Directory

LLM Agent Frameworks Compared

An agent framework gives you the loop: call the model, execute the tools it asks for, feed the results back, repeat until it stops. Around that sit state management, retries, structured output validation, and hooks for evaluation.

The honest starting position is that you may not need one. Provider SDKs now ship tool runners that handle the loop, and a first agent is often a hundred lines you fully understand. A framework pays off when you need orchestration the loop does not give you — branching workflows, durable state across restarts, multi-agent handoff — or when a team needs one shape to build against.

The cost is indirection. When an agent misbehaves you are debugging your prompt, your tools, and the framework's idea of how they fit together. Pick one whose abstractions you could reimplement if you had to.

6 tools · 6 open source · 6 self-hostable

At a glance

Agent frameworks compared
ToolBest forPricingRuns
Claude Agent SDKopen sourceFilesystem- and shell-shaped agents where the built-in tool set is most of what you need.Open sourceSelf-hosted
LangChainopen sourceProjects that benefit from breadth of integrations, and teams who want explicit stateful graphs via LangGraph.Open sourceHosted or self-hosted
LlamaIndexopen sourceRetrieval-heavy applications where document ingestion and indexing are the hard part.Open sourceHosted or self-hosted
Pydantic AIopen sourcePython teams already using Pydantic who want type safety and a framework small enough to hold in your head.Open sourceSelf-hosted
DSPyopen sourceTasks with a measurable metric and enough examples to optimise against, where hand-tuned prompts keep drifting.Open sourceSelf-hosted
Mastraopen sourceTypeScript and Node teams who want a framework designed for their stack instead of a translated one.Open sourceHosted or self-hosted

How to choose

Language, honestly

Most of this category is Python-first. If your service is TypeScript, the shortlist is genuinely shorter, and a thin layer over the provider SDK is often better than a half-maintained port.

How much it hides

Some frameworks give you primitives you compose; others give you an agent you configure. The second is faster to a demo and harder to debug at depth. Match this to how much novel behaviour you expect to need.

State and durability

A long agent run will be interrupted. Whether the framework can resume from a checkpoint — or expects you to hold state yourself — decides how much infrastructure you write around it.

Evaluation as a first-class concern

Anything shipped needs regression testing against a dataset. Frameworks that treat evals as part of the loop save you wiring an observability tool in later, though a dedicated tool will go deeper.

Frequently asked

Do I need an agent framework?

Often not. Provider SDKs include tool runners that drive the agent loop, and a first agent built directly on one is small and completely legible. Reach for a framework when you need orchestration, durable state, or a shared shape across a team.

What is the difference between an agent framework and an SDK tool runner?

A tool runner automates one loop: request, execute tools, feed results back, repeat. A framework adds what surrounds the loop — workflow branching, persistence, memory, retrieval, and evaluation.

Which agent frameworks work in TypeScript?

Fewer than in Python. Several major libraries ship a JavaScript or TypeScript package, and a couple are TypeScript-first. Check which is actually maintained rather than merely published.