migrating-deep-agents-to-pydantic-ai-harness

migrating-deep-agents-to-pydantic-ai-harness is a skill for Codex from pydantic/pydantic-ai. It costs 109 tokens per session (1,329 once invoked), scanned A, original, MIT.

A migration guide for moving applications built with LangChain Deep Agents to Pydantic AI and Pydantic AI Harness. It focuses on preserving how the existing application behaves, including its tools, permissions, memory, delegation, and execution state.

In plain words
What is it for?
Use it to inspect a Deep Agents application's dependencies and runtime, map its features to Pydantic AI, and identify behavior that could not be verified during migration.
Why use it?
It helps avoid a superficial rewrite that changes important behavior or falsely claims the new version matches the old one.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

Good fit Use it to inspect a Deep Agents application's dependencies and runtime, map its features to Pydantic AI, and identify behavior that could not be verified during migration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pydantic/pydantic-ai/migrating-deep-agents-to-pydantic-ai-harness
About the project

Pydantic AI is a typed Python SDK for building AI agents that can use different language models and interfaces, including voice, image generation, and embeddings. Developers use it for applications ranging from structured data extraction to long-running multi-agent work. The catalogue entries provide workflows and configuration for its coding-agent and harness features.

pydantic/pydantic-ai · 20,645 stars · on GitHub · pydantic.dev

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pydantic/pydantic-ai --skill migrating-deep-agents-to-pydantic-ai-harness
Clone the repo
git clone --depth 1 https://github.com/pydantic/pydantic-ai

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrating-deep-agents-to-pydantic-ai-harness

README.md
[![agentmods](https://agentmods.dev/badge/skills/pydantic/pydantic-ai/migrating-deep-agents-to-pydantic-ai-harness/github.svg)](https://agentmods.dev/skills/pydantic/pydantic-ai/migrating-deep-agents-to-pydantic-ai-harness)
Your own site
<a href="https://agentmods.dev/skills/pydantic/pydantic-ai/migrating-deep-agents-to-pydantic-ai-harness"><img src="https://agentmods.dev/badge/skills/pydantic/pydantic-ai/migrating-deep-agents-to-pydantic-ai-harness/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for migrating-deep-agents-to-pydantic-ai-harness

Your own site · 80×15
<a href="https://agentmods.dev/skills/pydantic/pydantic-ai/migrating-deep-agents-to-pydantic-ai-harness"><img src="https://agentmods.dev/badge/skills/pydantic/pydantic-ai/migrating-deep-agents-to-pydantic-ai-harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,329 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.01329
Opus 5.5 $0.00044 $0.00532
Sonnet 5.5 $0.00022 $0.00266
Haiku 4.5 $0.00011 $0.00133

Measured 19d ago against content hash 21a58bbcc65d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

migrating-deep-agents-to-pydantic-ai-harness scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

src/pydantic_ai_harness/pydantic_ai_harness/.agents/skills/migrating-deep-agents-to-pydantic-ai-harness/SKILL.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrate Deep Agents to Pydantic AI Harness

Preserve the application's observed contracts, not the shape of create_deep_agent. Compose Pydantic AI primitives and Harness capabilities; keep infrastructure with the application that already owns it.

Establish the source contract

  1. Resolve the deepagents import origin before applying these mappings. Route a local module or project-owned create_deep_agent to the ordinary LangChain migration only when its implementation has ordinary LangChain or LangGraph semantics; vendored implementations that reproduce Deep Agents contracts remain in scope. Read repository instructions, manifests, lockfiles, tests, runtime entrypoints, and the resolved source. Record exact Deep Agents, LangChain, LangGraph, Pydantic AI, and Harness versions. If the locked source is unavailable, reproduce its environment without changing the target lockfile. If that is not possible, mark affected behavior unverified and do not claim parity.
  2. Trace one representative request through prompt and model profile, tools and integrations, middleware and permissions, backend and execution, skills and memory, delegation, state, checkpoints and approvals, retries and limits, events, side effects, and the public boundary. Inspect every caller of that boundary.
  3. Run the cheapest deterministic baseline. Record evidence separately from the outcome: source-inspected, probe-observed, or regression-tested.
  4. Load only the mapping needed for the detected source features:
    • Core Migration for construction, models and profiles, prompts, tools and MCP, middleware, state, outputs, caching, or tracing.
    • Context and Execution for coding-agent defaults, planning, files, permissions, backends, sandboxes, interpreters, media, skills, memory, retrieval, or context limits.
    • Orchestration and Recovery for synchronous, dynamic, or background subagents; grading loops; approvals; checkpoints; fault tolerance; durable execution; or streaming.
    • Hosts and Protocols only when migrating Deep Agents Code, a frontend, ACP, A2A, or a deployment boundary.

Read the full file on GitHub · 44 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago First seen · 44 lines · 109 tokens per session scan A 21a58bbcc65d

Subscribe to this mod's changes

migrating-deep-agents-to-pydantic-ai-harness is a skill published in the GitHub repository pydantic/pydantic-ai (20,645 stars, last pushed today), licensed MIT. It adds 109 tokens to every session and 1,329 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-27.