PAA Practice Exams

PAA Practice Exams / Exam guide / Section 3

Section 3: Developing custom agents

Section 3 is about 33% of the exam and lists nine considerations across 3.1, 3.2 and 3.3. Most questions turn on where a control belongs: in code or configuration (callbacks, plugins, workflow agents, graph nodes, IAM and deny policies), not in the model's instructions. The rest turn on which identity holds a permission (the agent's own identity, not a developer account or a shared service account) and which protocol fits the boundary (MCP for tools, A2A for agents owned by others).

Share of the examAbout 33%, roughly 16 to 17 questions if the GA exam has 50
Practice questions13 free on this page and in the practice exam, 60 in the full bank
The 9 Section 3 considerations, as worded in the official exam guide

3.1 Designing and building agentic workflows in code

  • Selecting and configuring the appropriate language model (e.g., large language model [LLM] vs. small language model [SLM], self-hosted vs. software as a service [SaaS], and open-source software [OSS] vs. proprietary LLM) considering cost, security, and agent architecture
  • Building custom agents using open-source libraries (e.g., Agent Development Kit [ADK])
  • Configuring sessions and memory (e.g., Agent Platform Memory Bank and managed sessions)
  • Configuring skills using Agents CLI (e.g., plugins and agent vs. human mode)

3.2 Integrating enterprise domain knowledge

  • Designing, configuring, and managing retrieval-augmented generation (RAG) pipelines and vector retrieval systems (e.g., embedding models, similarity scoring, and reranking) using appropriate services such as vector databases (e.g., Vector Search and Agent Retrieval)
  • Configuring agent permissions (e.g., Agent Identity)
  • Using Google Cloud tools (e.g., Agent Registry, Google Cloud MCP servers) to configure prebuilt and custom capabilities (e.g., custom integration layers for managed databases, API integrations, and MCP server that connects agents to third-party SaaS tools and remote servers)

3.3 Orchestrating and coordinating agentic workflows

  • Orchestrating agents using agentic protocols (e.g., MCP and Agent2Agent [A2A])
  • Selecting and coordinating multiagent handoffs and workflows (e.g., parallel agents, sequential agents, and graph workflow) using Google Cloud tools (e.g., Agent Identity, Agent Registry, Agent Runtime, and agent policies)

Source: Professional Agentic Architect exam guide (PDF).

MaaS, self-deployed endpoint, Claude or on-device Gemma: which model setup the scenario asks for

If the scenario saysChooseWhy
Open model, bursty or unpredictable traffic, no MLOps or GPU skills, the standard model is good enoughModel as a Service (MaaS) on Agent Platform, called from ADK through the LiteLlm connectorServerless managed API: Google provisions and scales the accelerators, and pay-as-you-go pricing fits idle periods.
Fine-tuned or custom weights, steady high volume, no multi-tenant service, data path inside your own project and VPCSelf-deploy from Model Garden to a dedicated Agent Platform endpoint and pass projects/PROJECT_ID/locations/LOCATION/endpoints/ENDPOINT_ID as the LlmAgent modelSelf-deployment is the documented option for custom weights, predictable volume and data-path control. Its GPUs bill while idle, so it loses on bursty traffic.
Granular control of serving, team already runs KubernetesvLLM on GKE behind an OpenAI-compatible endpoint, reached through LiteLlmMost control and most operations. Wrong when the team lacks Kubernetes and MLOps skills.
Claude is required, no third-party API keys, IAM authorization and Google Cloud billingClaude on Agent Platform: a Claude model string in LlmAgent, Application Default Credentials, GOOGLE_GENAI_USE_ENTERPRISE=TRUE, pip install "anthropic[vertex]"Claude is a partner model consumed as a managed API. Its weights cannot be self-deployed.
No connectivity, data must stay on the device, open model to tune laterGemma 4 E2B or E4B running locallyThese variants target mobile devices and laptops with text, image and audio input. Gemma 4 31B targets servers.
High-volume, low-latency, cost-sensitive step such as intent classificationGemini Flash-Lite on that agentThe most cost-efficient Gemini model for that traffic.
Multi-step reasoning across many tool callsGemini Pro on that agentA reasoning-first model for complex agentic workflows.

The model is a per-LlmAgent setting, so one system can run Flash-Lite on the high-volume agent and Pro on the low-volume reasoning agent. Self-hosting a large model for a low-volume agent adds GPU operations without the steady volume that justifies a dedicated endpoint.

Sources: Choose an open model serving option, ADK: Agent Platform hosted models, Use Gemma

ADK session state, managed Sessions and Memory Bank: which setting meets which requirement

RequirementConfigureWhy the alternative fails
A value follows one user across all of that user's sessionsState key with the user: prefix, such as user:preferred_languageapp: keys are shared by every user of the app. Unprefixed keys live only in the current session.
Data passed between tool calls in one invocation, never persistedtemp: prefixADK discards temp: keys after the invocation. Unprefixed keys persist with the session.
Durable managed sessions, agent stays on Cloud Run, no database administratorVertexAiSessionService pointed at an Agent Runtime instance created without deploying codeInMemorySessionService loses history on restart or scale-in. DatabaseSessionService needs a database you run.
Known user facts in context on every turnPreloadMemoryTool: retrieves memories at the start of each turn into the system instructionLoadMemoryTool and custom search_memory tools run only when the model decides to call them.
Update memories during a long session without reprocessing itadd_events_to_memory with only the recent eventsadd_session_to_memory resends the whole session. Call it once, at session end.
Persist only certain kinds of informationMemory topics: a managed topic such as USER_PREFERENCES plus custom topics with a label, a description and few-shot examplesPrompts, TTLs and IAM conditions do not change what extraction stores.
Delete memories N days after last create or updatedefault_ttl in the instance TTL configurationcreate_ttl covers only CreateMemory. memory_revision_default_ttl covers revisions.
Sessions and memories encrypted with CMEKencryption_spec (kms_key_name) when you create the Agent Runtime instance, in a single region if the instance also deploys the agentThe global location does not support CMEK. Multi-region CMEK works only for standalone instances. The key cannot be changed after creation.
No Memory Bank resources outside a geography, in any projectgcp.resourceLocations organization policy constraintPer-instance settings do not stop other projects.

Sources: ADK: State, Set up Memory Bank, Memory Bank with ADK

ADK callbacks and plugins, Agents CLI skills and extensions: where rules are enforced

  • before_tool_callback returning a dict: ADK skips the tool and uses the dict as the tool result. Use it for argument checks such as an amount limit. after_tool_callback runs after the tool has executed, too late to stop a side effect.
  • before_model_callback returning an LlmResponse: ADK skips the model call. Use it for input guardrails. Returning None lets the call proceed.
  • ADK plugin: a BasePlugin subclass registered once on the Runner (or the App in Python). Its callbacks apply to every agent, tool and model call the runner manages and run before object-level callbacks. ADK recommends plugins for policy enforcement such as tool authorization. The prebuilt Model Armor plugin screens input and output against Model Armor templates and does not check per-user tool rights.
  • Agents CLI: uvx google-agents-cli setup installs the CLI and seven google-agents-cli-* skills. By default it installs them globally for every coding agent it detects. --workspace installs them relative to the current directory. --dry-run prints the commands, scope and auth status without changing anything.
  • Agent mode and human mode: Agents CLI is optimized for coding agents to run, and human mode is a person running the commands directly. agents-cli login requires --interactive (-i), so the coding agent asks the user to run agents-cli login -i in their own terminal, then resumes.
  • Version pinning: setup takes skills from the repository's default branch. Pin both with uv tool install google-agents-cli==VERSION, then setup with --skills-source set to the matching release tag. agents-cli update moves both to the latest release and replaces local edits to google-agents-cli-* skills.
  • Extensions: override built-in commands such as deploy, add commands, and ship skills into .agents/skills without forking. At project scope they are recorded in agents-cli-extensions.yaml and vendored under extensions/. Commit both so teammates and CI get the same checks. --global extensions exist on one machine only.
  • agents-cli deploy copies every .env entry into the deployed service's environment. Keys stored there reach production.

Sources: ADK: Plugins, Agents CLI: Security, Agents CLI: Using extensions

RAG Engine, Vector Search and Agent Retrieval: fixing relevance, ranking, latency and chunking

If the scenario saysChooseWhy
Retrieval returns text that restates the question instead of answering itEmbed the corpus with RETRIEVAL_DOCUMENT and questions with QUESTION_ANSWERINGRetrieval task types are asymmetric. SEMANTIC_SIMILARITY is not meant for retrieval. No extra query-time call, unlike HyDE.
Exact part numbers, SKUs or brand-new product names missHybrid search: dense plus sparse (token-based) embeddings in one Vector Search index, merged with Reciprocal Rank FusionDense embeddings handle out-of-domain tokens poorly. No second search engine is needed.
Right chunk retrieved but ranked low, tight latency, per-request pricingRanking API reranker in rag_retrieval_config.ranking.rank_service, for example semantic-ranker-default@latest, with the Discovery Engine API enabledUnder 100 ms and priced per RAG Engine request. The LLM ranker makes a Gemini call, takes 1 to 2 seconds and bills tokens.
RagManagedDb corpus past about 10,000 files, latency risingANN strategy, tree_depth 3, leaf_count about 10 times the square root of the file count, import with rebuild_ann_index trueThe default KNN compares every point. The ANN index must be built before the first query.
RAG Engine must write to your own Vector Search indexAn empty index with STREAM_UPDATE, explicit DOT_PRODUCT_DISTANCE or COSINE_DISTANCE, dimensions matching the embedding modelRAG Engine validates the index at corpus creation and populates it on import. Batch-update indexes are rejected.
PDFs with headings, lists and tables chunk badlyDocument AI layout parser in the corpus options (files up to 20 MB and 500 pages)Each chunk comes from one layout entity. More chunk_overlap mixes content further.
JSON records, semantic search plus attribute filters, automatic embeddings, no VMs and no second databaseAgent Retrieval (formerly Vector Search 2.0): a Collection with a data schema and a vector schemaStores Data Objects, embeds with built-in models, filters on vectors and payload together.
Corpus encrypted with CMEKSymmetric encrypt/decrypt key in the RAG Engine region, named without /cryptoKeyVersions/N, usable by the RAG Engine service agentGlobal key rings and signing keys do not work.

Sources: Embedding task types, RAG Engine retrieval and ranking, Use RagManagedDb

Agent Identity, auth manager, Agent Registry and MCP servers: granting tool access

If the scenario saysChooseWhy
Each agent reads only its own data, no keys, little code changeDeploy with identity_type AGENT_IDENTITY and grant roles on the resource to that agent's principal:// identifierA SPIFFE-based principal tied to the resource ID. No impersonation, no keys, picked up by ADC.
Releases delete and recreate the agent, access disappearsBaseline roles (logging, service usage) on the project principalSet for all agents; sensitive roles bound after deploy to the principal in spec.effectiveIdentityA new resource ID means a new principal.
Reuse the agent's token outside the runtimeKeep the default Context-Aware Access policy and give the other workload its own identityTokens are bound to the agent's X.509 certificate.
Act in Jira or GitHub on behalf of the signed-in employee3-legged OAuth auth provider in Agent Identity auth managerAccess is limited to the intersection of agent policy and user permissions. Logs show both.
Machine-to-machine SaaS MCP access, no secrets in code, central viewRegister the server in Agent Registry and attach a 2-legged OAuth auth provider to the agent-to-MCP-server bindingBindings record which agent calls which server.
Google Cloud remote MCP server, read-only tools onlyroles/mcp.toolUser plus product roles, and an IAM deny policy on mcp.googleapis.com/tools.call when tool.isReadOnly is falseDeny wins over allow grants added later.
Private or external MCP servergcloud agent-registry services create with a toolspec.json (up to 10 KB)The registry does not inspect it. Import tools needs a public endpoint.
MCP server on Cloud Run, registered automaticallyA Cloud Run service with --functional-type=mcp-server and --identity-type=agent-identityStreamable HTTP only, services not jobs.
Only approved parameterized SQL on Cloud SQLMCP Toolbox for Databases: sources, tools and toolsets in tools.yamlGeneric execute_sql allows arbitrary SQL.
Apigee REST APIs as MCP tools, no servers to runMCP in Apigee, with OpenAPI operations mapped to toolsApigee policies restrict tools to OAuth clients.

Sources: Agent Runtime: Agent Identity, Register MCP servers, Prevent read-write MCP tool use

MCP or A2A, and the A2A settings questions check

If the scenario saysChooseWhy
Stateless tools with structured inputs and outputsMCP, consumed in ADK with McpToolsetMCP connects an agent to tools and resources.
Agent owned by another organization, other framework, multi-turn state, internals hiddenA2A, consumed with RemoteA2aAgent pointed at its Agent CardBuilt for opaque agents. Use both: A2A between agents, MCP inside each.
Same codebase, every request, needs parent state, low latencyLocal sub-agentIn memory, no network hop.
Large MCP server, few tools needed, bearer tokentool_filter plus auth_scheme and auth_credential on McpToolsetFiltered tools never reach the model.
MCP clients (Antigravity, Claude Code) need the whole agentto_mcp_serverExposes the agent's reasoning, not single tools.
Agent exposed with to_a2a, client calls the wrong portPass host and port to to_a2a matching uvicornThe card's RPC URL defaults to port 8000. The card is served at /.well-known/agent-card.json.
Partner uses OAuth 2.0, some skills are sensitiveSecurity schemes in the Agent Card, tokens in the HTTP Authorization header over HTTPS, sensitive skills in an authenticated extended Agent CardIdentity stays out of the JSON-RPC payload.
A2A agent on Agent Runtime (Preview)Clients fetch the authenticated Agent Card with Google credentialsAgent Runtime does not serve a public card.
Tasks run for hours, client is serverlessPush notifications: capabilities.pushNotifications, a webhook in TaskPushNotificationConfig, then GetTaskNo open connection or poller.
Refine a completed taskNew task in the same contextId with referenceTaskIdsTerminal tasks cannot restart.
Find a sub-agent in Agent Registry at runtimeroles/agentregistry.viewer for the caller's agent identity, and an authenticated httpx.AsyncClient passed to get_remote_a2a_agentA2A calls are not authenticated for you. header_provider is for McpToolset only.
Agent A may invoke only Agent BCustom role with reasoningEngines.query and .get on B's resource, and an IAM deny on create, update and deleteProject-level roles/aiplatform.user is too broad.
Agent Gateway egress policy fails with NOT_FOUNDRegister the target in Agent Registry, then grant roles/iap.egressor on it to the agent's principalTargets are validated at bind time.

Sources: A2A and MCP, ADK: A2A introduction, ADK: MCP tools

A2A actors: a user, an A2A client agent and an A2A server agent
In A2A, a client agent sends tasks to a remote agent that publishes an Agent Card. Diagram from the A2A protocol documentation.
Two agents on either side of an organizational boundary talking over A2A, each using MCP to reach APIs and enterprise applications
A2A between agents owned by different teams or companies, MCP between each agent and its tools. Diagram from the A2A protocol documentation.

SequentialAgent, ParallelAgent, LoopAgent, graph workflows or transfer: choosing the multi-agent pattern

Workflow agents and graph nodes run in a code-defined order. A coordinator LlmAgent that transfers by instruction does not, so it fails any "deterministic" requirement.

If the scenario saysChooseWhy
Coordinator calls a specialist on demand and keeps handling the userWrap the specialist in AgentTool and list it in toolsThe answer returns to the caller. A sub_agents transfer hands the user to the sub-agent.
Independent checks must run concurrently, then one summaryParallelAgent with a distinct output_key per branch, inside a SequentialAgent that then runs the synthesis agentBranches do not share state while running, so synthesis must come after.
Draft and critique until good, with a cost ceilingLoopAgent with max_iterations, plus a tool that sets tool_context.actions.escalate = TrueLoopAgent has no built-in stop condition. Text phrases do not end it.
Tools plus a strict schema on a model that cannot combine themA tool agent saves results with output_key, then an LlmAgent with output_schema and no toolsThe fallback set_model_response tool is unreliable.
Explicit routing, a message can match several categories (ADK 2.0)Graph Workflow: a router node emits route values, an edge dictionary maps each route to a function nodeA list of route values runs every matching branch. Function nodes call no model.
Parallel deterministic nodes, one node needs all outputsSTART in several edges rows, each path into one JoinNodeJoinNode waits for every predecessor and passes outputs keyed by node name.
Approval must always pause the flowA node that yields RequestInput with a message and response_schemaThe pause does not depend on a model.
Sub-agents never talk to users, return automatically, may run in parallelmode single_turn on each sub-agent, not on the rootDefault chat mode keeps control until a manual transfer. task mode allows clarifying questions and no parallelism.
Threshold rules change monthly, block calls that drift from user intentSemantic governance policies (Preview), enforced by Agent GatewayNatural language constraints plus an intent check, changed without redeploying.

Sources: ADK: Parallel agents, ADK: Graph workflows, ADK: Collaboration modes

ADK SequentialAgent diagram: sub-agents run one after another, each passing its output to the next
A SequentialAgent runs its sub-agents in a fixed order. Diagram from the ADK documentation.
ADK ParallelAgent diagram: sub-agents run at the same time and their results are gathered
A ParallelAgent runs independent sub-agents concurrently. Diagram from the ADK documentation.

13 free Section 3 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 60 Section 3 questions.

Question 1, 3.2 Integrating enterprise domain knowledge

A retailer's ADK agent must look up orders in a Cloud SQL for PostgreSQL database. Security forbids the model from generating arbitrary SQL. Only three approved parameterized queries may run. The team also wants connection pooling and OpenTelemetry tracing, and does not want to write or maintain a custom MCP server. What should you do?

  1. Run MCP Toolbox for Databases with the prebuilt PostgreSQL configuration, and have the agent call its generic execute_sql tool for the three approved queries.
  2. In MCP Toolbox for Databases, define a Cloud SQL source and three parameterized SQL tools in tools.yaml, group them in a toolset, and load it into the agent.
  3. Build a FastMCP server on Cloud Run that implements the three parameterized queries, a connection pool and OpenTelemetry tracing, and connect it as a toolset.
  4. Grant the agent's identity the Cloud SQL Client role, and use the system instructions to tell it to run only the three approved SELECT statements.
Show the answer and explanation

Answer: B. MCP Toolbox for Databases is an open-source MCP server that also serves as a custom tools framework. tools.yaml defines sources, tools with fixed parameterized statements, and toolsets, so the agent can run only the approved queries. Toolbox provides connection pooling, IAM authentication and OpenTelemetry observability out of the box.

Why the other options are wrong:

  • A. The prebuilt generic tools, such as execute_sql, let the model run arbitrary SQL, which security forbids.
  • C. This creates the custom server that the team wants to avoid building and maintaining.
  • D. Instructions are not an enforcement control; the model could still produce other SQL.

Official reference: github.com/googleapis/mcp-toolbox

Question 2, 3.1 Designing and building agentic workflows in code

An insurance company wants its claims-intake agent, built with Agent Development Kit (ADK), to use an open-weight Llama model for summarizing adjuster notes. Traffic is unpredictable and bursty, and it spikes after storms and is near zero otherwise. The team is three application developers with no MLOps or GPU capacity-planning experience, and leadership wants the agent in production within two weeks. The standard instruction-tuned model meets quality requirements. Which approach meets these requirements with the LEAST operational overhead?

  1. Deploy the model from Model Garden to a dedicated Agent Platform endpoint on NVIDIA L4 GPUs and pass the endpoint resource name to the LlmAgent model parameter.
  2. Call the model through Model as a Service (MaaS) on Agent Platform by using the LiteLlm wrapper as the LlmAgent model.
  3. Serve the model on a GKE Autopilot cluster with vLLM and point the agent at the OpenAI-compatible endpoint through LiteLlm.
  4. Build a custom vLLM container image, deploy it to an Agent Platform endpoint, and add autoscaling rules for the storm season.
Show the answer and explanation

Answer: B. MaaS serves open models through serverless managed APIs, so Google handles accelerator provisioning, scaling, and maintenance, and pay-as-you-go pricing suits bursty, unpredictable traffic. Because a standard, non-customized model is sufficient, there is no reason to self-deploy. ADK reaches MaaS open models through the LiteLlm model connector.

Why the other options are wrong:

  • A. A dedicated self-deployed endpoint adds capacity planning and pays for GPUs during idle periods, which suits predictable high-volume traffic rather than bursty traffic.
  • C. Running vLLM on GKE gives granular control but requires Kubernetes and MLOps skills the team does not have.
  • D. A custom vLLM container is meant for custom serving logic and adds the most image and scaling maintenance of all the options.

Official reference: docs.cloud.google.com/vertex-ai/generative-ai/docs/open-models/choose-serving-option

Question 3, 3.1 Designing and building agentic workflows in code

A legal-tech company has standardized on Anthropic Claude for contract analysis because of internal benchmark results. It is now building an ADK agent that will run on Google Cloud. The security team forbids storing third-party API keys in application configuration and requires that all model calls be authorized with Google Cloud IAM through Application Default Credentials and billed to the Google Cloud account. What should the developer do?

  1. Pass the Claude on Agent Platform model string to LlmAgent, set GOOGLE_GENAI_USE_ENTERPRISE=TRUE, and install anthropic[vertex].
  2. Wrap Anthropic's public API with the LiteLlm connector and store the Anthropic API key in the project's .env file, which is excluded from Git.
  3. Download the Claude weights from Model Garden and self-deploy them to a dedicated GPU endpoint that ADK calls by its endpoint resource name.
  4. Replace Claude with a Gemma model that is fine-tuned to mimic Claude's contract-analysis outputs.
Show the answer and explanation

Answer: A. Anthropic makes Claude available directly through Agent Platform as a partner model. ADK's registry routes Claude model strings to its Claude wrapper class, and the setup uses ADC with GOOGLE_GENAI_USE_ENTERPRISE=TRUE and the anthropic[vertex] library. As a result, calls are authorized with IAM and billed through Google Cloud without an Anthropic API key.

Why the other options are wrong:

  • B. Calling Anthropic's public API requires an Anthropic API key in application configuration, which the security team forbids even if the file is not committed, and usage is not billed through Google Cloud.
  • C. Claude is a proprietary partner model that is consumed as a managed API, so its weights are not available for self-deployment.
  • D. Replacing the model ignores the company's benchmark-driven standard and adds tuning work that no requirement asks for.

Official reference: adk.dev/agents/models/agent-platform

Question 4, 3.1 Designing and building agentic workflows in code

A meal-planning agent built with ADK uses Agent Platform Memory Bank through VertexAiMemoryBankService. Memories about each user's allergies and dietary restrictions are generated from past conversations. In testing, the agent sometimes suggests recipes that contain allergens because the model does not always decide to look up memories before it answers. Product owners require that the user's known restrictions be in the model's context on every turn. Which change should the developer make?

  1. Replace the existing LoadMemoryTool with a custom tool that calls tool_context.search_memory, and include a stronger docstring.
  2. Add callback_context.add_session_to_memory to the after_agent_callback so that memories are regenerated after every turn.
  3. Add PreloadMemoryTool to the agent so that memories are retrieved at the start of each turn and included in the system instruction.
  4. Switch to InMemoryMemoryService so that memory retrieval does not depend on a remote service call.
Show the answer and explanation

Answer: C. PreloadMemoryTool retrieves memories at the start of every turn and places them in the system instruction, which establishes baseline context about the user. LoadMemoryTool, and custom tools that call search_memory, run only when the model decides that memories are needed. That model-dependent behavior is the root cause of the missed allergens.

Why the other options are wrong:

  • A. A custom search_memory tool is still called only when the model chooses to call it, so retrieval is still not guaranteed on every turn.
  • B. add_session_to_memory generates memories, but it does not put memories into the model's context for the current turn.
  • D. InMemoryMemoryService has no persistence and uses only keyword matching, and it does not force retrieval on each turn.

Official reference: docs.cloud.google.com/gemini-enterprise-agent-platform/scale/memory-bank/adk-quickstart

Question 5, 3.1 Designing and building agentic workflows in code

A bank's advisory agent generates memories through GenerateMemories calls that ADK callbacks trigger, and it occasionally writes memories directly with CreateMemory. A new retention policy requires every memory to be deleted automatically 90 days after it was last created or updated, with no custom cleanup code. Memory revisions are already covered by a separate policy. How should the architect configure Agent Platform Memory Bank?

  1. Set memory_revision_default_ttl to 90 days in the Memory Bank instance's TTL configuration.
  2. Configure a granular TTL that sets only create_ttl to 90 days.
  3. Schedule a Cloud Run job that lists memories daily and deletes the ones that are older than 90 days.
  4. Set default_ttl to 90 days in the Memory Bank instance's TTL configuration.
Show the answer and explanation

Answer: D. Memory Bank supports automatic expiration through a TTL configuration on the instance. A default TTL applies to all operations that create or update memories, and for updated memories it recalculates the expiration as now plus the TTL. That behavior satisfies the requirement to delete memories 90 days after their last creation or update without custom code.

Why the other options are wrong:

  • A. memory_revision_default_ttl controls the lifetime of memory revisions, not the memories themselves.
  • B. create_ttl applies only to memories created with CreateMemory, so memories that GenerateMemories creates or updates would not get the 90-day TTL.
  • C. A scheduled cleanup job is custom code that the policy explicitly rules out, and Memory Bank TTL provides this natively.

Official reference: docs.cloud.google.com/gemini-enterprise-agent-platform/scale/memory-bank/setup

Question 6, 3.1 Designing and building agentic workflows in code

An enterprise has 15 teams that build agents with Agents CLI, and they deploy from laptops and from CI. Governance requires that an SBOM and compliance check run before every deployment, and that coding agents learn the organization's agent-design rules from skills. Teams must keep typing the same agents-cli deploy command, and the platform team does not want to fork the tool. Which approach meets these requirements?

  1. Build an Agents CLI extension that overrides deploy and ships the rule skills, add it at project scope, and commit its files.
  2. Edit the installed google-agents-cli-deploy skill on each laptop so that it tells coding agents to run the compliance check before deploying.
  3. Ask each developer to add the extension with --global on their laptop so that the override applies to all of their projects.
  4. Fork the agents-cli repository, add the compliance check to the deploy command, and distribute the fork through an internal package index.
Show the answer and explanation

Answer: A. Agents CLI extensions can override built-in commands such as deploy with a run vector, add commands, and ship skills into .agents/skills without forking the tool. At project scope, an extension is recorded in agents-cli-extensions.yaml and vendored under extensions/. Committing both files gives every teammate and CI the same overrides.

Why the other options are wrong:

  • B. The google-agents-cli-* skills are reserved and are replaced on update, so local edits are lost, and a skill is guidance that does not enforce a check.
  • C. A --global extension lives only on that one machine, so CI and developers who skip the step would bypass the check.
  • D. A fork is exactly what extensions are designed to avoid, and the platform team would have to maintain it against every upstream release.

Official reference: google.github.io/agents-cli/guide/extensions/using

Question 7, 3.2 Integrating enterprise domain knowledge

A RAG Engine corpus created with the default RagManagedDb settings has grown from 3,000 to about 40,000 RAG files. Query latency has climbed steadily, and the product owner accepts a slight loss of recall in exchange for faster answers. The team does not want to take on the lifecycle and scaling of a separate vector database. What should you do?

  1. Move the corpus to a Pinecone index configured as the RAG Engine vector database, so that a dedicated vector database scales with the larger volume.
  2. Keep the default KNN strategy, and reduce chunk_size from 1,024 to 256 tokens so that each comparison in the exact similarity search is cheaper.
  3. Create a corpus with the ANN strategy, tree_depth 3 and leaf_count near 10 times the square root of the file count, and import with rebuild_ann_index set to true.
  4. Create a corpus with the ANN strategy and the default tree_depth of 2 and leaf_count of 500, and start querying at once because the index is built on the first query.
Show the answer and explanation

Answer: C. KNN, the RagManagedDb default, compares every data point and is recommended for fewer than about 10,000 RAG files, so latency grows with the corpus. ANN uses a tree-based structure. For more than about 10,000 files, the guidance is tree_depth 3 and leaf_count of about 10 * sqrt(number of files). The ANN index must be rebuilt at least once with rebuild_ann_index before you query it.

Why the other options are wrong:

  • A. Bringing your own vector database such as Pinecone makes you responsible for its lifecycle and scaling, which the team wants to avoid.
  • B. Smaller chunks create more vectors for the exact KNN search to scan, which makes latency worse.
  • D. The ANN index must be rebuilt at least once before querying; it is not built on the first query, and the defaults suit about 10,000 files rather than 40,000.

Official reference: docs.cloud.google.com/gemini-enterprise-agent-platform/build/rag-engine/use-ragmanageddb-with-rag

Question 8, 3.2 Integrating enterprise domain knowledge

A bank is building a RAG Engine corpus in europe-west4 for internal credit policies. Its security standard requires the corpus data at rest to be encrypted with customer-managed keys held in Cloud KMS. The project already has the Cloud KMS API enabled, and a security engineer holds the Cloud KMS Admin role. Which two actions are required to create the CMEK-protected corpus? (Choose two.)

  1. Create the key ring in the global location so that the same key can protect RAG corpora in europe-west4 and in any other region.
  2. Grant the RAG Engine service agent (service-PROJECT_NUMBER@gcp-sa-vertex-rag.iam.gserviceaccount.com) permission to use the key.
  3. Reference the full key version resource name ending in /cryptoKeyVersions/1 in the corpus EncryptionSpec so that the key version is pinned.
  4. Create an asymmetric signing key with the HSM protection level in europe-west4 so that every use of the key is hardware-backed.
  5. Create a symmetric encrypt/decrypt key in a europe-west4 key ring, and reference it in the EncryptionSpec without the version suffix.
Show the answer and explanation

Answer: B and E. For CMEK, the key ring must be in the same region as the RAG Engine endpoint, and the key purpose must be symmetric encrypt/decrypt. The EncryptionSpec takes the key resource name without /cryptoKeyVersions/N. The RAG Engine service agent must be granted permission to use that key so that it can encrypt and decrypt corpus data.

Why the other options are wrong:

  • A. The key ring must be in the same region as the RAG Engine endpoint (europe-west4), not global.
  • C. The EncryptionSpec must use the key name without the version number.
  • D. CMEK for RAG Engine requires a key whose purpose is symmetric encrypt/decrypt; an asymmetric signing key cannot encrypt corpus data.

Official reference: docs.cloud.google.com/gemini-enterprise-agent-platform/build/rag-engine/use-ragmanageddb-with-rag

Question 9, 3.2 Integrating enterprise domain knowledge

A fraud-scoring agent runs on Agent Runtime with Agent Identity and reads a sensitive BigQuery dataset. A contractor proposes exporting the agent's Google Cloud access token to an on-premises batch job that needs the same data, and suggests disabling whatever blocks the token from working outside the runtime. The security team wants to prevent stolen or replayed agent credentials. What should you recommend?

  1. Keep the default Context-Aware Access policy that binds agent tokens to the runtime, and give the batch job its own least-privileged identity.
  2. Set the environment variable that opts the agent out of Context-Aware Access so that the batch job can reuse the agent's exported tokens on premises.
  3. Generate a long-lived key for the agent identity, store it in Secret Manager, and let the on-premises batch job read the key when it starts each run.
  4. Grant the batch job's service account the Service Account Token Creator role on the agent identity so that it can impersonate the agent at run time.
Show the answer and explanation

Answer: A. Agent identity tokens are bound to the agent's X.509 certificate. The default Google-managed Context-Aware Access policy enforces that binding, so stolen tokens can't be replayed outside the trusted runtime. Google strongly discourages opting out. The batch job should use its own separate, least-privileged identity.

Why the other options are wrong:

  • B. Opting out of Context-Aware Access is strongly discouraged because it exposes the agent to credential theft.
  • C. Agent identities don't support long-lived keys, so there is no key to generate or share.
  • D. Agent identities can't be impersonated, unlike service accounts.

Official reference: docs.cloud.google.com/gemini-enterprise-agent-platform/govern/agent-identity-overview

Question 10, 3.3 Orchestrating and coordinating agentic workflows

An insurer's claims-triage agent, built with ADK, must check three independent sources for every claim: the policy database, historical weather data, and a fraud-scoring API. Each check is handled by its own LlmAgent with dedicated tools. Running the checks one after another makes triage too slow. A final summary must combine all three results, and the orchestration must be deterministic rather than decided by a model. What should you do?

  1. Run the three agents in a ParallelAgent with a distinct output_key each, inside a SequentialAgent that then runs a synthesis agent.
  2. Put the three check agents and the synthesis agent together in one ParallelAgent so that all four agents start at the same time and the summary is ready sooner.
  3. Wrap the three check agents in a LoopAgent with max_iterations set to 3 so that each iteration runs one check.
  4. Create a coordinator LlmAgent with the three check agents as sub-agents and instruct it to transfer to each sub-agent before writing the summary.
Show the answer and explanation

Answer: A. ParallelAgent runs independent sub-agents concurrently, which removes the sequential latency, and its execution is deterministic rather than model-driven. Because parallel branches do not share state during execution, each branch stores its result under its own output_key, and a SequentialAgent then runs the synthesis agent after the parallel stage has populated those keys. This is the documented parallel research and synthesis pattern.

Why the other options are wrong:

  • B. The synthesis agent would run concurrently with the checks, before their results exist in state.
  • C. LoopAgent repeats the same sub-agents sequentially for iterative refinement; it does not run independent checks in parallel.
  • D. LLM-driven transfer is neither deterministic nor concurrent, so it fails both the latency and the predictability requirements.

Official reference: adk.dev/agents/workflow-agents/parallel-agents

Question 11, 3.3 Orchestrating and coordinating agentic workflows

Your underwriting agent is exposed through the A2A protocol, and some tasks take several hours to complete. The calling client is a serverless orchestrator running on Cloud Run functions. It cannot keep an HTTP connection open for hours, and the platform team wants to avoid running an extra always-on component just to check task status. How should you deliver task results to the client?

  1. Have the client call SendStreamingMessage and keep the Server-Sent Events stream open until the task reaches a terminal state, resubscribing with SubscribeToTask if it drops.
  2. Deploy a small Compute Engine VM that calls GetTask every few seconds for each open task and forwards completed results to the orchestrator through Pub/Sub.
  3. Advertise capabilities.pushNotifications in the Agent Card, have the client register an HTTPS webhook through TaskPushNotificationConfig, and call GetTask on each notification.
  4. Increase the client's HTTP timeout to several hours and use a synchronous SendMessage call for every request so that results return on the same connection.
Show the answer and explanation

Answer: C. A2A push notifications target very long-running tasks and clients such as serverless functions that cannot hold persistent connections. The server advertises support with capabilities.pushNotifications, the client provides a webhook through TaskPushNotificationConfig, and on notification the client retrieves the full task with GetTask. No persistent connection or polling component is needed.

Why the other options are wrong:

  • A. SSE streaming requires the client to keep an active HTTP connection open for the life of the task, which the serverless client cannot do.
  • B. Polling works but adds the always-on component and operational overhead that the team wants to avoid.
  • D. Holding a synchronous request open for hours has the same persistent-connection problem as streaming and is fragile for serverless clients.

Official reference: a2a-protocol.org/latest/topics/streaming-and-async

Question 12, 3.3 Orchestrating and coordinating agentic workflows

A client agent asked a remote design agent, over the A2A protocol, to generate a campaign banner. The task reached the completed state and returned an image artifact. The user now wants the same banner with a different background color, and the design agent should keep the context of the original request. How should the client agent send this refinement?

  1. Send a new message with the same taskId as the completed task so that the design agent reopens it and continues with the existing artifact and history.
  2. Send a new message in the same contextId, listing the original task in referenceTaskIds, so that the design agent creates a new refinement task.
  3. Start a new contextId and describe the original banner and the new color again in full so that the design agent has every detail it needs.
  4. Call CancelTask on the completed task to release it, and then resend the original message with the color change in the same contextId.
Show the answer and explanation

Answer: B. In A2A, tasks that reach a terminal state such as completed cannot restart. A refinement is modeled as a new task in the same contextId, and the client can hint which earlier work it builds on by using referenceTaskIds. This preserves conversational context while keeping each unit of work immutable and traceable.

Why the other options are wrong:

  • A. A completed task is immutable and cannot be restarted; follow-up work requires a new task.
  • C. A new contextId discards the grouping that lets the agent use the context of the original interaction.
  • D. Canceling applies to running tasks; the task is already completed, and resending from scratch loses the reference to the original artifact.

Official reference: a2a-protocol.org/latest/topics/life-of-a-task

Question 13, 3.3 Orchestrating and coordinating agentic workflows

An orchestrator ADK agent on Agent Runtime must discover a currency-conversion subagent from Agent Registry at runtime instead of using a hardcoded URL. The code calls AgentRegistry.get_remote_a2a_agent with the subagent's resource name. After deployment, the registry lookup fails with permission errors. In a test where the lookup is bypassed, calls to the Google-hosted subagent are rejected as unauthenticated. Which two actions should you take? (Choose two.)

  1. Grant the Agent Registry API Viewer role (roles/agentregistry.viewer) to the developer's user account that deployed the orchestrator.
  2. Grant the Agent Registry API Viewer role (roles/agentregistry.viewer) to the orchestrator's agent identity on the project or registry.
  3. Pass a header_provider to the AgentRegistry constructor so that Google authentication headers are added to the remote A2A calls.
  4. Pass an httpx.AsyncClient configured with Google authentication to get_remote_a2a_agent.
  5. Store the subagent's endpoint URL in an environment variable and construct the RemoteA2aAgent from it.
Show the answer and explanation

Answer: B and D. For A2A delegation through Agent Registry, the parent agent's identity, not a user account, needs the Agent Registry API Viewer role to look up the subagent at runtime. The ADK Agent Registry integration does not authenticate remote A2A calls automatically, so you must supply an authenticated HTTP client, such as an httpx.AsyncClient with Google authentication, to get_remote_a2a_agent.

Why the other options are wrong:

  • A. The deployed agent calls the registry with its own agent identity, so roles granted to the developer's account do not apply at runtime.
  • C. header_provider adds headers only to McpToolset requests made to MCP servers; it does not affect RemoteA2aAgent calls or the registry API.
  • E. Hardcoding the URL ignores the requirement for runtime discovery and does not fix the authentication failure.

Official reference: adk.dev/integrations/agent-registry

Practise all 60 Section 3 questions, then take a 50-question, 120-minute simulation weighted like the real exam. $19 once, 12 months.

Practise Section 3