General3 min read

Agent runtimes and frameworks

These tools solve different problems. Frameworks compose model calls and tools; orchestration runtimes provide durable execution; agent platforms add userfacing contro...

Status
current-snapshot
Updated
Topics
ai-engineering · frameworks · orchestration

Agent runtimes and frameworks

The gist Agent runtimes and frameworks provide the scaffolding for chaining model calls, managing state, and recovering from failures. Frameworks compose model calls and tools; orchestration runtimes provide durable execution; agent platforms add user-facing control planes. This guide compares LangGraph, CrewAI, AutoGen/AG2, Haystack, and direct SDK approaches across learning curve, community, and production readiness — and helps you decide when a simple SDK call beats a full framework.


Tool What to learn from it Typical fit
LangGraph Explicit graphs, state, checkpoints, human-in-loop Stateful agent workflows
OpenAI Agents SDK Harness primitives, tools, handoffs, tracing Hosted or custom OpenAI-agent applications
LangChain Model/tool abstractions and integrations Application composition and provider breadth
PydanticAI Typed Python agents and validated outputs Type-safe application agents
Mastra TypeScript agent/workflow primitives JS/TS product teams
Temporal Durable workflows, retries, timers, versioning Long-running reliable operations
OpenHands SDK Composable coding agents with execution surfaces Developer-agent platforms
CrewAI Role-based orchestration (Agents/Tasks/Crews/Flows) Fast prototyping (30–60 min)
AutoGen/AG2 (MS Agent Framework) Multi-agent conversations, merged with Semantic Kernel Enterprise multi-language (C#, Python, Java), Azure
Semantic Kernel Microsoft's agent SDK, plugin model, planners .NET/Java shops, Azure-native
Haystack Search and RAG pipelines, hybrid retrieval Document ingestion and retrieval quality

Comparison dimensions#

Dimension LangGraph CrewAI AutoGen/AG2 Haystack Direct SDK
Learning curve Medium (graph mental model) Low (role-based API) Medium (conversations) Medium (pipeline DAGs) Lowest (just API calls)
Community Large (126k+ stars, 400+ prod companies) Growing (20k+ stars, $18M funding) Large (Microsoft backing) Niche (deepset, strong RAG) Varies by provider
Production readiness High (Uber, LinkedIn, Klarna) Medium (teams hit ceiling at 6–12 months) GA April 2026 (Agent Framework 1.0) High for RAG pipelines Depends on implementation
Best for Complex stateful workflows with HITL Rapid prototyping, small teams Enterprise Azure/.NET environments Precision retrieval, hybrid search Single model calls, 1–2 tools

When raw SDK beats framework#

Use the direct provider SDK when: (1) you need a single model call, (2) you have 1–2 tools, (3) the workflow is simple and linear, (4) you want minimal dependencies, (5) provider-specific features matter (extended thinking, prompt caching, vision). Use a framework when: (1) you need multi-source retrieval with reranking, (2) the workflow has multi-step tool calling with state, (3) you need long-running workflows with human approval, (4) you need full tracing with evals, (5) you're building a team-facing product, not a single pipeline.

CrewAI caveat: fastest to prototype but teams hit a ceiling at 6–12 months as workflow complexity grows. It was rewritten independently of LangChain. AutoGen/Semantic Kernel note: merged into Microsoft Agent Framework 1.0 (GA April 2026); AutoGen and Semantic Kernel are now in maintenance mode. Haystack is strongest for document ingestion and retrieval quality; it is not a general-purpose agent framework.

Do not choose a framework before deciding whether the problem is a workflow, an agent, or a team. A framework cannot compensate for missing authority, evaluation, or observability design.

Sources and further reading#

All links verified 2026-08-27.

Primary references: LangGraph, OpenAI Agents SDK, LangChain, PydanticAI, Mastra, Temporal, and OpenHands SDK.



← Coding Agent Profiles · Home · Infrastructure and Observability Tools →

From my vault

AI-Engineering/08 Tool Landscape/Agent Runtimes and Frameworks