SDK Reference
Reference for the Band Python SDK.
Installation
Base package
Adapter extras
Core Agent API
The Agent class is the main entry point for creating and running Band-connected agents.
Agent.create()
Factory method that creates an Agent with platform connectivity.
Agent lifecycle methods
Agent properties
Example
Configuration
AgentConfig
SessionConfig
ContactEventConfig
Controls how contact requests and updates are processed.
See Contact Management for contact tool behavior, real-time contact events, and full examples of all three strategies.
Configuration files
load_agent_config() reads agent credentials from agent_config.yaml.
Runtime URLs and model provider keys can be set in .env:
Add both agent_config.yaml and .env to your .gitignore.
load_agent_config()
Adapter Reference
Common adapter options
Several adapters expose the same Band integration options. Individual adapter sections below list only their adapter-specific parameters.
Adapter features
Adapters declare which events they emit and which platform capabilities they use through the features parameter, built from the Emit and Capability enums:
Memory tools are enterprise-only.
The boolean flags enable_execution_reporting, enable_memory_tools, and enable_task_events are deprecated in favor of features. They still work but emit a DeprecationWarning, and passing both a boolean flag and features raises an error.
Adapter summary
LangGraphAdapter
Adapter for LangGraph-based agents with ReAct pattern.
Provide either llm for the simple pattern or graph_factory / graph for the advanced pattern.
See Common adapter options for custom_section, additional_tools, features, and history_converter.
AnthropicAdapter
Adapter for direct Anthropic SDK usage with a manual tool loop.
See Common adapter options for system_prompt, custom_section, features, history_converter, and additional_tools.
PydanticAIAdapter
Adapter for Pydantic AI agents with type-safe tools.
See Common adapter options for system_prompt, custom_section, features, history_converter, and additional_tools.
ClaudeSDKAdapter
Adapter for Claude Agent SDK with MCP server support.
See Common adapter options for custom_section, features, history_converter, and additional_tools.
A2AAdapter
Adapter for connecting to remote A2A-compliant agents.
A2AGatewayAdapter
Adapter that exposes Band peers as A2A HTTP endpoints.
CrewAIAdapter
Adapter for CrewAI-based agents with role, goal, and backstory definitions.
See Common adapter options for custom_section, features, history_converter, and additional_tools.
CodexAdapter
Adapter for OpenAI Codex CLI integration via JSON-RPC.
See Common adapter options for additional_tools, history_converter, and features. See CodexAdapterConfig for key configuration fields.
LettaAdapter
Adapter for Letta agents with persistent memory.
Operating modes:
per_room(default): Each room gets its own Letta agent with isolated memory.shared: One Letta agent shared across all rooms, with per-room isolation via the Conversations API.
See Common adapter options for features (passed to the adapter) and the custom_section option inside LettaAdapterConfig. See LettaAdapterConfig for key configuration fields.
ParlantAdapter
Adapter for Parlant behavioral engine integration.
See Common adapter options for system_prompt, custom_section, history_converter, and additional_tools.
SlackAdapter
Wraps an inner framework adapter (the brain) and bridges it into Slack. See the Slack Adapter tutorial for setup.
The adapter defaults its features and history converter to the inner adapter’s, so the brain’s capabilities flow through unchanged.
Adapter configuration objects
CodexAdapterConfig
CodexAdapterConfig has 30+ fields for fine-grained control. The table below lists the most commonly used parameters.
See the SDK source for the full list, including approval modes, task event options, and timeout settings.
LettaAdapterConfig
SlackApp
Configuration for one Slack app served by SlackAdapter. Required token combination depends on the adapter’s transport; passing the wrong combination raises ValueError at construction.
ACP integration
BandACPServerAdapter
Platform bridge for editor-facing ACP integrations.
Import BandACPServerAdapter from band.adapters. The PyPI package is band-sdk; the import module is band.
ACPServer
ACP protocol handler used with BandACPServerAdapter.
ACPServer implements these ACP methods: initialize, new_session, load_session, list_sessions, prompt, cancel_prompt, set_session_mode, and set_session_model.
ACPClientAdapter
Adapter for bridging Band rooms to an external ACP agent process.
Platform Tools
AgentToolsProtocol
Platform tools available to adapters. These tools are pre-bound to the current room unless noted otherwise.
Contact tool return shapes and contact event workflows are covered in Contact Management.
Memory tools are enterprise-only. Include them in generated schemas with include_memory=True.
ContactTools
ContactTools exposes the contact-management subset of AgentToolsProtocol for ContactEventStrategy.CALLBACK. It is agent-scoped, not room-bound, and uses method names without the band_ prefix.
See the CALLBACK strategy example for ContactTools usage.
Types
PlatformMessage
Immutable message from the platform.
AgentInput
Bundle of everything an adapter needs to process a message.
HistoryProvider
Lazy history conversion wrapper.