Google Cloud Professional Agentic Architect (GCP-PAA): 5 Practice Questions on Using coding agents for application development
5 questions, one domain: Using coding agents for application development from the Google Cloud Professional Agentic Architect (GCP-PAA) exam. About 17% of the exam comes from this domain. Pick your answer, then check it against the explanation.

Google Cloud Professional Agentic Architect (GCP-PAA) · Using coding agents for application development · 5 questions with answers and explanations
📊 Set profile
Exam: GCP-PAA · 55 questions (estimate) · 120 minutes
This set: 4 advanced, 1 applied · 2 scenario, 2 troubleshooting, 1 comparison
Topics: Antigravity, Gemini Enterprise, Model Context Protocol (MCP) servers, Agents CLI in Agent Platform, Cloud Run, Model Garden
🧠What these questions look for
These questions put a development team to work with a coding agent such as Antigravity on everyday repository tasks: refactoring, performance fixes, security patches, automated runs in CI. The question is how to give the agent the right context, tools and limits. Look for the answer that scopes rules and skills to where they matter and runs the agent with narrow access in an isolated place; distractors load everything into one long file or hand the agent broad credentials.
Watch for these while you work
• Ask what the agent is missing: access to a system (an MCP server) or know-how it should apply the same way each time (a rule or a skill).
• Keep the context lean. Guidance that applies only to certain files or tasks should load only for them; one very long instruction file makes the agent miss steps.
• When the agent runs code or commands on its own, give it a sandbox such as Cloud Workstations or an isolated workload, away from production credentials.
Question 1 of 5
A platform team lets developers use Antigravity through Gemini Enterprise. Developers may use the BigQuery remote MCP server and one internal Go tooling server that runs locally, but security found that some developers edited the local server's launch command to run an unvetted binary. Which control addresses both needs?
Show answer
✅ Answer: D
Difficulty: applied · Topic: Antigravity, Gemini Enterprise, Model Context Protocol (MCP) servers
MCP controls for AI developer tools
Gemini Enterprise administrators configure Antigravity in the AI developer tools settings. The MCP section has two settings:
• MCP servers: turns on managed access to MCP servers (disabled by default).
• Allowed server configuration: a JSON allowlist with local_servers and remote_servers.
Local versus remote entries
• A local server entry has an id and optional command and args. If they are specified, they override the user's local configuration, so a developer cannot swap in another binary.
• A remote server entry has an id and, for custom servers, a url; preconfigured Google servers such as bigquery need only the id.
Example: {"local_servers":[{"id":"go-tools","command":"go","args":["run","..."]}],"remote_servers":[{"id":"bigquery"}]}.
Limits
In IDEs that use the Agent Client Protocol (such as JetBrains IDEs), the controls are best effort, because the IDE can inject its own MCP tools.
Why each option works or fails
• ✗ A. Outside-of-file access Deny: this setting limits what the AI agent may read outside its working folders; it does not stop the developer from editing configuration.
• ✗ B. Agent Registry and Agent Gateway: they govern traffic from agents on Agent Runtime and Gemini Enterprise to registered destinations, not the local MCP processes that Antigravity starts on a developer machine.
• ✗ C. IAM deny policy: IAM governs only Google Cloud MCP servers; it cannot control a local stdio server or which binary it launches.
• ✓ D. MCP allowlist with command override (correct): the allowlist limits which local and remote servers agents may use, and specifying the local server's command and arguments overrides any edited local launch command.
Question 2 of 5
A developer used Antigravity with Agents CLI to deploy an ADK agent to Cloud Run. A week later security finds a third-party CRM API key in the Cloud Run service's environment variables. The key had been in the project's root .env file for local testing, and nobody configured it for production. How should the team deploy the agent from now on?
Show answer
✅ Answer: B
Difficulty: advanced · Topic: Agents CLI in Agent Platform, Cloud Run
What agents-cli deploy carries to production
The Agents CLI security guide states that agents-cli deploy copies every entry in the project-root .env file into the deployed service's environment variables on Agent Runtime, Cloud Run and GKE. It advises removing API keys and other secrets from .env before deploying, and on Agent Runtime and Cloud Run passing secrets from Secret Manager with --secrets ENV=SECRET.
Other safe defaults in the same guide
• Cloud Run deploys pass --no-allow-unauthenticated, so the service is private by default.
• A bare deploy sets ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=false, so prompt content is not captured in trace spans.
• When a coding agent runs commands, it acts with your gcloud credentials and every IAM role you hold.
Why each option works or fails
• ✗ A. Make it private: Agents CLI already deploys Cloud Run services as private; access control does not remove a secret stored in plain environment variables.
• ✓ B. Secret Manager instead of .env (correct): removing the key from .env stops it from being copied into the service, and the secrets option injects it from Secret Manager.
• ✗ C. Rename the file: the guide says every entry in the root .env is copied; there is no GOOGLE_-prefix filter, and renaming hides the key from local runs rather than managing it.
• ✗ D. Turn off tracing: the key leaked through environment variables, not traces, and a bare deploy does not capture message content in spans.
Question 3 of 5
An AppSec team wants Antigravity to delegate a security review of every agent-written patch to a dedicated reviewer before the main agent reports done. The reviewer must inspect code and run static analysis tools, must have no file-editing tools, must not be selectable as the main chat agent, and the team wants it committed so every developer gets the same one. What should they create?
Show answer
✅ Answer: C
Difficulty: advanced · Topic: Antigravity
Custom subagents in Antigravity
A parent agent can call invoke_subagent to start a concurrent session with its own role and prompt. Teams define reusable custom subagents as Markdown files with YAML frontmatter:
• Workspace: .agents/agents/<name>.md (commit it to share with the team); global: ~/.gemini/config/agents/<name>.md; or inside a plugin.
• Frontmatter fields include name, description (the planner uses it to decide when to delegate), tools (explicit list of permitted tools such as read_file, run_command), mainAgent (whether it can be the primary chat agent), subagent, model (inherit, flash, pro) and commandExecutionPolicy.
Example
The Antigravity docs show a code-auditor subagent with tools: [read_file, run_command, send_message], mainAgent: false, subagent: true and a system prompt that tells it to "perform thorough static analysis without altering files".
Why a separate reviewer
A reviewer with no write tools cannot "fix" its way past a finding, and its clean context is not biased by the main agent's own reasoning.
Why each option works or fails
• ✗ A. Personal skill: a skill in each home folder is not shared through the repository, and it runs inside the main agent with its write tools.
• ✗ B. Linter hook: a hook runs a script after edits; it is not a reviewing agent, and lint warnings are not a security review.
• ✓ C. Custom subagent with a tool allowlist (correct): a committed .agents/agents file shares it with the team, the tools list grants reading and command execution without write tools, and mainAgent: false keeps it out of the primary agent picker.
• ✗ D. always_on rule: the same agent reviewing its own work has full write access and the same blind spots, and a rule is guidance, not a separate reviewer with limited tools.
Question 4 of 5
A healthcare software company wants its developers to use Claude Code backed by Claude models that are billed through Google Cloud. Its compliance team requires that prompts containing source code stay inside the company's VPC Service Controls perimeter, be protected with customer-managed encryption keys, be processed in a chosen region, and have Google Cloud as the sole data processor. A team lead prefers another option for faster access to beta features. Which option should the architect choose?
Show answer
✅ Answer: C
Difficulty: advanced · Topic: Model Garden
Two ways to use Claude on Google Cloud
• Google-managed Claude models on Agent Platform: Google operates inference, served from regional and multi-region endpoints (REGION-aiplatform.googleapis.com), with Agent Platform quotas and billing.
• Claude models on Google Cloud (Anthropic managed) at claude.googleapis.com: Anthropic operates the stack and is the data processor; it offers the newest models, betas and Anthropic-only features such as the Files API and Code Execution.
When the docs say to choose Google-managed
• Google-operated inference with Google Cloud as the sole data processor.
• Data and inference inside Google Cloud's security boundary with VPC Service Controls, CMEK and regional data residency.
• Coverage under Google Cloud compliance programs.
Endpoints and residency
The global endpoint serves requests from any supported region for availability, so it doesn't meet data residency requirements; regional endpoints do.
Why each option works or fails
• ✗ A. Global endpoint: the global endpoint routes to any region with capacity and does not support data residency requirements.
• ✗ B. Anthropic managed with inference location: even with a chosen inference location, Anthropic is the data processor, which breaks the sole-processor requirement.
• ✓ C. Google-managed Claude on regional endpoints (correct): it is the documented choice when data must stay within VPC Service Controls, use CMEK, stay in a region and have Google Cloud as the sole processor.
• ✗ D. Anthropic managed with Model Armor: Model Armor screens prompts and responses for risks; it does not move an Anthropic-operated service inside the company's perimeter or change the processor.
Question 5 of 5
In a monorepo, the payments team put its rules in services/payments/src/AGENTS.md. Developers open Antigravity on the repository root or on services/payments, and the agent ignores those rules even while editing files in services/payments/src. Rules in the root AGENTS.md work. What should the team do?
Show answer
✅ Answer: B
Difficulty: advanced · Topic: Antigravity
How Antigravity discovers rules
Rules are loaded from the workspace folder and each parent folder up to the repository root, plus the global configuration. At each level it reads AGENTS.md, GEMINI.md and the .agents/ folder.
• It does not load rules from subfolders below the workspace folder, "even when the agent reads or edits files there". Opening the repository root therefore never loads src/routes/AGENTS.md-style files.
• Rules are cumulative: every rule found is combined into the prompt; none replaces another.
• AGENTS.md and GEMINI.md use no frontmatter and are always active.
Applying it
With the workspace opened on services/payments, Antigravity reads services/payments/AGENTS.md (or its .agents/rules) and the root AGENTS.md, so the payments rules apply together with the shared ones.
Why each option works or fails
• ✗ A. Delete the root file: rules are cumulative, so the root file does not hide the other one; deleting it only loses the shared rules.
• ✓ B. Move up and open on the service (correct): rules in the workspace folder or its parents load, while folders below the workspace are never scanned for rules.
• ✗ C. Glob rule at the root: a glob rule activates its own content for matching files; it does not make Antigravity load a nested AGENTS.md.
• ✗ D. Add frontmatter: AGENTS.md takes no frontmatter and is always on when it is discovered; the file is simply below the workspace folder.
🎯 Takeaways
• Govern Antigravity's MCP use with the admin allowlist, whose local-server command and arguments override what developers configure.
• agents-cli deploy copies the root .env into the service, so keep secrets out of it and pass them from Secret Manager.
• For an independent, read-only reviewer, define a custom subagent with a restricted tools list and commit it to the workspace.
• When compliance needs VPC Service Controls, CMEK, regional processing and Google as sole processor, back Claude Code with Google-managed Claude on regional endpoints.
• Antigravity loads rules from the workspace folder upward to the repository root, never from subfolders below the workspace.
🔗 Related practice sets
• Building agents using low-code tools: 5 GCP-PAA Questions with Full Explanations
• All GCP-PAA practice sets
• Every exam on this blog
📚 More GCP-PAA practice
More GCP-PAA questions: https://hyunhp.github.io/cert-bank/#exam=GCP-PAA
Study guide: https://hyunhp.github.io/cert-bank/study.html#exam=GCP-PAA
These are original practice questions, not real exam questions, and cert-bank is not affiliated with any certification vendor.
Original practice questions written for this blog, not exam dumps.
Comments
Post a Comment