Safety controls for AI agents — budgets, approvals, rate limits, and audit logs
Project description
AgentSentinel
Safety controls for AI agents — budgets, approvals, rate limits, audit logs, and DLP.
Installation
pip install agentsentinel
Quick Start
from agentsentinel import AgentPolicy, AgentGuard
policy = AgentPolicy(
daily_budget=10.00,
require_approval=["send_email", "delete_*"],
rate_limits={"web_search": "10/min"},
)
guard = AgentGuard(policy)
@guard.protect("web_search")
def search_web(query: str) -> str:
return f"Results for: {query}"
Features
- 💰 Budget Controls — Daily/hourly spending limits with per-model caps
- ✋ Approval Gates — Require human approval for sensitive operations
- ⏱️ Rate Limiting — Prevent runaway loops with sliding window limits
- 📋 Audit Logging — Complete trail of every tool invocation
- 🔒 DLP & PII Detection — Block credit cards, SSNs, API keys from leaking
- 🌐 Network Controls — Allowlist/blocklist outbound domains
Framework Integrations
# LangChain
from agentsentinel.integrations.langchain import protect_langchain_agent
executor = protect_langchain_agent(executor, policy=policy)
# CrewAI
from agentsentinel.integrations.crewai import protect_crew
crew = protect_crew(crew, policy=policy)
# LlamaIndex
from agentsentinel.integrations.llamaindex import protect_agent
agent = protect_agent(agent, policy=policy)
# OpenAI Assistants
from agentsentinel.integrations.openai_assistants import protect_function_map
functions = protect_function_map(functions, guard=guard)
# Anthropic Tools
from agentsentinel.integrations.anthropic_tools import protect_tool_handlers
handlers = protect_tool_handlers(handlers, guard=guard)
101 Models Supported
Cost tracking for OpenAI, Anthropic, Google, Mistral, Cohere, Meta, AWS Bedrock, Azure OpenAI, Groq, Together, Perplexity, DeepSeek, xAI, and local models.
Documentation
Full docs at docs.agentsentinel.net
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentsentinel_core-1.2.0.tar.gz.
File metadata
- Download URL: agentsentinel_core-1.2.0.tar.gz
- Upload date:
- Size: 109.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4322732a178476ad829f5953381ae14cfa29e1d785b49abc97034c7d5c8fdfc5
|
|
| MD5 |
0d3e5ddd79e0d3ee34905b7c2ccfa87f
|
|
| BLAKE2b-256 |
96db7e6812245cc6d11bd67b90886d13b35e67b928fc8b050cc396b8d64f3f67
|
File details
Details for the file agentsentinel_core-1.2.0-py3-none-any.whl.
File metadata
- Download URL: agentsentinel_core-1.2.0-py3-none-any.whl
- Upload date:
- Size: 114.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26a859bf1948997b39c4d13b15bc64b174e4f1238836976420137893ebf9422
|
|
| MD5 |
23b19eab7d4d6b794730fc5013a80651
|
|
| BLAKE2b-256 |
dbba7caa6b3e21eb734d5ed57692fe45027bfa1e14bf1aa9899d12e7354584f6
|