Orchestration first
Model agents as workflows with explicit state, routing, and execution boundaries instead of scattered prompt calls.
Production docs for agent teams
Build scalable agent workflows with tools, memory, streaming, APIs, and clients on top of one runtime. Start with a working agent fast, then grow into stateful, production-ready systems without rewriting the foundation.
from agentflow.core import Agent, StateGraph, ToolNode
from agentflow.core.state import AgentState, Message
from agentflow.storage.checkpointer import InMemoryCheckpointer
from agentflow.utils.constants import END
checkpointer = InMemoryCheckpointer()
def get_weather(location: str) -> str:
return f"The weather in {location} is sunny"
tool_node = ToolNode([get_weather])
agent = Agent(
model="gemini-3-flash-preview",
provider="google",
system_prompt="You are a helpful assistant.",
trim_context=True,
reasoning_config=True,
tool_node=tool_node,
)
graph = StateGraph()
graph.add_node("MAIN", agent)
graph.add_node("TOOL", tool_node)
graph.add_conditional_edges("MAIN", should_use_tools, {"TOOL": "TOOL", END: END})
graph.add_edge("TOOL", "MAIN")
app = graph.compile(checkpointer=checkpointer)Connected stack
Framework foundations
Model agents as workflows with explicit state, routing, and execution boundaries instead of scattered prompt calls.
Bring checkpointing, storage, background work, callbacks, and graceful failure handling into the core architecture.
Document one connected stack across the Python library, API and CLI package, hosted playground, and TypeScript client.
Documentation tracks
The main docs now separate learning, architecture, and production work so readers can move forward without scanning the whole sidebar.
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.
Beginner-friendly by design
The new docs are organized around the real journey: install the library, build one agent, add tools, add memory, expose it through the API, connect a client, then deploy with confidence.
Create a small, working agent and understand the moving parts.
Give the agent capabilities and learn how state moves through a workflow.
Compose agents into predictable handoffs and reusable workflows.
Add persistence, APIs, streaming, clients, and deployment practices.