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.

48
/ 100
Emerging

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.

AI-safety prompt-engineering AI-governance cost-management LLM-security
Maintenance 10 / 25
Adoption 7 / 25
Maturity 20 / 25
Community 11 / 25

How are scores calculated?

Stars

22

Forks

3

Language

Python

License

MIT

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.