Google Releases Zero-Trust AI Agent Security Blueprint on ADK

Google has open-sourced a working demo that shows developers how to build production-safe AI agents using its Agent Development Kit and Gemini. The release tackles one of the hardest unsolved problems in agentic AI: what happens when a language model gets tricked into issuing unauthorized refunds or executing malicious code.

Google’s Agent Development Kit team has published an open-source security reference called zero-trust-agents, a fully runnable demonstration of how to build an autonomous AI agent that doesn’t become a liability the moment it touches a live database. Built on ADK — the agent framework Google open-sourced in April 2025 — and its Gemini models, the project centers on a Customer Support and Returns Agent that can issue refunds, write to databases, and execute dynamically generated Python code. The security architecture it demonstrates is the point.

The announcement arrives as prompt injection has climbed to the top of OWASP’s list of vulnerabilities for LLM applications, and as research has shown injection attacks succeeding at rates as high as 84 percent in controlled settings. Most agent frameworks — LangChain, CrewAI, AutoGen, LlamaIndex, Semantic Kernel — provide the orchestration machinery for LLMs to call tools, but none of them natively prevent a manipulated model from executing a dangerous action before anyone can stop it. The prevailing industry advice has been to bolt on a separate “agent control plane” for policy enforcement. Google’s demo is notable for embedding that logic directly into the reference implementation.

Why System Prompt Rules Aren’t Enough

The core argument of the release is blunt: telling an agent “never refund more than the order total” inside a system prompt is not a security control. As the ADK team wrote in the accompanying blog post:

“Adding ‘Never refund more than the order total’ to the system prompt does not solve the problem. System prompts are soft constraints. They can be bypassed by prompt injection, altered during prompt tuning, or behave unpredictably across model updates.”

The release demonstrates what replaces those soft constraints: three distinct security layers, each covering blind spots the others can’t address.

Three Layers, Each Doing a Different Job

The first layer is cryptographic signing of every database write. In the demo, each agent holds its own identity, and every state-changing transaction is signed before it reaches the database. In a production Google Cloud environment, private signing keys are generated inside a tamper-resistant Hardware Security Module and never leave it; locally, the demo simulates this with an HMAC key so no cloud account is required. A background audit process continuously re-verifies ledger signatures, meaning a direct database manipulation — say, changing a $149.00 refund to $10,000.00 — is immediately detectable because the signature no longer matches the payload.

The second layer addresses dynamically generated code. When an agent writes Python on the fly to calculate restocking fees or parse logs, simply running that code inside a standard Docker container is dangerous — containers share the host Linux kernel, and a kernel vulnerability or misconfigured capability can hand an attacker root access to the host. The demo instead routes all generated scripts through a gVisor-based sandbox: code is mounted read-only, dangerous syscalls are blocked at the user-space kernel level, and a five-second execution timeout kills runaway loops before they cause harm.

The third layer is what the team calls a Semantic Gateway — a deterministic reverse proxy that sits in front of both the model and the database. Unlike the LLM itself, the gateway applies hard-coded rules: checking that refund amounts don’t exceed order totals, scanning outputs for secret strings before they’re returned, enforcing business logic that doesn’t bend under pressure from a cleverly worded prompt. Google also recommends wiring these gateway rules into CI/CD pipelines as unit tests, so a model upgrade or prompt revision can’t quietly break a security policy.

“Building autonomous agents does not require accepting unconstrained risk. By moving security boundaries into hardware-backed identity, user-space kernel sandboxing, and deterministic input/output validation, you help allow the model to handle dynamic reasoning while the underlying infrastructure enforces strict limits,” wrote the ADK team.

What Makes This Different From Other Sandboxing Tools

gVisor-based sandboxing isn’t new — commercial platforms like E2B, Modal and Vercel Sandbox already offer production-grade isolation using similar technology. What distinguishes this release is that Google packages HSM-backed signing, gVisor sandboxing and a semantic gateway together in a single free, locally runnable demo tied to a named, maintained framework. That combination — breadth plus accessibility — is harder to find elsewhere.

Why This Matters If You’re Still in School or Just Starting Out

The demo runs entirely on a laptop. No Google Cloud account, no API billing, no infrastructure setup. That makes it a genuinely low-barrier way to get hands-on with a skill set that’s becoming a real differentiator in AI engineering hiring. The three things that most often kill agentic AI projects before they reach production are uncontrolled cost from runaway agent loops, poor observability and security gaps like prompt injection — and this codebase addresses the third directly.

A candidate who can explain in an interview why system prompt constraints fail under adversarial conditions, and then describe what cryptographic non-repudiation, kernel-level sandboxing and deterministic gateways actually do instead, will stand out from the much larger pool of applicants who have only built chatbots or retrieval-augmented generation pipelines. The fact that the code lives under Google’s name on GitHub also gives it portfolio weight that a personal side project can’t easily match.

The zero-trust-agents repository and full walkthrough are available at Google’s developer blog.

Source: Google AI

Additional research sources