█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Pydantic Deep Agents

एक सेल्फ-होस्टेड टर्मिनल कोडिंग असिस्टेंट और उसके पीछे का Pydantic AI फ़्रेमवर्क

Autonomous Coding Agentsओपन सोर्स
भाषा
Python
लाइसेंस
MIT
संक्षेप में

Pydantic Deep Agents क्या है?

Pydantic Deep Agents एक सेल्फ-होस्टेड टर्मिनल कोडिंग असिस्टेंट और उसके पीछे का Pydantic AI फ़्रेमवर्क. यह AI Coding टूल्स की Autonomous Coding Agents श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और MIT लाइसेंस के तहत है। शुरू करने के लिए: टर्मिनल असिस्टेंट इंस्टॉल कैसे करें.

सारांश

Pydantic Deep Agents (`pydantic-deep` पैकेज) Vstorm टीम की एक ही रिपॉज़िटरी में दो चीज़ें शामिल हैं: Claude Code की तरह का एक सेल्फ-होस्टेड टर्मिनल AI असिस्टेंट, और वह Python फ़्रेमवर्क जो इसे चलाता है। यह असिस्टेंट योजना बनाता है, फ़ाइलें एडिट करता है, शेल कमांड चलाता है, वेब सर्च करता है, सेशन के बीच चीज़ें याद रखता है, sub-agents बनाता है और MCP servers से जुड़ता है। यह किसी भी tool-calling मॉडल पर काम करता है जिसे आप चुनें: Anthropic, OpenAI, OpenRouter, Google Gemini, लोकल Ollama मॉडल या कोई भी OpenAI-compatible endpoint।

यह फ़्रेमवर्क एक ही function call के पीछे वही harness दिखाता है। `create_deep_agent()` किसी मॉडल को फ़ाइल सिस्टम, शेल, टास्क प्लानिंग, स्थायी मेमोरी, sub-agents, sandbox में execution, MCP और अपने-आप context summarization देता है, और हर क्षमता एक flag से चालू होती है। यह Pydantic AI के Capabilities API पर सीधे बना है, इसलिए responses को typed Pydantic models के रूप में रखा जा सकता है। README के अनुसार कोडबेस Pyright और MyPy से strict mode में जाँचा जाता है।

इसकी मुख्य खासियत Live Run Forking है: चल रहा run कई अलग-अलग branches में बँट सकता है, जिनमें से हर एक copy-on-write फ़ाइल सिस्टम overlay पर चलती है और उसका अपना steering message और डॉलर बजट होता है। फिर एक AI judge, एक test command या एक vote तय करता है कि run किस branch से आगे चले। रिपॉज़िटरी में DeepResearch भी शामिल है, जो इस फ़्रेमवर्क पर बना एक reference web app है और दिखाता है कि planning, parallel sub-agents और workspace फ़ाइल browser कैसे काम करते हैं।

यह क्या करता है

  • Claude Code जैसा टर्मिनल UI, जिसमें streaming tool calls, असली diffs, tool approval dialogs और 25+ slash commands हैं
  • कोई भी tool-calling मॉडल चलता है: Anthropic, OpenAI, OpenRouter, Google Gemini, Ollama या कोई OpenAI-compatible URL
  • `create_deep_agent()` फ़्रेमवर्क, जिसमें planning, sub-agents, agent teams, skills, memory और checkpoints toggles के रूप में मिलते हैं
  • Live Run Forking: parallel copy-on-write branches को AI judge, test results या vote से merge किया जाता है
  • नाम वाले workspaces के साथ Docker sandbox, Playwright से browser automation और MCP server support
  • default security preset के साथ lifecycle hooks, fallback models, और token व USD budget tracking

शुरू करें

README से अपनी ज़रूरत का रास्ता चुनें: टर्मिनल असिस्टेंट चलाएँ, या library इंस्टॉल करके अपना खुद का agent बनाएँ।

टर्मिनल असिस्टेंट इंस्टॉल कैसे करें

macOS और Linux पर install script बिना किसी Python setup के uv और CLI सेट कर देती है। Windows पर या मैन्युअल install के लिए `pip install "pydantic-deep[cli]"` इस्तेमाल करें।

bashbash
curl -fsSL https://raw.githubusercontent.com/vstorm-co/pydantic-deep/main/install.sh | bash

API key सेट करें और शुरू करें

किसी provider की key export करें और TUI शुरू करें। TUI के अंदर `/model` से या config command से मॉडल बदलें।

bashbash
export ANTHROPIC_API_KEY=sk-ant-...
pydantic-deep

# pick another model
pydantic-deep config set model openai:gpt-5.4
The pydantic-deep terminal UI writing a FastAPI demo app, with file writes, a summary and a status bar showing model, tokens and cost
The pydantic-deep TUI building a small FastAPI app, with the model, token count and cost in the status bar.Pydantic Deep Agents README ↗

Headless या sandbox में चलाएँ

वही CLI CI और scripts के लिए TUI के बिना कोई task चलाती है, या आपके project को /workspace पर mount करके Docker sandbox के अंदर चलाती है।

bashbash
pydantic-deep run "Fix the failing test in test_auth.py"
pydantic-deep run --task-file task.md --json

pydantic-deep tui --sandbox docker
pydantic-deep tui --workspace ml-env

फ़्रेमवर्क से अपना agent बनाएँ

library इंस्टॉल करें और एक call में agent बनाएँ; forking, sub-agents, memory और cost tracking जैसी क्षमताएँ flags से चालू होती हैं।

bashbash
pip install pydantic-deep

Deep agent बनाएँ और चलाएँ

README का एक न्यूनतम agent, जिसमें उसकी फ़ाइलों के लिए state backend है।

pythonpython
from pydantic_ai_backends import StateBackend
from pydantic_deep import create_deep_agent, create_default_deps

agent = create_deep_agent(
    model="anthropic:claude-sonnet-4-6",
    include_todo=True,
    include_subagents=True,
    include_memory=True,
    cost_tracking=True,
)

deps = create_default_deps(StateBackend())
result = await agent.run("Build a REST API for user auth", deps=deps)

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • अपनी पसंद के मॉडल पर, लोकल Ollama मॉडल सहित, टर्मिनल में Claude Code जैसा कोडिंग असिस्टेंट चलाना
  • headless `pydantic-deep run` command से CI में कोडिंग tasks की scripting करना
  • Python में कस्टम research या coding agent बनाना, बिना planning, memory, sandboxing और sub-agents को दोबारा wire किए
DeepResearch web app where a planner sub-agent asks the user to choose the level of detail for a research task
Plan mode in the DeepResearch reference app: the planner sub-agent asks a clarifying question first.
DeepResearch web app showing five general-purpose sub-agents that each completed a research subtask, with a task progress bar
Five sub-agents researching in parallel, each saving notes to the workspace.
DeepResearch web app with a workspace file browser listing notes and a markdown file preview beside the agent's edit_file calls
The workspace file browser with an inline preview of a note the agents wrote.
  • एक ही बदलाव के लिए कई तरीके एक साथ आज़माना और tests या AI judge से सबसे अच्छा नतीजा चुनवाना

How Pydantic Deep Agents compares

Pydantic Deep Agents alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
opencode★ 231kआपके टर्मिनल के लिए ओपन सोर्स AI कोडिंग एजेंट
Claude Code★ 158kAnthropic का एजेंटिक कोडिंग टूल, जो आपके टर्मिनल में रहता है, आपके codebase को समझता है और सामान्य काम व git workflows को प्राकृतिक भाषा के निर्देशों से संभालता है
Orca★ 151kकई CLI कोडिंग एजेंट साथ-साथ चलाएं, हर एक अपने अलग git worktree में
OpenAI Codex★ 137kOpenAI का कोडिंग एजेंट: लोकल चलने वाला ओपन सोर्स CLI, और IDE, डेस्कटॉप ऐप व क्लाउड (Codex Web) वाले विकल्प भी
Pi★ 125kएक न्यूनतम टर्मिनल कोडिंग एजेंट, जिसे आप फ़ोर्क करने के बजाय TypeScript में बढ़ा सकते हैं
Gemini CLI★ 110kGoogle का ओपन सोर्स AI एजेंट, जो Gemini को सीधे आपके टर्मिनल में ले आता है
autoresearch★ 101kएक कोडिंग एजेंट को एक GPU और एक ट्रेनिंग फ़ाइल दीजिए, और उसे रात भर प्रयोग करने दीजिए
Pydantic Deep Agents★ 1.1kएक सेल्फ-होस्टेड टर्मिनल कोडिंग असिस्टेंट और उसके पीछे का Pydantic AI फ़्रेमवर्क