Reference
Python API
Core types and public classes exported from agentdeck, plus the protocol SPI in
agentdeck.bindings.
Exports
Deck: Unified composition root.Agent: Declarative agent specification.tool: Decorator declaring a leaf capability.workflow: Decorator declaring orchestration as an async function.ToolCtx: The context a tool receives.WorkflowCtx:ToolCtxplus orchestration, for a@workflowbody.AgentInstance: One agent as something runnable: whatctx.agentis andctx.agents.create()mints.Run: A deck-bound handle on one run:status(),pause(),resume(),cancel(),pending(),answer(),events().TurnResult: One agent turn's outcome, whatdeck.run()returns:output,usage,run_id,session_id.Observer: One consumer of a deck's event stream, forDeck(observers=[...]).Event: One canonical event, whatrun.events()yields and anObserverreceives.RunStatus: A run's lifecycle state, whatdeck.runs.list(status=...)filters on.views: Declarative predicates over the event stream, composed with|,&and~.__version__: The installed version.
Content blocks
What deck.run() takes instead of a plain string, and what a run reports back.
ContentBlock: The union of the block types below.TextBlock: Prose.ImageBlock: An image inline, base64.AudioBlock: Audio inline, base64.ResourceBlock: Bytes held elsewhere, referenced rather than carried.DataBlock: JSON as content.
Bindings
From agentdeck.bindings, not the root package. Native, Terminal and AGUI resolve lazily, so
importing the SPI pulls in neither an HTTP stack nor the AG-UI models. The guide is
Bindings.
Native: AgentDeck's own HTTP/SSE protocol, viaNative.http().Terminal: one session per process, viaTerminal.stdio().AGUI: the AG-UI protocol, viaAGUI.http(); needs theaguiextra.Binding: the contract a binding implements:info,build(),start(),stop().BindingInfo: what a binding declares about itself, including what itadvertises.Endpoint:HttpEndpoint | StdioEndpoint, whatbuild()returns.HttpEndpoint: an ASGI app mounted at a path.StdioEndpoint: a coroutine over stdin and stdout, with no port opened.Exposure: hosts a validated set of bindings, whatdeck.expose()returns.DeckGateway: the whole surface a binding may touch on a deck.TargetInfo: one agent or workflow a protocol may start a run against.Capabilities: what varies by deployment rather than by run.GatewayError: a gateway call that failed, carrying aGatewayFailureCode.GatewayFailureCode: why it failed, for a binding to map onto its own protocol.PROTOCOL_SPI_VERSION: the SPI version a binding declares. Frozen at 1.