AI agents are no longer limited to answering questions. They now write code, approve software changes, simulate cyber‑attacks, and even generate kernel‑level security shields. As these capabilities expand, organizations must move beyond the “does it work?” test and ask whether the agent can be trusted to act safely in real‑world environments.
Why security matters for autonomous AI agents
When an agent can execute actions without a human in the loop, a mistake can become a breach, a data leak, or a compliance violation. The risk profile differs from traditional chatbots because the output is no longer a text snippet—it is an operation that changes code, network configurations, or system state.
Recent product launches illustrate how quickly the threat surface is widening. Anthropic’s Claude Ship can automatically merge pull‑requests after a short review, Palo Alto Networks is buying Terra to simulate multi‑stage cyber‑attacks, and Cisco/OpenAI’s Shirudo framework lets AI agents generate and load eBPF‑based kernel shields. Each of these examples adds a new class of privileged operation that must be vetted before it reaches production.
A systematic assessment helps answer three durable questions that cut across any domain: what data the agent sees and retains, how the agent reaches a decision and whether that decision can be audited, and what safeguards exist to stop the agent when it deviates from expected behavior.
- What data does the agent see and retain?
- How does the agent make decisions and can those decisions be audited?
- What safeguards exist to stop the agent when it goes off‑track?
A three‑layer framework for evaluating AI agents
The framework builds on three recent developments: the security‑focused prompting approach described by Astra Security, the governance tools baked into Sionic’s OpenGateway, and the provenance controls introduced by Amazon Bedrock’s Trusted Access API. By treating each dimension as a separate layer—Data, Decision, and Defense—organizations can create a checklist that is both comprehensive and adaptable to different vendor ecosystems.
1. Data layer – visibility and ownership
First, map every input the agent consumes (source code, configuration files, user prompts) and every artifact it stores (logs, model checkpoints, generated patches). Claude Ship, for example, logs every code suggestion and approval decision in a structured audit trail. The Bedrock Trusted Access API lets customers choose between storing prompts in their own encrypted S3 bucket (Enterprise Data Controls) or in Amazon‑managed storage (Enterprise Frontier Safeguards). Terra’s attack‑simulation platform records each stage of a simulated breach in a cloud‑native repository that can be exported for offline analysis.
Key checks for the Data layer include:
- Is data retained on‑premises or in a third‑party cloud?
- Are encryption keys owned by the customer?
- Does the provider give a clear inventory of what logs are kept and for how long?
If the answer to any of these questions is “unclear,” the organization should demand a data‑handling addendum before proceeding. In regulated sectors such as finance or healthcare, retaining data in a jurisdiction‑controlled environment may be a legal requirement.
2. Decision layer – model behavior and auditability
Agents make decisions based on large language models, specialized inference kernels, or a combination of both. Sionic’s OpenGateway uses speculative decoding to speed up inference, but it also provides request‑level logging that captures the token candidates the auxiliary model proposed. Claude Ship offers an “observe‑only” mode that lets teams see the agent’s suggested fixes before they are applied, and it can be configured to require a human sign‑off for any merge that touches critical files.
For security‑critical agents like Shirudo, the generated eBPF shield is cryptographically signed, creating a verifiable artifact that can be inspected before loading. This signature acts as a decision provenance record: anyone can verify that the shield originated from the trusted AI model and has not been tampered with.
Key checks for the Decision layer include:
- Can you retrieve a full decision trace for each action?
- Is there a way to enforce rule‑based gating (e.g., only merge PRs that meet pre‑defined criteria)?
- Are model updates versioned and auditable?
When a trace is available, it becomes possible to replay a decision in a sandbox, verify that the same inputs produce the same outputs, and spot any drift caused by model updates.
3. Defense layer – runtime controls and fail‑safes
Even with perfect visibility, an agent can still act unexpectedly due to ambiguous prompts or emergent behavior. Defense mechanisms therefore focus on limiting the impact of a rogue action.
Anthropic caps monthly spend on Claude Ship and recommends an observe‑only rollout for new teams. Palo Alto’s Terra platform runs attacks under human supervision, allowing analysts to abort a simulation at any stage. Shirudo’s eBPF shields are loaded only after a cryptographic verification step, and the framework can roll back the shield if a conflict is detected.
Key checks for the Defense layer include:
- Is there a configurable timeout or abort signal?
- Can you enforce a “human‑approval‑before‑execute” policy?
- Does the system generate alerts when an agent deviates from expected patterns?
A robust defense strategy often combines multiple controls—spending caps, sandbox execution, and real‑time monitoring—to create a layered safety net.
Applying the framework: a step‑by‑step checklist
- Inventory the agent’s data flows. Document where inputs, logs, and model checkpoints reside.
- Enable full request‑level logging. Verify that each decision can be replayed from the logs.
- Define governance rules. For code‑review agents, set criteria such as test‑pass thresholds before auto‑merge.
- Configure runtime safeguards. Set spend limits, enable observe‑only mode, and establish an abort key.
- Run a controlled pilot. Use a sandbox environment that mirrors production but isolates critical assets.
- Conduct an independent penetration test. Follow Astra Security’s approach of probing the same prompt across multiple agents to surface common weaknesses.
- Review the audit trail after the pilot. Look for any undocumented data retention or unexpected model behavior.
- Document the findings and update the governance policy. Treat the results as a living artifact that evolves with the agent.
Each step should be signed off by both the security team and the product owner. This dual‑approval process ensures that technical safeguards align with business risk appetite.
Trade‑offs and limitations to keep in mind
No framework can guarantee zero risk. Understanding the limits helps set realistic expectations and avoids a false sense of security.
- Performance vs. security: Enabling speculative decoding (as in Sionic’s OpenGateway) can cut latency but may reduce the granularity of decision logs.
- Cost of observability: Detailed request‑level logging and encrypted storage increase storage costs, especially for high‑throughput agents.
- Vendor lock‑in: Some providers (e.g., Anthropic’s Enterprise Data Controls) store data in proprietary formats that may be hard to migrate.
- Human resource demands: Running a pilot with full audit and penetration testing requires skilled security staff, which many organizations lack.
Another limitation is the evolving nature of large‑language‑model behavior. A model that passes all checks today may produce a novel failure mode after a future update. Continuous monitoring, rather than a one‑time audit, is therefore essential.
Practical takeaways for teams
1. Start small. Deploy the agent in a low‑risk sandbox before granting it production privileges. This mirrors the “pilot” step in the checklist and lets you validate the Data‑Decision‑Defense layers without exposing critical assets.
2. Treat logs as evidence. Store them in a tamper‑evident system (e.g., write‑once storage or blockchain‑based audit logs) and retain them for the same period required by your compliance regime.
3. Use layered safeguards. Combine spend caps, observe‑only mode, and rule‑based gating to create defense‑in‑depth. The more independent controls you stack, the lower the probability of a single point of failure.
4. Verify every code change. Even if an agent passes automated tests, a human reviewer should confirm high‑impact merges. This is especially true for changes that affect security‑critical modules or compliance‑related logic.
5. Plan for de‑commissioning. Have a process to retire the agent, delete retained data, and revoke any cryptographic keys. A clean exit strategy prevents orphaned credentials from becoming attack vectors.
By applying the Data‑Decision‑Defense framework, organizations can move from “the agent works in a demo” to “the agent is safe enough for production.” This disciplined approach aligns with emerging governance principles from the EU, Australia, and U.S. state coalitions, all of which call for transparent, auditable AI systems that protect users and data.
For deeper background on AI governance, see our guides on [AI ethics] and [AI agents].
When you’re ready to compare tools that implement these safeguards, explore our curated list at [/tools/compare].