Practical AI
Practical AI

Dealing with increasingly complicated agents

As AI systems move from simple chatbots to complex agentic workflows, new security risks emerge. In this episode, Donato Capitella unpacks how increasingly complicated architectures are making agents fragile and vulnerable. These agents can be exploited through prompt injection, data exfiltration, a

Featured Speakers

Donato Capitella Guest

Topics Discussed

Episode Summary

Executive Summary: ReverseSec security consultant Donato Capitella explains how enterprise AI has shifted from document-based chatbots toward agents that use tools, expanding the attack surface. Prompt injection can manipulate tool calls or exploit untrusted data mixed into context, so authorization and deterministic controls must sit outside the model. He discusses secure agent design patterns, risk-based testing, and Spikey, an open-source toolkit for testing real AI applications.

Main Topics: Enterprise adoption is moving toward agentic workflows: Capitella says many organizations have moved beyond internal RAG chatbots toward agents that use tools and APIs—for example, customer-support workflows that inspect accounts, review history, and draft or perform actions. MCP remains too new for many enterprises, which often use existing frameworks or custom implementations. Tool access and untrusted inputs expand the attack surface: An API exposed as an LLM tool may become reachable by anyone able to influence the model’s input, including through customer emails or prompt injection. Capitella stresses deterministic authorization checks that verify whether a tool action is permitted in its specific context. Mixing data sources creates confidentiality and integrity risks: When retrieval combines data from multiple users or sources, malicious content can enter another user’s model context and influence a response or action. Capitella describes a demonstrated customer-support scenario in which an attacker’s email could contaminate retrieved context and prompt a company-generated phishing message. MCP server descriptions and outputs can also carry prompt injections. Secure agent design should rely on controls outside the model: The discussed design-pattern paper presents six patterns for balancing security and agent capability. The action-selector pattern limits the model to choosing from fixed actions; code-then-execute has the model plan before untrusted data enters context, then uses symbolic variables, data-flow tracking, and tool policies to enforce deterministic restrictions. Prompt-injection defense requires detection and response: Capitella argues that jailbreaks are more like password guessing than SQL injection: success depends on how many attempts an attacker can make. Guardrails should provide detection signals and trigger responses such as temporarily suspending an identity after repeated attempts, rather than being treated as a complete protective barrier. AI application penetration testing and Spikey: Testing LLM-enabled applications is probabilistic and often more data-science-driven than conventional testing. Capitella’s team built Spikey, an open-source framework that adapts to different application interfaces, creates use-case-specific test datasets, and applies attack variations such as best-of-N. The goal is to assess the application, not merely red-team a model endpoint. Organizations face a governance balance: The guests contrast highly restrictive enterprises with startups where employees may use unsanctioned AI tools and share company data. The episode presents this as a longstanding cybersecurity tension made more urgent by strong demand for generative AI, without offering a single governance formula.

Key Arguments: Any tool exposed to an LLM should be treated as potentially exposed to anyone who can influence any part of the model’s input; internal APIs therefore need explicit authorization and access-control safeguards before being connected to agents. Combining untrusted emails, retrieved records, tool descriptions, and other sources in a single model context creates opportunities for prompt injection, data leakage, and manipulated actions. Guardrails alone do not secure an application. They are imperfect detection signals that should feed an operational response, including limiting repeated attempts by a user or identity. Reliable agent security should be enforced outside the LLM through deterministic mechanisms such as fixed action choices, data-flow tracking, and policies governing which data may be used for which tool calls. AI security testing should target the full application and its workflows, not just the model. Testing must account for probabilistic behavior, realistic interfaces, application-specific risks, and constraints on testing volume. The industry should shift emphasis from generic LLM red-teaming toward secure system design for applications with tool access, because prompt injection and jailbreaks are not currently solved at the model level.

Data Points: ReverseSec security-work pipeline: Tripled in size - Capitella said the company’s pipeline had grown to three times its prior size amid increased generative-AI cybersecurity work; no measurement period was specified. Agentic use cases in the design-pattern paper: About 10 - Capitella said the paper examines roughly ten kinds of agentic use cases and presents six design patterns. Design patterns in the paper: 6 - The patterns address trade-offs between security and the usefulness or power of different agent use cases. Example daily testing allowance: 100,000 requests per day - An illustrative upper-volume testing constraint described for a client engagement, not an industry-wide benchmark. Example restricted testing allowance: 1,000 prompts per day - An illustrative low-volume limit used to explain why penetration testers need carefully tailored test datasets. Example attack variations: Up to 100 - Spikey can be configured to try up to 100 variations per dataset entry using techniques such as best-of-N. Illustrative guardrail response threshold: 3 triggers - Capitella suggested that repeated guardrail triggers could prompt action against an identity; this was an example, not a universal recommended threshold. Typical assessment duration mentioned: 5–6 days - Capitella described the limited time he may have to conduct an application penetration test.

Pivotal Quotes: "Any tool exposed to an LLM becomes a tool exposed to any person that can control any part of the input into an LLM." — Donato Capitella: His concise description of how connecting tools to a model can expose internal capabilities to prompt-injection influence. "The guardrail is your detection feedback loop that then you have to action to protect your application and your users." — Donato Capitella: He clarifies that guardrails are not, by themselves, a security boundary; their signals must lead to operational responses. "You don't solve the problem of LLM agent security inside the LLM. This is not an alignment problem. You solve the problem outside of it." — Donato Capitella: His central takeaway from the discussion of deterministic, system-level controls for agent security.

Implications: As agents gain access to tools and mixed-source data, organizations need application-level security: strict authorization, controlled data flows, testing of real workflows, and response to repeated attacks. Generic model red-teaming and guardrails alone are not sufficient.

🔓 Sign Up for Unlimited Episode Search

About Practical AI

View all episodes from Practical AI