Pydantic Deep Agents is an independent open-source project built and maintained
by Vstorm, contributors to and partners across the broader
Pydantic AI ecosystem. It is built on top of Pydantic
AI but is not an official Pydantic library.
LocalBackend workspace under
PYDANTIC_DEEP_WORKDIR_ROOT.
Prerequisites
- Python 3.12 or newer
- LiteLLM Agent Platform running locally or deployed
- A model provider key, or a LiteLLM gateway the bridge can call
1. Start the bridge
2. Route through LiteLLM
For an OpenAI-compatible LiteLLM gateway, set:LITELLM_BASE_URL is set in OpenAI mode, bare model names are normalized
to openai:<model> for Pydantic AI, and /v1/models proxies LiteLLM model
discovery with a local fallback.
For an Anthropic Messages-compatible gateway, set:
anthropic:<model>. The bridge passes the gateway root URL to Pydantic AI’s
AnthropicModel, and the Anthropic SDK appends /v1/messages when sending
requests.
3. Register the custom runtime
Register the running bridge in LiteLLM Agent Platform:alias becomes the runtime ID for agents and sessions. The api_spec
tells LiteLLM Agent Platform to drive the bridge through the existing Claude
Managed Agents protocol.
4. Create an agent
In the UI, click New Agent, choosepydantic-deepagents as the runtime,
select a model, and set a system prompt.
Or via the API:
5. Start a session and stream events
MCP verification
Use the deterministic Pydantic AItest model to verify the bridge and MCP
plumbing without a provider API key:
https://mcp.deepwiki.com/mcp, sends a
managed-agent event, and asserts the SSE stream contains agent.tool_use,
agent.tool_result, agent.message, and session.status_idle.
Configuration
Do not put model provider keys in browser-visible LAP config. Provider keys
belong in the bridge environment or in the LiteLLM gateway the bridge calls.