Intro
AI applications are no longer simple chat interfaces. They now read private context, call tools, trigger workflows, fetch data from retrieval systems, and make decisions inside business processes.
That shift changes the security problem. A prompt is not just text anymore. In an agentic application, a prompt can become an action path.
This blog explains why model guardrails, cloud-provider controls, and in-house filters are not enough on their own, and what teams should do instead: test the agentic decision boundary before deployment, then enforce the right controls at runtime.
Problem
Traditional application security is built around code, infrastructure, APIs, dependencies, and access control. Those controls still matter, but they do not fully understand how an AI agent can fail.
The real risk sits inside the agentic decision boundary: how the system interprets prompts, uses context, decides whether to call a tool, handles sensitive data, and follows or ignores policy.
A few failure patterns show why this needs a dedicated approach:
- Prompt injection can push the model away from intended behavior.
- Sensitive data can leak when users or workflows send proprietary data into an LLM without the right boundaries.
- Business logic can be manipulated when the AI interface is allowed to make commitments or decisions without proper control.
- Tool misuse becomes more serious when the agent can call APIs, query databases, send messages, create tickets, or trigger financial and operational workflows.
Existing protections fall short for three reasons:
- Model-built guardrails protect the base model, not the full business workflow.
- Cloud guardrails can help, but they are often tied to a specific provider and may not match the organization’s exact risk model.
- In-house filters are useful at the start, but they are hard to maintain as attacks, prompts, models, tools, and agent behavior keep changing.
Solutions
Teams need a security approach built for agentic applications, not just LLM usage.
- Red-team prompts as test cases before deployment Treat adversarial prompts like security test cases. Test prompt injection, indirect prompt injection, jailbreaks, sensitive data extraction, tool misuse, excessive agency, and policy bypass before the application goes live. The goal is not to prove the model is “safe.” The goal is to understand how the complete agentic workflow behaves under pressure.
- Map the agentic decision boundary A useful test should cover the places where the agent makes or influences decisions:
- User prompts
- System prompts
- Retrieval context
- Tools and APIs
- MCP servers and third-party integrations
- Memory and stored context
- Identity, permissions, and approval flows
- Output handling and downstream execution
- Capture evidence, not just pass/fail results Security teams need reproducible findings: the prompt used, the response, the tool call, the data touched, the policy violated, the severity, and the recommended fix. This turns AI security from a subjective review into an evidence-backed posture assessment.
- Convert findings into enforceable policies A finding should not stop at a report. If an agent leaks data, overuses a tool, accepts untrusted retrieval content, or crosses an action boundary, that finding should become a policy. For example: block a tool call when source trust is low, require approval for sensitive actions, redact confidential data before model input, or stop an output before it reaches a downstream system.
- Add runtime protection Pre-production testing finds the known failure paths. Runtime protection handles what happens after launch, when real users, live data, changing models, and new attack patterns enter the workflow.
Runtime controls should observe prompts, context, model responses, tool calls, and policy decisions. They should understand whether the behaviour is risky, then intervene when needed.
dwaar’s POV
dwaar’s view is simple: AI-agent security should test the decision layer, not just the software layer.
Model guardrails are necessary, but they are not enough. The real question is whether the agent behaves safely inside your product context, with your prompts, your tools, your data, your policies, and your business logic.
That is why dwaar uses adversarial prompts as test cases. It red-teams agentic workflows before deployment, captures evidence and severity, maps findings to relevant frameworks, and helps convert vulnerabilities into enforceable runtime policies.
For teams building with agents, the security loop should look like this:
Test how the agent breaks. Understand why it broke. Turn the finding into a policy. Enforce or monitor that policy in production.
That is the difference between adding guardrails around an AI feature and actually securing the agentic workflow.