Everything you need to know about D2 AI agent guardrails and authorization
AI agent guardrails are security controls that constrain what AI agents can do, what inputs they can accept, and what outputs they can return. D2's guardrails provide input validation, output sanitization, and output validation to prevent AI agents from performing unauthorized or dangerous actions.
AI agents are autonomous systems that can call functions, access APIs, and interact with databases. Without proper authorization, an AI agent could be exploited to access sensitive data, perform privileged operations, or chain multiple actions together in dangerous ways. D2 provides function-level authorization specifically designed for agentic AI.
Traditional authorization systems focus on endpoint-level security, but AI agents operate at the function level. D2 provides function-level authorization that protects individual tool calls, not just API endpoints. We also offer guardrails and sequence enforcement that are critical for agentic AI security.
Sequence enforcement prevents AI agents from chaining multiple function calls together in dangerous ways. For example, an attacker might try to make an AI agent first query sensitive data, then exfiltrate it via email. D2's sequence enforcement tracks the order of function calls and blocks unauthorized sequences.
You can add D2 to your application in under 5 minutes: install the SDK, add the @d2_guard decorator to your functions, generate a policy template with our CLI, and configure RBAC. No additional infrastructure or complex setup required.
Yes! D2 is framework-agnostic and works with any Python framework or LLM library. Whether you're using LangChain, LlamaIndex, AutoGPT, or building custom AI agents, D2's decorator-based approach integrates seamlessly.
Currently, D2 supports Python with our official SDK. Support for additional languages is on our roadmap. The Python SDK works with any Python 3.8+ application.
D2 is built for production with minimal overhead. We use intelligent caching, optimized policy evaluation, and efficient network calls. Authorization checks typically add less than 5ms of latency to function calls.
Yes! D2 includes a free local development mode where policies are loaded from local files. This is perfect for development and testing. When you're ready for production, you can publish your policies to our cloud platform.
With D2's cloud mode, you can update policies through our dashboard or CLI. Changes propagate to your applications automatically within 30 seconds (Pro plan) or 15 minutes (Free plan) without any code changes or redeployment.
All plans include community support through our GitHub discussions. Paid plans include email support with response times based on your plan tier. Enterprise customers get dedicated support channels and SLA guarantees.
The D2 Python SDK is open source and available on GitHub. Our cloud platform and dashboard are proprietary but free to use for development with paid plans for production features.
Still have questions?
Contact us