Now Available - Production Ready

Control what your AI can do
One function at a time

Secure your LLM tools with easy peasy authorization. One decorator, instant security. Zero infrastructure.

Python SDK - Get started in 30 seconds
1. Install & Initialize
$pip install'd2-sdk[all]'
# Generate local policy
python -m d2 init
2. Protect Your Tools
# In your app startup
await configure_rbac()
@d2_guard("weather_api")
def get_weather(location: str):
return weather_service.fetch(location)
# Set user context
set_user("alice", roles=["developer"])
# Clear when done
clear_user_context()
Ready to get started?

Built for Production AI Systems

Runtime-optimized authorization that identifies security issues at the code level, not just endpoints.

One Decorator

Just add @d2_guard to your functions. Extremely simple code that replaces hundreds of lines of auth logic.

Declarative Policies

Define all authorization logic in YAML/JSON policy files—no code changes needed. Updates propagate in under a minute. Policy validation catches typos before they reach production.

Defense-in-Depth Authorization

Three layers of protection: RBAC controls who can call what, Guardrails, and Sequence Enforcement prevents multi-step attacks like data exfiltration.

Guardrails for AI Safety

Input validation constrains function arguments before execution. Output sanitization removes PII. Output validation denies calls with unexpected returns. All with unified operators.

Runtime Optimized

Built for high-performance production systems with minimal overhead and intelligent caching.

Full Observability

Every authorization decision emits telemetry. Track denials, sequence violations, and sanitization actions. OpenTelemetry integration for production monitoring and debugging.

From Complex to Simple

Replace hundreds of lines of authorization logic with a single decorator.

Before D2
# Hundreds of lines of auth logic
def get_weather(user,location):
if not user:
raise PermissionError
if user.role not in ["admin", "weather"]:
raise PermissionError
if not validate_permissions(user):
raise PermissionError
# ... and more
return weather_service.fetch(location)
With D2
# Complete setup
@d2_guard("weather_api")
def get_weather(location: str):
return weather_service.fetch(location)
# Set context
set_user("alice", roles=["developer"])
# Clear when done
clear_user_context()

Simple, Transparent Pricing

Start free with local mode. Scale to cloud for production with enterprise features.

Free
$0

Perfect for development

3 tools per app
1 published app
15-minute policy refresh
1 team member
Essentials
$99

Per month

10 tools per app
2 published apps
5-minute policy refresh
3 team members
Most Popular
Pro
$249

Per month

100 tools per app
10 published apps
30-second policy refresh
10 team members
Enterprise
Custom

For large organizations

Custom
Custom
Custom
Custom

All plans include:

File-based policies
CLI tools included
Community support
Local development mode

Ready to Secure Your AI Agents?

Tell us about your use case and we'll help you get started.