API reference¶
Generated from the docstrings. One page per public module. Each name is documented once, under the path you import it from.
Where to import from¶
| Import from | Names |
|---|---|
agent_adapter |
The everyday names in agent_adapter.__all__: Registry, tool, wrap, default_registry, ToolSpec, Executor, run_tool_loop, the approval policies and stores, the built-in hooks, Ledger, Flow, the message types and the five most caught errors |
agent_adapter.errors |
Every other error, plus ErrorInfo |
A subpackage (agent_adapter.exec, .hooks, .approval, ...) |
Everything else, such as ShortCircuit from agent_adapter.hooks |
| The port's subpackage | The ports you implement: LLMPort, PromptCachePlugin, ModelCaps from .models; CachePort from .cache; LedgerPort from .cost; EventSink from .tracing; ApprovalPort from .approval; EmbeddingPort from .embeddings |
import agent_adapter is cheap: each name loads on first use.
A subpackage page links the top-level names it re-exports instead of repeating them.
flowchart LR
T["agent_adapter<br/>top level"] --> S["subpackages<br/>exec · hooks · approval · flow · ..."]
T --> E["agent_adapter.errors"]
S --> I["integrations.<framework>"]
Pages¶
| Page | Modules |
|---|---|
| Top level | agent_adapter |
| Errors | agent_adapter.errors: the error catalogue (kind, cause, fix) |
| Executor | agent_adapter.exec, .exec.control, .exec.integration |
| Hooks | agent_adapter.hooks, .hooks.builtin |
| Approval | agent_adapter.approval |
| Flows | agent_adapter.flow, .flow.runner, .flow.visit |
| Cost | agent_adapter.cost |
| Cache | agent_adapter.cache, .cache.providers |
| Embeddings | agent_adapter.embeddings |
| Memory | agent_adapter.memory |
| Retrieval | agent_adapter.retrieval |
| Sandbox | agent_adapter.sandbox |
| Policy | agent_adapter.policy |
| Audit log | agent_adapter.audit |
| Context compression | agent_adapter.context, agent_adapter.context.formats |
| Runtime | agent_adapter.runtime |
| Tracing | agent_adapter.tracing |
| Models | agent_adapter.models and its provider modules |
| HTTP server | agent_adapter.server, .server.asgi, .server.service |
| Handlers | agent_adapter.handlers |
| Chat contract | agent_adapter.chat: what a chat agent receives and returns |
| Run viewer | agent_adapter.viewer: record(), the recorder and the local viewer |
| Model APIs, protocols and importers | integrations.openai, .gemini, .anthropic, .langchain, .openapi, .mcp, .a2a, .ag_ui |
| Agent frameworks | integrations.langgraph, .adk, .openai_agents and 14 more |
| Durable engines | integrations.temporal, .dbos |
| Protocol and discovery | integrations.base, .discovery |
| Evals | agent_adapter.evals, .evals.graders |
| Optimiser | agent_adapter.optimiser, .optimiser.graders |
| CLI | the agent-adapter command: init templates, doctor |
Framework modules import their framework lazily: install the extra to call them (see Integrations). Terms are defined in the Glossary.
tests/docs/test_reference_pages.py fails when a public name is missing here,
rendered twice, or rendered under a path that is not its import path.