---
type: "post"
id: "pydantic-ai-harness-is-the-official-capability-library-867f60"
slug: "pydantic-ai-harness-is-the-official-capability-library-867f60"
title: "Pydantic AI Harness is the official capability library for Pydantic AI"
description: "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."
retrieval_nugget: "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."
published_at: "2026-11-26"
updated_at: "2026-11-26"
record_date: "2026-11-26"
date_kind: "published_at"
topics: ["agent-harness","coding-agents"]
entities: ["Pydantic AI","Pydantic AI Harness","Coder"]
related_patterns: ["harness-architecture-outlives-model-choice"]
novelty_label: "new_fact"
what_changed: "Pydantic AI documents Coder(), a harness that lets an agent inspect files, edit code, and run shell commands."
prior_refs: []
source_url: "https://pydantic.dev/docs/ai/harness"
source_urls: ["https://pydantic.dev/docs/ai/harness"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:pydantic-ai-harness-is-the-official-capability-library-867f60"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/pydantic-ai-harness-is-the-official-capability-library-867f60/","markdown":"https://newruntime.com/posts/pydantic-ai-harness-is-the-official-capability-library-867f60.md","json":"https://newruntime.com/posts/pydantic-ai-harness-is-the-official-capability-library-867f60.json"}
markdown_url: "https://newruntime.com/posts/pydantic-ai-harness-is-the-official-capability-library-867f60.md"
---

# Pydantic AI Harness is the official capability library for Pydantic AI

## Retrieval answer

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.

## Summary

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](https://pydantic.dev/docs/ai/harness))

## 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.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Agent Harness](https://newruntime.com/topics/agent-harness.md): Explore the agent-harness topic hub.
- topic hub: [Coding Agents](https://newruntime.com/topics/coding-agents.md): Explore the coding-agents topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
