Simple definition#
An agent framework is a library or SDK that implements the plumbing every agent needs — the loop that calls the model, executes tools and feeds results back — plus state, memory, multi-agent coordination, human-in-the-loop, guardrails and tracing. You write the instructions, tools and business logic; the framework runs them.
What a framework gives you#
| Capability | Without a framework | With a framework |
|---|---|---|
| Agent loop | Hand-written loop over model responses and tool calls | agent.run(...) with step limits |
| Tools | JSON Schemas written by hand | Generated from functions/annotations; MCP client built in |
| State & checkpoints | Your own tables and resume logic | Pluggable checkpointers, sessions, durable runs |
| Multi-agent | Custom routing code | Handoffs, supervisors, graphs, crews |
| Human-in-the-loop | Custom pause/resume | Interrupts, approvals, resumable runs |
| Guardrails | Ad-hoc checks | Input/output guardrail hooks, middleware |
| Observability | Manual logging | Tracing (often OpenTelemetry) out of the box |
| Protocols | Your own integrations | MCP, A2A and AG-UI adapters |
Where frameworks sit in the platform#
The framework is one layer. Around it: the agent UI (connected with AG-UI or a custom stream), the AI gateway that governs model calls, MCP servers for tools, remote agents via A2A, and a runtime that keeps state and traces — either your own Kubernetes deployment or a managed agent platform.
Categories of frameworks#
flowchart TB
A["Agent frameworks"] --> G["Graph / workflow runtimes<br/>explicit state machines"]
A --> M["Agent SDKs<br/>agents, tools, handoffs"]
A --> H["Agent harnesses<br/>batteries-included autonomous agents"]
A --> J["JVM & .NET frameworks<br/>enterprise stacks"]
A --> P["Managed agent platforms<br/>cloud runtimes"]
A --> L["Low-code builders<br/>visual flows"]
G --- G1["LangGraph · LlamaIndex Workflows ·<br/>ADK workflow agents · MAF workflows"]
M --- M1["OpenAI Agents SDK · Google ADK ·<br/>Microsoft Agent Framework · CrewAI ·<br/>Pydantic AI · Strands · smolagents"]
H --- H1["Claude Agent SDK · LangChain Deep Agents ·<br/>coding-agent CLIs"]
J --- J1["Spring AI · Embabel · LangChain4j ·<br/>Koog · ADK Java · MAF .NET"]
P --- P1["Bedrock AgentCore · Vertex AI Agent Engine ·<br/>Azure AI Foundry Agent Service"]
L --- L1["Copilot Studio · n8n · Dify ·<br/>vendor agent builders"]
| Category | Mental model | Best when |
|---|---|---|
| Graph / workflow runtimes | You draw the state machine; nodes are LLM calls, tools or code | You need precise control, branching, retries, durable checkpoints and human interrupts |
| Agent SDKs | Agents with instructions + tools; hand off to other agents | You want a clean, lightweight way to build tool-using and multi-agent apps |
| Agent harnesses | A ready-made autonomous agent (file system, shell, sub-agents, skills, context management) you configure | Open-ended, long-running tasks: coding, research, operations |
| JVM & .NET frameworks | Agents as Spring beans / services in the enterprise stack | Your estate is Java or .NET, with existing security, data and ops |
| Managed platforms | Deploy any framework onto a serverless agent runtime with memory, identity and tool gateways | You want the cloud to run sessions, isolation, identity and observability |
| Low-code builders | Visual flow designers with connectors | Business-led automation with moderate complexity |
The main frameworks at a glance#
| Framework | Languages | Core abstraction | Standout strengths | Watch out for |
|---|---|---|---|---|
| LangGraph (LangChain) | Python, TS | State graph with checkpoints | Fine-grained control, durable execution, interrupts, large ecosystem | More code and concepts than lighter SDKs |
LangChain create_agent / Deep Agents |
Python, TS | Agent + middleware; batteries-included harness | Fast start on the LangGraph runtime; sub-agents, file system, skills | Deep Agents still evolving quickly |
| OpenAI Agents SDK | Python, TS | Agents, tools, handoffs, guardrails, sessions | Minimal abstractions, built-in tracing | Best experience with OpenAI models |
| Claude Agent SDK | Python, TS | The Claude Code agent harness as a library | Context management, sub-agents, skills, hooks, permissions, MCP | Harness opinionated around Claude models |
| Google ADK | Python, Java, Go, TS | LLM agents + workflow agents (sequential, parallel, loop) | Native A2A, deploys to Vertex AI Agent Engine | Strongest fit on Google Cloud |
| Microsoft Agent Framework | Python, .NET | Agents + graph workflows | Successor to AutoGen and Semantic Kernel (1.0 in April 2026); MCP, A2A, checkpointing, HITL | Migration needed from AutoGen/SK |
| CrewAI | Python | Role-based crews + Flows | Very fast to prototype multi-agent teams | Less low-level control; heavier runtime |
| LlamaIndex | Python, TS | Event-driven Workflows + agents | Best-in-class data/RAG connectors | Agent features secondary to RAG |
| Pydantic AI | Python | Type-safe agents with validated outputs | Strong typing, dependency injection, testability | Smaller multi-agent feature set |
| AWS Strands Agents | Python, TS | Model-driven agent loop | Simple; integrates with Bedrock AgentCore | AWS-centric ecosystem |
| Spring AI | Java | ChatClient, advisors, tools, MCP | Spring Boot native; enterprise integration | Agent orchestration is pattern-based, less opinionated |
| Embabel | Java, Kotlin | Goal-oriented actions planned by GOAP | Deterministic, explainable planning on Spring | Newer; smaller community |
| LangChain4j | Java | AI Services + agentic module | Framework-agnostic Java (Quarkus, Micronaut, Spring) | Agentic module younger than core |
| Koog (JetBrains) | Kotlin | Type-safe agent DSL and strategy graphs | Kotlin multiplatform, persistence/fault tolerance | Kotlin-first |
Details: Python and TypeScript frameworks, JVM frameworks, managed platforms.
How to choose#
flowchart TD
S["New agent use case"] --> Q1{"Main language<br/>of the team?"}
Q1 -->|"Java / Kotlin"| J{"Spring Boot estate?"}
J -->|"yes"| J1["Spring AI; add Embabel for<br/>goal-driven planning"]
J -->|"no"| J2["LangChain4j, or Koog for Kotlin"]
Q1 -->|".NET"| N1["Microsoft Agent Framework"]
Q1 -->|"Python / TS"| Q2{"Open-ended, long-running<br/>autonomous task?"}
Q2 -->|"yes"| H1["Agent harness: Claude Agent SDK<br/>or Deep Agents"]
Q2 -->|"no"| Q3{"Need explicit control flow,<br/>durable state, interrupts?"}
Q3 -->|"yes"| G1["LangGraph or MAF workflows"]
Q3 -->|"no"| Q4{"Committed cloud / model vendor?"}
Q4 -->|"Google"| A1["Google ADK"]
Q4 -->|"Microsoft"| A2["Microsoft Agent Framework"]
Q4 -->|"AWS"| A3["Strands Agents"]
Q4 -->|"OpenAI"| A4["OpenAI Agents SDK"]
Q4 -->|"neutral"| A5["LangGraph, Pydantic AI or CrewAI"]
Evaluation criteria#
| Criterion | Questions |
|---|---|
| Control | Can you define exact control flow, branching and retries? Can you see and edit the prompts the framework sends? |
| State & durability | Checkpointing, resumable runs, human interrupts, long-running tasks? |
| Model neutrality | Works well with several providers and with your AI gateway? |
| Protocols | MCP client (and server), A2A, AG-UI support? |
| Observability | OpenTelemetry tracing? Integrations with your LLMOps tools? |
| Testing | Easy to unit-test steps, mock models and run evaluation suites? |
| Security | Tool permission hooks, guardrails, sandboxing, identity propagation? |
| Deployment | Runs in your containers; supported by managed agent runtimes? |
| Maturity | 1.0+ API stability, release cadence, docs, community, commercial support? |
| Fit | Language, team skills, existing platform (Spring, Azure, GCP, AWS)? |
Avoiding framework lock-in#
- Tools as MCP servers, not framework-specific tool classes — every framework can call them.
- Prompts and evaluation sets in your repository, independent of framework.
- Agent-to-agent via A2A, so agents built with different frameworks can cooperate.
- OpenTelemetry tracing, so observability survives a framework change.
- Thin adapters around the framework API in your code.
Common mistakes#
Review questions#
What does an agent framework provide beyond a model SDK? The agent loop, tool schema generation and execution, state and checkpointing, multi-agent coordination, human-in-the-loop, guardrails, tracing and protocol adapters (MCP, A2A, AG-UI).
When would you choose a graph runtime such as LangGraph over a lightweight SDK? When you need explicit, testable control flow — branching, retries, durable checkpoints, human interrupts and long-running workflows — rather than letting the model decide every step.
What is the difference between an agent SDK and an agent harness? An SDK gives building blocks (agents, tools, handoffs) that you assemble. A harness is a ready-made autonomous agent — file system, shell, sub-agents, skills, context compaction, permissions — that you configure and extend.
How do you avoid lock-in to an agent framework? Put tools behind MCP, use A2A between agents, keep prompts and evaluation data in your own repository, trace with OpenTelemetry and wrap the framework behind thin adapters.
Which framework would you pick for a Spring Boot bank? Spring AI for model access, RAG, tools, MCP and memory inside the existing Spring estate; Embabel when goal-driven, explainable planning helps; managed or Kubernetes runtime with the bank’s identity, gateway and observability.
Summary#
- Frameworks run the agent loop and add state, multi-agent, HITL, guardrails, tracing and protocols.
- Categories: graph runtimes, agent SDKs, harnesses, JVM/.NET frameworks, managed platforms, low-code builders.
- Choose by language, control, durability, model neutrality, protocols, observability and maturity.
- Keep tools, prompts, evaluation and tracing framework-independent.
References#
- LangChain, Frameworks, runtimes and harnesses.
- OpenAI, Agents SDK.
- Anthropic, Claude Agent SDK.
- Google, Agent Development Kit.
- Microsoft, Agent Framework.
- Embabel Agent.