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
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
Errors
Common errors & fixes
pydantic_ai.exceptions.UserError: Unknown model: openai:gpt-4o
Model string format is incorrect or missing provider registration.
fixUse 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).
fixUse `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.
fixStart 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