Observed since 20 Oct, 15:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
10xGraph (formerly Agentflow) is a Python framework for multi-agent AI systems that stay correct under failure: replay-safe tool calls that are not re-executed after a crash, versioned state writes, real node and tool timeouts, and two-tier Redis plus PostgreSQL checkpointing. MIT licensed, self-hosted, any model (OpenAI, Google Gemini, Anthropic). Pair it with 10xgraph-api to generate the production server around your graph.
Formerly Agentflow. 10xGraph by 10xScale: graph engineering for production AI agents.
10xGraph is an open-source Python framework for building multi-agent AI systems and running them in production. You write the agent as a graph of nodes and tools. 10xGraph keeps tool calls from running twice after a crash, guards state writes, enforces timeouts, and, with the 10xgraph-api package, generates the API server around the graph.
This repository is the core engine (PyPI 10xgraph, import tenxgraph). The docs live at 10xgraph.com.
1. Correct under failure (this package)
node_timeout and tool_timeout in the run config (defaults 900 s and 300 s), so a hung tool cannot hold a worker forever.interrupt() pauses the run and saves the thread; resume with the decision.2. The production server ships in the box (10xgraph-api, MIT)
10xgraph-api generates the production server around your compiled graph: REST, SSE streaming, WebSocket and realtime-audio endpoints; JWT or custom auth; scoped authorization on every endpoint; thread ownership isolation; rate limiting; and Docker Compose and Kubernetes files. You drive it with the 10xgraph command (10xgraph init, 10xgraph api, 10xgraph build). See the ecosystem table.
3. Built to scale
PgCheckpointer caches active thread state in Redis and reads it first (default TTL 24 hours); PostgreSQL holds the durable history with versioned writes. Threads survive restarts and cache expiry. SqliteCheckpointer covers local work.4. One stack, backend to frontend
config["remote_tools"]; the run pauses until the client returns the result.10xgraph-client) for invoke, stream, threads, memory and files, plus a React playground (10xgraph play).5. You own it
Also included (standard for agent frameworks, listed as facts): graph orchestration and the ReAct tool-calling loop, parallel tool execution, OpenAI, Google Gemini and Anthropic support, MCP tools, streaming, and checkpointing to a database.
| You are | The problem | What 10xGraph does |
|---|---|---|
| A Python team taking an agent to production | Server, auth, persistence and deployment all have to be built around the agent | 10xgraph-api generates them from the graph |
| Running agents with side effects (payments, email, tickets) | A retry or crash repeats an action | Tool ledger: a completed tool call is replayed from the checkpointer, not re-run |
| Building a multi-user product | Users must not see each other's threads | Thread ownership isolation and scoped authorization on every endpoint |
| Required to self-host | Paid platforms, data residency, lock-in | MIT, self-hosted, any model |
| A Python backend with a TypeScript frontend | Hand-written SSE and client glue | Typed client and remote tools |
pip install 10xgraph
Provider SDKs and infrastructure integrations are optional extras. Install only what you use:
| Extra | Adds |
|---|---|
google-genai, openai, anthropic | Provider SDK adapters |
anthropic-vertex, anthropic-bedrock | Claude on Vertex AI or Amazon Bedrock |
realtime | Audio-to-audio agents over Gemini Live |
mcp | Model Context Protocol client and tools |
pg_checkpoint, sqlite_checkpoint | Durable checkpointing (Postgres + Redis, or SQLite) |
qdrant, mem0 | Long-term vector memory stores |
redis, kafka, rabbitmq, otel | Event publishers and tracing |
images, cloud-storage | Multimodal media handling and offload |
all | Every extra above at once, for development and CI |
pip install "10xgraph[google-genai,openai,anthropic,mcp,pg_checkpoint]"
Then set your provider key. A .env file in the working directory is loaded automatically.
export GEMINI_API_KEY=... # Google Gemini
export OPENAI_API_KEY=sk-... # OpenAI, or any OpenAI-compatible endpoint
export ANTHROPIC_API_KEY=sk-... # Anthropic Claude
Requires Python 3.12 or newer.
lookup_order reads data. refund_order moves money, so it pauses for a human decision with interrupt() before it acts. With a checkpointer, a crash or retry after the refund does not issue it twice.
from tenxgraph.core.state import Message
from tenxgraph.prebuilt.agent import ReactAgent
from tenxgraph.storage.checkpointer import InMemoryCheckpointer
from tenxgraph.utils import interrupt
def lookup_order(order_id: str) -> dict:
"""Look up an order by id."""
return {"order_id": order_id, "status": "delivered", "total": 42.00}
def refund_order(order_id: str, amount: float) -> str:
"""Refund an order. Requires approval."""
decision = interrupt({"amount": amount}, message=f"Refund ${amount}?")
if not decision.get("approved"):
return "Refund declined by reviewer."
return f"Refunded ${amount} for order {order_id}."
app = ReactAgent(
model="gemini/gemini-2.5-flash",
system_prompt=[{"role": "system", "content": "You are a support agent for an online store."}],
tools=[lookup_order, refund_order],
).compile(checkpointer=InMemoryCheckpointer())
config = {"thread_id": "1"}
result = app.invoke(
{"messages": [Message.text_message("Order A-1001 arrived broken, please refund it.")]},
config=config,
)
# The run pauses inside refund_order. After a reviewer approves:
result = app.invoke({"resume": {"approved": True}}, config)
Swap ReactAgent for RAGAgent, SwarmAgent, SupervisorTeamAgent or PlanActReflectAgent and the shape stays the same. Use PgCheckpointer (Postgres plus Redis) in production, or SqliteCheckpointer for local work.
Stream it:
async for chunk in app.astream(
{"messages": [Message.text_message("Where is order A-1001?")]},
config={"thread_id": "2"},
):
print(chunk.model_dump())
Add MCP tools by passing a fastmcp client; remote tools join your local ones:
from fastmcp import Client
mcp_client = Client({
"mcpServers": {
"orders": {"url": "http://127.0.0.1:8000/mcp", "transport": "streamable-http"},
}
})
app = ReactAgent(
model="gemini/gemini-2.5-flash",
tools=[lookup_order],
client=mcp_client,
).compile()
Prebuilt agents are graphs. When you need custom control flow, build one directly:
from tenxgraph.core.graph import Agent, StateGraph, ToolNode
from tenxgraph.core.state import AgentState
from tenxgraph.utils.constants import END
graph = StateGraph()
graph.add_node("MAIN", Agent(
model="gemini/gemini-2.5-flash",
system_prompt=[{"role": "system", "content": "You are a support agent."}],
tool_node="TOOL",
))
graph.add_node("TOOL", ToolNode([lookup_order, refund_order]))
def route(state: AgentState) -> str:
if state.context and state.context[-1].tools_calls:
return "TOOL"
return END
graph.add_conditional_edges("MAIN", route, {"TOOL": "TOOL", END: END})
graph.add_edge("TOOL", "MAIN")
graph.set_entry_point("MAIN")
app = graph.compile()
Nodes can be plain functions too, so you can call a provider SDK directly. See examples/react/.
Live audio-to-audio sessions over Gemini Live. The provider owns the turn loop, so the session runs
through arealtime: you push into an input queue and consume normalized events.
from tenxgraph.prebuilt.agent import AudioAgent
from tenxgraph.core.realtime import LiveInputQueue, RealtimeConfig
app = AudioAgent(
"gemini-live-2.5-flash-preview",
realtime_config=RealtimeConfig(model="gemini-live-2.5-flash-preview", voice="Puck"),
tools=[lookup_order],
).compile()
queue = LiveInputQueue()
queue.send_audio(pcm16_bytes) # non-blocking, safe to call from an audio callback
async for event in app.arealtime(queue, {"thread_id": "t1"}):
... # AudioDeltaEvent / transcripts / ToolCallEvent / ...
queue.close()
Barge-in, persisted transcripts (raw audio is never stored), automatic reconnect with session
resumption, and image/video frame input are handled for you. system_prompt, skills, and memory
work as they do on any other agent. Needs pip install "10xgraph[realtime]".
10xGraph is the new name of Agentflow. The framework, license and maintainers are the same. 10xscale-agentflow 0.10.1 is its last release.
pip uninstall 10xscale-agentflow
pip install 10xgraph
Uninstall first: both distributions provide the agentflow module and must not be installed side by side.
# before
from agentflow.core.graph import StateGraph
# after
from tenxgraph import StateGraph
The import name is tenxgraph because a Python identifier cannot start with a digit. All canonical paths are the old ones with agentflow replaced by tenxgraph (for example tenxgraph.core.graph, tenxgraph.storage.checkpointer, tenxgraph.prebuilt.agent). import agentflow keeps working as a deprecated alias until 2.0, with one DeprecationWarning.
Other renamed identifiers (old values still work where noted):
| Item | Old | New |
|---|---|---|
OpenTelemetry tracer and meter name, GEN_AI_SYSTEM | agentflow | 10xgraph |
| Logger names | agentflow.* | tenxgraph.* |
| Media URI scheme | agentflow://media/ | graph://media/ (old URIs still read) |
| Default home directory | ~/.agentflow | ~/.10xgraph (falls back to ~/.agentflow if only that exists) |
| Cloud media prefix | agentflow-media | 10xgraph-media (old objects still read) |
| Prebuilt tools user-agent | agentflow-prebuilt-tools | 10xgraph-prebuilt-tools/1.0 |
| Server config file | agentflow.json | 10xgraph.json (the CLI falls back to agentflow.json) |
| CLI command | agentflow | 10xgraph (agentflow stays as a deprecated alias until 2.0) |
| Package | What it does | Install | Source |
|---|---|---|---|
Core framework, 10xgraph | Graph engine, state and checkpointing, memory, tools, MCP, publishers, evaluation | pip install 10xgraph | this repository |
API server, 10xgraph-api (formerly 10xscale-agentflow-cli) | Generates the production server around your graph: REST, SSE, WebSocket, JWT auth, scoped authorization, rate limiting, Docker and Kubernetes files | pip install 10xgraph-api | 10xGraph/10xgraph-api |
TypeScript client, 10xgraph-client (formerly @10xscale/agentflow-client) | Typed client for every endpoint, React streaming hooks, client-side tools | npm install 10xgraph-client | 10xGraph/10xgraph-client |
| Playground | React UI to chat with agents and inspect graphs, threads and state | 10xgraph play | 10xHub/agentflow-playground |
| Documentation | Tutorials, guides, concepts, reference | 10xgraph.com | 10xGraph/10xgraph-docs |
From install to a running service:
pip install 10xgraph-api # pulls in 10xgraph
10xgraph init --path my-agent && cd my-agent
10xgraph api # REST and WebSocket API on :8000
10xgraph play # server plus playground
10xgraph build --docker-compose --k8s
A production scaffold with JWT auth and Redis rate limiting:
10xgraph init --path my-agent --yes --template production --auth jwt --rate-limit redis
Runnable scripts in examples/:
| Topic | Directory |
|---|---|
| React agents, sync and class-based | react/, react-injection/, agent-class/, tool-decorator/ |
| Streaming and stop/resume | react_stream/ |
| MCP servers and tools | react-mcp/, github-mcp/, xquik-mcp/ |
| RAG, memory, and vector stores | rag/, memory/, store/ |
| Multi-agent: swarm, supervisor, handoff, plan-act-reflect | swarm/, supervisor_team/, handoff/, multiagent/, plan_act_reflect/ |
| Realtime audio, multimodal | realtime/, multimodal/ |
| Structured output, skills, custom state | structured_output/, skills/, custom-state/ |
| Providers and A2A | providers/, a2a_sdk/ |
| Checkpointing, graceful shutdown | checkpointer/, graceful_shutdown/ |
| Evaluation and testing | evaluation/, testing/ |
Run one:
export GEMINI_API_KEY=... # or OPENAI_API_KEY
python examples/react/react_single_class.py
Some examples still use pre-rename import paths; the canonical paths are listed in CLAUDE.md.
refund, user B may not) are not built in. Tools can check the caller's verified scopes with tenxgraph.core.authz.has_scope.Your avatar belongs on this wall.
Every person above shipped code that now runs inside production agents. Merge one pull request and you join them, here and on the contributor page at 10xgraph.com/maintainers.
Your first pull request can be small. These are real, self-contained, and useful today:
pyproject.toml lists the modules mypy still skips. Pick one, fix its types, delete its line. The list only gets shorter.examples/ for a real use case: a support agent, a research pipeline, an approval flow.From clone to a passing check:
git clone https://github.com/10xGraph/10xGraph.git
cd 10xGraph
uv sync --dev
uv run pytest
uv run ruff check .
uv run mypy tenxgraph/
Draft pull requests are welcome, so open early and ask questions in the PR. For bigger changes, start a thread in Discussions first so the work does not overlap. CONTRIBUTING.md has the full workflow, and the Code of Conduct applies everywhere.
Found a vulnerability? Do not open a public issue. Follow the process in SECURITY.md.
10xGraph is MIT licensed and made by 10xScale. Copyright 10xScale. Contributions are accepted under the same license.
10xgraphDownload counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.10.1 | 16 Oct 2026 | 25 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 15:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:b87c158cbcceaf8602221d25f4af1e071e719c2f419e0ead426f44548e85ad3a