Get started
In this section10xGraph is open-source, self-hosted infrastructure for AI applications. Install it, build an agent, deploy the API server and call it from TypeScript.
- 13 pages
- About 77 min to read all
10xGraph is open-source, self-hosted infrastructure for AI applications. You write the agents, tools and tasks; 10xGraph runs them behind an API server with authentication, role-based access, tenant isolation, durable state in Postgres and Redis, background jobs, metrics and tracing, and generates Docker and Kubernetes deploy files. This section takes you from an empty folder to a secured, running server.
How you work with 10xGraph
| Step | Command | What happens |
|---|---|---|
| 1 | 10xgraph init |
Scaffolds a project. It asks for the setup (Quick or Full), agent name and AI provider (Full also asks for storage, auth, background worker and extras). |
| 2 | 10xgraph dev |
Starts the API server on 127.0.0.1:8000 and opens the playground in your browser. Chat with your agent and inspect threads and runs. No frontend to write. |
| 3 | 10xgraph config |
Opens a browser editor for every server setting in 10xgraph.json. |
Later, 10xgraph build writes the Docker and Kubernetes files for deployment. Details are in Playground.
The two-step path
| Step | Time | What you get |
|---|---|---|
| 1. Install | 5 min | The library, the API server and CLI, and the TypeScript client, with a provider key set |
| 2. Quickstart: first agent | 10 min | A support agent scaffolded with 10xgraph init, tried in the playground, called from curl and TypeScript, with JWT on and Docker files written |
After that, read Production readiness for what the server gives you and what stays your job, then the production checklist before you deploy.
The three packages
- Core library (
10xgraph, importtenxgraph):StateGraph, the prebuiltReactAgentand other agents, tools, checkpointing and memory. You can run an agent from Python with no server. - API server and CLI (
10xgraph-api, importtenxgraph_api, command10xgraph): REST, WebSocket and realtime audio endpoints generated from your compiled graph, plus auth, authorization, rate limiting, thread and memory routes, and10xgraph buildfor Docker and Kubernetes files. - TypeScript client (
10xgraph-client, classTenxGraphClient): typed invoke, stream, threads, memory and files for Node.js and browsers.
Go deeper
The tutorial builds one agent across several pages, so follow it in order. Skip it if you only want a running server.
| Page | Time | What you learn |
|---|---|---|
| Tutorial: Mental model | 10 min | Messages, state, nodes, edges, graphs, agents and threads |
| Tutorial: Build a graph | 15 min | A graph by hand, tools, and when to use ReactAgent or a custom graph |
| Tutorial: Threads and memory | 10 min | Persistent memory across invocations with checkpointers |
| Tutorial: Serve and inspect | 10 min | The Swagger UI, the playground and reading thread state |
| Tutorial: Call from your app | 10 min | A front end with the TypeScript client, streaming and sessions |
| Tutorial: Stream and approve | 10 min | Streaming and pausing for human approval |
| Tutorial: Test and evaluate | 10 min | Offline tests with TestAgent and an eval run |
| Project structure | 5 min | What the Full setup generates |
Prerequisites
You need:
- Python 3.12 or newer
- An API key for one LLM provider:
OPENAI_API_KEY,GEMINI_API_KEY(orGOOGLE_API_KEY), orANTHROPIC_API_KEY - Node 20 or newer and npm (optional, for the TypeScript client)
The next major section, Concepts, explains how everything works under the hood. Guides covers task-oriented recipes (add memory, use MCP, deploy to Kubernetes), and API reference documents every class, function, and route.
Rename note
10xGraph was called Agentflow. The old agentflow import and command still work until 2.0; see Coming from agentflow.
All pages in Get started
- Introduction10xGraph (formerly Agentflow) is open-source, self-hosted infrastructure for AI apps: API server, auth and roles, tenant isolation, durable state, jobs.5 min
- Why 10xGraph: you write the AI logic, it runs the infrastructureYou write the agents, tools and tasks. 10xGraph runs them with auth, roles, tenant isolation, durable state, jobs, metrics and deploy files. All replaceable.9 min
- InstallationInstall 10xGraph and the API server with pip on Python 3.12 or newer, add provider extras and a checkpointer, verify the CLI, and install the TypeScript client.5 min
- QuickstartScaffold a support agent with 10xgraph init, chat with it in the playground, call the API with curl and TypeScript, turn on JWT auth and generate Docker files.10 min
Tutorial
- Mental ModelLearn the seven ideas behind every 10xGraph agent (message, state, node, edge, graph, agent, thread) and the seven tutorial steps that build on them.6 min
- Build a graph by handBuild a 10xGraph agent by hand with an Agent node, a ToolNode and a conditional edge that loops until done, then rebuild it with ReactAgent.5 min
- Add Memory with ThreadsGive your agent conversation memory with thread IDs and checkpointers, persist state across calls, and tell thread memory apart from long-term memory.4 min
- Serve and inspectStart the 10xGraph API server with 10xgraph dev, test it with curl, read thread state over REST and inspect your agent's behavior in the hosted playground.5 min
- Call from your appCall your running 10xGraph agent server from a TypeScript app with 10xgraph-client: invoke, stream, keep a thread_id and send an auth token.5 min
- Stream and approveStream an agent run in Python with astream(), pause it for human approval with interrupt() inside a tool, then resume the same thread with a decision.5 min
- Test and evaluateWrite an offline unit test with a mocked TestAgent model, then run a small evaluation set against your weather agent with the 10xgraph eval command.5 min
Next steps
- Project structureSee every file that 10xgraph init --mode full generates, what each one does, and which 10xgraph.json keys init writes for you in a JWT-protected project.9 min
- Coming from agentflowMigrate from Agentflow to 10xGraph step by step: the new package, import, 10xgraph command, 10xgraph.json config and environment variable names.4 min