TKOResearch
Menu
Back to insights
AI Agent SecurityAI Agent SecurityPre-launch checklist

AI Agent Security Assessment: What to Review Before Production

A pre-launch review list for AI agents that touch production APIs, customer data, tools, memory, or RAG context.

Last reviewed May 4, 202610 min read

Start Here

If your AI agent can call tools, retrieve documents, write to SaaS systems, access customer data, send messages, run code, or make workflow decisions, it should not be reviewed as "just a chatbot."

It should be reviewed as a software system with authority.

The core question is no longer whether someone can make the model say something strange. The real question is this:

If the model, prompt context, retrieval layer, tool output, or memory is manipulated, what can the system actually do?

That is the purpose of an AI Agent Security Assessment: to identify whether an agent is ready for production, limited pilot, enterprise review, or further remediation before it touches real data and real business systems.

OWASP's LLM guidance identifies prompt injection, insecure output handling, sensitive information disclosure, insecure plugin design, and excessive agency as major LLM application risks. Those risks become materially more serious when the LLM is connected to tools, APIs, memory, and production workflows.

Why AI Agent Security Is Different

Traditional application security usually assumes that application logic is mostly deterministic. A user sends a request, the application validates it, business logic executes, and a result is returned.

AI agents change that pattern.

An AI agent may interpret user intent, inspect context, retrieve documents, select tools, generate parameters, call APIs, summarize results, update memory, and decide what to do next. That flexibility is why agents are useful. It is also why they are risky.

OWASP describes AI agents as LLM-powered systems that can reason, plan, use tools, maintain memory, and take actions. The OWASP AI Agent Security Cheat Sheet also highlights agent-specific risks including prompt injection, tool abuse, privilege escalation, data exfiltration, memory poisoning, goal hijacking, excessive autonomy, cascading failures, denial-of-wallet, and sensitive data exposure.

A production AI agent needs controls around at least five layers:

LayerSecurity Question
Prompt and instruction layerCan untrusted input override system intent?
Retrieval and context layerCan documents, emails, webpages, or records inject instructions or leak data?
Tool and API layerCan the agent take actions beyond what the user or workflow intended?
Identity and authorization layerAre actions scoped to the correct user, tenant, role, and business context?
Logging and artifact layerCan the organization reconstruct what happened and why?

If those layers are not reviewed together, the assessment will miss the actual failure mode.

The Pre-Production Review

A practical AI Agent Security Assessment should answer seven questions.

1. What Can The Agent See?

Start with data exposure.

The assessment should identify every source of information the agent can access:

Data SourceExamplesReview Focus
User promptChat input, form input, support ticketInput trust, injection handling, authorization
Retrieved documentsRAG chunks, knowledge base articles, PDFsTenant isolation, metadata filtering, document trust
SaaS recordsCRM, ticketing, email, calendar, ERPPer-user access, role boundaries, auditability
Tool outputAPI results, command output, database rowsWhether output is treated as trusted instruction
MemoryShort-term session state, long-term profile memoryPoisoning, cross-user contamination, stale context
LogsPrompt logs, traces, tool calls, errorsSensitive data exposure and retention

A safe agent does not simply retrieve relevant data. It retrieves authorized data, preserves source attribution, respects tenant boundaries, and treats external content as untrusted.

2. What Can The Agent Do?

The next question is action authority.

Every tool should be classified by impact:

Action ClassExamplesDefault Control
Read-onlySearch docs, summarize tickets, list recordsAllow with logging
Reversible writeCreate draft, add internal note, update non-critical fieldRequire validation and clear attribution
Irreversible writeDelete record, close case, modify billingRequire explicit approval
External communicationSend email, post message, notify customerDraft-first or human approval
Code or command executionRun shell, deploy code, trigger CI/CDStrong sandboxing or deny by default
Financial or legal actionRefund, approve payment, submit filingHuman approval and policy enforcement

OWASP's agent guidance recommends least privilege for tools, per-tool permission scoping, separate tool sets for different trust levels, and explicit authorization for sensitive operations.

A good assessment should not only ask whether a tool exists. It should ask whether the tool is scoped, whether the agent can chain it with other tools, whether the action is attributable to the correct user, and whether the server independently enforces authorization.

3. Can Untrusted Content Become Instruction?

Prompt injection is not limited to a user typing hostile instructions into a chat box. In agentic systems, instructions can enter through documents, webpages, emails, tickets, tool outputs, logs, memory, and retrieved content.

OWASP's prompt injection prevention guidance calls out RAG poisoning and agent-specific attacks such as thought/observation injection, tool manipulation, and context poisoning.

The assessment should test whether untrusted content can influence:

Injection SourceExample Risk
User promptUser asks agent to bypass workflow rules
Retrieved documentDocument contains malicious instructions that override the task
WebpageAgent summarizes attacker-controlled content that includes hidden instructions
Email or ticketIncoming message attempts to redirect the agent's behavior
Tool outputAPI response includes text that changes the next tool call
MemoryPoisoned memory changes future behavior across sessions

The right control is not better prompting alone. The system needs trust boundaries, content labeling, structured tool schemas, server-side authorization, output validation, and regression tests for known abuse classes.

4. Are RAG Boundaries Real Or Cosmetic?

RAG security is often where AI systems fail quietly.

A RAG workflow may appear safe because the application only exposes a chat interface. But if retrieval ignores tenant, role, source, document classification, or authorization metadata, the model can surface data the user should never receive.

The assessment should validate:

RAG ControlReview Question
Tenant isolationCan user A retrieve user B's records?
Role filteringDoes retrieval respect the user's actual permissions?
Source attributionCan every answer be traced back to authorized source material?
Document trustAre external or untrusted documents treated differently from trusted internal sources?
Metadata enforcementAre filters applied server-side or merely implied in the prompt?
Leakage testingCan sensitive content be induced through summaries, comparisons, or indirect queries?

A safe RAG system should enforce access before content reaches the model context. The model should not be trusted to decide what the user is allowed to see.

5. Is Output Validated Before It Becomes Action?

Improper output handling becomes more dangerous when model output is passed downstream.

If an LLM output becomes SQL, shell commands, API parameters, JSON patches, workflow transitions, emails, or code, then model output is part of the execution path. OWASP identifies insecure output handling as a risk because unvalidated outputs can lead to downstream exploits, including code execution and data exposure.

The assessment should review:

Output PathRequired Control
JSON tool parametersSchema validation and allowed-value enforcement
SQL or query generationParameterization and server-side policy
Shell/code executionSandbox, allowlist, and strict deny rules
Email/message generationDraft-first, approval, and recipient validation
Record updatesServer-side authorization and business rule enforcement
SummariesSensitive-data filtering and source validation

The model should propose actions. Deterministic code should authorize, validate, and execute them.

6. Can The Agent Loop, Escalate, Or Compound Errors?

Autonomy is useful until the system can keep acting after it has gone wrong.

Review whether the agent can:

  • Retry failed actions indefinitely.
  • Chain multiple low-risk tools into a high-risk outcome.
  • Convert read access into data exfiltration.
  • Use one tool's output as another tool's input without validation.
  • Persist manipulated state into memory.
  • Trigger external systems without human confirmation.
  • Create cost explosions through uncontrolled loops.

OWASP identifies excessive autonomy as an agent risk when high-impact actions occur without appropriate oversight.

The fix is not to remove all autonomy. The fix is to classify actions, define thresholds, require confirmation for high-impact operations, and log the reasoning and authorization path.

7. Can You Reconstruct What Happened?

If an AI agent causes damage and the logs only show "model responded," the system is not production-ready.

A production AI agent should preserve enough audit artifacts to answer:

QuestionArtifact Needed
Who initiated the action?User identity, session, role, tenant
What did the agent see?Prompt, retrieved sources, tool outputs, memory references
What did the agent decide?Planned action, selected tool, generated parameters
What authorized execution?Policy result, approval event, server-side authorization
What happened downstream?API response, record change, external message, error state
What was exposed?Output shown to user, files accessed, data returned

This does not mean logging sensitive data recklessly. It means designing traceability, redaction, retention, and access controls into the agent runtime before launch.

What The Review Should Leave Behind

The useful output is not a long report that nobody can act on. It is a small set of artifacts that lets engineering and leadership decide whether the agent can launch, should stay in pilot, or needs more work.

DeliverableDescription
Go/No-Go Launch MemoDecision-ready memo stating whether the agent is ready for production, pilot-only, or blocked.
Agent Trust-Boundary MapDiagram of model, memory, RAG, tools, APIs, credentials, logs, and approval gates.
Abuse-Case MatrixStructured tests for prompt injection, indirect injection, RAG leakage, unsafe tool use, and excessive autonomy.
Findings RegisterSeverity-ranked findings with artifacts, impact, recommended fix, owner, and validation method.
Remediation RoadmapPrioritized engineering plan for pre-launch blockers and post-launch hardening.

What Production-Ready Looks Like

An AI agent is closer to production-ready when:

  • It uses least-privilege tools.
  • Write actions are classified and gated.
  • RAG retrieval enforces authorization before model context.
  • External content is treated as untrusted.
  • Model output is validated before downstream execution.
  • Sensitive operations require deterministic server-side authorization.
  • Logs preserve prompt, retrieval, tool-call, approval, and output artifacts.
  • Memory is scoped, validated, and isolated.
  • There is a documented rollback, disable, or kill-switch path.
  • The system has regression tests for prompt injection and tool misuse scenarios.

What Usually Blocks Launch

Common blockers include:

BlockerWhy It Matters
Broad service credentialsThe agent inherits more authority than any user should have.
Prompt-only access controlThe model is being asked to enforce policy it can be manipulated to ignore.
Write-capable tools without confirmationPrompt injection can become production impact.
RAG without tenant isolationUsers may retrieve or summarize unauthorized data.
Tool outputs treated as instructionsMalicious API/content responses can influence next actions.
Missing audit tracesThe organization cannot reconstruct failures or prove bounded operation.

Final Thought

AI agent security is not about proving the model is perfectly safe. It is about proving that the system remains bounded when the model is wrong, manipulated, confused, or exposed to hostile context.

Before your AI agent reaches production, you should be able to answer one question with concrete artifacts:

What is the worst thing this agent can do if something goes wrong?

If the answer is unclear, the agent is not ready.

What TKOResearch Reviews

TKOResearch performs principal-led AI Agent Security Assessments for teams preparing production launch, enterprise review, investor diligence, or internal security sign-off.

Request AI Security Review

Sources