Graph orchestration
Typed StateGraph with conditional edges, sub-graphs, recursion limits, and explicit routing. Agents you can read, log, and replay.
v1.0 · MIT · Python 3.10+
Typed graphs, durable threads, a REST and SSE server, and a typed TypeScript client. Ship a working agent fast, then scale to production without rewriting the foundation.
pip install 10xscale-agentflow 10xscale-agentflow-cli
from agentflow.core.graph import Agent, StateGraph, ToolNodefrom agentflow.core.state import AgentState, Messagefrom agentflow.utils import ENDdef get_weather(location: str) -> str:"""Get current weather for a city."""return f"The weather in {location} is sunny."agent = Agent(model="google/gemini-2.5-flash",system_prompt=[{"role": "system", "content": "Helpful assistant."}],tool_node="TOOL",)graph = StateGraph(AgentState)graph.add_node("MAIN", agent)graph.add_node("TOOL", ToolNode([get_weather]))graph.add_conditional_edges("MAIN", route, {"TOOL": "TOOL", END: END})graph.add_edge("TOOL", "MAIN")graph.set_entry_point("MAIN")app = graph.compile()
Works with the stack you already use
Framework foundations
One Python project. Typed graphs, durable threads, a production server, and a typed TypeScript client. Without the glue tax.
Typed StateGraph with conditional edges, sub-graphs, recursion limits, and explicit routing. Agents you can read, log, and replay.
InMemoryCheckpointer for dev, PgCheckpointer (Postgres + Redis) for prod. Threads survive restarts and resume across replicas.
Built-in REST and SSE server, a typed TypeScript client, and a hosted playground. One project, full stack, no glue.
Same agent, every framework
The same ReAct agent in five different frameworks. AgentFlow keeps the graph explicit and ships the production stack with it.
from agentflow.core.graph import Agent, StateGraph, ToolNodefrom agentflow.core.state import AgentState, Messageagent = Agent(model="google/gemini-2.5-flash",system_prompt=[{"role": "system", "content": "Helpful assistant."}],tool_node="TOOL",)graph = StateGraph(AgentState)graph.add_node("MAIN", agent)graph.add_node("TOOL", ToolNode([get_weather]))# ... add edges + compile + invokeapp = graph.compile()
Documentation tracks
Install AgentFlow, run your first agent, and move from local code to a served app without guessing the next step.
02Understand agents, tools, state, memory, streaming, and production runtime boundaries before you scale up.
03Jump into example-driven tutorials, targeted implementation guides, and API reference for Python, REST, and TypeScript.
Connected stack
The Python runtime, the API server, the TypeScript client, and the hosted playground are designed together. Same types, same threads, same primitives across the whole stack.
Beginner-friendly by design
Install the library, build one agent, add tools and memory, expose it through the API, connect a client, then deploy.
Create a working agent and understand the moving parts.
Give the agent capabilities; learn how state moves through a workflow.
Compose agents into predictable handoffs and reusable workflows.
Add persistence, APIs, streaming, clients, and deployment.
Install, build a graph, expose an API, connect a TypeScript client. Then keep going, without rewriting anything.