Installation¶
Requirements¶
- Python 3.10+
- uv (recommended) or pip
Install with uv (recommended)¶
Install with pip¶
Optional Dependencies¶
Docker Sandbox¶
For isolated code execution in Docker containers:
Development¶
For running tests and building documentation:
Environment Setup¶
API Key¶
pydantic-deep uses Pydantic AI which supports multiple model providers. Set your API key:
Docker (optional)¶
For using DockerSandbox:
- Install Docker: Get Docker
- Ensure Docker daemon is running
- Pull the Python image:
Verify Installation¶
import asyncio
from pydantic_deep import create_deep_agent, DeepAgentDeps, StateBackend
async def main():
agent = create_deep_agent()
deps = DeepAgentDeps(backend=StateBackend())
result = await agent.run("Say hello!", deps=deps)
print(result.output)
asyncio.run(main())
Troubleshooting¶
Import Errors¶
If you get import errors, ensure you have the correct Python version:
API Key Not Found¶
Make sure your API key is set in the environment:
Docker Permission Denied¶
On Linux, you may need to add your user to the docker group:
Then log out and back in.
Next Steps¶
- Core Concepts - Learn the fundamentals
- Basic Usage Example - Your first deep agent
- API Reference - Complete API documentation