How to Choose an Agent Framework
A practical framework selection guide for agentic AI: control model, language, multi-agent needs, ecosystem, and production constraints.
- frameworks
- decision-guide
Choosing an agent framework is choosing a control-flow model and ecosystem—not a religion.
Decision criteria
- Language & runtime — Python vs TypeScript vs polyglot
- Control style — graph, roles, conversations, or minimal SDK
- State & durability — long jobs, resume, human approval
- Multi-agent needs — true specialization vs marketing
- Tooling ecosystem — connectors, MCP, observability vendors
- Team skills — what your engineers can debug at 2am
- Vendor coupling — cloud lock-in vs portable code
Mapping common options
| Need | Consider |
|---|---|
| Explicit graphs + state | LangGraph |
| Role-based crews quickly | CrewAI |
| Conversational multi-agent | AutoGen |
| Typed Python, ergonomic agents | PydanticAI |
| OpenAI-centric agent SDK | OpenAI Agents SDK |
| Data/RAG-heavy agents | LlamaIndex |
| Enterprise Microsoft stack | Semantic Kernel / AutoGen orbit |
| TypeScript full-stack | Mastra / LangGraphJS ecosystem |
Browse the full frameworks directory.
Questions to force an honest choice
- Can I represent my process as a state machine?
- Do I need multi-agent day one, or is that cosplay?
- How will I log trajectories?
- Can I unit-test tools without the framework?
- What happens when I hit a framework bug on a Friday?
Recommendation path
- Write the agent loop in pseudocode
- Circle state, tools, HITL, and multi-agent points
- Spike two frameworks on one real task
- Score: clarity, debuggability, eval hooks, deploy path
- Pick the boring winner
Summary
The best framework is the one your team can operate. Optimize for control and observability; fashion is a poor production metric.
Frequently asked questions
Do I need an agent framework?
Not always. If you have a simple loop and a few tools, custom code may be clearer. Use a framework when state, retries, multi-agent coordination, or ecosystem integrations become heavy.
Related reading
LangGraph vs CrewAI vs AutoGen
Vendor-neutral comparison of LangGraph, CrewAI, and AutoGen for building multi-step and multi-agent systems.
LangGraph
LangGraph is a library for building stateful, graph-based agent workflows with explicit control flow and durable execution patterns.
OpenAI Agents SDK
The OpenAI Agents SDK is a toolkit for building agent applications with tool use, handoffs, and guardrail-oriented patterns in the OpenAI ecosystem.
PydanticAI
PydanticAI is a Python agent framework emphasizing type-safe structured outputs, dependency injection, and ergonomic agent definitions.