# Pydantic AI Harness (slim)

> Pydantic AI Harness is Pydantic's open-source Python library of agent capabilities for Pydantic AI, with workspaces and sandboxes, file and shell tools, memory, sub-agents, guardrails and spend limits, plus ready-made agents such as Coder and Researcher.

- Full: https://www.anchorterminal.com/tools/pydantic-ai-harness.md (~7,850 tokens) · this version ~1,530 tokens · JSON https://www.anchorterminal.com/tools/pydantic-ai-harness.json · canonical https://www.anchorterminal.com/tools/pydantic-ai-harness
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-11-27 · pricing https://www.anchorterminal.com/tools/pydantic-ai-harness#pricing · reviews https://www.anchorterminal.com/tools/pydantic-ai-harness#reviews
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

**A · 83.5/100 · rank #15 of 1698 · #5 in Agent frameworks & SDKs · agent-ready · confidence medium**


Assessment: 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.

## Facts

- Kind: Agent framework · vendor: Pydantic · category: Agent frameworks & SDKs · legal entity: Pydantic Services Inc. · provenance 79/100
- Packages: pypi `pydantic-ai-harness`
- Auth: None · pricing: Free · x402: no · licence: MIT
- Surface listed: The Python package `pydantic-ai-harness` 0.76.0, read from pydantic.dev/docs/ai/harness, PyPI and the README, pyproject.toml and docs/harness in a clone of pydantic/pydantic-ai on 27 November 2026. It wasn't installed or run
- Relation to Pydantic AI: An add-on package to the framework listed as pydantic-ai, released with it and pinned to the matching `pydantic-ai-slim`. The pydantic-ai listing credits the Harness's sandboxes and Prompt Injection Defender in its security notes
- Ready-made agents: `Coder` (`read_file`, `write_file`, `edit_file`, `list_files`, `grep`, `shell`, `delegate_task`, repository context and context controls) and `Researcher` (search, page fetching and a delegated sub-researcher)
- Workspaces: Core `LocalWorkspace`, and in the Harness Docker or Podman, smolvm, BoxLite, OpenSandbox, Kubernetes agent-sandbox, Modal, E2B, Daytona, Render, Sprites, boxd and SSH, plus a Bubblewrap wrapper the docs call best effort, not a security boundary
- Capabilities: 100 or more by the vendor's count, from core and the Harness, among them memory, planning, skills, sub-agents, compaction, code mode on Monty, browser use, computer use and hosted integrations such as GitHub, Linear, Slack and Notion
- Approvals and guardrails: `Permissions` modes `full` (default), `auto` and `read-only`, Approval Reviewer, Tool Call Judge, output guardrails, Deny Unanswered and a Prompt Injection Defender that reports by default
- Cost controls: `SpendLimits` budgets per run, day or month and per tenant, `ToolBudgets`, `ReportRemainingBudget`, `DetectLoops` and `ToolOutputLimits`, which spills results of 10,000 characters or more to a file
- Durable execution: Temporal and DBOS extras, plus Absurd, pgtask, AWS Lambda and Azure Durable Task pages in the Harness docs
- Telemetry: None from the Harness. Tracing goes through core's opt-in OpenTelemetry instrumentation or Logfire
- Releases: About 65 on PyPI from 0.1.1 on 13 April to 0.76.0 on 27 November 2026, 35 of them in the 90 days to 27 November

- Scores: Reliability 61, Performance not tested, Schema & documentation 98, Agent ergonomics 89, Security & auth 85, Payments & pricing 90, Task success not tested, Maintenance & community 87, Transparency & trust 82
- Why: Reliability, Local-package reading. · Schema & documentation, Framework reading. · Agent ergonomics, Framework reading. · Security & auth, Framework reading (telemetry defaults, approval hooks, guardrails, sandboxing). · Payments & pricing, Self-hosted rule. · Maintenance & community, 0.76.0 on 27 November 2026 (30). · Transparency & trust, MIT, with third-party notices in the package (30).
- Sources: 13, open questions: 4, both in the full twin
- Capabilities: agent.framework, agent.multi-agent, agent.durable, agent.mcp-client
- JSON: https://www.anchorterminal.com/api/v1/tools/pydantic-ai-harness.json · card, about 200 tokens, for choosing between listings: https://www.anchorterminal.com/tools/pydantic-ai-harness.card.md
- Its vendor verifies the listing with `verify_listing` or `POST https://www.anchorterminal.com/api/v1/verify` (the full twin says how); no effect on the grade.
- Support: https://github.com/pydantic/pydantic-ai/issues; more in the full twin

## Before you call it

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

## Connect

```bash
pip install "pydantic-ai-harness[coder,anthropic]"
```

## Similar tools

| Tool | Grade | Score | Shared capabilities | Slim |
| --- | --- | --- | --- | --- |
| AI SDK | AA | 93.6 | agent.framework, agent.mcp-client, agent.multi-agent, agent.durable | https://www.anchorterminal.com/tools/vercel-ai-sdk.min.md |
| OpenAI Agents SDK | AA | 90 | agent.framework, agent.multi-agent, agent.durable, agent.mcp-client | https://www.anchorterminal.com/tools/openai-agents-sdk.min.md |
| Pydantic AI | AA | 85.6 | agent.framework, agent.multi-agent, agent.durable, agent.mcp-client | https://www.anchorterminal.com/tools/pydantic-ai.min.md |
| Strands Agents | A | 83.7 | agent.framework, agent.mcp-client, agent.multi-agent, agent.durable | https://www.anchorterminal.com/tools/strands-agents.min.md |
| Microsoft Agent Framework | A | 83.1 | agent.framework, agent.multi-agent, agent.durable, agent.mcp-client | https://www.anchorterminal.com/tools/microsoft-agent-framework.min.md |


## Panel reviews (0, desk reviews from public material, no calls made)

