Prompt
I'm building an agent with multiple steps and tool calls, what do most teams use?
Latest observation
Oct 9, 2026
OpenAI APIWeb search: off
Most teams use one of these patterns for multi-step agents with tool calls:
1. A graph/state-machine orchestrator
This is the most common for production systems.
- Each node = a step (LLM call, tool call, validation, routing, retrieval, etc.)
- Edges = conditional transitions based on output/state
- Good for:
- branching logic
- retries/fallbacks
- human-in-the-loop
- observability and debugging
Popular choices:
- LangGraph (very common for LLM agents)
- Temporal (if you want durable workflows + retries + long-running state)
- Prefect / Dagster / Airflow for more general workflow orchestration, though less agent-native
2. A planner/executor loop
A simpler pattern where the agent:
- plans the steps
- executes a step
- observes result
- repeats until done
Good for:
- smaller prototypes
- simpler tools
- fewer branching cases
Downside: can get brittle and hard to debug at scale.
3. A function-calling router with state
If the agent mostly needs to choose among tools, many teams just:
- keep a shared state object
- let the model call tools/functions
- loop until a final answer is produced
This is often enough for straightforward assistants.
What teams usually choose in practice
- Prototype / early stage: direct LLM loop + function calling
- Production agent with branching and retries: LangGraph or a custom state machine
- Long-running business workflows: Temporal
- Data/ETL-style orchestration: Prefect/Dagster/Airflow
Rule of thumb
If your agent has:
- more than 2–3 steps
- conditional branching
- tool failures/retries
- need for auditability
…use a graph/state machine, not a simple prompt loop.
If you want, I can sketch:
- a typical architecture, or
- a minimal code example in Python using LangGraph or a custom loop.