Skip to main content

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 withFor
GraphStateGraph, CompiledGraph, START, END, invoke, stream
AgentAgent, ToolNode, and how a model is wired into a node
State and MessagesAgentState, Message, content blocks
ToolsThe @tool decorator and tool signatures
CheckpointersInMemoryCheckpointer, PgCheckpointer, durability
Memory storesCross-thread memory and vector backends
EvaluationEvalSet, 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:

SurfaceDefault pathSetting
Swagger UIhttp://127.0.0.1:8000/docsDOCS_PATH
ReDochttp://127.0.0.1:8000/redocsREDOCS_PATH
OpenAPI JSONhttp://127.0.0.1:8000/openapi.jsonFastAPI 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.

GroupCovers
GraphInvoke and stream a compiled graph
Live WebSocketBidirectional runs and realtime audio
ThreadsConversation history and thread management
Memory storeStore, search, list, forget
FilesUpload and retrieval
ObservabilityRun inspection
EvalsRunning evaluations over HTTP
PingHealth check used by probes

CLI and configuration

PageCovers
Commandsinit, api, play, build, eval, test, skills, version
ConfigurationEvery agentflow.json key
EnvironmentEvery environment variable
AuthJWT and custom BaseAuth
Rate limitingBackends and limits

TypeScript client

@10xscale/agentflow-client, framework-agnostic and fully typed.

PageCovers
AgentFlowClientConstruction and shared options
Invoke and StreamRunning an agent
RealtimeAudio sessions
Threads, Memory, FilesEverything 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 async version 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.