vstorm-co/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.

What it solves

Pydantic Deep Agents provides a comprehensive infrastructure (an "agent harness") for building and running autonomous AI agents. It eliminates the need for developers to manually implement repetitive "plumbing" like tool-calling, memory, sandboxed execution, and context management, while offering a self-hosted terminal assistant as a ready-to-use alternative to Claude Code.

How it works

Built on Pydantic AI, the project operates as both a CLI tool and a Python framework. It wraps LLMs with a suite of capabilities including a copy-on-write filesystem for isolated execution, a multi-agent swarm architecture for delegating tasks, and a persistent memory system. A standout feature is "Live Run Forking," which allows an agent to branch a single execution into multiple parallel paths to test different approaches, with an AI judge or test results determining the winning branch to merge back into the main history.

Who it’s for

  • Developers who want a type-safe Python framework to build complex research or coding agents quickly.
  • Power users seeking a self-hosted, model-agnostic terminal AI assistant that can edit files, run shell commands, and connect to MCP servers.

Highlights

  • Live Run Forking: Parallelize agent decision-making with isolated branches and automated merging.
  • Model Agnostic: Supports Anthropic, OpenAI, Google Gemini, OpenRouter, and local models via Ollama.
  • Agent Harness: Integrated tools for web search, browser automation (Playwright), and local document parsing (PDF, DOCX, etc.).
  • Sandboxed Execution: Docker-based workspaces for safe code execution.
  • MCP Integration: Native support for Model Context Protocol servers (e.g., GitHub, Figma).
  • Type Safety: Fully typed public API using Pydantic for structured outputs and IDE autocomplete.