| Graph-based framework | Models the workflow as explicit states and transitions (e.g. LangGraph). |
| Role-based framework | Organises work around agents with roles and tasks (e.g. CrewAI). |
| Conversation framework | Agents collaborate through structured messages (e.g. AutoGen). |
| Protocol-based composition | Connects tools and agents through a standard interface such as MCP. |
- You need durable, resumable state → graph-based.
- Work maps cleanly to roles → role-based.
- You want vendor-neutral tool access → MCP-style composition.
- 01Model the workflow on paper: states, steps, tools and stop conditions.
- 02Pick the framework whose abstraction matches that model.
- 03Keep prompts, tool contracts and policy outside the framework where possible.
- 04Benchmark reliability before committing to a framework.
Auditable refund workflow
- Context
- Refunds must pass validation and approval before money moves.
- Problem
- A free-form agent loop cannot be reviewed or resumed after a failure.
- Approach
- Model the process as graph states with checkpoints after each transition.
- Outcome
- A resumable workflow that reviewers can inspect step by step.
Vendor-neutral tool access
- Context
- Several AI clients need the same order-lookup capability.
- Problem
- Each client requires its own custom integration to internal systems.
- Approach
- Expose tools through an MCP server while the framework owns orchestration.
- Outcome
- Clients can be swapped without rewriting tool integrations.
Graph states for an auditable refund
requested -> validated -> approved -> refunded -> closed
\-> rejected
checkpoint after every transition; resume from the last state on failureGraph frameworks suit processes that must be reviewed and resumed. Keep the refund policy in your own module, not inside the framework.
MCP server alongside the framework
orchestration: langgraph # states and transitions live here
tool_access: mcp_server # standard, permission-scoped tool surface
tools: [lookup_order] # read-only for this workflowMCP standardises tool access; it does not decide the workflow. Keep orchestration and tool exposure separate.
Graph frameworks
Up: Explicit control and resumability
Down: More setup and conceptual overhead
Role frameworks
Up: Fast prototyping
Down: Less control over transitions
Protocol composition
Up: Interoperable tools
Down: Does not provide orchestration by itself
| Option | Upside | Cost |
|---|---|---|
| Graph frameworks | Explicit control and resumability | More setup and conceptual overhead |
| Role frameworks | Fast prototyping | Less control over transitions |
| Protocol composition | Interoperable tools | Does not provide orchestration by itself |
- Evaluate on your task set, not framework demos.
- Avoid framework-specific locking of business rules.
- Check observability hooks and streaming support early.
- Pin framework versions; their APIs change quickly.
| Key | Typical value | Note |
|---|---|---|
| framework_version | pinned | Avoid surprise breaking changes. |
| checkpointing | on for long runs | Enables resume after failure. |
| tracing | enabled | Instrument before shipping. |
| Symptom | Cause | Fix |
|---|---|---|
| Framework upgrades break workflows | Business logic inside framework internals | Keep domain logic in your own modules. |
| No visibility into failures | Tracing not configured | Enable run/span tracing at integration time. |
Which framework is best?
The one matching your workflow shape. Graph frameworks suit auditable processes; role frameworks suit rapid prototyping.
Does MCP replace a framework?
No. MCP standardises tool and context access; orchestration is still your application's job.
More in Agents & agentic AI
Agent anatomy: loop, planner, tools and memory
The minimal system behind an AI agent: a goal, a reasoning loop, tool access, state and a stop condition.
Agentic patterns: ReAct, plan-and-execute, reflection
Three reusable reasoning patterns and how to choose between them for real workloads.
Multi-agent orchestration patterns
When to split work across agents, how they hand off, and how to avoid coordination overhead.