Examples: flows¶
Graphs of nodes with joins, loops and pauses. Back to the Examples gallery. Files here: 8.
| File | Shows | Install | Run | Docs |
|---|---|---|---|---|
examples/adk_flow.py |
A flow compiled to an ADK Workflow: run it, pause at a gate, resume with a decision. | pip install "agent-adapter[adk]" |
python examples/adk_flow.py |
Google ADK |
examples/durable_dbos.py |
DBOS: a support-desk refund flow as a DBOS workflow on SQLite; a desk lead approves it. | pip install agent-adapter; optional: pip install "agent-adapter[dbos]" |
python examples/durable_dbos.py |
Run flows on Temporal or DBOS |
examples/durable_flow.py |
Crash-safe runs: a ticket order flow dies mid-run, and a new worker finishes it. | pip install agent-adapter |
python examples/durable_flow.py |
Durable runs |
examples/durable_temporal.py |
Temporal: a support-desk refund flow as a workflow; a desk lead approves it in the store. | pip install agent-adapter; optional: pip install "agent-adapter[temporal]" |
python examples/durable_temporal.py |
Run flows on Temporal or DBOS |
examples/first_flow.py |
A first flow: classify a ticket, then either look up the policy or escalate. | pip install agent-adapter |
python examples/first_flow.py |
Your first flow |
examples/flow_research.py |
The spec research flow: fan-out retrieval, a join, a capped loop and an approval pause. | pip install agent-adapter |
python examples/flow_research.py |
Flows |
examples/flow_subflows.py |
Sub-flows and a node cache: a packing flow runs inside an order flow and pauses for a check. | pip install agent-adapter |
python examples/flow_subflows.py |
Sub-flows and the node cache |
examples/multi_agent.py |
Multi-agent: a supervisor delegates to two specialists, a handoff, and a flow that routes. | pip install agent-adapter |
python examples/multi_agent.py |
Multi-agent: agents as tools, handoffs and routing |