Open source · MIT · Self-hosted · Python 3.12+

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.

Build your first app

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.

illustrative traffic

Runs Zilogue in productionMIT licensedSelf-hosted on your infrastructureOpenAI, Anthropic, Gemini, Vertex AI, Bedrock and any MCP server

01 The 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 buildWith 10xGraph
An API server with streaming and WebSocketsGenerated from your graph
Login, roles and per-customer data isolationOne auth block in 10xgraph.json
Thread storage, caching and long-term memoryPostgres and Redis built in, any database pluggable
A job queue, worker and scheduler10xgraph worker and 10xgraph scheduler
Metrics, tracing and access logsPrometheus, OpenTelemetry, JSON logs, audit log
Dockerfiles and Kubernetes manifests10xgraph build

02 Follow one request

Follow one request through 10xGraph

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

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);
}
Step 2 of 7

Each customer sees only their own data

Your customers must never see each other's data. 10xGraph checks it in storage, on every route, from the verified token.

JWT or your own auth class. Roles with permissions and a reach of own, tenant or all. Rate limits, token revocation and prompt-injection validators.

Auth is off until you configure it. The Full setup in 10xgraph init turns it on.

  • Tenant from the token

    You declare tenant columns on the checkpointer and store. They are filled from claims your auth class verified, never from client input.

  • A foreign thread answers 404

    Another tenant's thread, message, memory or file is not found, so ids do not leak.

  • Reach per role

    Members see their own data. Admins can read across their tenant. Runs and writes stay with the caller.

  • Checked at boot

    The server refuses to start if a route has no permission guard or tenant claims and storage columns disagree.

10xgraph.jsonjson
{
  "auth": {
    "method": "jwt",
    "tenant_claims": ["org_id"],
    "roles": {
      "member": {"permissions": ["graph:*", "threads:*", "store:*", "files:*"], "reach": "own"},
      "org_admin": {"inherits": ["member"], "permissions": ["admin:read"], "reach": "tenant"}
    },
    "default_role": "member"
  }
}
  1. Token verified
  2. Roles resolved
  3. Permission checked
  4. Query filtered by tenant
  5. Foreign data: 404
Step 3 of 7

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

Step 4 of 7

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.

graph.pypython
from storage.my_db import MyCheckpointer, MyStore

app = graph.compile(
    checkpointer=MyCheckpointer(),
    store=MyStore(),
)

Bring your own backend →

Step 5 of 7

Background jobs with the same identity and rules

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.

Step 6 of 7

Metrics, traces and an audit log you own

Your logs and telemetry go to your own stack. Nothing is sent to 10xScale.

  • Metrics

    Prometheus metrics for the API and the worker.

  • Traces

    OpenTelemetry traces to Phoenix, Logfire, LangSmith or any OTLP backend.

  • JSON logs

    One JSON object per line with a request id, ready for your log pipeline.

  • Audit log

    A line for every access, denial and change: who, which tenant, which resource, allowed or not. Never prompts or answers.

audit logjson
{"event": "access", "user_id": "u-42", "tenant": {"org_id": "acme"}, "action": "threads:read", "resource": "thread/abc123", "result": "denied"}
Step 7 of 7

10xgraph build writes the Dockerfile, docker-compose.yml and a Kubernetes manifest, with liveness and readiness probes.

Three commands from empty folder to running service

  1. 01
    $10xgraph init

    Scaffold a project. Three questions: name, setup, provider. The Full setup turns on auth, rate limits and token revocation.

  2. 02
    $10xgraph dev

    Start the API server and open the playground. Chat with your agent, inspect threads and runs.

  3. 03
    $10xgraph build

    Write the Dockerfile, and with flags docker-compose.yml and a Kubernetes manifest.

03 Proof and trust

In production

Zilogue runs on 10xGraph

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.

113 releases, 331 commits in the last 30 days. Maintainers, Changelog, Security.

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.

Evidence 10xGraph gives you

  • Authentication and role-based access on every route
  • Tenant isolation enforced in storage
  • Rate limits and token revocation
  • Security headers and production startup checks
  • An audit log of access, denials and changes

What stays with you

  • Encryption at rest and backups
  • Identity provider, MFA and access reviews
  • Log retention and storage
  • Network, TLS and secrets management
  • Your organization's policies and processes

Yours to run, on any model

MIT licensed, self-hosted, no LangChain dependency. Pick the provider with one model string; the graph, tools and endpoints stay the same.

Good fit

  • You ship AI features to your own customers.
  • You must self-host or keep data in your region.
  • You need tenant isolation and access control from day one.
  • Your team writes Python and wants code, not a builder.

Not the right choice

  • You want a no-code builder. 10xGraph is code-first Python.
  • You want a hosted, managed service. There is none; you run it.
  • You need Python older than 3.12.
  • You need the largest community and integration catalog. LangGraph and CrewAI are bigger.

Frequently asked questions

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.

Build your first app