Metadata-Version: 2.4
Name: agentshield-os
Version: 0.1.0
Summary: Deterministic Security, Guardrails, and Governance OS for Autonomous AI Agents in Python.
Author-email: AgentShield Team <support@agentshield.dev>
License: MIT
Project-URL: Homepage, https://github.com/agentshield/agentshield
Project-URL: Documentation, https://github.com/agentshield/agentshield#readme
Project-URL: Repository, https://github.com/agentshield/agentshield
Project-URL: Bug Tracker, https://github.com/agentshield/agentshield/issues
Keywords: ai,agents,security,guardrails,llm,governance,langchain,llamaindex,autogen
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"

# agentshield

> Deterministic security, parameter guardrails, and governance OS for autonomous AI agents in Python.

[![PyPI version](https://img.shields.io/pypi/v/agentshield.svg)](https://pypi.org/project/agentshield/)
[![License: MIT](https://img.shields.io/badge/License-MIT-emerald.svg)](https://opensource.org/licenses/MIT)

AgentShield Python SDK lets you protect LangChain, LlamaIndex, AutoGen, and custom Python AI agents with zero-latency decorators and deterministic security rules.

---

## 📦 Installation

```bash
pip install agentshield
```

---

## ⚡ Quick Start

```python
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.
