Reference

In this sectionReference for 10xGraph: the Python library, the REST and WebSocket API, the CLI and 10xgraph.json configuration, and the typed TypeScript client.

  • 49 pages
  • About 306 min to read all

The 10xGraph reference documents four surfaces of one system: the Python library, the REST and WebSocket API that the server generates from your graph, the CLI with its 10xgraph.json configuration, and the TypeScript client. It is for developers who already know what they want to call and need exact signatures, options and error conditions. Pick the surface you are calling from.

Start here

Python developers should open Graph and Agent first: they define StateGraph, CompiledGraph, invoke, stream and how a model is wired into a node. Checkpointers matters for production, because durable threads and replay-safe tool calls depend on one.

If you run the server, the CLI commands and configuration pages cover every 10xgraph.json key, with auth and rate limiting for the production settings. Frontend developers should start with AgentFlowClient and Stream. The REST contract starts at conventions and the graph endpoints.

If you do not yet know which call you need, the how-to guides are organized by task.

Python library

The graph engine, agents, tools, state, storage, and the evaluation harness. Everything importable from tenxgraph.*.

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 10xgraph.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 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.

All pages in Reference

Python library

  1. GraphStateGraph, CompiledGraph, START, END — the core execution engine of 10xGraph.8 min
  2. AgentThe Agent class — a smart node that handles LLM calls, tool use, memory, skills, and retries.6 min
  3. LLM Utilitiescall_llm, create_llm_client, detect_provider, and the default LLM timeout controls exported from tenxgraph.core.llm.4 min
  4. SkillsSkillConfig, SkillMeta and SkillsRegistry — load Agent Skills (agentskills.io) into an Agent and let the model activate them on demand.10 min
  5. StateAgentState, custom state, reducers, and the add_messages pattern for 10xGraph.4 min
  6. MessagesMessage, ContentBlock types, MediaRef, TokenUsages — the wire format for all agent communication.7 min
  7. ToolsToolNode — the unified tool registry and executor for local functions, MCP, Composio, and LangChain tools.4 min
  8. StreamEmitterEmit live progress, errors, and status updates from tools during streaming execution.6 min
  9. CheckpointersBaseCheckpointer, InMemoryCheckpointer, PgCheckpointer, SqliteCheckpointer — state persistence for conversation threads.7 min
  10. Memory storesBaseStore, QdrantStore, Mem0Store — long-term semantic memory for agents.5 min
  11. MediaMediaOffloadPolicy, ensure_media_offloaded, BaseMediaStore, MediaRefResolver — handling large binary content in agent messages.5 min
  12. PublishersReference for ConsolePublisher, RedisPublisher, KafkaPublisher, RabbitMQPublisher, OtelPublisher, LogfirePublisher, and LangsmithPublisher event publishers.9 min
  13. RealtimeAPI reference for realtime audio-to-audio, including LiveInputQueue, RealtimeConfig, VADConfig, ReconnectConfig, AudioAgent, and the WebSocket bridge protocol.13 min
  14. TestingTestAgent, QuickTest, TestResult, MockMCPClient — test 10xGraph graphs without making LLM API calls.4 min
  15. EvaluationAgentEvaluator, EvalSet, EvalCase, EvalConfig, EvalReport and TrajectoryCollector — how a scored evaluation run is wired together.14 min
  16. Evaluation criteriaConstructor signatures, defaults and scoring behaviour for every built-in evaluation criterion class in tenxgraph.qa.evaluation.criteria.9 min
  17. Evaluation harnessEvaluationRunner, ReporterManager, ExecutionResult and the pytest helpers for writing 10xGraph eval tests, with real signatures and defaults.10 min
  18. Context ManagerBaseContextManager and MessageContextManager — trim and bound the agent's message history before each LLM call.2 min
  19. Callback ManagerCallbackManager, BeforeInvokeCallback, AfterInvokeCallback, OnErrorCallback, BaseValidator, PromptInjectionValidator — hook into every LLM, tool, and MCP4 min
  20. Lifecycle CallbacksGraphLifecycleHook, GraphLifecycleContext — hook into graph-level events (start, end, error, interrupt, resume, checkpoint, state update).13 min
  21. Background Task ManagerBackgroundTaskManager — launch and track asyncio tasks from node functions without blocking the graph response.4 min
  22. ID GeneratorBaseIDGenerator and built-in implementations — control the format of thread IDs, run IDs, and other identifiers generated by the framework.3 min
  23. Command & HandoffCommand and create_handoff_tool — control graph routing from inside nodes and transfer execution between agents.4 min

REST API

  1. Conventions and permissionsThe 10xGraph REST API response envelope, HTTP and WebSocket authentication, the endpoint permission table, and the HTTP status codes the server returns.3 min
  2. Graph endpointsReference for the 10xGraph REST endpoints that invoke, stream, stop, and inspect a graph, with request bodies, responses, and auth requirements.7 min
  3. Live WebSocket endpointsReference for the WS /v1/graph/live WebSocket endpoint that bridges audio to a realtime AudioAgent (Gemini Live): init frame, binary and JSON frames, auth.8 min
  4. Thread endpointsReference for the 10xGraph REST endpoints that read and write thread state and messages, with request fields, responses, and auth requirements.4 min
  5. Memory store endpointsReference for /v1/store — storing, searching, listing, updating, deleting, and forgetting memories through the 10xGraph API server.4 min
  6. File upload endpointsReference for the 10xGraph REST endpoints that upload files and retrieve them, with request fields, responses, and authentication requirements.2 min
  7. Observability endpointsReference for the GET /v1/observability/{thread_id} endpoint that reconstructs a run trace with spans, events, and token usage.4 min
  8. Eval endpointsReference for the eval run listing and detail endpoints that serve 10xgraph eval reports over HTTP, including their public, unauthenticated status.4 min
  9. Health check endpointGET /ping is the unauthenticated health check of the 10xGraph API server, used for Kubernetes probes, Docker HEALTHCHECK and load balancers.2 min

CLI and configuration

  1. CLI referenceEvery 10xGraph CLI command with its purpose, usage line, options and defaults: init, api, play, dev, build, eval, test, skills, audit, config, demo and version.6 min
  2. 10xgraph.json referenceEvery 10xgraph.json key the server and CLI read, with types, defaults and examples, the rate_limit sub-keys, and the environment variables the API server uses.8 min
  3. AuthenticationHow to configure JWT auth or a custom auth backend for the 10xGraph API.12 min
  4. Rate LimitingComplete reference for the rate_limit block in 10xgraph.json: the backends, limits, and every option for throttling requests to the 10xGraph API server.5 min
  5. Environment VariablesReference for every environment variable the 10xGraph API server recognizes, grouped by area such as auth, CORS, logging, and Snowflake ID settings.8 min
  6. Thread Name Generator10xGraph can optionally generate user-friendly thread names for new conversation threads.1 min
  7. ID Generator10xGraph uses ID generators to create unique identifiers for threads, messages, and other persisted records.3 min

TypeScript client

  1. AgentFlowClientComplete reference for the AgentFlowClient class — the main entry point for calling 10xGraph from TypeScript or JavaScript.9 min
  2. Graph controlReference for graph-control methods on the TypeScript client: ping, graph, graphTools, observability, graphStateSchema, stopGraph, fixGraph, and setup.7 min
  3. MessageReference for the Message class and all content block types in the 10xGraph TypeScript client.10 min
  4. invoke()Reference for the AgentFlowClient.invoke() method — send messages and receive the final state.5 min
  5. stream()Reference for the AgentFlowClient.stream() method — receive real-time streaming chunks from the agent.5 min
  6. realtime()Reference for the AgentFlowClient.realtime() method and the RealtimeSession class — a transport-only audio-to-audio client for the /v1/graph/live WebSocket.9 min
  7. ThreadsReference for all thread, state, and message methods on AgentFlowClient.7 min
  8. MemoryReference for all memory store methods on AgentFlowClient, store, search, list, update, and delete memories.6 min
  9. FilesReference for file upload and media access methods on AgentFlowClient.5 min
  10. AuthReference for all authentication options available in AgentFlowClient.7 min