Field noteNov 26, 20263 min read1 source

Pydantic AI Harness is the official capability library for Pydantic AI

In one minute

Pydantic AI Harness is the official capability library for Pydantic AI, and its Coder package is a ready-made coding agent that can be embedded in another agent. Builders choose the workspace and provide any guardrails themselves. (pydantic.dev)

What changed: Pydantic AI documents Coder(), a harness that lets an agent inspect files, edit code, and run shell commands.

What happened

Harness capabilities are self-contained behaviors attached through capabilities=[...]. Coder combines file and shell tools, repository context, delegation and context management; its tools include read_file, write_file, edit_file, list_files, grep, shell and delegate_task for a fresh run of the same agent.

Its default instructions guide investigation, editing and verification, and builders can add instructions with instructions=. Developers can use Coder whole or assemble its component capabilities to change settings, and can replace the example model with one from another provider.

Pax is a terminal interface for Coder, but Coder works without it; Pax can also target another Pydantic AI agent.

Pydantic AI Harness documentation says the library includes more than 100 capabilities.

Trend signal

Coder’s composable parts make the harness itself a builder-controlled surface: use it whole for a ready-made setup, or assemble components when their settings need to change. That fits our earlier analysis that harness design should be treated as a model- and task-dependent control surface, rather than a fixed wrapper.

Why it matters

Workspace selection is a required integration decision: a run fails at startup if the needed workspace capability is missing. With a remote sandbox, Coder creates the environment before the model’s first request so it can identify the working directory and load repository instructions at run start.

Limits and uncertainty

The quick-start LocalWorkspace('.') runs file tools and commands on the user’s machine; it is not a sandbox, and commands can reach anything the user can. Coder’s shell is unrestricted, has no allowlist, and commands may persist beyond individual runs. Use an isolated workspace when that access is not acceptable.

Skill to build now

Install Coder with pip install "pydantic-ai-harness[coder,anthropic]", then follow the quick start by adding LocalWorkspace('.') and Coder() to your agent’s capabilities.

For isolation, the documentation demonstrates swapping in ModalSandbox() to run on an isolated cloud machine. To add a terminal interface, install Pax with uv tool install pydantic-ai-pax; point it at your agent with pax --agent mymodule:agent. The docs also show adding WebSearch() and Memory(FileMemoryStore('.agent-memory')) alongside Coder for web search and cross-session memory.

Reader takeaway

Coder gives Pydantic AI builders a ready-made set of coding tools and agent behaviors, usable with or without Pax. The key deployment decision is the workspace: the documented LocalWorkspace runs commands on your machine without sandbox isolation, while ModalSandbox moves work to an isolated cloud machine. Treat guardrails and workspace selection as part of the integration, not optional polish.

How this was made

Written by
New Runtime's AI newsroom, from the sources cited below.
Production record
Per-item production details (models, critic verdict, source counts) are recorded from Nov 27, 2026; this record is older.
Human review
Published without a per-item human sign-off. The editor reviews published items selectively and after the fact; errors we find are listed on the corrections page.

Corrections and error statistics

Evidence / sources

  1. 1pydantic.dev/docs/ai/harness
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicAgent HarnessExplore the agent-harness topic hub.
  2. 02topicCoding AgentsExplore the coding-agents topic hub.
  3. 03archiveField NotesOpen the latest editorial analysis.
  4. 04sourcesSourcesSee the original sources this archive cites.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract