Get the FREE Ultimate OpenClaw Setup Guide →

pydantic-deepagents

Python Deep Agent framework built on top of Pydantic-AI, designed to help you quickly build production-grade autonomous AI agents with planning, filesystem operations, subagent delegation, skills, and structured outputs—in just 10 lines of code.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio vstorm-co-pydantic-deepagents uvx pydantic-deepagents \
  --env PIP_DISABLE_PIP_VERSION_CHECK="1 (optional: disable pipVersionCheck to avoid noise in logs)"

How to use

Pydantic Deep Agents provides a Python-based framework for building Claude Code-style autonomous agents with planning, filesystem access, memory, subagents, and optional web/search capabilities. The project also ships a command-line interface (CLI) that lets you run a ready-made terminal AI assistant in your shell. You can use the CLI to start an interactive agent, run targeted tasks, or manage configuration and models. In addition, there is a DeepResearch reference app that demonstrates a full-featured research agent with a web UI and sandboxed code execution. With these tools you can quickly prototype agents that plan tasks, execute code, and persist context across sessions, while also enabling advanced features like memory management, hooks, and cost tracking.

How to install

Prerequisites:

  • Python 3.10 or newer
  • pip (Python package manager)

Installation steps:

  1. Install the CLI-enabled package (includes the CLI tools): pip install pydantic-deep[cli]
  2. Verify installation: pip show pydantic-deep pydantic-deep --help

Usage examples:

  • Start an interactive terminal AI assistant: pydantic-deep chat

  • Run a single task with the agent: pydantic-deep run "Fix the failing tests in src/"

  • Use a Docker sandbox for isolated execution (optional): pydantic-deep run "Build a web scraper" --sandbox

  • Manage configuration (model, memory, etc.): pydantic-deep config set model openai:gpt-4.1

Note: If you only want the framework without CLI, you can install the core package via: pip install pydantic-deep

Additional notes

Tips and notes:

  • The CLI supports built-in commands like /commit, /pr, /review, /test, /fix, and /explain. Use them to steer the agent's behavior and track changes.
  • The framework offers optional features such as persistent memory (MEMORY.md), context management for unlimited context, and cost tracking.
  • If you plan to use the DeepResearch app, follow the app’s README for additional dependencies (web UI, API keys, and sandboxed execution). Ensure API keys or credentials are loaded in environment variables or a .env file as required by the app.
  • For advanced usage, you can build your own agent with create_deep_agent and customize dependencies, subagents, memory backends, and hooks. Refer to the API reference for available options.
  • If encountering environment-related issues, ensure your Python environment is clean (virtualenv/venv or pyenv) and that conflicting packages are avoided. Update to the latest compatible versions to minimize compatibility issues.

Related MCP Servers

Sponsor this space

Reach thousands of developers