If you're building custom AI agent applications (not just using coding tools), you may want a framework. Here's how the major options compare.
Don't reach for a framework first. If your workflow is a straight line (A → B → C → D), plain
async/await+ direct API calls is simpler, faster, and easier to debug. Use a framework only when you need agent autonomy, branching, or multi-agent orchestration. See When NOT to use a framework below for details.
| Framework | Language | Agent Pattern | Best For |
|---|---|---|---|
| Claude Agent SDK | Python, TypeScript | Claude Code as a library | Production agents with Claude |
| OpenAI Agents SDK | Python | Agents + handoffs + guardrails | Lightweight OpenAI-native agents |
| Pydantic AI | Python | Agents, graphs, function-based | Model-agnostic, Pydantic-native apps |
| Google ADK | Python, TypeScript, Go, Java | Multi-language enterprise framework | Production agents on Google Cloud |
| LangChain / LangGraph | Python, JS | Graph-based DAG | Complex, stateful workflows |
| CrewAI | Python | Role-based crews | Multi-agent collaboration |
| AutoGen | Python | Conversational | Multi-agent dialogue |
| Mastra | TypeScript | Function-based | TypeScript-native backends |
| Semantic Kernel | C#, Python | Plugin-based | Enterprise .NET/Python apps |
| Vercel AI SDK | TypeScript | Streaming | React/Next.js frontends |
Use when you want Claude Code's agent loop as a library in your own app or CI pipeline.
npm install @anthropic-ai/claude-agent-sdk (TypeScript) or pip install claude-agent-sdk (Python)Use when you want a lightweight, OpenAI-native agent framework with very few abstractions.
pip install openai-agents)Use when you want a model-agnostic Python framework that integrates tightly with Pydantic validation.
pip install pydantic-aiUse when you're building production agents inside the Google Cloud ecosystem.
pip install google-adk), TypeScript (@google/adk), Go, JavaUse when you need complex, stateful agent workflows with branching logic, parallel execution, and persistence.
Use when you need multiple agents with distinct roles collaborating on a task.
Use when you need multi-agent conversations — agents talking to each other to solve problems.
Use when you're building TypeScript-native agent backends.
For simple, deterministic pipelines (like a news aggregation pipeline), frameworks add unnecessary abstraction. A custom pipeline with async/await + direct API calls is simpler, faster, and easier to debug.
Rule of thumb: If your pipeline is a straight line (A → B → C → D), use plain code. If it branches, loops, or needs agent autonomy, use a framework.
Search for a command to run...