Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pydantic-ai-harness

Latest version: v0.77.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
PyPI package Publisher: org:pydantic
21,426 Stars
3,293 Forks
21 Versions
6.0M Downloads
Python Repo language

Scan summary

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.

  • Releases: 21 versions; the latest 5 were published within 5 days (24–28 Nov 2026).
  • Findings: No rules fired in version 0.77.0.
  • Downloads: 6,004,444 downloads.

Versions

21 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 0.77.0

Findings

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.

Known vulnerabilities

2 CVEs · last 19 Nov 2026

0 CRITICAL 1 HIGH 1 MEDIUM 0 LOW

Versions

  • > 0.69.0
  • ≥ 0.59.0, ≤ 0.69.0 1 HIGH
  • ≥ 0.4.0, < 0.59.0 1 HIGH 1 MEDIUM
  • < 0.4.0 1 MEDIUM

Vulnerabilities

  • CVE-2026-133161 High 19 Nov 2026 pydantic-ai-harness: Harness `ToolOutputLimits` ANSI stripping can take quadratic time, blocking the event loop No fix yet
  • CVE-2026-114386 Medium 21 Oct 2026 Pydantic AI Harness tool-call limit bypass in nested CodeMode calls Fixed in 0.59.0

README

The publisher’s own README, as collected from the registry.

Pydantic AI Harness

CI PyPI versions license Join Slack

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.

Pydantic AI, the harness SDK, Coder, and Pax

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

Quick start

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.

Built from capabilities

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.

Workspaces

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.

From problem to capability

Look up a capability by the problem it solves. The Capabilities section below lists all of them by what they give your agent.

OX Radar and Response Center

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.

Where it’s listed

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

  • pypi-releases pydantic-ai-harness

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229