Write your AI logic. 10xGraph runs the infrastructure.
The open-source backend for AI products you ship to your own customers. Auth, roles, tenant isolation, durable state, background jobs, metrics and an audit log come with the install. One command writes your Docker and Kubernetes files.
An editor types a short agent.py and a 10xgraph.json with JWT authentication that reads the tenant from the org_id claim, a Redis cache store, a Redis stream worker broker and the audit log turned on. The editor tilts into an isometric base, and the infrastructure rises on top of it in layers: validators for prompt injection, rate limits shared through Redis, access with roles and a reach of own, tenant or all, authentication with JWT or your own class, and the API server on port 8000. PostgreSQL, Redis and Kubernetes pods, including a worker pod, slide in beside it. Requests from a TypeScript client travel down through the layers and a request log lists each one: an expired token gets 401 EXPIRED_TOKEN, a thread in another tenant gets 404, a burst gets 429 with a retry-after of 12 seconds, a prompt injection gets 422 prompt injection blocked, and a report task gets 202 task make_report queued. When a pod is lost mid-refund, a new pod resumes and the refund is skipped because it is already in the ledger. The traffic is illustrative.
writing agent.pyyou write10xGraph generatesyour infra
agent.py10xgraph.json
$
illustrative traffic
Runs Zilogue in productionMIT licensedSelf-hosted on your infrastructureOpenAI, Anthropic, Gemini, Vertex AI, Bedrock and any MCP server
01The problem
What is 10xGraph?
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.
License
MIT
Runtime
Python 3.12+
Status
1.0
Updated
November 2026
The backend you do not have to write
Most agent frameworks stop at the graph. Shipping it to customers means building this layer yourself or buying a hosted platform.
Without 10xGraph, you build
With 10xGraph
An API server with streaming and WebSockets
Generated from your graph
Login, roles and per-customer data isolation
One auth block in 10xgraph.json
Thread storage, caching and long-term memory
Postgres and Redis built in, any database pluggable
One call from your app, through every layer it passes on the way to an answer. You write the agent. The rest is the install.
Step 1 of 7 · Your app calls
Step 1 of 7
One stack, Python backend to TypeScript frontend
An official typed TypeScript client covers invoke, streaming, threads, memory and files. Tools can run in the user's browser through remote tools.
REST, SSE streaming, WebSocket, realtime audio and AG-UI endpoints, generated from your graph.
agent.pypython
from tenxgraph.prebuilt.agent import ReactAgent
def lookup_order(order_id: str) -> str:
"""Look up an order by id."""
...
agent = ReactAgent(
model="google/gemini-2.5-flash",
system_prompt=[{"role": "system", "content": "You are a support agent."}],
tools=[lookup_order],
)
app.tstypescript
import { TenxGraphClient, Message } from'10xgraph-client';
const client = new TenxGraphClient({
baseUrl: 'https://agents.example.com',
authToken: userJwt, // same JWT the API checks
});
const question = Message.text_message('Where is order A-1042?', 'user');
for await (const chunk of client.stream([question])) {
if (chunk.event === 'message') render(chunk.message?.content);
}
Crash mid-run. Resume without charging the card twice.
A process can die between two tool calls. When the run resumes, 10xGraph replays the interrupted step but checks a tool ledger first, so tools that already finished are skipped instead of executed again.
Run 1thread order-1042
lookup_orderran · recorded
charge_cardran · recorded
send_receiptprocess killed
Resumesame thread
lookup_orderskipped · in ledger
charge_cardskipped · in ledger
send_receiptran · recorded
Requires a checkpointer. Ledger entries are keyed by the assistant message that issued the call plus the tool call id. A crash before a tool returns, or in the short gap before its record is written, can repeat that tool, so send an idempotency key derived from stable inputs to payment providers. Limits
Tool ledger
Each completed tool call is recorded as soon as it returns. Keys include the issuing message, so models that reuse ids like call_1 never collide across turns.
Versioned state writes
Durable writes use an optimistic version check, so two runs on the same thread cannot overwrite each other. The Redis cache is version-guarded too.
Real timeouts
node_timeout and tool_timeout stop a hung tool from holding a worker forever.
Postgres and Redis by default. Your database if you prefer.
Active conversations need fast reads, history needs to be durable, memory needs search. 10xGraph ships a store for each, and every one of them can be replaced.
Hot state
Active thread state is cached in Redis on every step and read first, so a busy thread does not hit the database. Valkey, Dragonfly and KeyDB work too.
Durable history
Threads and messages in PostgreSQL with versioned writes, so two runs cannot overwrite each other. SQLite for local work.
Long-term memory
pgvector in the same Postgres for vector, full-text or hybrid search, or Qdrant as a dedicated vector service.
Bring your own database
Each storage layer is one interface. Implement BaseCheckpointer or BaseStore for the database you already run and pass it to compile(); point cache_store at a BaseCacheStore for shared server state. The API, auth, tenancy and jobs work the same on top.
Reports, ingestion and nightly cleanups run on a worker, not in the request. The worker loads your graph, storage and auth config the same way the API does.
tasks.pypython
from tenxgraph_api.jobs import broker
@broker.task(task_name="make_report", http=True)
async def make_report(topic: str, config: dict) -> dict:
# config["user"] is the identity of the caller who queued it
...
$ 10xgraph worker
$ 10xgraph scheduler
Start from Python or over HTTP
Queue a task in code or with POST /v1/tasks/{name}; read progress and cancel it.
Runs as the caller
A task carries the identity of the user who queued it, so access rules still apply.
Cron and brokers
Schedule with cron. Redis Streams, RabbitMQ or Kafka as the broker.
Zilogue, the AI interview platform for hiring teams, runs on 10xGraph in production. It is built by 10xScale, the team that builds and maintains 10xGraph, so the maintainers depend on it in their own product.
Built for teams going through SOC 2 and ISO 27001 audits
10xGraph is software you run, so the audit covers your organization and your deployment. The control mapping lists each SOC 2 and ISO 27001 control, the feature you can point to as evidence, and what stays yours.
Still deciding? These are the questions teams ask before they adopt 10xGraph.
What is 10xGraph?
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.
What do I write, and what does 10xGraph run for me?
You write the agents, tools, tasks and prompts in Python. 10xGraph runs the API server, authentication, roles and tenant isolation, durable state, background jobs, metrics, tracing and the audit log, and writes the Docker and Kubernetes files.
Why not use an agent framework with my own FastAPI server?
You can. You would then write and maintain the API server, authentication and roles, the tenant filter in every query, the job worker, metrics and the deploy files yourself. 10xGraph ships that layer as one install, and each part can still be replaced: the auth class, the storage backends and the cache store.
How does it keep tenants apart?
Your auth class verifies the token. Roles give permissions and a reach of own, tenant or all. Tenant columns on the checkpointer and store are filled from the verified identity, and every query filters by them. A thread from another tenant answers 404. Row-level security in Postgres is opt-in.
Is authentication on by default?
No. Auth is off until you configure it, which suits local development. The Full setup in 10xgraph init turns on JWT auth, rate limits and token revocation.
What do I have to run in production?
The API server, Postgres for durable state, and Redis for the cache store once you run more than one worker. The job worker and the scheduler are separate processes that you start only if you use background jobs. 10xgraph build writes the Dockerfile, docker-compose.yml and Kubernetes manifest for them.
What happens if the server crashes mid-run?
With a checkpointer configured, 10xGraph records the current node before running it and keeps a ledger of every completed tool call. When the run resumes, on the same process or a new pod, the interrupted node runs again, but any tool call already in the ledger is skipped instead of executed. A payment tool that finished before the crash does not charge the card a second time. A crash before a tool returns, or in the short gap before its record is written, can still repeat that tool, so give payment and other side-effecting tools an idempotency key derived from stable inputs.
Can it run background jobs?
Yes. 10xgraph worker runs your Python tasks and 10xgraph scheduler runs cron schedules, on Redis Streams, RabbitMQ or Kafka. Tasks are built on TaskIQ. A task runs as the user who queued it.
Is it only for agents?
Agents are the main workload, and the graph engine is part of the install. Background jobs run any Python task on a worker with the same identity and access rules.
Do I have to use Postgres?
No. Postgres and Redis are the defaults, and SQLite works for local development. Each storage layer is an interface, so you can write an adapter for the database you already run: BaseCheckpointer for threads, BaseStore for memory and BaseCacheStore for shared server state.
How does my frontend talk to the server?
Through the typed TypeScript client, installed with npm install 10xgraph-client. It covers invoke, streaming, threads, memory and file uploads, and it sends the same JWT the server checks. It works in Next.js, Vite and Node. Tools can also run in the browser, for work only the user's device can do.
Can I move an existing LangGraph agent to 10xGraph?
Yes. The graph model is similar: StateGraph, checkpointers and thread ids have direct equivalents, while message classes and prebuilt agents need replacing. The LangGraph comparison page in the docs lists the steps.
Does 10xGraph help with SOC 2 or ISO 27001?
10xGraph is software you run, so it holds no certification itself; your organization and deployment are what get audited. The control mapping shows which controls its features support, such as access control, rate limiting and the audit log, and which stay yours, such as encryption at rest and backups.
Do I need LangChain?
No. 10xGraph has no LangChain dependency.
Which models does it support?
OpenAI, Google Gemini (including Vertex AI) and Anthropic (direct API, Vertex AI and Amazon Bedrock), plus any OpenAI-compatible endpoint such as Ollama or vLLM.
Who uses 10xGraph in production?
Zilogue, an AI interview platform for hiring teams built by 10xScale, runs on 10xGraph in production. 10xScale builds and maintains 10xGraph.
Was 10xGraph previously called Agentflow?
Yes. 10xGraph was published as Agentflow, under the PyPI name 10xscale-agentflow, until 2026. The project was renamed because many unrelated tools share the Agentflow name. The Python package is now imported as tenxgraph. The old agentflow import path remains as a deprecated alias until 2.0, so existing code keeps working while you switch to the new package names.
Ship your AI product with auth, tenancy, jobs and deployment already done.