pydantic-deepagents
Open-source, self-hosted Claude Code - a terminal AI assistant and the Python framework behind it. Tool-calling, sandboxed execution, multi-agent teams, skills, checkpoints, unlimited context - on Pydantic AI, any model.
Pydantic Deep Agents is an open-source AI agent framework and self-hosted terminal assistant built on Pydantic AI. It provides a production-ready agent harness with tool-calling, sandboxed execution, persistent memory, unlimited context management, and a unique live run-forking capability that splits agent runs into parallel branches for exploring multiple approaches simultaneously. Developers can either use the ready-made terminal assistant (like Claude Code) with any LLM provider, or build custom agents via a single `create_deep_agent()` function call that includes planning, multi-agent swarms, MCP server integration, and type-safe structured output.
Key Features
Use Cases
- 01Building custom AI coding assistants with file editing, shell execution, and sandboxed testing
- 02Research agents that explore multiple solution approaches in parallel branches before committing
- 03Multi-agent systems for complex workflows like API development, code review, and testing coordination
- 04Self-hosted Claude Code alternative for teams requiring model flexibility or data privacy
- 05CI/CD automation with headless agent runs for benchmarking and scripted tasks
- 06Production AI applications with type-safe responses, cost controls, and security guardrails
Related Agents
View morehermes-agent
The agent that grows with you
agency-agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.
openinterpreter
A coding agent for open models like Kimi K3
cline
Autonomous coding agent as an SDK, IDE extension, or CLI assistant.
pydantic-deepagents — FAQ
What is Pydantic Deep Agents?+
Pydantic Deep Agents is both a self-hosted terminal AI assistant (like Claude Code) and a Python framework for building custom AI agents. It provides complete agent infrastructure including tool-calling, planning, memory, sandboxed execution, and unique run-forking capabilities, all built on Pydantic AI and supporting any LLM model.
How do I install the terminal assistant?+
On macOS/Linux, run `curl -fsSL https://raw.githubusercontent.com/vstorm-co/pydantic-deep/main/install.sh | bash` which auto-installs uv and the CLI. On Windows or for manual installation, use `pip install "pydantic-deep[cli]"`. For the framework only, install `pip install pydantic-deep`.
Which AI models and clients does it support?+
It works with any tool-calling-capable model including Anthropic Claude, OpenAI GPT, Google Gemini, OpenRouter's 200+ models, and local Ollama models. The terminal assistant runs standalone; the framework integrates into any Python application using Pydantic AI.
What API keys or prerequisites are required?+
You need an API key for your chosen model provider (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.). Docker is optional but required for sandboxed execution. Python 3.10+ is required for the framework; the install script handles dependencies for the CLI.
Is Pydantic Deep Agents free and open source?+
Yes, it's fully open source under the MIT license. You only pay for LLM API usage from your chosen provider. The framework, terminal assistant, and all features are free to use, modify, and deploy.
What makes the run-forking feature unique?+
Live run forking splits an in-flight agent conversation into parallel isolated branches that each try different approaches, then uses an AI judge or test results to automatically select the best outcome. No other agent framework (Claude Code, Aider, LangGraph, CrewAI) offers this capability.
How do I install pydantic-deepagents?+
Open the source repository on GitHub and follow its README. pydantic-deepagents is a agent — MCP Agents Market links you directly to the official repo.
Is pydantic-deepagents free?+
pydantic-deepagents is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.