Observed since 20 Oct, 23:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A runtime and definition-time security guardrail framework for AI agents and developers.
A lightweight, enterprise-grade runtime sandboxing and definition-time guardrail framework for Python applications, built to safely run code generated or modified by AI agents.
📖 Full Documentation: shield-docs-mu.vercel.app
AI coding agents are excellent at generating code but often lack a global understanding of architectural boundaries, leading to path traversal bypasses, illegal imports, API resource leaks, or infinite lockups.
Agent-Safeguard captures these boundary violations, blocks them in real-time, and generates structured JSON diagnostic reports (shield_reports/violation_report.json) that AI agents can ingest to automatically self-correct and rewrite their code!
@shield, @freeze, and @lock_signature to scan imports, prevent code mutations, and secure API parameters.@restrict_network, @restrict_fs, @virtual_fs (redirecting all writes to RAM), database locks, and memory/timeout limits.@prompt_inject (docstring constraints) and @prompt_assert (Gemini-powered semantic assertions).shield.yaml to prevent agents from simply deleting Python decorators from source files.pip install agent-safeguard
Import it in your Python code using the underscore name agent_shield:
from agent_shield import shield, virtual_fs, restrict_db
shield.yaml rule file in your project root:rules:
- pattern: "sandbox_code.*"
timeout: 0.5
virtual_fs: true
restrict_network: ["api.stripe.com"]
# sandbox_code.py
import urllib.request
def process_data():
# Attempting to fetch unauthorized API will block and generate a violation report
response = urllib.request.urlopen("https://unauthorized-api.com")
return response.read()
This project is licensed under the Apache License 2.0. See LICENSE for details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.6 | 13 Jun 2026 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:16 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:df6bf45d01348e12536588b6fc467ca20a5af8d4eb0a867d63fc76ce4b2c76e7