Registry / llm-agents / pydantic-deep

pydantic-deep

JSON →
library0.3.30pypypi✓ verified 86d ago

Batteries-included agent harness for Python built on Pydantic AI, providing tool-calling, sandboxed execution via Docker, multi-agent teams, and unlimited context. Current version 0.3.17, released monthly.

pip install pydantic-deep
INSTALL
IMPORT
SIG · PYDANTIC-DEEP
P
pydantic-deep
llm-agentspythonv0.3.30
Install
15.8s avg
Import
4867ms
Disk
71MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.30 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
1/2 runs
✓ 17.95s
py 3.11
1/2 runs
✓ 17.35s
py 3.12
✓ —
✓ 13.85s
py 3.13
1/2 runs
✓ 13.95s
py 3.9
✕ build_error
✕ build_error
71MB installed
● package 71MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create_deep_agent
from pydantic_deep import create_deep_agent
from pydantic_deep.agent import create_deep_agent
Public API is at package root, not in submodule
BrowserCapability
from pydantic_deep.capabilities import BrowserCapability
from pydantic_deep import BrowserCapability
Capabilities are in the capabilities subpackage
DockerSandbox
from pydantic_deep.sandbox import DockerSandbox
from pydantic_deep import DockerSandbox
Sandbox classes are in the sandbox subpackage

Minimal agent creation with a single synchronous call.

import asyncio from pydantic_deep import create_deep_agent async def main(): agent = create_deep_agent( model="openai:gpt-4o", api_key=os.environ.get("OPENAI_API_KEY", ""), instructions="You are a helpful assistant." ) result = await agent.run("What is the capital of France?") print(result.data) if __name__ == "__main__": import os asyncio.run(main())
pydantic-deep --version
Debug
Known issues
breakingIn 0.3.16, `instructions` now replaces `BASE_PROMPT` instead of appending to it. Previously, passing `instructions="..."` appended to the base prompt; now it becomes the full system prompt. Use `instructions=None` (default) to keep the default base prompt.
fix
Update code: if you previously relied on appending, manually include the base prompt prefix in your instructions string.
affects: >=0.3.16
gotchaTools passed via `tools=` parameter lost metadata (name, description, etc.) before 0.3.13. They were added via `agent.tool()` which hardcoded `takes_ctx=True` and discarded `Tool` metadata.
fix
Upgrade to >=0.3.13 or pass tools as list of `Tool` objects using the `tool` decorator with full metadata.
affects: <0.3.13
gotchaBrowserCapability opens Playwright browser eagerly on every agent run before 0.3.11. This caused a browser window to spawn even when no browser tool was used.
fix
Upgrade to >=0.3.11, which lazily initializes Playwright only on first browser tool call.
affects: <0.3.11
deprecatedSubagent factory ignores parent `web_search`/`web_fetch` settings before 0.3.14, causing 400 errors on Bedrock/Vertex models that do not support the beta web tools.
fix
Upgrade to >=0.3.14, which propagates parent settings to subagents.
affects: <0.3.14
Errors
Common errors & fixes
pydantic_ai.exceptions.UserError: Unknown model: openai:gpt-4o
Model string format is incorrect or missing provider registration.
fix
Use a supported model format like 'openai:gpt-4o' only if you have pydantic-ai >=0.0.22 with the openai extra installed. Ensure OPENAI_API_KEY env var is set.
playwright._impl._errors.Error: It looks like you are using Playwright Sync API inside the async event loop.
Playwright synchronous calls are used in an async context (e.g., using `sync_playwright` inside async agent run).
fix
Use `async with async_playwright() as p:` instead of `with sync_playwright() as p:`. Or switch to `BrowserCapability` which handles this internally.
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionRefusedError(111, 'Connection refused'))
Docker daemon is not running or the user does not have permissions to access the Docker socket.
fix
Start Docker Desktop or daemon, and ensure your user is in the 'docker' group (on Linux).
Upgrade
Version history
0.3.30latest on PyPI · released Jun 18, 2026
Audit
Dependencies
pydantic-airequiredCore agent framework for tool-calling and model routing
playwrightoptionalRequired for BrowserCapability (headless browser)
dockeroptionalRequired for DockerSandbox capability
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
pydantic-deep — pip install pydantic-deep · libregistry