A terminal chat client for Ollama, OpenAI, Anthropic and other pydantic-ai-supported LLM providers.
vstorm-co/pydantic-deepagents
Self-hosted open-source terminal AI coding assistant, plus the Python framework behind it, built on Pydantic AI and usable with any model.
Open-source alternative to:Claude Code
- Stars
- 1,115
- Forks
- 145
- Open issues
- 3
- Last commit
- 8 days ago
What is it?
Pydantic Deep Agents is a terminal AI assistant in the style of Claude Code, and a Python framework for building similar agents. The CLI can plan tasks, read and edit files, run shell commands, search and fetch the web, keep persistent memory, spawn subagents, and connect to MCP servers. The same harness is available through a single call to create_deep_agent(), which adds a filesystem, shell, planning, memory, sandboxed execution and context summarization to any model.
The project runs on Pydantic AI and supports models from Anthropic, OpenAI, Google Gemini, OpenRouter and local Ollama, plus any OpenAI-compatible endpoint. Its distinctive feature is live run forking: an in-flight run can be split into isolated branches that each try a different approach, with an AI judge or a test command choosing which branch to keep. Other capabilities include Docker sandboxing with named workspaces, checkpoints, a skills system loaded from SKILL.md files, tool approval dialogs, and structured output via Pydantic models.
Key features
- 01Terminal TUI with file editing, shell execution, web search and fetch, and MCP server support
- 02Live run forking that splits a run into branches merged by an AI judge or test results
- 03Framework entry point create_deep_agent() with toggles for planning, subagents, memory and skills
- 04Docker sandbox with named workspaces and optional browser automation via Playwright
- 05Automatic context summarization for long conversations and fallback-model retries
- 06Checkpoints to save, rewind and fork sessions
Use cases
- Running a self-hosted coding assistant that works with a model of your choice
- Building a custom research or coding agent on top of a ready-made agent harness
- Trying several implementation approaches in parallel and keeping the one that passes tests
- Automating coding tasks headlessly in CI or scripts with the run command
Quick start
- 1
Install the CLI on Windows or manually with pip
pip install "pydantic-deep[cli]" - 2
Run the assistant from the terminal
pydantic-deep
Things to know
- Requires Python 3.10 or newer.
- The one-line install script on Linux and macOS must be run manually from the README.
In collections
Topics
FAQ
- What is pydantic-deepagents?
- Self-hosted open-source terminal AI coding assistant, plus the Python framework behind it, built on Pydantic AI and usable with any model. Pydantic Deep Agents is a terminal AI assistant in the style of Claude Code, and a Python framework for building similar agents. The CLI can plan tasks, read and edit files, run shell commands, search and fetch the web, keep persistent memory, spawn subagents, and connect to MCP servers. The same harness is available through a single call to create_deep_agent(), which adds a filesystem, shell, planning, memory, sandboxed execution and context summarization to any model.
- Is pydantic-deepagents free to use? What license does it have?
- pydantic-deepagents is open source under the MIT license. Check the license terms before using it in commercial products.
- Is pydantic-deepagents still maintained?
- Actively maintained. The last commit to pydantic-deepagents was on Oct 30, 2026.
- What can I use pydantic-deepagents for?
- Running a self-hosted coding assistant that works with a model of your choice Building a custom research or coding agent on top of a ready-made agent harness Trying several implementation approaches in parallel and keeping the one that passes tests Automating coding tasks headlessly in CI or scripts with the run command
- How do I install pydantic-deepagents?
- Install the CLI on Windows or manually with pip: pip install "pydantic-deep[cli]" Run the assistant from the terminal: pydantic-deep
- Where can I get pydantic-deepagents?
- The source code and installation instructions are on GitHub: https://github.com/vstorm-co/pydantic-deepagents
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A terminal coding agent with built-in LSP, debugger, browser and subagent tools, supporting 60+ model providers.
A terminal coding agent written in Go that edits files, runs commands and keeps local sessions, with you choosing the model and permission level.
A Rust-based coding agent terminal tool, forked from OpenAI's Codex, built to get strong results from low-cost and open models.
An open-source coding agent that reads your project, edits files and runs tests from your terminal, desktop, browser or editor.
A minimalist, terminal-native coding agent written in C that works with local llama.cpp models and many cloud LLM providers.