agentshield
Deterministic security, parameter guardrails, and governance OS for autonomous AI agents in Python.
AgentShield Python SDK lets you protect LangChain, LlamaIndex, AutoGen, and custom Python AI agents with zero-latency decorators and deterministic security rules.
📦 Installation
pip install agentshield
⚡ Quick Start
from agentshield import AgentShield, AgentShieldViolation
shield = AgentShield()
# Define security policy
policy = {
"allowedTools": ["transfer_funds"],
"maxParamValues": {"amount": 500},
"forbiddenPatterns": ["DROP TABLE", "rm -rf"]
}
# Wrap python tool with decorator
@shield.guard(tool_name="transfer_funds", policy=policy)
def transfer_funds(recipient: str, amount: float):
return f"Transferred ${amount} to {recipient}"
# Allowed Call
print(transfer_funds(recipient="Alice", amount=250))
# Blocked Call (Raises AgentShieldViolation)
try:
transfer_funds(recipient="Bob", amount=2500)
except AgentShieldViolation as e:
print(e) # [AgentShield Blocked] Parameter 'amount' value (2500) exceeds max allowed cap (500).
📄 License
MIT © 2026 AgentShield Team.
Metadata
Release files for agentshield-os 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentshield_os-0.1.0.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentshield_os-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 kB
Release files / agentshield_os-0.1.0.tar.gz
| Download URL | agentshield_os-0.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9dc1b36bb203deffcd6a214500bb52531b66ef48cd2319febf6d4641168a65be
|
|
BLAKE2b-256 checksum How to use checksums |
9aa8244bb6a5e1ed03a5eb9b559d7cbeb9dc17955b5c2e410075cb51e89c8e69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / agentshield_os-0.1.0-py3-none-any.whl
| Download URL | agentshield_os-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4334d3a4ead6fa00a3dca23ba94201a9748447402189706782631d4f64271df
|
|
BLAKE2b-256 checksum How to use checksums |
5dde1e1d82de6b8821fed06fae5c373183b024058c722fc165f7e8d3373b5e42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|