Scan your whole stack
From OX Research Newsroom
Are you using pydantic-ai-harness?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.77.0
pydantic-ai-harness was last scanned on 28 Nov 2026 at version 0.77.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.77.0 LATEST | 28 Nov 2026 | No rules fired |
| 0.76.0 | 27 Nov 2026 | No rules fired |
| 0.75.0 | 25 Nov 2026 | No rules fired |
| 0.74.0 | 25 Nov 2026 | Not shown |
| 0.73.0 | 24 Nov 2026 | Not shown |
Findings for v0.77.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.77.0; other versions have their own rules, not their own score.
0 CRITICAL 1 HIGH 1 MEDIUM 0 LOW
The publisher’s own README, as collected from the registry.
Your agent's favorite harness, built on Pydantic AI
Pydantic AI Harness is the official capability and harness library for Pydantic AI. Every Pydantic AI agent already has a light harness: the typed agent loop, any model, your own tools, structured output. For simple agents that's enough. But set an agent loose on complex, long-running work (fix a codebase, research a question, run for hours unattended) and what it needs around the model grows: a workspace to act in, a plan it keeps current, memory that carries across sessions, sub-agents to hand work to, context management for long runs, and durable execution that survives a restart. Pydantic AI Harness ships that harness.
Everything here is one primitive: a capability, a self-contained unit of agent behavior you add to capabilities=[...] on any agent. There are 100+ of them, and complete agents like Coder and Researcher are themselves combinations of capabilities. Use a single capability, compose your own set, or start from the whole coding agent and swap parts out.
Coder, and PaxAn agent on its own is a loop calling a model and tools. A harness is everything around that loop that makes it hold up on real work: the workspace it acts in, the tools, context management, recovery, guardrails, and the interface you steer it through. Four layers carry that idea; start with the one that matches what you are doing:
| Layer | What it is | Start here when |
|---|---|---|
Pydantic AI (pydantic-ai) |
The agent framework: the agent loop, models from every major provider, tools, structured output, and the capability system | You are building an agent, or an LLM feature in your own application |
Pydantic AI Harness (pydantic-ai-harness) |
The SDK you build a harness of your own from: workspaces, file and shell tools, memory, sub-agents, context management, and ready-made agents like Coder |
Your agent needs to edit files, run commands, remember, delegate, or keep working through long runs |
Coder |
A ready-made coding agent in one capability: file and shell tools, task delegation, repo instructions and context management. You supply the workspace it runs in, and any guardrails | You want a coding agent in your own code, to run, extend or swap parts of |
Pax (pydantic-ai-pax) |
The TUI in front of Coder, and a terminal interface for any Pydantic AI agent; everything in it is a plugin, the coding agent included |
You want to use a coding agent rather than build one, or run your own agent in a terminal |
Each package installs the one it is built on: pydantic-ai-harness installs pydantic-ai-slim, and pydantic-ai-pax installs pydantic-ai-harness. Coder supplies the tools, context management and recovery; you choose the workspace it runs in and any guardrails, and Pax is the interface in front of it. That is why either works without the other: build on Coder and never open Pax, or point Pax at an agent that is entirely your own. Neither is clai, the legacy CLI that ships with Pydantic AI.
uv:
uv add "pydantic-ai-harness[coder,anthropic]"
pip:
pip install "pydantic-ai-harness[coder,anthropic]"
from pydantic_ai import Agent
from pydantic_ai.capabilities import LocalWorkspace
from pydantic_ai_harness.coder import Coder
agent = Agent(
'anthropic:claude-opus-5-5',
capabilities=[LocalWorkspace('.'), Coder()],
)
result = agent.run_sync('Find out why tests/test_parser.py fails and fix the bug it caught.')
print(result.output)
LocalWorkspace('.') is where the agent works: its file tools and commands run on your machine, in this directory. It is not a sandbox, so commands can reach anything you can. To run the same agent in an isolated cloud machine, swap it for a sandbox capability (Modal, E2B, Render, Sprites, Daytona, or boxd); see Workspaces.
With Modal, for example:
from pydantic_ai_harness.modal_sandbox import ModalSandbox
agent = Agent('anthropic:claude-opus-5-5', capabilities=[ModalSandbox(), Coder()])
Coder provides six tools: read_file, write_file, edit_file, list_files, grep, and shell, plus delegate_task to hand a sub-task to a fresh run of the same agent, repository context, and context controls. Shell commands are unrestricted and can persist beyond individual runs. Default instructions guide autonomous investigation, editing, and verification; pass instructions= to add your own guidance.
uv tool install pydantic-ai-pax
pax
Point it at your own agent with pax --agent mymodule:agent, or at the bundled export with pax --agent pydantic_ai_harness.coder:coder_agent -m anthropic:claude-opus-5-5, which is the example above without a model.
Every model works: swap the string for any provider's. Need more? Add capabilities to the list; here's the same coder on gpt-6.1-sol, with web search and cross-session memory:
uv:
uv add "pydantic-ai-slim[openai]"
pip:
pip install "pydantic-ai-slim[openai]"
from pydantic_ai import Agent
from pydantic_ai.capabilities import LocalWorkspace, WebSearch
from pydantic_ai_harness import Coder, Memory
from pydantic_ai_harness.memory import FileMemoryStore
agent = Agent(
'openai:gpt-6.1-sol',
capabilities=[
LocalWorkspace('.'),
Coder(),
WebSearch(), # look up docs and error messages on the web
Memory(FileMemoryStore('.agent-memory')), # remembers across sessions
],
)
Skills (your SKILL.md procedures, loaded on demand; point it at a skills/ directory and add the skills extra), Web Fetch, Guardrails, and Dynamic Workflow slot in the same way.
Coder is a regular combined capability: FileSystem with five of its tools and content hashes off, Shell with its persistent shell tool and no allowlist, RepoContext, SubAgents delegating to the agent itself, ClearToolResults, and a bounded ToolOutputLimits, plus its default instructions and JSON argument repair. Use it whole, or build the same agent from those capabilities to change any setting; the Coder page lists the exact configuration, tool signatures, delegation, and the persistent shell lifecycle.
A workspace is where the agent's files and commands live: your machine with LocalWorkspace, or an isolated sandbox. Harness capabilities never pick one for you. Attach one, or the run fails at its start and tells you what to attach.
Coder, FileSystem, Shell, Repo Context, and Macroscope work in the run's workspace, starting in its working directory. To work in a subdirectory, set it on the workspace: LocalWorkspace('./repo'). To continue in the same files from a later run or another agent, see Sharing a workspace.
Skills, SubAgents, ToolOutputLimits, and Memory's FileMemoryStore use the run's workspace for their own files too. To keep those files on your machine while the agent works in a sandbox, point them at a local location:
from pydantic_ai.workspaces import LocalWorkspaceBackend
from pydantic_ai_harness import Memory, ToolOutputLimits
from pydantic_ai_harness.memory import FileMemoryStore
from pydantic_ai_harness.tool_output_limits import LocalFileOverflowStore
memory = Memory(FileMemoryStore('.', workspace=LocalWorkspaceBackend('/var/lib/myapp/memory'))) # notes on this machine
limits = ToolOutputLimits(store=LocalFileOverflowStore()) # spills in this machine's temp directory
By default, harness files (Shell's background job logs, tool-output spills) go in .pydantic-ai-harness/ in the workspace's working directory, which is git-ignored. When the workspace user cannot write to the working directory, Shell keeps its job files in a directory private to that user under the workspace's temp directory ($TMPDIR in its environment, or /tmp) instead.
Step Persistence's file and SQLite stores, Media's disk and SQLite stores, and Code Mode mounts use paths on the machine running the agent, not the run's workspace.
FileSystem's root_dir limits only the file tools, not Shell commands.
Upgrading from an earlier release? The Coder page lists what changed.
Look up a capability by the problem it solves. The Capabilities section below lists all of them by what they give your agent.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.