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.
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.
git clone --depth 1 https://github.com/coleam00/context-engineering-introWrote 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.
[](https://agentmods.dev/agents/coleam00/context-engineering-intro/pydantic-ai-dependency-manager)<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.
<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>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.
| Model | Per session | Once 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 |
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 3mo 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.
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
- Minimal Config: Only essential environment variables
- Single Provider: One LLM provider, no complex fallbacks
- Basic Dependencies: Simple dataclass or dictionary, not complex classes
- Standard Patterns: Use the same pattern for all agents
- 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()
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.
- 3mo ago First seen · 560 lines · 54 tokens per session scan A 7b16cc4fc52e
pydantic-ai-dependency-manager is an agent published in the GitHub repository coleam00/context-engineering-intro (13,924 stars, last pushed 8mo 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.
pydantic-ai-dependency-manager compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pydantic-ai-dependency-managercoleam00/context-engineering-intro | Agent | 14k | 8mo ago | MIT | A | 54 | Claude Code |
| Geoprocessing SpecialistSHAdd0WTAka/Zen-Ai-Pentest | Agent | 529 | 27d ago | MIT | A | 45 | Claude Code, OpenCode |
| python-proechoVic/blade-code | Agent | 181 | 14d ago | MIT | A | 51 | Claude Code |
| temporal-test-buildercanonical/copilot-collections | Agent | 33 | 14d ago | Apache-2.0 | A | 56 | Claude Code |
| package-revieweroborchers/fractional-cto | Agent | 39 | 1mo ago | MIT | A | 287 | Claude Code |
| script-operatorMadGraphTeam/MadAgents | Agent | 15 | 3mo ago | MIT | A | 24 | Claude Code |
| python-reviewerFmarzochi/EGC | Agent | 70 | today | Apache-2.0 | A | 43 | Claude Code, Kiro |