Quick Start
Get Sentinel running in your project in under 5 minutes.
1. Install
pip install sentinelseed2. Basic Usage
from sentinelseed import Sentinel<h1 class="text-3xl font-bold mb-6">Initialize</h1>
sentinel = Sentinel()
<h1 class="text-3xl font-bold mb-6">Validate input</h1>
result = sentinel.validate_input("What's the weather today?")
if result.is_safe:
print("Input is safe to process")
else:
print(f"Blocked: {result.violations}")
<h1 class="text-3xl font-bold mb-6">Validate output</h1>
response = "The weather is sunny with a high of 72°F."
result = sentinel.validate_output(response)
if result.is_safe:
print("Output is safe to return")
3. Protect an Agent
from sentinelseed import Sentinel
from langchain.agents import create_react_agent
<h1 class="text-3xl font-bold mb-6">Create your agent</h1>
agent = create_react_agent(...)
<h1 class="text-3xl font-bold mb-6">Wrap with Sentinel</h1>
sentinel = Sentinel()
safe_agent = sentinel.protect(agent)
<h1 class="text-3xl font-bold mb-6">Use as normal - now with safety!</h1>
response = safe_agent.invoke("Help me with my task")
4. Configure Safety Level
from sentinelseed import Sentinel, SeedLevel<h1 class="text-3xl font-bold mb-6">Standard protection (recommended)</h1>
sentinel = Sentinel(seed_level=SeedLevel.STANDARD)
<h1 class="text-3xl font-bold mb-6">Maximum protection (for high-risk applications)</h1>
sentinel = Sentinel(seed_level=SeedLevel.FULL)
<h1 class="text-3xl font-bold mb-6">Minimal protection (for low-risk, high-speed applications)</h1>
sentinel = Sentinel(seed_level=SeedLevel.MINIMAL)
Next Steps