vstorm-co/pydantic-ai-middleware
Middleware layer for Pydantic AI — intercept, transform & guard agent calls with 7 lifecycle hooks, parallel execution, async guardrails, conditional routing, and tool-level permissions.
This project helps AI developers and engineers ensure their Pydantic AI agents operate safely, cost-effectively, and adhere to specific rules. It takes your agent's prompts and outputs, applying various checks to prevent issues like prompt injection, PII leakage, and unauthorized tool use. The output is a more robust and compliant AI agent.
Used by 1 other package. Available on PyPI.
Use this if you are building AI agents with Pydantic AI and need to implement guardrails for security, cost management, and content filtering.
Not ideal if you are looking for a full agent framework with planning capabilities or if you are not using Pydantic AI agents.
Stars
22
Forks
3
Language
Python
License
MIT
Category
Last pushed
Mar 12, 2026
Commits (30d)
0
Dependencies
3
Reverse dependents
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/agents/vstorm-co/pydantic-ai-middleware"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Featured in
Higher-rated alternatives
ucsandman/DashClaw
🛡️Decision infrastructure for AI agents. Intercept actions, enforce guard policies, require...
Dicklesworthstone/destructive_command_guard
The Destructive Command Guard (dcg) is for blocking dangerous git and shell commands from being...
microsoft/agent-governance-toolkit
AI Agent Governance Toolkit — Policy enforcement, zero-trust identity, execution sandboxing, and...
vstorm-co/pydantic-ai-shields
Guardrail capabilities for Pydantic AI — cost tracking, prompt injection detection, PII...
Pro-GenAI/Agent-Action-Guard
🛡️ Safe AI Agents through Action Classifier