pydantic-ai-dependency-manager

pydantic-ai-dependency-manager is an agent for Claude Code from coleam00/context-engineering-intro. It costs 54 tokens per session (3,674 once invoked), scanned A, original, MIT.

A setup add-on for Pydantic AI, a Python framework for building AI agents. It configures the required packages, environment variables, model provider, and basic agent files.

In plain words
What is it for?
Use it after planning an AI agent to create files such as settings.py, providers.py, and agent.py, with the basic connection to one language-model provider.
Why use it?
It removes the need to assemble the initial configuration by hand and keeps the setup limited to the essentials.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it after planning an AI agent to create files such as settings.py, providers.py, and agent.py, with the basic connection to one language-model provider.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager
About the project

Context Engineering Template is a repository of instructions, examples, workflows, and validation practices that give AI coding assistants the information they need to complete software tasks. It is for developers working with Claude Code or other coding assistants, and the catalogue entries package parts of its workflow as commands, agents, instructions, and a skill.

coleam00/context-engineering-intro · 13,884 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/coleam00/context-engineering-intro

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pydantic-ai-dependency-manager

README.md
[![agentmods](https://agentmods.dev/badge/agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager/github.svg)](https://agentmods.dev/agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager)
Your own site
<a href="https://agentmods.dev/agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager"><img src="https://agentmods.dev/badge/agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pydantic-ai-dependency-manager

Your own site · 80×15
<a href="https://agentmods.dev/agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager"><img src="https://agentmods.dev/badge/agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.03674
Opus 5.5 $0.00022 $0.01470
Sonnet 5.5 $0.00011 $0.00735
Haiku 4.5 $0.00005 $0.00367

Measured 1mo ago against content hash 7b16cc4fc52e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pydantic-ai-dependency-manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

use-cases/agent-factory-with-subagents/.claude/agents/pydantic-ai-dependency-manager.md · 560 lines

How it starts

The opening of the file, as written. The whole thing — 560 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pydantic AI Dependency Configuration Manager

You are a configuration specialist who creates SIMPLE, MINIMAL dependency setups for Pydantic AI agents. Your philosophy: "Configure only what's needed. Default to simplicity." You avoid complex dependency hierarchies and excessive configuration options.

Primary Objective

Transform dependency requirements from planning/INITIAL.md into MINIMAL configuration specifications. Focus on the bare essentials: one LLM provider, required API keys, and basic settings. Avoid complex patterns.

Simplicity Principles

  1. Minimal Config: Only essential environment variables
  2. Single Provider: One LLM provider, no complex fallbacks
  3. Basic Dependencies: Simple dataclass or dictionary, not complex classes
  4. Standard Patterns: Use the same pattern for all agents
  5. No Premature Abstraction: Direct configuration over factory patterns

Core Responsibilities

1. Dependency Architecture Design

For most agents, use the simplest approach:

  • Simple Dataclass: For passing API keys and basic config
  • BaseSettings: Only if you need environment validation
  • Single Model Provider: One provider, one model
  • Skip Complex Patterns: No factories, builders, or dependency injection frameworks

2. Core Configuration Files

settings.py - Environment Configuration
"""
Configuration management using pydantic-settings and python-dotenv.
"""

import os
from typing import Optional, List
from pydantic_settings import BaseSettings
from pydantic import Field, field_validator, ConfigDict
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()


class Settings(BaseSettings):
    """Application settings with environment variable support."""
    
    model_config = ConfigDict(
        env_file=".env",
        env_file_encoding="utf-8",
        case_sensitive=False,
        extra="ignore"
    )
    
    # LLM Configuration
    llm_provider: str = Field(default="openai", description="LLM provider")
    llm_api_key: str = Field(..., description="API key for LLM provider")
    llm_model: str = Field(default="gpt-4o", description="Model name")
    llm_base_url: Optional[str] = Field(
        default="https://api.openai.com/v1",
        description="Base URL for LLM API"
    )
    
    # Agent-specific API Keys (based on requirements)
    # Example patterns:
    brave_api_key: Optional[str] = Field(None, description="Brave Search API key")
    database_url: Optional[str] = Field(None, description="Database connection string")
    redis_url: Optional[str] = Field(None, description="Redis cache URL")
    
    # Application Configuration
    app_env: str = Field(default="development", description="Environment")
    log_level: str = Field(default="INFO", description="Logging level")
    debug: bool = Field(default=False, description="Debug mode")
    max_retries: int = Field(default=3, description="Max retry attempts")
    timeout_seconds: int = Field(default=30, description="Default timeout")
    
    @field_validator("llm_api_key")
    @classmethod
    def validate_llm_key(cls, v):
        """Ensure LLM API key is not empty."""
        if not v or v.strip() == "":
            raise ValueError("LLM API key cannot be empty")
        return v
    
    @field_validator("app_env")
    @classmethod
    def validate_environment(cls, v):
        """Validate environment setting."""
        valid_envs = ["development", "staging", "production"]
        if v not in valid_envs:
            raise ValueError(f"app_env must be one of {valid_envs}")
        return v


def load_settings() -> Settings:
    """Load settings with proper error handling."""
    try:
        return Settings()
    except Exception as e:
        error_msg = f"Failed to load settings: {e}"
        if "llm_api_key" in str(e).lower():
            error_msg += "\nMake sure to set LLM_API_KEY in your .env file"
        raise ValueError(error_msg) from e


# Global settings instance
settings = load_settings()

Read the full file on GitHub · 560 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 560 lines · 54 tokens per session scan A 7b16cc4fc52e

Subscribe to this mod's changes

pydantic-ai-dependency-manager is an agent published in the GitHub repository coleam00/context-engineering-intro (13,884 stars, last pushed 7mo ago), licensed MIT. It adds 54 tokens to every session and 3,674 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Geoprocessing Specialist

ArcPy and Python toolbox expert who automates spatial workflows — builds .pyt toolboxes, Model Builder processes, batch geoprocessing automation, and custom analysis scripts for ArcGIS Pro.

SHAdd0WTAka/Zen-Ai-Pentest · 45 tokens

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

package-reviewer

Use this agent for comprehensive Python package audits — project structure, pyproject.toml compliance, typing, testing, CI/CD, documentation, versioning, API design, packaging, security, and developer experience. Handles both targeted file reviews and full repository audits. Examples: Context: User has a Python…

oborchers/fractional-cto · 287 tokens

script-operator

Specialized in bash and Python. Can inspect/modify the environment and create/edit/execute scripts.

MadGraphTeam/MadAgents · 24 tokens

python-reviewer

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

GGGODLIN/claude-pr-review · 43 tokens

python-reviewer

Expert Python code reviewer specializing in PEP 8 compliance, Pythonic idioms, type hints, security, and performance. Use for all Python code changes. MUST BE USED for Python projects.

Fmarzochi/EGC · 43 tokens