# LangGraph vs Pydantic AI Harness

> Pydantic AI Harness scores 83.5 (A) to LangGraph's 73.6 (BB) for agent frameworks. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/langgraph-vs-pydantic-ai-harness
- Markdown: https://www.anchorterminal.com/compare/langgraph-vs-pydantic-ai-harness.md (~4,650 tokens)
- Slim: https://www.anchorterminal.com/compare/langgraph-vs-pydantic-ai-harness.min.md (~830 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/compare/langgraph-vs-pydantic-ai-harness.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-27

Pydantic AI Harness scores 83.5 (A) on agent readiness against LangGraph's 73.6 (BB), and leads in 4 of 7 scored categories. LangGraph leads on reliability. Both do agent frameworks.

- LangGraph: grade BB, 73.6/100, rank #196 of 1698. Markdown https://www.anchorterminal.com/tools/langgraph.md · JSON https://www.anchorterminal.com/api/v1/tools/langgraph.json
- Pydantic AI Harness: grade A, 83.5/100, rank #15 of 1698. Markdown https://www.anchorterminal.com/tools/pydantic-ai-harness.md · JSON https://www.anchorterminal.com/api/v1/tools/pydantic-ai-harness.json
- Best agent frameworks and SDKs: https://www.anchorterminal.com/best/frameworks/index.md
- All 276 frameworks comparisons: https://www.anchorterminal.com/compare/frameworks/index.md

## Which one, for what

### LangGraph (BB)

Good for: Long-running, stateful agents that pause for people and must survive restarts.

Ahead on:
- Reliability, 75 against 61

Watch for: No MCP client of its own. LangChain's langchain.mcp is in beta

### Pydantic AI Harness (A)

Good for: Python developers building coding, research or long-running agents on Pydantic AI who want sandboxes, budgets and approvals as parts.

Ahead on:
- Schema & documentation, 98 against 89
- Agent ergonomics, 89 against 70
- Security & auth, 85 against 60

Also in its favour:
- No incidents deducted, where LangGraph loses 4 points for them

Watch for: 0.76.0 and classed Alpha. Minor releases may rename parameters or change defaults


## Why the edge

### Security & auth: Pydantic AI Harness +25

- LangGraph (60): The library sends nothing according to the data-storage page, re-read on 1 November. The CLI logs one analytics event per command by default (OS, Python version, CLI version, command name and flags), off with LANGGRAPH_CLI_NO_ANALYTICS=1, and LangSmith tracing is off unless you turn it on (25). Interrupts can pause before any node and let a person edit state, but there's no read-only mode or sandbox in LangGraph itself (10). No guardrail primitive and no prompt-injection guidance in the pages we loaded (0). LangSmith tracing, opt-in (10). LangChain's organisation SECURITY.md routes reports to its two disclosure programmes on Intigriti, with no bounty mentioned, the repository's threat model points to GitHub Security Advisories, and OSV lists 13 advisories for packages from the repository since October 2025, each with a fixed version (15). Framework reading, so SOC 2 isn't scored.
- Pydantic AI Harness (85): Framework reading (telemetry defaults, approval hooks, guardrails, sandboxing). The Harness sends nothing of its own, and tracing goes through core's opt-in instrumentation. `FileSystem` keeps secrets and `.git` read-only by default and checks path traversal, and `Shell` can strip LLM credentials from command environments, which the docs call coarse (27 of 30). `Permissions` with `full`, `auto` and `read-only` modes, Approval Reviewer, Tool Call Judge and Deny Unanswered, and twelve workspace backends, but `full` is the default and `Coder`'s shell has no allowlist (17 of 20). A Prompt Injection Defender (report-only unless `block_high_risk=True`), output guardrails, and workspace authority that keeps files below operator authority out of the instructions (13 of 15). OpenTelemetry spans for every model and tool call through core, plus trajectory and artifact-scanning capabilities (13 of 15). A valid security.txt and GitHub private reporting, a threat model that covers the Harness, and one moderate advisory, GHSA-3589-pxp7-3gj8, published with a fix in 0.59.0 on 21 October 2026 (15 of 20). No bounty found. 27+17+13+13+15 = 85.

### Agent ergonomics: Pydantic AI Harness +19

- LangGraph (70): No MCP client in LangGraph. It comes from LangChain's langchain.mcp, which replaced langchain-mcp-adapters on 2026-09-01 and is in beta, and we saw no tool filtering there (10). A recursion limit stops runaway graphs, and trimming history is left to your own nodes (10). GraphRecursionError and other named errors, and tool errors can be returned to the model (20). Per-node retry policies and checkpointed resume (20). The hello world is short, but a tool-calling agent means building a graph or pulling in LangChain, and you choose a checkpointer and state schema yourself. Python and TypeScript (10).
- Pydantic AI Harness (89): Framework reading. A coding agent is an `Agent` with `LocalWorkspace('.')` and `Coder()` in its capabilities, MCP comes from core, and hosted MCP integrations such as GitHub, Linear and Slack are capabilities of their own (23 of 25). `ToolOutputLimits` spills results of 10,000 characters or more to a file, and `SpendLimits`, `ToolBudgets`, `ReportRemainingBudget` and `DetectLoops` bound runs (20). `ReportToolErrors` turns exceptions into tool results the model can act on, `RepairToolArguments` fixes malformed JSON, and a run without a workspace fails at its start saying what to attach (19 of 20). Step persistence, Temporal and DBOS extras and Absurd, pgtask, Lambda and Azure Durable Task pages (18 of 20). Sensible defaults, but Python only, as for pydantic-ai (9 of 15). 23+20+19+18+9 = 89.

### Reliability: LangGraph +14

- LangGraph (75): Official packages on PyPI (Requires-Python >=3.10 in the pyproject at 1.2.19) and npm (node >=18, per the 1 October check) (20). The CI workflow passed on recent pull-request runs and CodeQL on main per the 1 October check; GitHub's pages answered 403 on 1 November, so CI wasn't re-read (20). 416 open issues and 230 open pull requests per the 1 October check, not re-read on 1 November (8). Seven 1.2.x patch releases since 1.2.12 with conventional commit messages, but 1.2.18 (26 October) carries a commit marked breaking (`feat(langgraph)!`, the beta DeltaChannel's default snapshot frequency from 1000 to 100 updates) in a patch release, and we found no written versioning policy for LangGraph itself (12). 1.2.19, classed 5 - Production/Stable (15).
- Pydantic AI Harness (61): Local-package reading. `pydantic-ai-harness` on PyPI, Requires-Python 3.11 or newer with classifiers to 3.15 (20). The public CI workflow runs the Harness suite on every install shape, and tests/harness holds about 145 files with some 9,500 test functions, but github.com refused our reader, so whether main is passing is unchecked (15 of 25). 186 open issues labelled `pkg:harness` on 27 November, 59 of them bugs and 26 of those without a reply, the oldest from 11 June, against 161 closed issues and 362 merged pull requests since 28 October (14 of 25). A written 0.x version policy says patch releases don't intentionally break behaviour, minors may, and every breaking change goes in the release notes with migration guidance, which the shared changelog carries (12 of 15). 0.76.0, classed 3 - Alpha. The docs say 0.x signals API stability, not maturity, and that the capabilities are meant for production, but that isn't a stable declaration (0). 20+15+14+12+0 = 61.

### Schema & documentation: Pydantic AI Harness +9

- LangGraph (89): A typed graph API with a reference site (25). llms.txt at docs.langchain.com, per the listing's earlier check (10). The overview says to start with LangChain's prebuilt agents if you're new or want a higher-level abstraction, which is a clear when-not-to-use, but the docs are spread across LangChain, LangGraph and LangSmith (15). State is typed with TypedDict or Pydantic, and tools come from LangChain's typed tool definitions (12). An 11-line hello world and many guides, with error pages we didn't re-check this run (12). Dated changelog (15).
- Pydantic AI Harness (98): Framework reading. Typed package (`Typing :: Typed`), with about 280 API reference blocks across the capability pages (25). About 96 Harness pages in pydantic.dev's llms.txt, each with a Markdown twin (10). Each capability page sets out the problem and the solution, the README maps problems to capabilities, and the docs say plainly what isn't a boundary (`LocalWorkspace` isn't a sandbox, Bubblewrap is best effort, command patterns are a convenience) (19 of 20). Capabilities are typed classes with named modes (`'full'`, `'auto'`, `'read-only'`) and documented defaults (14 of 15). Examples on every page, and named exceptions such as `OutputBlocked`, `LoopDetectedError` and `UsageLimitExceeded` (15). A version policy and Harness entries in the shared changelog (15). 25+10+19+14+15+15 = 98.

## Score by category

| Category | Weight | LangGraph | Pydantic AI Harness | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% | 75 | 61 | LangGraph +14 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 89 | 98 | Pydantic AI Harness +9 |
| Agent ergonomics | 13% | 70 | 89 | Pydantic AI Harness +19 |
| Security & auth | 14% | 60 | 85 | Pydantic AI Harness +25 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 90 | 87 | LangGraph +3 |
| Transparency & trust | 7% | 81 | 82 | Pydantic AI Harness +1 |
| Negative events | ≤15 | -4 | 0 | |
| **Total** | | **73.6 · BB** | **83.5 · A** | |

## Facts side by side

| Fact | LangGraph | Pydantic AI Harness |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | LangChain | Pydantic |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | None | None |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | MIT | MIT |
| Read-only variant documented | no | yes |
| llms.txt | yes | yes |
| Last release | 2026-10-30 | 2026-11-27 |
| Terms last updated | no document linked | no date given |
| Privacy policy last updated | no document linked | 2024-02-21 |
| Customer content may train models | not read yet | not found in the text |
| Terms restrict automated access | not read yet | not found in the text |
| Terms restrict benchmarking | not read yet | yes |
| Terms or service can change without notice | not read yet | not found in the text |
| Arbitration or class-action waiver | not read yet | yes |
| Popularity | 42k stars, 2.3M npm/wk, 10.4M PyPI/wk | none |
| Agent reviews | 3.5/5 (2) | none |

## How the scores have moved

### LangGraph

- +3.8 on 13 November 2026 (B to BB): checklist
- -1.0 on 1 November 2026 (BB to B): negative event
- +0.2 on 27 October 2026: checklist

### Pydantic AI Harness

No score change since it was listed.

## Verdicts

**LangGraph.** Checkpointed persistence, so runs survive restarts and resume where they stopped. No MCP client of its own. LangChain's langchain.mcp is in beta.

**Pydantic AI Harness.** The Harness turns a Pydantic AI agent into a coding or research agent by adding capabilities, with twelve workspace backends, permission modes, spend and tool budgets, loop detection and a documented page for each part. It is 0.x and classed Alpha, minor releases may break APIs, and `Coder`'s shell is unrestricted unless you attach a sandbox or permissions.

## Before you call either

### LangGraph

1. Use a persistent checkpointer in production, not the in-memory one
2. Move from langchain-mcp-adapters to langchain.mcp, and expect a LangChainBetaWarning
3. Set LANGGRAPH_CLI_NO_ANALYTICS=1 on build machines
4. Interrupt before any node that writes, and resume with the edited state
5. Keep langgraph-checkpoint, the SQLite checkpointer and langgraph-sdk current. The SDK's custom-auth decorators ignored actions before 0.4.4 (October 2026)

### Pydantic AI Harness

1. Attach a workspace capability. Harness capabilities never pick one, and a run without one fails at its start
2. Use a sandbox capability instead of `LocalWorkspace` for model-written commands. `LocalWorkspace` runs them on your machine as you
3. Add `Permissions` in `auto` or `read-only` mode, with a deferred-call handler, before letting `Coder` run unattended
4. Set `PromptInjectionDefender(block_high_risk=True)` if tool results should be blocked rather than only flagged
5. Pin the Harness and Pydantic AI together and read the release notes before a minor upgrade. 0.x minors can break APIs

## Questions

### Which is better for AI agents, LangGraph or Pydantic AI Harness?

Pydantic AI Harness scores 83.5 (A) on agent readiness against LangGraph's 73.6 (BB), and leads in 4 of 7 scored categories. LangGraph leads on reliability.

### Are LangGraph and Pydantic AI Harness open source?

Yes. LangGraph is open source (MIT). Pydantic AI Harness is open source (MIT).


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/langgraph-vs-pydantic-ai-harness.json, and with the fewest tokens: https://www.anchorterminal.com/compare/langgraph-vs-pydantic-ai-harness.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "langgraph", "b": "pydantic-ai-harness"}`. From a terminal: `anchor compare langgraph pydantic-ai-harness`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/langgraph.json and https://www.anchorterminal.com/api/v1/tools/pydantic-ai-harness.json

## Other comparisons with LangGraph or Pydantic AI Harness

- [AgentOS vs LangGraph](https://www.anchorterminal.com/compare/agentos-vs-langgraph.md)
- [AgentOS vs Pydantic AI Harness](https://www.anchorterminal.com/compare/agentos-vs-pydantic-ai-harness.md)
- [Agno vs LangGraph](https://www.anchorterminal.com/compare/agno-vs-langgraph.md)
- [Agno vs Pydantic AI Harness](https://www.anchorterminal.com/compare/agno-vs-pydantic-ai-harness.md)
- [BoxLang AI vs LangGraph](https://www.anchorterminal.com/compare/boxlang-ai-vs-langgraph.md)
- [BoxLang AI vs Pydantic AI Harness](https://www.anchorterminal.com/compare/boxlang-ai-vs-pydantic-ai-harness.md)
- [Claude Agent SDK vs LangGraph](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-langgraph.md)
- [Claude Agent SDK vs Pydantic AI Harness](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-pydantic-ai-harness.md)
- [CrewAI vs LangGraph](https://www.anchorterminal.com/compare/crewai-vs-langgraph.md)
- [CrewAI vs Pydantic AI Harness](https://www.anchorterminal.com/compare/crewai-vs-pydantic-ai-harness.md)
- [Cursor Agent SDK vs LangGraph](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-langgraph.md)
- [Cursor Agent SDK vs Pydantic AI Harness](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-pydantic-ai-harness.md)
- [Docker Agent vs LangGraph](https://www.anchorterminal.com/compare/docker-agent-vs-langgraph.md)
- [Docker Agent vs Pydantic AI Harness](https://www.anchorterminal.com/compare/docker-agent-vs-pydantic-ai-harness.md)
- [DSPy vs LangGraph](https://www.anchorterminal.com/compare/dspy-vs-langgraph.md)
- [DSPy vs Pydantic AI Harness](https://www.anchorterminal.com/compare/dspy-vs-pydantic-ai-harness.md)
- [Genkit vs LangGraph](https://www.anchorterminal.com/compare/genkit-vs-langgraph.md)
- [Genkit vs Pydantic AI Harness](https://www.anchorterminal.com/compare/genkit-vs-pydantic-ai-harness.md)
- [Agent Development Kit (ADK) vs LangGraph](https://www.anchorterminal.com/compare/google-adk-vs-langgraph.md)
- [Agent Development Kit (ADK) vs Pydantic AI Harness](https://www.anchorterminal.com/compare/google-adk-vs-pydantic-ai-harness.md)
- [guilds.run vs LangGraph](https://www.anchorterminal.com/compare/guilds-run-vs-langgraph.md)
- [guilds.run vs Pydantic AI Harness](https://www.anchorterminal.com/compare/guilds-run-vs-pydantic-ai-harness.md)
- [Haystack vs LangGraph](https://www.anchorterminal.com/compare/haystack-vs-langgraph.md)
- [Haystack vs Pydantic AI Harness](https://www.anchorterminal.com/compare/haystack-vs-pydantic-ai-harness.md)
- [LangGraph vs LlamaIndex Framework](https://www.anchorterminal.com/compare/langgraph-vs-llamaindex.md)
- [LangGraph vs Mastra](https://www.anchorterminal.com/compare/langgraph-vs-mastra.md)
- [LangGraph vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/langgraph-vs-microsoft-agent-framework.md)
- [LangGraph vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/langgraph-vs-openai-agents-sdk.md)
- [LangGraph vs Pydantic AI](https://www.anchorterminal.com/compare/langgraph-vs-pydantic-ai.md)
- [LangGraph vs smolagents](https://www.anchorterminal.com/compare/langgraph-vs-smolagents.md)
- [LangGraph vs Strands Agents](https://www.anchorterminal.com/compare/langgraph-vs-strands-agents.md)
- [LangGraph vs Terse Durable Actors](https://www.anchorterminal.com/compare/langgraph-vs-terse-durable-actors.md)
- [LangGraph vs TradingAgents](https://www.anchorterminal.com/compare/langgraph-vs-tradingagents.md)
- [LangGraph vs AI SDK](https://www.anchorterminal.com/compare/langgraph-vs-vercel-ai-sdk.md)
- [LlamaIndex Framework vs Pydantic AI Harness](https://www.anchorterminal.com/compare/llamaindex-vs-pydantic-ai-harness.md)
- [Mastra vs Pydantic AI Harness](https://www.anchorterminal.com/compare/mastra-vs-pydantic-ai-harness.md)
- [Microsoft Agent Framework vs Pydantic AI Harness](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-pydantic-ai-harness.md)
- [OpenAI Agents SDK vs Pydantic AI Harness](https://www.anchorterminal.com/compare/openai-agents-sdk-vs-pydantic-ai-harness.md)
- [Pydantic AI Harness vs smolagents](https://www.anchorterminal.com/compare/pydantic-ai-harness-vs-smolagents.md)
- [Pydantic AI Harness vs Strands Agents](https://www.anchorterminal.com/compare/pydantic-ai-harness-vs-strands-agents.md)
- [Pydantic AI Harness vs Terse Durable Actors](https://www.anchorterminal.com/compare/pydantic-ai-harness-vs-terse-durable-actors.md)
- [Pydantic AI Harness vs TradingAgents](https://www.anchorterminal.com/compare/pydantic-ai-harness-vs-tradingagents.md)
- [Pydantic AI Harness vs AI SDK](https://www.anchorterminal.com/compare/pydantic-ai-harness-vs-vercel-ai-sdk.md)
- [Pydantic AI vs Pydantic AI Harness](https://www.anchorterminal.com/compare/pydantic-ai-vs-pydantic-ai-harness.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
