Skip to contents

Agent

agent()
Create an Agent

Graph Construction

graph_builder()
Create a graph builder
END
End sentinel for graph execution

State

state_schema()
Create a typed state schema
state_snapshot_class()
State snapshot S7 class
new_state_snapshot()
Create a state snapshot

Node Helpers

as_node()
Convert an Agent to a graph node handler function
tool_node()
Create a tool execution node
route_tool_calls()
Route based on pending tool calls
route_to()
Create a constant router

Convenience Graphs

react_graph()
Create a ReAct (Reasoning + Acting) agent graph
pipeline_graph()
Create a sequential pipeline graph
supervisor_graph()
Create a supervisor graph that routes to workers

Memory & Persistence

memory()
Create a key-value memory store
checkpointer()
Create a workflow checkpointer

Human-in-the-Loop

new_interrupt()
Create an agent graph interrupt condition
approval_tool()
Create an approval tool for human-in-the-loop workflows

Visualization

as_mermaid()
Render an agent graph as a Mermaid diagram