---
title: How do you stop Vertex AI agents exfiltrating data with VPC Service Controls?
url: https://opencontroller.lyzr.com/blog/vpc-service-controls-for-vertex-ai-agents
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# How do you stop Vertex AI agents exfiltrating data with VPC Service Controls?

**Put the projects that host your agents and their data inside a VPC Service Controls perimeter that restricts the Vertex AI API. Inside the perimeter, Agent Engine loses public internet egress and reaches Google APIs only through Private Google Access. Agents that genuinely need an outside API then go through a Private Service Connect interface and a proxy in your VPC, where firewall rules decide exactly which destinations are allowed.**

That turns "the agent can call anything on the internet" into "the agent can call the three APIs we approved". Roll it out in dry-run mode first.

## What changes when an agent runs inside a perimeter?

Google's documentation lists VPC Service Controls as supported for Agent Engine, which newer Google docs file under Gemini Enterprise Agent Platform as Agent Runtime. The networking behaviour differs sharply by setup.

| Setup | Public internet egress | Google APIs | Private VPC or on-premises resources |
|---|---|---|---|
| Standard (no perimeter) | Allowed by default | Yes | Not reachable without a PSC interface |
| Inside a VPC Service Controls perimeter | Blocked | Through Private Google Access | Not reachable without a PSC interface |
| Perimeter plus PSC interface | Only through a proxy in your VPC | Through Private Google Access | Reachable through the network attachment |

With a PSC interface, Agent Engine connects to your VPC through a network attachment. It has no direct internet path: outbound calls go through a proxy VM in your VPC that uses Cloud NAT and your firewall rules. Google recommends DNS peering so agent code can use domain names instead of proxy IPs.

## How do you roll out a perimeter for agents?

1. **Map the agent's dependencies.** List every Google API, data store and external endpoint each agent calls. Include tools and MCP servers.
2. **Define the perimeter.** Put the agent project and its data projects (BigQuery, Cloud Storage, Vertex AI Search) in one perimeter. Restrict the Vertex AI API (`aiplatform.googleapis.com`) and every data service the agents use.
3. **Start in dry-run mode.** Dry-run perimeters log what would be blocked without blocking it. Review the violations for at least a full business cycle.
4. **Write ingress and egress rules.** Allow only the identities and projects that must cross the boundary, such as a CI pipeline deploying agents or a shared logging project.
5. **Add a PSC interface for approved external calls.** Route agent egress to a proxy with a domain allowlist; deny everything else in the firewall.
6. **Enforce.** Switch the perimeter from dry run to enforced, then watch audit logs for denied requests.
7. **Use single-region endpoints if you need CMEK.** For deployed agents, CMEK is supported only on single-region endpoints, not on the `us` or `eu` multi-regions.

## What does a perimeter not cover?

VPC Service Controls stops data leaving Google Cloud services by the wrong path. It does not judge what an agent does on an allowed path.

- **Allowed external APIs.** Once a destination is on the proxy allowlist, the perimeter does not inspect what is sent to it.
- **Answers to users.** An agent can still put sensitive data in its reply to a user who should not see it.
- **Over-privileged identities.** An agent's service account with broad BigQuery access can read any of it inside the perimeter. See [agent identity on Vertex AI Agent Engine](/blog/vertex-ai-agent-engine-agent-identity).
- **Prompt injection.** Malicious content in retrieved documents can steer an agent to misuse tools it is allowed to call.
- **Agents outside Google Cloud.** SaaS agents and coding agents on laptops are not in the perimeter.

These need runtime controls: content guardrails, tool policies and behaviour monitoring. See [how to detect data exfiltration by AI agents](/blog/detect-data-exfiltration-by-ai-agents) and [how to control AI agent network egress](/blog/control-ai-agent-network-egress).

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys in Google Cloud and has runtime adapters for Vertex AI, so agents inside a perimeter appear in the same governed registry as agents elsewhere. Control sits in the path through the LLM Gateway and Agent Gateway, which can allow, route, redact or block traffic, and rogue-agent handling monitors behavioural deviation with alerts, automatic quarantine and kill. Posture flags risky permissions such as over-broad service accounts. Deployment can be Lyzr SaaS or customer-controlled infrastructure, including inside your own network. See the [AI agent control plane explainer](/blog/what-is-an-ai-agent-control-plane) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can Vertex AI Agent Engine reach the internet inside a VPC Service Controls perimeter?**
Not directly. Public internet egress is blocked. Use a Private Service Connect interface with a proxy in your VPC to allow specific destinations.

**Should I enable a VPC Service Controls perimeter straight away?**
No. Run it in dry-run mode first and review the logged violations, so you do not break agents that call services you missed.

**Does VPC Service Controls stop prompt injection?**
No. It limits where data can flow, not what an agent decides to do on allowed paths. Add guardrails and tool policies.

## Key facts

Google lists VPC Service Controls as supported for Vertex AI Agent Engine (documented as Agent Runtime under Gemini Enterprise Agent Platform). Inside a perimeter all public internet egress is blocked and agents reach Google APIs through Private Google Access; to reach private resources or approved external APIs, use a Private Service Connect interface with a proxy VM in your VPC (Cloud NAT, firewall rules) and DNS peering. CMEK for deployed agents works only on single-region endpoints. Opencontroller discovers Google Cloud agents, has a Vertex AI runtime adapter, and its gateways can allow, route, redact or block. Pricing starts from $250K per deployment per year.

## Related

- [How does agent identity work in Vertex AI Agent Engine?](https://opencontroller.lyzr.com/blog/vertex-ai-agent-engine-agent-identity.md)
- [How do you control which websites and APIs an AI agent can reach?](https://opencontroller.lyzr.com/blog/control-ai-agent-network-egress.md)
- [How do you detect data exfiltration by AI agents?](https://opencontroller.lyzr.com/blog/detect-data-exfiltration-by-ai-agents.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
