HOW-TO GUIDE19 min read

AI Runtime Security Posture: Inspect Live Agent Traffic

A practical guide to checking live agent inputs, tool calls and outputs before they create security or operational risk.

P
PADISO teamPublished 15 Nov 2026

An effective ai runtime security posture checks what an AI agent receives, requests and sends while it is running. Put inspection at the boundaries around model inference and tool execution, then enforce permissions and payload rules in code rather than relying on the model to obey instructions. Start with one agent workflow and make every action traceable.

This is different from reviewing a model before launch. Static assessments can help you understand configuration and known risks, but a live agent can encounter untrusted content, change its plan and propose tool actions one step at a time. If you are still deciding which workflows should use agents, begin with PADISO's AI strategy and solutioning service. If you already have a workflow in view, this guide will help you design the controls around it.

What does an AI runtime security posture protect?

An agent is a software system that uses a model to interpret a task and may call tools, retrieve information or take actions. The model's response is only one part of its behaviour. The system also includes the user interface, retrieval sources, model provider, memory, tool gateway, credentials and downstream services.

Runtime security means checking activity as that system runs. For an agent, the important security events are not limited to the initial prompt and final answer. They include retrieved documents entering context, proposed tool calls, arguments passed to those tools, results returned, and any data sent outside your environment.

A useful distinction is:

Control area Main question Examples of controls
AI security posture management What AI assets, permissions and configurations exist? Asset inventory, cloud configuration review, identity and supply-chain checks
Runtime security What is this agent doing right now, and is it permitted? Prompt and retrieval inspection, tool authorisation, output checks, audit events
Application security Is the surrounding application built and deployed securely? Secure coding, authentication, vulnerability management and network controls

These areas complement each other. Runtime inspection does not replace identity management, secure development or pre-deployment testing. Nor does an asset inventory tell you whether a particular agent invocation is about to send an unauthorised payment instruction or export sensitive records.

The OWASP Top 10 for Agentic Applications describes risks including goal hijacking, tool misuse, identity and privilege abuse, and memory or context poisoning. These are useful categories for threat modelling. The practical lesson is that a control focused only on the user's first prompt will miss risks that arise later in the execution path.

For teams building or operating agents, PADISO's AI agents and automation service covers workflow design as well as implementation. Security requirements belong in that design, not in a filter bolted on after the agent has been granted access to business systems.

What do you need before you inspect live traffic?

Do not begin by buying a proxy or choosing a guardrail product. First establish what the agent is allowed to do, where its data comes from and which actions could cause harm. Without that context, an inspection layer can produce alerts without telling your team what to block.

Gather these items for the workflow you plan to protect:

  • A workflow description. State the user goal, the agent's expected steps and what a successful result looks like.
  • A system map. List the application, model provider, retrieval stores, agent framework, tools, MCP servers, APIs and downstream systems.
  • An action inventory. Record every tool, its purpose, inputs, identity and effect. Mark actions that change records, move money, send messages, grant access or run code.
  • Data classifications. Identify personal information, credentials, confidential material and records subject to your organisation's obligations.
  • Identity and permission details. Determine which user or service identity reaches each tool, how credentials are stored and what scopes they grant.
  • A baseline of normal operation. Capture expected tool sequences, payload shapes, task volumes, failure modes and response times.
  • An owner and response path. Name who can block a tool, disable a workflow, investigate an alert and approve a change.

Use real traces from a test environment if available. A trace should show the request, retrieved context, model response or tool proposal, policy decision, tool result and final response. Do not collect more sensitive content than needed to investigate behaviour. Use redaction or controlled test data where practical.

If the agent uses MCP, the MCP server development service can help with tool boundaries and server design. Regardless of protocol, treat each tool as an interface that needs an owner, a defined contract and an explicit authorisation decision.

How do you build an AI runtime security posture step by step?

1. Draw the execution path and trust boundaries

Write down the sequence from user request to final action. A typical path is: user input, application checks, retrieval, context assembly, model inference, tool proposal, policy decision, tool execution, result returned to the agent, and response or follow-up action.

For each transition, ask what crosses the boundary. Is it a prompt, a document, a structured tool payload, a credential or a result from an external service? Record whether the data is trusted, untrusted or conditionally trusted. A document from a customer email remains untrusted even after your retrieval system has indexed it. Retrieval changes where the content is stored, not who controls its instructions.

Mark the points where a decision can be enforced. Your application can validate a request before it enters the model. A retrieval layer can label and constrain returned content. A tool gateway can reject a call before a business system executes it. An egress control can stop sensitive output from leaving the environment.

Do not treat the model's internal reasoning as a security boundary. You usually cannot reliably inspect or constrain every internal step. Focus instead on observable inputs and outputs, explicit tool proposals, identities, and consequential actions.

Tip: Draw the flow with the team that owns each component. The diagram should identify which service makes each security decision, rather than showing a single box labelled “AI”.

Common mistake: Inspecting only the model endpoint. An agent can retrieve poisoned content or call an exposed tool through application code that sits outside the model provider's endpoint.

2. Classify tools by the impact of their actions

Create a tool register and group tools by consequence. A read-only search over a limited knowledge base is not equivalent to deleting a customer record, changing a payment destination or sending an external email.

For each tool, document:

  • What business action it performs.
  • Which data it can read or change.
  • The identity used to call it.
  • Whether its effects can be reversed.
  • Which inputs determine the target, amount, recipient or scope.
  • Whether the tool can call another service or execute code.
  • What confirmation or approval the action requires.

Use this classification to set different policies. Low-impact read operations may be eligible for automatic execution when arguments pass strict checks. High-impact changes may require a human approval, a second source of authorisation or a separate transaction control. A tool that can run arbitrary code should have a tightly isolated execution environment and should not inherit broad access to production data.

Apply least privilege at the tool level. The agent should receive only the permissions needed for its task, and a tool call should be checked against the user, workflow and target resource. A session-wide permission is often too broad because the agent's next action may differ from the original request.

Tip: Make the tool name reflect what it does and keep each tool's authority narrow. Prefer separate operations such as lookup_invoice and approve_invoice over a generic tool that can read or alter anything.

Common mistake: Giving an agent a powerful service credential, then trying to contain it with a system prompt. Prompt text is guidance for the model. It is not a substitute for access control enforced by the application.

3. Define the original task and the rules for changing it

Runtime checks need a clear account of what the user asked for. Preserve the original request and relevant authorisation context in application state, separately from retrieved documents and model-generated text. At each consequential tool call, compare the proposed action with that task.

This helps identify a confused-deputy problem. A confused deputy is a system with legitimate authority that gets tricked into using that authority for the wrong purpose. For example, an agent asked to review a record might receive an injected instruction in a document to delete it. The agent's service identity may technically be allowed to delete records, but the user's task does not authorise that action.

Use deterministic checks for facts that can be evaluated in code: whether the user has permission, whether a target belongs to the user's scope, whether a requested operation is allowed, whether a value is within a permitted limit, and whether approval is present. A semantic classifier can help flag an apparent mismatch between the request and action, but it should not be the sole authorisation mechanism for consequential operations.

Keep the decision explainable. A policy result should say which rule allowed or denied the action, not just return a generic risk score. Store the policy version and the relevant identifiers so the team can reconstruct why an action proceeded.

Tip: Represent the user goal as structured application state where possible, such as a requested operation and authorised record identifier. Do not rely on a later model summary as the only record of intent.

Common mistake: Assuming the user's initial request authorises every step the agent later proposes. The system must check the actual action, target and identity at the point of execution.

4. Inspect prompts and retrieved context before inference

Check direct user input and any external content that will be added to the model's context. Indirect prompt injection occurs when content from a web page, email, file or other source contains instructions intended to influence the agent. The content may look like ordinary text, but it can ask the model to ignore its task, reveal information or invoke tools.

Inspection can include source allow-lists, content labelling, prompt-injection classifiers and rules that separate instructions from quoted or retrieved material. Where possible, preserve provenance: record where a passage came from and mark it as data, not as an instruction with authority over the system.

Sanitisation should be used carefully. Deleting every suspicious phrase can damage legitimate content and still fail to remove a cleverly worded attack. A stronger pattern is to limit what retrieved content can authorise, keep tool permissions outside the prompt, and verify any resulting action independently.

Test the control against both direct prompts and indirect content in the sources the agent reads. Include documents that contain instructions, attempts to extract secrets, misleading claims about user permissions and requests to call tools. Measure whether the agent continues its intended task and whether any unsafe action is blocked downstream.

The OWASP Top 10 for LLM Applications includes prompt injection and sensitive information disclosure among the risks to consider. Use it as a threat-model input, then map the risks to the actual retrieval and execution paths in your application.

Tip: Keep source trust labels available after retrieval. A string from an external web page should not become trusted just because it now sits beside internal knowledge in a prompt.

Common mistake: Relying on a system prompt that tells the model to ignore malicious instructions. Keep that instruction, but enforce the permissions and action rules outside the model as well.

5. Validate every proposed tool call before execution

Treat a generated tool call as an untrusted request. Before the tool runs, validate its structure and meaning against a contract. The contract should define allowed fields, types, formats, bounds, enumerated values and relationships between fields.

For example, a tool that changes a customer contact detail should reject an unknown customer identifier, an invalid field name and an out-of-scope account. A payment-related tool should validate the permitted operation and destination against business rules that do not come from model-generated text. The exact checks depend on the application and its existing transaction controls.

Use several layers:

  1. Schema validation: Is the payload valid JSON and does it match the expected structure?
  2. Value validation: Are amounts, identifiers, dates and strings within allowed ranges and formats?
  3. Authorisation: Is this identity permitted to perform this action on this resource now?
  4. Intent and business-rule checks: Does the action fit the authorised task and applicable process?
  5. Approval or confirmation: Does the action require a person or a separate system to approve it?

Do not confuse a valid schema with a safe action. A destructive operation can use perfectly valid JSON. Likewise, a regex that blocks a word such as “delete” will miss equivalent actions expressed another way. Use deterministic policy for authority and payload constraints, with additional detection for suspicious content where useful.

If you use MCP, pin the expected tool schema and description in a controlled registry. Compare what the client expects with what the server exposes. Treat unexpected schema or description changes as a change-management event, not as an automatic update to trust. Restrict outbound network paths so a tool cannot quietly reach an unapproved destination.

Tip: Put the enforcement point in a tool gateway or application service that the model cannot bypass. Log the proposed call and the decision, including a safe representation of its arguments.

Common mistake: Validating only the arguments produced by your own agent framework. Check the actual payload at the last point before the downstream operation executes.

6. Protect data on the way out

Inspect model responses and tool results for information that should not leave a defined boundary. Depending on the workflow, this may include credentials, API keys, personal information, customer records or confidential business material.

Build the control around data classification and destination. A mask or block rule should be specific enough to avoid exposing protected data while still allowing the task to work. For example, the system may need to use a customer identifier internally while preventing that identifier from appearing in a public response. Decide which services may receive which classes of data, and apply the rule before the content is sent to an external model or user.

Use existing secret-management and data-loss prevention controls where they fit. Add detection for secrets and sensitive identifiers to the inference and egress path, but do not assume a content filter knows your organisation's data permissions. A model provider's safety feature can be one layer; your application remains responsible for deciding whether a particular record may be sent.

For Australian organisations, consider the Privacy Act and relevant regulatory obligations when agents handle personal information. The OAIC's privacy guidance is a starting point for understanding privacy responsibilities. Prudentially regulated organisations should also assess their information-security arrangements against the requirements that apply to them. APRA's CPS 234 information security guidance is relevant context, but an agent control should be mapped to your organisation's obligations rather than presented as a standalone compliance solution.

Tip: Test both the prompt sent to the model and the final response returned to the user. Sensitive data can enter through retrieval, appear in a tool result or be reconstructed in the completion.

Common mistake: Redacting only the final answer. If sensitive data has already been sent to an external inference endpoint, output filtering does not undo that disclosure.

7. Set limits on execution, cost and repetition

Agents can call tools repeatedly, retry after errors or continue through a chain of delegated tasks. Set explicit limits in the orchestrator or gateway so an unexpected loop cannot create unbounded activity.

Define limits for:

  • Tool calls per task and the maximum sequence depth.
  • Permitted retries and timeouts.
  • Token or inference budgets, where available.
  • Actions per user, workflow or time window.
  • High-impact actions that need an additional approval.
  • The conditions that stop the workflow and hand control to a person.

Choose limits from observed workflow needs, not guesswork. Capture a baseline in a test environment, then set a threshold that allows legitimate variation while stopping runaway execution. Include a circuit breaker that can pause a tool or workflow without taking unrelated business services offline.

If the agent delegates work to other agents, propagate identity and task context explicitly. Record which agent requested an action and which principal authorised it. A child agent should not gain broader privileges merely because a parent agent delegated a task.

Tip: Make limits visible to operations teams. A blocked workflow should produce a useful reason and a safe recovery path, not silently retry until it exhausts resources.

Common mistake: Treating cost controls as a finance-only concern. A sudden increase in tool calls can indicate a loop, abuse or an integration change that also creates security risk.

8. Choose inspection components by control, not category label

Products described as AI gateways, guardrails or runtime protection platforms can overlap, but their capabilities differ. Map each product to a specific point in your architecture and test the controls that matter to your workflow.

Component type Good fit Questions to test
Application middleware A team controls the agent code and wants checks close to tool execution Can it enforce policy before every call? Can developers test and version rules?
Model-provider safety features A workflow already uses the provider's managed inference platform Which inputs and outputs are checked? Can you apply checks to retrieved content and tool calls?
AI gateway or proxy Traffic from several applications needs a shared inspection and visibility point Can it identify the user, agent, tool and policy decision? What happens if it is unavailable?
Dedicated runtime security platform Security teams need central discovery, monitoring or enforcement across multiple systems Which protocols and agent frameworks are supported? Can you verify the claimed control in a proof of value?
Existing IAM, API gateway and DLP Controls already exist and can be extended to agent traffic Can they make per-action decisions with enough context, without creating bypass paths?

For example, AWS documents Bedrock Guardrails as controls that can be applied in Bedrock workflows. Microsoft documents Azure AI Content Safety, including safety features for AI content. Check current product documentation for the exact capabilities, deployment options and pricing before making a decision. Product features and charges change; do not carry a price from an old comparison into a business case.

Run a proof of value using your own agent, policies and threat cases. Include a normal request, a malicious retrieved document, a valid but unauthorised tool call, an unexpected schema change, sensitive output and a repeated tool loop. Check whether each event was detected, blocked, recorded and made available to the right responder.

Do not add a second model call to every request without measuring the effect. A classifier or model-based inspection step may add latency and operational complexity. Use deterministic checks for rules that can be expressed exactly, and reserve more involved analysis for cases where it adds meaningful detection. Test failure behaviour as well: a security service timeout should not silently turn into an uninspected tool execution.

Tip: Ask vendors to demonstrate the enforcement path, not just a dashboard or detection score. Confirm where the policy runs and whether the agent can reach the tool through another route.

Common mistake: Selecting a platform based on a broad “AI security” label. Make a control-to-requirement matrix and validate each claim against a test case.

9. Instrument the workflow and make response operational

Inspection without observability leaves teams unable to explain what happened. Record a trace for each task with a correlation identifier that follows it through inference, retrieval and tool execution. Capture timestamps, identities, tool names, policy outcomes, schema versions and the result of each action.

Avoid logging full prompts and outputs by default if they contain sensitive information. Decide what is necessary for security investigation, who can access it and how long to retain it. Use redaction, access controls and a documented retention policy. Store enough evidence to reconstruct an event without turning the log platform into a new repository of exposed customer data.

Define response actions before launch. For example:

  • Block a specific tool call and let the agent continue only if safe.
  • Pause the workflow and ask a human to review the proposed action.
  • Revoke or rotate a credential if misuse is suspected.
  • Disable a tool integration or agent version through a controlled switch.
  • Preserve relevant traces and notify the appropriate security or service owner.

Set alerts around events that deserve attention, not every rejected request. A burst of denied calls, a new tool schema, a high-impact action outside normal hours or repeated attempts to reach an unapproved destination may require investigation. Review alert volume during the pilot so the team can distinguish useful signals from routine noise.

Tip: Run a tabletop exercise with security, product, engineering and operations. Give the team a realistic trace and ask who can stop the action, what evidence they need and how service resumes.

Common mistake: Assuming an audit log is useful because it exists. If it omits the principal, policy decision or tool arguments needed to reconstruct an action, it may not support investigation.

10. Test, launch gradually and keep the controls current

Treat runtime controls as software. Version policies, review changes, test them before release and monitor how they behave in production. A model update, new retrieval source, changed tool schema or expanded permission can alter risk even if the visible user experience appears unchanged.

Start in a controlled environment with test data and a representative set of tasks. Use adversarial cases as well as normal cases. Test whether a prompt injection reaches the model, whether an unauthorised call is denied, whether a malformed payload is rejected and whether an alert reaches the correct team. Test failure conditions such as a policy service outage or stale tool registry.

If you begin with monitor-only operation, be explicit about its limits. Monitoring can reveal what would have been blocked, but it does not prevent the action. Use it only where that risk is acceptable, and define the point at which enforcement becomes mandatory. For actions with material financial, privacy or operational consequences, do not let a learning period become an indefinite exception.

A practical rollout sequence is:

  1. Select one workflow with a named business owner and bounded tool access.
  2. Map data flows, identities, actions and trust boundaries.
  3. Add schema checks, authorisation and execution limits at the tool boundary.
  4. Add prompt, retrieval and egress inspection according to data risk.
  5. Test normal and adversarial cases, including failure behaviour.
  6. Launch to a limited group with alerts and a clear rollback path.
  7. Review traces, policy exceptions and incidents, then adjust rules under change control.
  8. Expand to the next workflow only after the owners can operate the controls.

Maintain a change register for model versions, prompts, retrieval sources, tool definitions, policies and credentials. A change to an MCP server description or schema should trigger review because an agent may interpret the updated interface differently. Keep a known-good configuration available so you can roll back safely.

Tip: Track operational measures that help you manage the system, such as rejected calls by reason, approval rates, policy-service failures and task completion failures. Use them to diagnose the workflow, not to claim security is solved by a single score.

Common mistake: Treating a successful red-team exercise as proof that the agent is secure. Testing provides evidence about selected scenarios; ongoing runtime monitoring and threat detection and access control address production behaviour as it changes.

How should you measure whether the controls work?

Use measures tied to security decisions and service operation. The exact measures depend on the workflow, but a useful dashboard might include:

  • Tool calls allowed, denied and sent for approval, grouped by reason.
  • Attempts to use unknown tools, fields, targets or destinations.
  • Sensitive-data detections and redactions, with access to the underlying content restricted.
  • Policy or inspection failures, including fail-open and fail-closed events.
  • Agent loops, retries and budget-limit events.
  • Time taken to investigate and resolve a blocked or suspicious action.
  • Changes to tool schemas, permissions and policy versions.

Interpret these measures together. A sharp increase in denials might indicate an attack, a broken tool integration or a new workflow pattern. A low number of alerts does not prove safety if coverage is incomplete or the system is not logging the relevant boundary.

Review representative traces with the workflow owner and security team. Ask whether the action was allowed for the right reason, whether the evidence was sufficient, and whether the user received a useful response. Use the review to improve controls without weakening a rule simply to remove friction.

For a broader architecture review, PADISO's enterprise architecture and platform engineering team can help map identity, gateways, application services and operational ownership across the design. The work should leave your team with clear enforcement points and a way to operate them.

Where does PADISO fit?

We help teams design agent workflows, tool boundaries and platform controls so security decisions sit in the right part of the system. The first step is to map one live or planned workflow, identify its high-impact actions and agree what must be blocked, approved or logged.

What should you do next?

Choose one agent workflow and write down every tool it can call, the identity each call uses and the consequence of each action. Then compare the current execution path with the steps in this guide. If you want help choosing a safe starting point, take the PADISO AI readiness test.

WANT TO TALK THROUGH YOUR SITUATION?

Talk it through with us. Thirty minutes, no slides.

P
Written by the PADISO TeamSydney-based technology leaders who build what they advise on. Seven years of fractional CTO, architecture and AI work for enterprise, government and private equity.

Keep reading

All posts →

Let's talk.

Tell us what you are weighing up, whether it is a build, a roadmap or a deal. You will leave the call knowing your next step.

Book a 30-min callhi@padiso.co