TypeScript Architecture
Reference for @band-ai/sdk 1.0.0.
Architecture
The table maps names when moving between the Python SDK and @band-ai/sdk 1.0.0. Use each language reference for its lifecycle, configuration and adapter behavior. Its source is under packages/sdk/src.
Differences an adapter author sees:
onMessage(message, tools, history, participantsMessage, contactsMessage, { isSessionBootstrap, roomId })replaceson_message(), and a subclass sets the abstractproviderstring that names it in failure reports.relayReply(tools, text, mentions)from@band-ai/sdk/coreposts the model’s final text unless the turn already replied, andrenderSystemPrompt()from@band-ai/sdk/runtimebuilds Band’s instructions.- Tool schemas come from
TOOL_MODELS, throughtools.getToolSchemas("openai" | "anthropic"). Optional tool groups are set agent-wide withlinkOptions.capabilities; see Tool capabilities. - Keep per-room state in a
Mapkeyed by room ID and release it inonCleanup(roomId).