PAA Practice Exams / Exam guide / Section 2
Section 2: Using coding agents for application development
Section 2 is about 17% of the exam and lists five considerations under 2.1 (using coding agents) and 2.2 (customizing them for enterprise workflows). Most questions turn on where a setting lives (a workspace file committed to the repository, a global file on one machine, or a managed setting or IAM policy enforced centrally), which customization is deterministic (hooks, IAM deny policies, managed settings) rather than model-dependent (rules, skills), and which sandbox setting keeps agent commands isolated while still reaching what they need.
| Share of the exam | About 17%, roughly 8 to 9 questions if the GA exam has 50 |
| Practice questions | 7 free on this page and in the practice exam, 30 in the full bank |
The 5 Section 2 considerations, as worded in the official exam guide
2.1 Using coding agents effectively
- Configuring coding agents with Model Context Protocol (MCP) servers, custom skills, and access to tools (e.g., Antigravity and Claude Code on Google Cloud)
- Using coding agents in secure sandboxes (e.g., Google Kubernetes Engine [GKE], Cloud Workstations, and Antigravity)
- Using coding agents to refactor source code, optimize execution runtimes, and patch application-layer vulnerabilities
2.2 Customizing coding agents for enterprise workflows
- Creating skills, plugins, extensions hooks, rules, and subagents using Antigravity
- Augmenting Antigravity with Agents CLI to build, scale, govern, and optimize deployed agents
Source: Professional Agentic Architect exam guide (PDF).
MCP servers and Claude models for coding agents: where each setting lives and who enforces it
| If the scenario says | Configure | Why |
|---|---|---|
| Share a remote Google Cloud MCP server with the team, no stored keys (Antigravity) | Commit <workspace>/.agents/mcp_config.json with serverUrl and "authProviderType": "google_credentials" | The workspace file is versioned; the global ~/.gemini/config/mcp_config.json is per machine. google_credentials attaches each user's Application Default Credentials. Remote servers use Streamable HTTP; httpUrl and HTTP+SSE are not supported. |
| Block MCP tools that change resources for every principal and client, keep read-only tools | IAM deny policy on mcp.googleapis.com/tools.call with a condition on tool.isReadOnly being false | Google Cloud MCP servers check mcp.tools.call, granted by MCP Tool User (roles/mcp.toolUser). Removing that role blocks all tools. Client-side deny lists are per developer. |
| Only approved MCP servers may load in Claude Code | Deploy managed-mcp.json (Linux: /etc/claude-code/managed-mcp.json) | It gives exclusive control, including over plugin servers and --mcp-config. deniedMcpServers blocks only named servers; allowedMcpServers without allowManagedMcpServersOnly is a soft allowlist. |
| Claude Code billed to one Google Cloud project, scripted install, model upgrades only after approval | CLAUDE_CODE_USE_VERTEX=1, ANTHROPIC_VERTEX_PROJECT_ID, CLOUD_ML_REGION, and pinned ANTHROPIC_DEFAULT_OPUS_MODEL / ANTHROPIC_DEFAULT_SONNET_MODEL | Environment variables suit non-interactive rollouts; /setup-vertex is interactive. Unpinned aliases follow built-in defaults. |
| Least privilege for developers who only invoke Claude models | roles/aiplatform.user, or a custom role with aiplatform.endpoints.predict | Admin roles exceed what model invocation needs. |
| Screen MCP traffic for prompt injection or sensitive data | Model Armor | Model Armor sanitizes requests and responses. It is not an authorization control and does not separate read-only from read-write tools. |
Sources: Antigravity MCP, Control MCP use with IAM, Claude Code managed MCP.
Antigravity permission presets and the Claude Code sandbox: settings that keep agent commands isolated
The Antigravity terminal sandbox uses Linux namespaces or macOS Seatbelt. It blocks ~/.ssh and .env, hides anything not mounted, and allows network access only to approved domains.
| Antigravity preset | Sandbox | Commands |
|---|---|---|
| Request Review | Off | Always ask |
| Default | On | Allowed in the sandbox with no network; ask to run outside |
| Auto | On | Safe, reversible commands outside the sandbox run without prompting |
| Turbo | Off | Allowed without prompting, unrestricted |
read_url(domain)grants are compiled into the sandbox's outbound allowlist, sopipornpmcan reach an internal mirror while staying sandboxed. Acommand(...)allow rule lets a command run without prompting, including outside the sandbox on the host with full privileges.- Antigravity CLI:
enableTerminalSandboxand"toolPermission": "proceed-in-sandbox"in~/.gemini/antigravity-cli/settings.json, oragy --sandbox/agy --mode=auto. - Headless
agy -pcannot prompt: an action that needs approval is soft-denied, the run still exits 0, and a notice goes to stderr. Pre-grant only the needed actions underpermissions.allow, for examplecommand(regex:npm run (build|test)). Ask rules cannot be answered headless;--dangerously-skip-permissionsapproves everything. - Claude Code: deliver managed settings with
sandbox.enabledandsandbox.failIfUnavailabletrue (refuse to start without the sandbox) andsandbox.allowUnsandboxedCommandsfalse (ignoredangerouslyDisableSandboxretries). Managed settings override user and project settings.disableBypassPermissionsModeaffects permission prompts, not sandboxing.
Sources: Antigravity terminal sandbox, Antigravity headless mode, Claude Code sandboxing.
Cloud Workstations or GKE Agent Sandbox: isolating coding agents at the infrastructure layer
- Cloud Workstations without public internet: set
disablePublicIpAddressesto true in the workstation configuration and turn on Private Google Access on the subnet so Google APIs stay reachable. For approved external sites, use Secure Web Proxy with domain policies (Cloud Logging records and DLP controls) and sethttps_proxyandhttp_proxyin a custom workstation image.disableSshlimits administrative access only. Google recommends one workstation per developer. - GKE Agent Sandbox gives each agent a dedicated Pod. The controller uses a
SandboxTemplate(runtime gVisor or microVM), aSandboxWarmPoolthat hands out ready Pods in under a second, andSandboxClaimresources that request them. - GPUs and TPUs work only with the gVisor runtime, not microVMs. Both runtimes isolate code from the node kernel; neither restricts network reachability.
- Network isolation: the controller creates a default-deny NetworkPolicy only for Pods created from a
SandboxTemplate.Sandboxresources created directly do not get it, so automation should createSandboxClaimresources against the warm pool. - Credentials: gVisor Pods cannot use node metadata to reach Google Cloud. Use Workload Identity Federation for GKE on the sandbox's Kubernetes service account; never mount a service account key that generated code could read.
- Agent Substrate is the other model: agent actors share pre-warmed worker Pods. It does not support GPUs, TPUs or GKE Autopilot clusters, so it does not fit a requirement for a dedicated Pod per agent.
Sources: Cloud Workstations security best practices, Agent Sandbox on GKE.
Refactoring, runtime optimization and vulnerability patching: /plan, Build with Google bundles and CodeMender
| Task in the scenario | Use | Why not the alternatives |
|---|---|---|
| Large refactor; reviewers approve scope, files and checkpoints before any edit, then see results | /plan in the Antigravity App: an Implementation Plan artifact with task breakdown and verification checkpoints, inline comments, then Proceed; a Walkthrough artifact summarizes changes and test results afterward | Fast mode skips planning. Plan Review Policy set to Always Proceed removes the review pause. Permission presets control commands, not plan review. |
| Front-end INP or memory leak, measured before and after | Chrome DevTools bundle under Settings > Customizations > Build with Google Plugins (skills for Chrome DevTools and Puppeteer in a real browser) | Modern Web Guidance gives best-practice guidance without measurement. INP is measured in the browser, so server sizing does not fix it. |
| Legacy Google Cloud code: deprecated SDK calls, downloaded keys, unapproved billable APIs | google-cloud-developer plugin from the Antigravity Marketplace | It bundles the Developer Knowledge MCP server for current documentation, a google-cloud-recipe-auth skill that enforces ADC and service identities, and consent guardrails for billable APIs. |
| Thousands of scanner findings, many false positives; fixes must be proven and reviewed | CodeMender on Gemini Enterprise Agent Platform (Preview) through its local CLI client | It imports scanner findings, builds the code and attempts an exploit to confirm each finding, then generates and tests a patch reviewed as a diff. The CLI client sends targeted snippets, not whole repositories. |
| Known vulnerabilities in container images | Artifact Analysis scanning in Artifact Registry | It scans images for known vulnerabilities; it does not verify exploitability or write fixes for first-party code. |
Sources: Antigravity planning, Build with Google, CodeMender.
AGENTS.md, rules, skills or hooks: which Antigravity customization meets the requirement
| Requirement | Use | Configuration facts |
|---|---|---|
| Short constraint that applies on every turn | AGENTS.md or GEMINI.md | No frontmatter; always active (always_on); full text injected every turn. |
| Long domain guide, applied automatically only when relevant | .agents/rules/<name>.md with trigger: model_decision | description is required; only the path and description are injected until the task matches. |
| Constraints for certain file types | Rule with trigger: glob | globs is required, for example "*.tf". |
| Checklist loaded only on request | Rule with trigger: manual | Loaded by @-mention; the Antigravity CLI does not support rule mentions. |
| Multi-step procedure with helper scripts | Skill: .agents/skills/<folder>/SKILL.md, scripts in scripts/ | description is required and decides activation. The agent sees name and description each turn and reads the full file on a match. disable-model-invocation: true allows only explicit /<name> use. |
| Block an action deterministically | PreToolUse hook in .agents/hooks.json, matcher on the tool name such as run_command | The script returns JSON on stdout with decision: deny blocks; ask respects Always Allow; force_ask always prompts; deny_unless_prior_grant denies unless previously granted. Plugin hook scripts must exit 0; a non-zero exit is logged and ignored, so the hook fails open. PostToolUse runs after the tool and cannot block. Default timeout: 30 seconds. |
Workspace files under .agents/ are committed and shared; ~/.gemini/config/ holds global rules, skills and hooks.json for one machine. Hooks in ~/.gemini/antigravity-cli/settings.json are not loaded. Active global and always_on rules share a 20,000-token budget.
Antigravity subagents and plugins: definition files, frontmatter and agy plugin commands
- Custom agent files:
.agents/agents/<name>.mdin the workspace (committed, reviewed) or~/.gemini/config/agents/(one machine).define_subagentcreates a transient subagent during a session, with no versioned definition. - Frontmatter:
nameanddescriptionare required.toolsis an explicit allowlist (for exampleview_file,grep_search).subagent: trueallowsinvoke_subagent;mainAgent: falsehides it from the primary-agent selector (both default to true).modelisinherit,flashorpro.commandExecutionPolicy(off,auto,eager,sandbox; defaultsandbox) controls shell auto-execution only. - Workspace option of
invoke_subagent:inheritworks in the parent's workspace,shareuses shared directory storage, andbranchcreates an isolated Git worktree that is cleaned up when the subagent is killed. Usebranchfor parallel edits that must not collide. - Subagent context: a subagent starts without the parent's conversation history but inherits its allowed command prefixes, file scopes and sandbox settings.
- Plugins package skills, MCP servers, subagents, rules and hooks as one versioned unit with a
plugin.jsonmanifest. Install withagy plugin installfrom the official marketplace, a GitHub URL or a local path. - Per-user secrets are declared under
mcpServers.<server>.variablesin the plugin'smcp_config.json, not at the file root. The plugin stays disabled until each user fills in the setup dialog. - CI validation:
agy plugin validate --stricttreats warnings as errors. - Migration:
agy plugin import geminiandagy plugin import claudebring in~/.gemini/extensions/and~/.claude/plugins/. Antigravity IDE workflows stop working on October 19, 2026; skills are the migration path. IDE extensions bring the agent into editors and are not a packaging format.
Sources: Custom subagents, Plugins, Build plugins.
Agents CLI with Antigravity: pinned setup, project extensions, and deploy and publish flags
| Requirement | Command or file | Documented behavior |
|---|---|---|
| Skills only in one repository, CLI and skills on one audited version | uv tool install google-agents-cli==<version>, then agents-cli setup --workspace --skills-source <release tag URL> | By default setup installs skills globally from the default branch. --workspace installs them under the current directory. |
| Pre-deploy checks for workstations and CI, no fork | Commit agents-cli-extension.yaml at the project root overriding deploy; the wrapper calls agents-cli deploy "$@" | Project-root extensions load automatically. Overrides run with AGENTS_CLI_DISABLE_OVERRIDES=1, so the call reaches the built-in deploy. --global extensions are per machine; install cannot be overridden. |
| Agent must act as its own principal | agents-cli deploy --agent-identity, then IAM grants to that principal | Opts in projects scaffolded before Agent Identity became the default. |
| Outbound calls must pass through Agent Gateway | agents-cli scaffold enhance --agent-gateway, then --agent-gateway-egress | Egress needs a gateway with governedAccessPath AGENT_TO_ANYWHERE; --agent-gateway-ingress covers inbound CLIENT_TO_AGENT. |
| API key must not sit in plain environment variables | Secret Manager plus --secrets NAME=<secret> | Deploy copies every project-root .env entry into environment variables. --key sets CMEK on create only. |
| Billed overnight, oversized | Set min_instances to 0 and smaller CPU and memory in deployment/terraform/, re-apply | Terraform sets min_instances = 1 and 4 vCPU / 8Gi (CLI default 1 vCPU / 4Gi). Deploy's --min-instances 0 default applies only when creating a service. |
| Show a Cloud Run or GKE agent in the Gemini Enterprise app | agents-cli publish gemini --registration-type a2a with the agent card URL | A2A is the only mode on Cloud Run and GKE; adk registration needs an Agent Runtime resource. |
Sources: Agents CLI reference, Agents CLI extensions, Agents CLI lifecycle.
7 free Section 2 questions with answers
The first answer is open as an example. In the practice exam you answer them one by one and get a score for this section; the full bank has 30 Section 2 questions.
Question 1, 2.1 Using coding agents effectively
A data engineering team uses the Antigravity CLI to write BigQuery transformations. They want the agent to inspect live dataset schemas through the Google Cloud remote BigQuery MCP server. Security policy forbids storing long-lived credentials, such as API keys or service account keys, in any configuration file, and the MCP configuration must be shared with every engineer through the repository. Every engineer already has Application Default Credentials configured with gcloud and holds the required IAM roles. What should you do?
- Add an entry to ~/.gemini/config/mcp_config.json on each laptop that sets serverUrl to the BigQuery MCP endpoint and passes a token minted from a service account key in the Authorization header.
- Commit <workspace>/.agents/mcp_config.json with an mcpServers entry whose serverUrl is the BigQuery MCP endpoint and whose authProviderType is "google_credentials".
- Commit <workspace>/.agents/mcp_config.json with an entry that sets httpUrl to the BigQuery MCP endpoint and uses the HTTP+SSE transport.
- Commit a stdio MCP proxy configuration that uses command to launch a local bridge process and passes the path of a downloaded service account JSON key through env.
Show the answer and explanation
Answer: B. The workspace file <workspace>/.agents/mcp_config.json is loaded only for that workspace and can be committed, which satisfies the sharing requirement. Setting authProviderType to "google_credentials" makes Antigravity attach the engineer's own Application Default Credentials, so no long-lived secret is written into the file. Remote MCP servers in Antigravity are configured with serverUrl over Streamable HTTP.
Why the other options are wrong:
- A. The global file is per-laptop and not shared through the repository, and a token derived from a service account key violates the no-long-lived-credentials policy.
- C. Antigravity does not support the legacy HTTP+SSE transport or the httpUrl field for remote MCP servers.
- D. Referencing a downloaded service account key is exactly the long-lived credential the policy forbids, and the local proxy adds unnecessary moving parts.
Official reference: antigravity.google/docs/mcp
Question 2, 2.1 Using coding agents effectively
Your team uses both the Antigravity App and the Antigravity CLI. You wrote step-by-step instructions and a helper script that validates Cloud Run service YAML before a deployment. Every engineer who clones the repository should get this capability without extra setup. The agent should apply it only when a task involves Cloud Run deployments, and the full instructions should not consume context during unrelated tasks. What should you do?
- Commit .agents/skills/cloud-run-validate/SKILL.md with a precise description of when to use it, and put the script in a scripts/ subfolder.
- Save the skill in ~/.gemini/config/skills/cloud-run-validate/ on your workstation, which both the App and the CLI read, and share the folder with the team.
- Add the full step-by-step instructions and the script contents to an AGENTS.md file at the repository root so that every session can follow them.
- Wrap the script in a local stdio MCP server, register it in each engineer's global ~/.gemini/config/mcp_config.json, and describe the workflow in the tool description.
Show the answer and explanation
Answer: A. Workspace skills in <workspace-root>/.agents/skills/ are committed to version control and are read by both the Antigravity App and CLI. Skills use progressive disclosure: the agent sees only the name and the required description on each turn and reads the full SKILL.md when the task matches, so a precise description keeps unrelated tasks lean. Bundling the script in scripts/ lets the agent run it as a black box.
Why the other options are wrong:
- B. The global skills folder is shared by the App and the CLI but only on one workstation, so it is not distributed through the repository and requires manual setup by each engineer.
- C. AGENTS.md is always active and injected into every turn, and rules are intended for constraints rather than multi-step workflows.
- D. A per-engineer global MCP configuration is not shared through the repository and adds a server process just to run a validation script.
Official reference: antigravity.google/docs/skills
Question 3, 2.1 Using coding agents effectively
A bank provides Cloud Workstations on which developers run coding agents such as the Antigravity CLI and Claude Code. Compliance requires that workstations have no direct path to the public internet, that agents and developers can still reach Google APIs and a short list of approved external package sites, and that all access to those external sites is logged and subject to data loss prevention controls. Which two actions should you take? (Choose two.)
- Add the approved package sites as read_url allow rules in each developer's Antigravity permissions so that the terminal sandbox can reach only those hosts.
- Set disableSsh in the workstation configuration so the workstation VMs cannot reach the internet.
- Set disablePublicIpAddresses to true in the workstation configuration and configure Private Google Access on the workstation subnet.
- Assign one workstation to each team instead of each developer so that external traffic comes from fewer VMs.
- Configure Secure Web Proxy with policies for the approved domains, and set https_proxy and http_proxy to it in a custom workstation image.
Show the answer and explanation
Answer: C and E. Disabling public IP addresses blocks direct internet access, and Private Google Access keeps Google APIs reachable. Secure Web Proxy then provides auditable, policy-based access to specific external sites with DLP protections and Cloud Logging records, and a custom image can point the workstation's proxy variables at it.
Why the other options are wrong:
- A. Antigravity rules apply only to that agent and are set per developer; they do not stop other traffic from the VM or provide logging and DLP.
- B. Disabling SSH to the VM restricts administrative access paths and does nothing to block internet egress.
- D. Google recommends one workstation per developer for isolation, and sharing workstations does not create a logged, DLP-controlled egress path.
Official reference: docs.cloud.google.com/workstations/docs/set-up-security-best-practices
Question 4, 2.1 Using coding agents effectively
An application security team has thousands of static analysis findings across a large Java and Python codebase, many of them false positives. They want an AI agent that confirms whether each vulnerability is actually exploitable before fixing it, generates and tests a patch, and lets developers review and approve every patch before it is committed. Full source repositories must not be uploaded to Google's servers. The team has approval to evaluate Preview offerings in a non-production pilot. Which approach should you recommend?
- Ask a coding agent in Antigravity to read the scanner report and rewrite every flagged function in one pass, and then run the existing unit tests.
- Enable Model Armor for the team's coding agents so that prompts and responses that contain vulnerable code patterns are blocked.
- Use CodeMender on Gemini Enterprise Agent Platform through its local CLI client, and review the verified, tested patches as code diffs.
- Enable Artifact Analysis vulnerability scanning on the application's container images in Artifact Registry, and triage the results by severity.
Show the answer and explanation
Answer: C. CodeMender, a Preview AI code security agent on Gemini Enterprise Agent Platform that is offered for limited testing and evaluation, finds vulnerabilities or imports findings from external scanners, verifies them by building the code and attempting an exploit, and then generates and tests a patch that developers review as a diff before commit. Its local CLI client mediates access to the code and can run commands in a local process-level sandbox, so only targeted snippets are sent to the hosted agent rather than whole repositories.
Why the other options are wrong:
- A. Rewriting every flagged function without exploit verification keeps the false positives, and passing existing unit tests does not show that each vulnerability is fixed.
- B. Model Armor screens prompts and responses for AI security risks; it does not verify or remediate vulnerabilities in application code.
- D. Artifact Analysis scans images in Artifact Registry for known vulnerabilities but does not prove exploitability or generate tested fixes for first-party code.
Official reference: docs.cloud.google.com/gemini-enterprise-agent-platform/codemender
Question 5, 2.2 Customizing coding agents for enterprise workflows
Your team's internal Antigravity plugin ships a PreToolUse hook in its hooks.json that matches the run_command tool. Testing reveals two problems. First, when the hook script detects a command against the production database, it prints a message to stderr and exits with code 2, yet the command still runs. Second, commands against the staging database must prompt a human every time, but developers who previously chose "Always Allow" are no longer prompted. Which two changes resolve both problems? (Choose two.)
- Increase the hook's timeout value so that the script finishes before Antigravity proceeds with the tool call.
- For production commands, exit with code 0 and write {"decision": "deny", "reason": "..."} to stdout.
- For staging commands, return "decision": "ask" so that the developer is prompted for approval.
- For staging commands, return "decision": "deny_unless_prior_grant" so that only previously approved commands run.
- For staging commands, return "decision": "force_ask" so that the developer is prompted regardless of cached permissions.
Show the answer and explanation
Answer: B and E. Plugin command hooks must exit with code 0 and write a JSON response to stdout; any non-zero exit code is logged as a hook execution error and ignored, so the hook fails open, which is why the production command ran. Returning {"decision": "deny"} with exit code 0 hard-blocks the call. The force_ask decision always prompts and ignores cached permissions, whereas ask respects existing "Always Allow" choices.
Why the other options are wrong:
- A. The failure is caused by the exit-code and stdout contract, not by the timeout, which defaults to 30 seconds.
- C. The ask decision respects "Always Allow" settings, which is exactly the current failure.
- D. deny_unless_prior_grant lets previously granted commands run without prompting and denies the rest instead of asking a human.
Official reference: antigravity.google/docs/build-plugins
Question 6, 2.2 Customizing coding agents for enterprise workflows
A data engineering team is moving from Gemini CLI and Claude Code to the Antigravity CLI. Over the past year, the team built several Gemini CLI extensions stored in ~/.gemini/extensions/ and a few Claude Code plugins stored in ~/.claude/plugins/ that bundle MCP servers and team instructions. The team wants to keep using these capabilities in Antigravity with the LEAST manual effort. What should you do?
- Rewrite each extension and plugin by hand as SKILL.md files under .agents/skills/, and re-create the MCP server entries in mcp_config.json.
- Copy the ~/.gemini/extensions/ and ~/.claude/plugins/ directories into ~/.gemini/config/skills/ so that Antigravity discovers them as skills.
- Install the Antigravity extension for Visual Studio Code so that the editor loads the Gemini CLI extensions and Claude Code plugins.
- Run agy plugin import gemini and agy plugin import claude to migrate the existing extensions and plugins into Antigravity.
Show the answer and explanation
Answer: D. The agy plugin import subcommand migrates existing extensions from ~/.gemini/extensions/ or ~/.claude/plugins/ (or a directory you pass) into Antigravity. It is the built-in migration path, so it requires the least manual work.
Why the other options are wrong:
- A. Rewriting by hand can work, but it is the most manual option.
- B. Skills are discovered only as folders that contain a SKILL.md file directly inside skills/, so copied extension directories would not load as skills or bring their MCP configuration.
- C. Antigravity IDE extensions bring Antigravity agents into editors; they are not a migration path for Gemini CLI extensions or Claude Code plugins, and the team uses the CLI.
Official reference: antigravity.google/docs/plugins
Question 7, 2.2 Customizing coding agents for enterprise workflows
An ADK agent scaffolded with agents-cli is deployed to Agent Runtime. A security review finds two gaps: the agent's outbound calls to third-party APIs bypass the company's existing Agent Gateway, and a vendor API key is stored in the project-root .env file. You must route all outbound agent traffic through the gateway and keep the key out of the deployed service's plain environment variables. Which two actions should you take? (Choose two.)
- Redeploy with --agent-gateway-ingress set to the gateway's resource name, because the gateway uses the CLIENT_TO_AGENT governed access path.
- Keep the key in .env, because agents-cli deploy excludes .env files from the deployed service.
- Run agents-cli scaffold enhance --agent-gateway, and then redeploy with --agent-gateway-egress set to a gateway whose governedAccessPath is AGENT_TO_ANYWHERE.
- Redeploy with --key set to a Cloud KMS key so that the .env values are encrypted at rest.
- Store the key in Secret Manager, remove it from .env, and redeploy with --secrets VENDOR_API_KEY=<secret-name>.
Show the answer and explanation
Answer: C and E. --agent-gateway-egress binds an Agent Runtime agent's outbound traffic to an existing Agent Gateway with governedAccessPath AGENT_TO_ANYWHERE, and the --agent-gateway scaffold option, which makes the Dockerfile trust the gateway's root CA, is required first. agents-cli deploy copies every .env entry into the service's environment variables, so secrets should come from Secret Manager through --secrets.
Why the other options are wrong:
- A. Ingress binding governs inbound client-to-agent traffic, not the agent's outbound calls.
- B. This is false: deploy copies every entry in the project-root .env into the deployed environment variables.
- D. --key sets customer-managed encryption for the Agent Runtime resource on create only and does not remove the key from environment variables.
Official reference: google.github.io/agents-cli/cli
Practise all 30 Section 2 questions, then take a 50-question, 120-minute simulation weighted like the real exam. $19 once, 12 months.
Practise Section 2