Get started
In this section10xGraph is open-source, self-hosted infrastructure for AI applications. Install the library, build an agent, deploy the API server, and call it from TypeScript.
- 14 pages
- About 96 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. MIT licensed, by 10xScale. Formerly Agentflow. A tool that finished before a crash is not run twice on replay, with the exceptions listed under limits. The Platform overview lists everything the server handles. 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 three questions: name, template and provider. |
| 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.
Secure by the third step
The quickstart server starts open so you can try it, then turns on JWT near the end, and you watch the server return 401 without a token and 404 when a second user reads the first user’s thread. With auth configured, the server also turns on owner-only thread access, so you do not write that code. Security in five minutes explains that step; it needs one config key and one environment variable.
The three-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 |
| 3. Security in five minutes | 5 min | JWT auth on, two users, a 401 for no token and a 404 for someone else’s thread |
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 |
| Project structure | 5 min | What the Full setup generates |
Prerequisites
To get started, 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 18 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 published under the name “Agentflow” until 2026. The Python library now imports from tenxgraph (for example from tenxgraph.core.graph import StateGraph), the PyPI package is 10xgraph, and the command is 10xgraph. The old agentflow imports still work as a deprecated alias until version 2.0. The old package name 10xscale-agentflow is no longer updated; install 10xgraph instead.
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 and tracing.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. Every part is replaceable.10 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.6 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 the Docker files.10 min
- Security in five minutesTurn on JWT auth for the quickstart agent, create tokens for two users, and watch the server reject a missing token and a second user reading the first user's thread.4 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.7 min
- Build a graph by handBuild a 10xGraph agent with a tool by hand, route between the agent and tool nodes, then compare it with ReactAgent.6 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.5 min
- Serve and inspectStart the 10xGraph API server, test with curl, and use the playground to inspect your agent's behavior.6 min
- Call from your appCall your running 10xGraph agent server from a TypeScript app with 10xgraph-client: invoke, stream, keep a thread and send an auth token.7 min
- Stream and approveStream an agent run in Python with astream(), pause it for human approval with interrupt(), then resume the same thread with a decision.6 min
- Test and evaluateWrite a unit test with a mocked model, then run a small evaluation set against your weather agent with the 10xgraph eval command.7 min