
- Preparing the next model input and running tool calls.
- Carrying state forward between steps and persisting it for resumability.
- Handling transient failures, retry logic, and human approvals.
- Recording audit logs, execution traces, and results for observability and debugging.
- Purpose: Fast path to a working agent; provides pre-built agent implementations and standardizes the model/tool interface.
- When to use: You want minimal boilerplate and just need the built-in loop behavior.
- What you supply: model selection, tools, and instructions; the agent manages the interaction and tool invocation.
- Purpose: Make workflow steps explicit by modeling each step as a node in a state graph.
- When to use: Workflows require branching, recoverability, human pauses, or long-running stateful processes.
- What you supply: explicit node functions, routing logic, and state model; the framework provides persistence and resumability.
- Purpose: Organize work around roles; group agents into crews and assign role-specific tasks with clear handoffs.
- When to use: You have distinct agents that should act independently with explicit role responsibilities and backstories.
- What you supply: agent roles, goals, backstories, and task definitions; the framework coordinates handoffs and task execution.

How to choose
- Start with the simplest solution that satisfies your workflow constraints.
- If one model and a few tools are sufficient, keep orchestration in application code without a framework.
- Choose LangChain-style frameworks for a fast, pre-built agent and fewer infrastructure concerns.
- Pick a graph-based framework like LangGraph for explicit branching, saved progress, or multi-step approvals.
- Use a role-based approach (CrewAI) when work should be divided among specialized agents with clear role handoffs.

- Only add a framework when it saves you work you would otherwise implement and maintain (persistence, retries, auditability, pauses).
- Prefer frameworks that match your required guarantees: persistence, approval gates, observability, and operational simplicity.
- Evolve from simple to structured: start small and adopt more structured orchestration as complexity grows.
Choose the simplest framework that provides the control and guarantees (e.g., persistence, approvals, auditability) your workflow requires. Start small and evolve to a more structured orchestration framework only when the benefits outweigh the additional coordination overhead.
- Orchestration is the application layer that keeps the agent loop running reliably (model/tool calls, state, retries, approvals, logging).
- LangChain, LangGraph, and CrewAI represent three orchestration design points: pre-built agent interface, graph/stateful workflows, and role-based multi-agent coordination.
- Match the framework to your workflow’s branching, persistence, and role-hand-off needs to minimize complexity while maximizing reliability.
- LangChain course
- LangGraph course
- CrewAI course
- For more on orchestration best practices, look for resources on state management, long-running workflows, and auditability in agent-based systems.