API reference
Four surfaces, one system. Pick the one you are calling from.
Python library
The graph engine, agents, tools, state, storage, and the evaluation harness.
Everything importable from agentflow.*.
| Start with | For |
|---|---|
| Graph | StateGraph, CompiledGraph, START, END, invoke, stream |
| Agent | Agent, ToolNode, and how a model is wired into a node |
| State and Messages | AgentState, Message, content blocks |
| Tools | The @tool decorator and tool signatures |
| Checkpointers | InMemoryCheckpointer, PgCheckpointer, durability |
| Memory stores | Cross-thread memory and vector backends |
| Evaluation | EvalSet, EvalCase, and how a run is scored |
REST and WebSocket API
What the API server exposes once you run agentflow api.
The server generates its own OpenAPI schema, so the authoritative contract for your build is always available locally:
| Surface | Default path | Setting |
|---|---|---|
| Swagger UI | http://127.0.0.1:8000/docs | DOCS_PATH |
| ReDoc | http://127.0.0.1:8000/redocs | REDOCS_PATH |
| OpenAPI JSON | http://127.0.0.1:8000/openapi.json | FastAPI default, always on |
Set DOCS_PATH and REDOCS_PATH to empty values in production to turn the
interactive docs off; the server warns if they are left on. Note that the raw
schema at /openapi.json stays available regardless, so block it at the proxy
if you do not want it public.
| Group | Covers |
|---|---|
| Graph | Invoke and stream a compiled graph |
| Live WebSocket | Bidirectional runs and realtime audio |
| Threads | Conversation history and thread management |
| Memory store | Store, search, list, forget |
| Files | Upload and retrieval |
| Observability | Run inspection |
| Evals | Running evaluations over HTTP |
| Ping | Health check used by probes |
CLI and configuration
| Page | Covers |
|---|---|
| Commands | init, api, play, build, eval, test, skills, version |
| Configuration | Every agentflow.json key |
| Environment | Every environment variable |
| Auth | JWT and custom BaseAuth |
| Rate limiting | Backends and limits |
TypeScript client
@10xscale/agentflow-client, framework-agnostic and fully typed.
| Page | Covers |
|---|---|
| AgentFlowClient | Construction and shared options |
| Invoke and Stream | Running an agent |
| Realtime | Audio sessions |
| Threads, Memory, Files | Everything else the server exposes |
Conventions used here
- Signatures are the real ones. If a page and the source disagree, the source is right and the page is a bug: please report it.
- Async methods are marked. Most Python entry points have both an
asyncversion and a sync wrapper, and the reference names both. - Defaults are stated explicitly, including when the default is
None. - Error codes are listed with the condition that raises them. The full index is in error codes.
Reference pages describe what things are. For task-shaped questions, start from the how-to guides.