Constitutional AI Safety for Agents
Add production guardrails to any AI agent.
Quick Start
import requests
def check_action(action):
r = requests.post(
'https://api.odei.ai/api/v2/guardrail/check',
json={'action': action, 'severity': 'medium'}
).json()
return r.get('verdict') == 'APPROVED'
if check_action('send email to all users'):
send_email()
MCP (Claude Desktop)
{"mcpServers": {"odei": {"command": "npx", "args": ["@odei/mcp-server"]}}}
7 Constitutional Layers
- Immutability
- Temporal context
- Referential integrity (catches hallucinated references)
- Authority
- Deduplication (prevents double-actions)
- Provenance
- Constitutional alignment
Returns: APPROVED / REJECTED / ESCALATE
Production Stats (ODEI Jan-Feb 2026)
- 65% APPROVED
- 15% REJECTED
- 20% ESCALATE
LangChain
from langchain.tools import tool
import requests
@tool
def guardrail_check(action: str) -> str:
r = requests.post('https://api.odei.ai/api/v2/guardrail/check',
json={'action': action}).json()
return f"{r['verdict']}: {r.get('reasoning','')[:200]}"
Links
- Free MCP:
npx @odei/mcp-server - API: https://api.odei.ai/integrate/
- Research: https://github.com/odei-ai/research
Top comments (0)