vstorm-co/pydantic-ai-shields

Guardrail capabilities for Pydantic AI — cost tracking, prompt injection detection, PII filtering, secret redaction, tool permissions, and async guardrails. Built on pydantic-ai's native capabilities API.

58
/ 100
Established

Implements guardrails as composable Pydantic AI capabilities rather than external middleware, enabling cost tracking via auto-detected model pricing, prompt injection detection across six attack categories, and concurrent guard execution that cancels LLM calls on early violation detection. Provides both infrastructure shields (tool permissions, custom input/output validation) and content shields (PII regex detection, secret redaction, keyword blocking) that integrate directly into agent initialization without wrapper overhead.

27 stars and 3,073 monthly downloads. Available on PyPI.

Maintenance 13 / 25
Adoption 15 / 25
Maturity 18 / 25
Community 12 / 25

How are scores calculated?

Stars

27

Forks

4

Language

Python

License

MIT

Last pushed

Mar 28, 2026

Monthly downloads

3,073

Commits (30d)

0

Dependencies

3

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/agents/vstorm-co/pydantic-ai-shields"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.