adapter | FrameworkAdapter | Required | The adapter that handles each turn |
config | AgentCredentials | None | { agentId, apiKey, wsUrl?, restUrl? }, as returned by the config loaders |
agentId | string | config.agentId | Agent UUID; wins over config |
apiKey | string | config.apiKey | Agent API key; wins over config |
wsUrl | string | config.wsUrl, then wss://app.band.ai/api/v1/socket | Phoenix socket base URL. The client appends /websocket |
restUrl | string | config.restUrl, then derived from wsUrl | REST base URL. Derivation keeps the host and maps ws: to http:, wss: to https: |
agentConfig | AgentConfig | {} | Room behavior. See AgentConfig |
sessionConfig | SessionConfig | See SessionConfig | Per-room context and retry behavior |
contactConfig | ContactEventConfig | { strategy: "disabled" } | Contact event handling. See Contacts and Discovery |
logger | Logger | NoopLogger | Receives SDK logs. See Logging |
shutdownTimeoutMs | number | null | 30000 | Timeout in milliseconds that run() passes to stop() at shutdown |
roomFilter | (room) => boolean | Accept every room | Rooms for which it returns false are not joined |
identity | { name, description? } | Fetched from the platform | Agent name and description to use instead of the platform profile |
linkOptions | object | None | Transport options, including capabilities (see Tool capabilities) and conflictPolicy, "supersede" or "reject", for a second connection with the same agent ID |
preprocessor | Preprocessor | DefaultPreprocessor | Filters and shapes platform events before they reach the adapter |
onParticipantAdded | (roomId, participant) => void | None | Called when a participant joins a room the agent is in |
onParticipantRemoved | (roomId, participantId) => void | None | Called when a participant leaves |
link | BandLink | Built from the credentials | A prebuilt transport, mainly for tests |
contextFactory | (roomId, defaults) => ExecutionContext | Built in | Replaces the per-room execution context, mainly for tests |