AI Guard
Learn how to enable AI Guard and write your first policy.
Scale AI agents without scaling risk
Discover your agents, set custom policies, and block harmful actions inline, so you can safely scale agents in production.
Works out-of-the-box with the models, frameworks, and languages your agents already run on
Runtime security for AI agents
Prevent prompt injection, tool misuse, data exfiltration and other runtime threats.
Discover agent risk
See every agent, what resources it can reach, and whether they are exposed.
Catch multi-step attacks
Evaluate every prompt, tool, and MCP call against session history, normal agent behavior, and your policies.
Block attacks inline
Stop unsafe actions and redact sensitive data mid-loop, in real time.
Protect with one click
Enforce using the Datadog tracer you already use, on any model, provider, or framework.
AI Guard sits inline between orchestrators and LLMs, intercepting every interaction in real-time. Turn on protection for a single agent, or cover all of them through your AI gateway.
One platform for every team responsible for your agents
Get the visibility and control you need, whether you’re shipping agents, protecting them at runtime, responding to attacks, or governing what they can do.
Understand your risk exposure and keep your agents behaving as intended. Demonstrate what was evaluated, what was blocked, and why.
Catch real attacks with fewer false positives. Stop agents from taking unsafe actions mid-session, and mask sensitive data in real time.
Enforce guardrails using the Datadog SDK you already run. Give development, platform, and security teams shared trace context for investigations.
Turn enforcement on with a single click, and keep agents connected to the content and data they need to do their job.
A single solution for every team responsible for your agents
Understand risk exposure
Discover agents with no code changes
If you already run the Datadog tracer, visibility is immediate and enforcement is one click away. Instrument per agent or hook into your AI gateway for one integration point.
Map agents to connected services and datastores
Find your first-party agents and the model endpoints, upstream and downstream services, and datastores they reach, including the security posture of each, for any model or provider.
Detect sensitive data in prompts and tools
Identify PII, financial data and secrets moving through prompts, responses, tool calls, and tool results. Know which agents touch sensitive data before you decide what to block.
Evaluate and customize
Set sensitivity thresholds per environment and service
Choose the minimum confidence score needed to flag a threat. Lower the threshold to surface more attacks, raise it to cut noise, and set different thresholds for production and staging.
Inspect prompts, tool calls, and MCP interactions
Inspect every prompt, response, tool call, and tool result as it happens, including content translated into another language or hidden with substitution encoding.
Analyze the full conversation context
Evaluate each action against the agent’s behavioral baseline, session history, and your enterprise policies to catch slow-build attacks.
Enforce everywhere
Test and enforce policies
Set tool blocklists to bound what an agent can do. Preview AI Guard’s verdict on any policy change in the Policy Simulator before it reaches production.
Block unsafe interactions in the request path
Stop malicious prompts, responses, tool calls, and tool results inline. Catch attacks while the agent is still iterating, before anything is compromised.
Mask PII, financial data, and secrets
Redact 400+ types of secrets and credentials in user prompts, responses, tool calls, and tool results, including email addresses, phone numbers, banking data, API keys, and tokens.
Investigate and respond
Focus on the findings that matter
Signals are tagged by their severity, attack categories, tools involved, and any sensitive data found. See a step-by-step record of the attack path, and investigate the trace in Agent Observability and APM.
Tighten your guardrails and close the loop
Block attacking IPs and users, create a security case, or run a SOAR workflow. Push the signal to Jira or your SIEM, or automate response.
Generate audit evidence
Export audit records, including evaluation detail and access logs. Every verdict is recorded with the context it was based on.
Priced to scale with your agents
Choose from annual, monthly, or on-demand plans.
Security and engineering teams scale agents in production
Organizations across industries trust AI Guard to secure their agents at runtime.
Joey Marburger, VP of Content Intelligence
Our customers are news publishers, and the AI features we ship carry their brand and their readers' trust. Prompt injection isn't an abstract risk for us. A single bad output can damage credibility that took years to build. AI Guard gives us the visibility and real-time controls to ship AI without that risk hanging over every release.
Viraj Patel, Senior Software Engineer
Datadog gives us the end-to-end visibility we need to move fast without compromising on security. AI Guard detects threats as our agent runs, and the connection to Agent Observability lets us go from spotting a flagged trace to understanding exactly what went wrong. That runtime awareness gives us the confidence to know we'll see issues before they become real problems.
Zeïd Marouf, Security Engineer
As an agent platform, security is paramount to address the nuances of agentic AI, like exfiltration risk, authentication, and real-time policy control. Datadog has been a phenomenal partner, and AI Guard gets this right. It goes beyond just scanning prompts in isolation to identify and secure the full risk profile of our customers' agents.
AI Guard is an AI agent security product that protects your homegrown, custom agents against prompt injection, tool misuse, data exfiltration, and other threats at runtime. It evaluates every prompt, response, tool call, MCP call, and API interaction against each agent's behavioral baseline, session history, and the data and tools it can reach. AI Guard runs inline with your agents, blocking malicious activity and redacting sensitive data in real time before anything is compromised.
AI Guard protects against prompt injection, jailbreaking, tool misuse, sensitive data exfiltration, and other threats in the OWASP Agentic Top 10.
The lethal trifecta describes three capabilities that make agents vulnerable to attacks. These are access to private data, exposure to untrusted content, and the ability to externally communicate. AI Guard addresses the lethal trifecta by enforcing agent security guardrails at runtime. It evaluates all prompts, responses and tool calls and blocks unsafe behavior in real time, so attempts to manipulate agents are unsuccessful.
AI Guard sits inline between orchestrators and LLMs, intercepting every prompt, response, tool call, and tool result in real-time. An evaluator model (LLM-as-a-judge) reviews each one against the full context: the system prompt, running session history, the agent’s behavioral baseline and your custom policies. Each decision comes with reason tags such as data-exfiltration, jailbreak and indirect-prompt-injection.
AI Guard evaluates each tool call's intent, arguments, relationship to earlier steps and output. It allows benign intermediate steps to proceed if they align with your organization’s intent for that agent. If intent diverges, AI Guard stops the chain of behavior immediately.
Yes. With sensitive data scanning enabled for a service, AI Guard scans LLM inputs, tool calls and outputs. It redacts financial data, secrets, and PII (such as email addresses, phone numbers and Social Security numbers) in real time.
AI Guard is model and framework agnostic. It works with OpenAI, Anthropic, Bedrock, VertexAI, Azure, and more.
If you already run the Datadog tracer SDK, visibility is immediate and enforcement is one click away. Instrument per agent or hook into your AI gateway for one integration point. See the documentation for full setup instructions.
Yes. The AI Guard Policy Simulator lets you submit user input, assistant output and tool calls and see the action and reason in real time. You can also tune the sensitivity threshold and test sensitive data scanning there.
The Discover page shows your protected and unprotected agents. It maps the model endpoints, datastores, and connected services each agent touches, so you can understand your risk exposure.
When AI Guard detects and attack, it generates a security signal in theSignals explorer. Each signal carries the attack category, the evaluation result, a severity level and related AI Guard spans, so teams can see the entire session that led to a blocked action and correlate all the agent interactions together for deeper investigation and response. From the Signal, you can block attacking users or IPs, open security cases, or trigger remediation workflows. You can also push a case to Jira or your SIEM and handle it in your security team’s existing systems.
AI Guard is generally available to protect custom agents at runtime. Sign up for a free trial here. Protection for coding agents (such as Claude Code, Cursor, and Codex) is in Preview. Sign up for a free preview.
Resources and learning
Try AI Guard for yourself