Skip to main content
AI Agents & Automation

⏱ About 20 min20 XP

Orchestration Frameworks

Building a multi-agent system from scratch requires implementing message routing, state management, error handling, retry logic, logging, parallelism controls, and agent lifecycle management — before writing a single line of task-specific code. Orchestration frameworks exist to provide this infrastructure so that builders can focus on what their agents do rather than on the plumbing that connects them. Understanding the major frameworks — their design philosophies, their architectural patterns, and their tradeoffs — lets you choose the right tool for a given problem and lets you read and evaluate new frameworks as the field continues to evolve rapidly.

LangGraph: State Machines for Agent Workflows

LangGraph, built by LangChain, models agent workflows as directed graphs where nodes are agents or functions and edges are transitions triggered by the current state. The core abstraction is a state object that flows through the graph, being modified at each node. Conditional edges let the graph branch based on state contents — implementing routing logic like 'if the agent's output indicates the task needs human review, route to the review node; otherwise proceed to the completion node.' LangGraph's graph-based model makes complex workflows visually and programmatically explicit. You can inspect the graph, trace which path a given execution took, and add monitoring at node boundaries. It handles cycles natively — a key requirement for agentic loops where an agent may need to iterate multiple times before completing a task. LangGraph also has first-class support for persistence: the state graph can be checkpointed to a database, enabling long-running workflows that can be paused, resumed, or retried after failure without losing progress. The tradeoff is explicitness: every transition must be defined in the graph. For highly dynamic workflows where the structure of the agent network itself changes at runtime based on what agents discover, LangGraph requires more careful upfront design.

CrewAI: Role-Based Agent Teams

CrewAI takes a different philosophical approach: it models multi-agent systems as teams of agents with explicitly assigned roles, goals, and backstories — much like defining job descriptions for team members. A 'crew' is a collection of agents with defined roles (e.g., 'Senior Research Analyst', 'Technical Writer', 'Quality Reviewer') and a set of tasks assigned to the crew. CrewAI handles the sequencing and delegation automatically based on task dependencies and agent capabilities. The role-based approach makes CrewAI highly accessible: the mental model maps directly onto how humans think about team composition and task assignment. It also makes agent prompts more coherent — an agent told it is a 'Senior Research Analyst with 10 years of financial market experience' tends to produce more focused, contextually appropriate output than a generic agent. CrewAI supports both sequential and hierarchical execution modes, with a manager agent in hierarchical mode that makes delegation decisions at runtime. The tradeoff is control granularity. CrewAI abstracts away much of the low-level orchestration, which is helpful for rapid prototyping but constraining when a workflow requires precise control over message formats, state sharing, or execution timing.

AutoGen: Conversational Multi-Agent Systems

Microsoft's AutoGen framework models multi-agent interaction as structured conversations — agents send messages to each other in a chat-like protocol, and the conversation continues until a termination condition is met. The framework provides a UserProxyAgent that can represent a human in the loop (executing code on their behalf, asking for human input at defined moments) and AssistantAgents that perform reasoning and generation tasks. AutoGen's conversational model is particularly well-suited to iterative collaborative tasks: a coding agent writes code, an execution agent runs it, a review agent critiques the output, and the coding agent revises — all via a structured back-and-forth that resembles pair programming. The framework has strong support for code execution in isolated sandboxes, making it a natural fit for software engineering automation. AutoGen v0.4 (released late 2024) introduced a significant architectural revision, adding an event-driven asynchronous runtime that decouples agent message passing from synchronous function calls — improving scalability and enabling more complex multi-agent topologies. The framework also introduced typed messages and agent teams with explicit group chat management.

The Anthropic Agent SDK

Anthropic's Agent SDK (released 2025) provides lightweight primitives for building agents and multi-agent systems on top of Claude. The core abstractions are the Agent (a Claude model instance with a system prompt, a set of tools, and an optional handoff list) and the Runner (which executes agents, manages the tool-call loop, and handles handoffs between agents). The SDK is deliberately minimal: it provides the essential machinery without imposing an opinionated workflow structure. Handoffs in the Anthropic SDK are first-class primitives — an agent can transfer control to another agent by including it in its handoff list and invoking a transfer. This makes the supervisor-worker and pipeline patterns easy to implement with very little boilerplate. The SDK integrates natively with MCP, so any MCP-compatible tool server can be connected to an agent without custom adapters. The SDK's minimalism is both its strength and its limitation. It provides a clean, composable foundation and avoids the magic-and-abstraction overhead of heavier frameworks. But complex workflow patterns — like stateful checkpointed pipelines or sophisticated group-chat dynamics — require more code from the builder than CrewAI or LangGraph would demand.

Match each framework to the architectural property that most distinctly characterizes it.

Terms

LangGraph
CrewAI
AutoGen
Anthropic Agent SDK
Event-driven async runtime

Definitions

Decouples agent message passing from synchronous calls, improving scalability in complex topologies
Provides minimal first-class primitives for agents, tools, and handoffs with native MCP integration
Organizes agents as role-defined team members with job descriptions that shape their reasoning
Models workflows as directed graphs with typed state that flows through nodes and conditional edges
Structures multi-agent interaction as a back-and-forth conversation with a termination condition

Drag terms onto their definitions, or click a term then click a definition to match.

Frameworks Are Architectural Opinions

Each framework encodes a particular opinion about how agents should be structured and connected. Choosing a framework is choosing to adopt that opinion. Understanding the opinion — not just the API — lets you work with the framework effectively and recognize where it does not fit your problem.

Flashcards — click each card to reveal the answer

A team is building an AI system that dynamically discovers during execution which specialist agents it needs, based on what it learns about the task. The workflow graph cannot be fully specified in advance. Which framework characteristic would be most limiting for this use case?

A developer wants to build a coding assistant where a writing agent drafts code, an execution agent runs it, and the two iterate until tests pass — up to a maximum of 10 rounds. Which framework's core design model most naturally matches this iterative conversational structure?

Framework Selection Analysis

  1. For each of the following three hypothetical multi-agent projects, select the framework you would recommend and justify your choice in terms of the architectural fit — not just 'it is easier' but specifically how the framework's design model maps to the project's requirements.
  2. Project 1: A long-running autonomous research assistant that takes weeks to complete a literature review, must be pausable and resumable, and follows a well-defined pipeline of subtasks: search, collect, summarize, cross-reference, synthesize.
  3. Project 2: An AI system that simulates a startup pitch session where different AI agents role-play as a founder, a skeptical investor, a technical advisor, and a market expert — each challenging and building on each other's points.
  4. Project 3: A personal coding tutor that writes a code exercise, evaluates the student's attempt, gives targeted feedback, revises the exercise if needed, and repeats until the student demonstrates understanding — with the student able to intervene at any point.
  5. For each: (a) name your framework choice, (b) identify the specific framework feature that maps to the project's most important requirement, (c) name one thing the framework does not naturally provide that you would need to build yourself.