Build and Deploy AI Agents on Google Cloud

Build and Deploy AI Agents on Google Cloud

Walks through four phases of discovering requirements, designing an architecture, planning deployment and validating AI agent or multi-agent systems on Google Cloud.

Skill files8 files

assets/

references/

SKILL.md284 lines
1
---
2
name: google-cloud-solution-build-deploy-agents
3
metadata:
4
version: "1.0.2"
5
category: MultiProductSolutions
6
description: >-
7
Designs, builds, and deploys AI agents or multi-agent systems on Google Cloud.
8
Provides an interactive workflow to gather requirements, recommend a tailored
9
architecture, and generate deployment instructions. Use when designing or
10
implementing agentic systems on Google Cloud. Don't use for general Google
11
Cloud solution architecture (use google-cloud-solution-architecture instead)
12
or for narrow tasks targeting a single product without agent context.
13
---
14
15
# Build and deploy AI agents on Google Cloud
16
17
This skill guides agents through the workflow of designing and implementing a
18
tailored multi-product solution in the cloud for a given workload, use case, or
19
requirement.
20
21
## Attribution
22
23
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
24
MUST read and follow the instructions in
25
[Usage Attribution](references/attribution.md).
26
27
## Workflow
28
29
The solution design and implementation workflow is divided into the following
30
phases:
31
32
* **Phase 1: Requirements discovery and analysis**: Analyze the workload's
33
requirements, constraints, dependencies, and current state.
34
* **Phase 2: Solution design**: Build a technology stack, architecture, and
35
deployment configuration for the workload based on Google Cloud design best
36
practices and recommendations.
37
* **Phase 3: Implementation plan**: Generate automation and instructions to
38
deploy the solution.
39
* **Phase 4: Solution validation**: Validate that the deployment meets the
40
requirements of the workload.
41
42
Copy this checklist into your active task/plan artifact to track progress across
43
the four phases:
44
45
- [ ] Phase 1: Requirements discovery and analysis completed & confirmed.
46
- [ ] Phase 2: Solution architecture generated & approved.
47
- [ ] Phase 3: Implementation plan generated & approved.
48
- [ ] Phase 4: Solution validation generated & approved.
49
50
### Phase 1: Requirements discovery and analysis
51
52
1. **Discover requirements**: Gather and understand the functional and
53
non-functional requirements, business goals, and current state (if any) of
54
the workload, including its architecture, dependencies, and constraints.
55
56
*Important*: First, check whether the user's initial prompt has already
57
answered the following questions or whether the prompt explicitly asks you
58
to propose a solution architecture/diagram from a given set of parameters.
59
60
- If the user's prompt provides sufficient requirements and it explicitly
61
requests an architecture proposal or diagram, then skip asking the
62
questions below, and instead proceed to the step **Recommend agent
63
design pattern**.
64
- If the user's prompt doesn't provide sufficient requirements, then
65
complete these steps to gather missing information:
66
67
1. Ask the user to describe the functional requirements of their
68
workload: business processes, activities, and use cases.
69
70
2. Ask the user to describe the non-functional requirements (security,
71
privacy, compliance, reliability, disaster recovery, cost,
72
operations, performance, and sustainability) of their workloads.
73
74
3. Ask the user what existing systems, knowledge bases, product
75
documentation, or other documentation the AI agents need to access
76
for grounded guidance.
77
78
4. Ask the user to describe dependencies, if any, on other workloads,
79
products, or tools.
80
81
5. Review the input that the user has provided so far, and check
82
whether there are any ambiguities or contradictions in the input.
83
84
If you identify any ambiguities or contradictions in the
85
requirements that the user has provided, then do the following for
86
each ambiguity or contradiction that you identify:
87
88
* Describe the ambiguity or contradiction.
89
* Ask the user how they wish to resolve the ambiguity or
90
contradiction.
91
* If the user delegates the choice to you (e.g., the user
92
replies with "do what you think is best" or "you decide"),
93
then provide a clear suggestion to resolve the ambiguity or
94
contradiction, explain your reasoning, and ask the user to
95
approve your suggestion.
96
97
**Critical**: Until all the ambiguities and contradictions that you
98
identify are resolved according to the preceding guidance, you must
99
NOT recommend or generate any architecture design, technical
100
decomposition, or Google Cloud product recommendations.
101
102
2. **Recommend agent design pattern**: Evaluate the complexity, workflow,
103
latency, and cost requirements of the workload to recommend an agent design
104
pattern:
105
106
- **Single-agent system**: Recommend for simpler tasks, acting as an
107
effective starting point to refine core logic and tools.
108
- **Multi-agent system**: Recommend for complex problems requiring
109
multiple specialized agents to collaborate on a workflow.
110
111
3. **Identify components**: Based on the requirements analysis, generate a
112
technical decomposition of the workload. The technical decomposition must
113
identify the logical components of the workloads and their relationships.
114
Also identify any cross-cloud components, hybrid components, or on-premises
115
components that the solution needs to integrate with.
116
117
4. **Ask for confirmation**: Ask the user to confirm whether the recommended
118
design pattern and technical decomposition match their workload
119
requirements.
120
121
5. **Iterate**: If the user requests changes, generate an updated technical
122
decomposition, and ask the user to confirm the changes. Continue iterating
123
until the user confirms the technical decomposition. Proceed to the next
124
phase only after the user provides confirmation of the technical
125
decomposition.
126
127
### Phase 2: Solution design
128
129
1. **Retrieve relevant Google Cloud guidance from
130
`references/related-guidance.md`**.
131
132
*Important*: Use the content that you retrieved from
133
`references/related-guidance.md` to ground the guidance that you generate in
134
the remaining steps of this phase.
135
136
2. **Map components to Google Cloud products**: For each component in the
137
confirmed technical decomposition, identify the appropriate Google Cloud
138
products and features by consulting
139
[product-mappings.md](references/product-mappings.md) for detailed
140
recommendations, trade-offs, and alternatives across networking, frontends,
141
agent/model runtimes, memory stores, and tools.
142
143
3. **Create architecture diagram**: Create an architecture diagram in Mermaid
144
format: https://github.com/mermaid-js/mermaid. The diagram should show the
145
components, their relationships, and data/control flows.
146
147
4. **Generate design recommendations**: Generate design guidance based on the
148
following Google Cloud best practices and recommendations. Use the
149
information in `references/related-guidance.md`, with an emphasis on the
150
guidance in `references/design-principles.md`.
151
152
5. **Draft solution architecture**: Compile the requirements, technical
153
decomposition, product mapping, architecture diagram, and design
154
recommendations into a single Markdown file adhering to the format in
155
[solution-template.md](assets/solution-template.md). Save this document in
156
the workspace as `solution-architecture.md`.
157
158
6. **Request review**: Present the generated solution architecture (including
159
the complete fenced `mermaid` code block for the diagram) directly to the
160
user in your response, and explicitly request their feedback or approval.
161
When you present the architecture, ask the user to provide approval for you
162
to proceed with an implementation plan.
163
164
7. **Iterate**: If the user requests changes, generate an updated solution
165
architecture and repeat the steps from "Map components to Google Cloud
166
products" through "Request review" until the user approves the solution
167
architecture.
168
169
### Phase 3: Implementation plan
170
171
1. **Retrieve relevant implementation resources**:
172
173
*Important*: Use the resources in references/related-guidance.md as the
174
technical foundation for the Infrastructure as Code (IaC) and the deployment
175
instructions that you generate in the remaining steps of this phase.
176
177
2. **Identify deployment prerequisites**: Document prerequisites for the
178
deployment, including the following:
179
180
- Projects and billing associations
181
- Required Google Cloud APIs
182
- Required IAM permissions
183
- Any other prerequisites
184
185
3. **Generate Infrastructure as Code (IaC)**: Generate code (e.g., Terraform)
186
and deployment scripts to automate the provisioning of the proposed Google
187
Cloud resources.
188
189
- Where appropriate, alongside or instead of raw infrastructure scripts,
190
instruct the user to set up or enhance the project structure, deployment
191
configuration, and CI/CD pipelines by using Agents CLI commands:
192
- To create a new project, use `agents-cli create`. Don't use
193
`agents-cli scaffold create`.
194
- To add deployment and CI/CD scaffolding to an existing repository,
195
use `agents-cli scaffold enhance`.
196
197
4. **Write deployment instructions**: Draft sequential, step-by-step deployment
198
instructions to execute the IaC and initialize the workload components.
199
Compile the deployment prerequisites, IaC, and deployment instructions into
200
a single Markdown file adhering to the format in
201
[implementation-template.md](assets/implementation-template.md). Save this
202
document in the workspace as `implementation-instructions.md`.
203
204
- The instructions MUST provide the exact ADK code to define a stateful
205
agent node that takes a prompt, calls a model, and returns a tool
206
execution request.
207
- The instructions MUST demonstrate how to register tools like database
208
readers by using Model Context Protocol (MCP) standards.
209
- If deploying the agent to Cloud Run, the instructions MUST show how to
210
configure Cloud Run to scale to zero when the agent is idle, reducing
211
runtime costs.
212
- The instructions MUST recommend using encrypted environment variables to
213
store model parameters or private API credentials. Encryption helps to
214
prevent the exposure of sensitive credentials in plain-text container
215
log streams.
216
- Where appropriate, the instructions MUST specify using the Agents CLI
217
`agents-cli deploy` command (alongside or instead of raw
218
infrastructure/deployment scripts) to run the deployment.
219
220
5. **Request review**: Present the generated deployment instructions to the
221
user and explicitly request their feedback and confirmation.
222
223
6. **Iterate**: If the user requests changes, generate an updated
224
implementation plan and repeat the steps from "Generate Infrastructure as
225
Code (IaC)" through "Request review" until the user approves the
226
implementation plan.
227
228
### Phase 4: Solution validation
229
230
1. **Retrieve relevant verification resources**:
231
232
*Important*: Use the resources in references/related-guidance.md and their
233
verification patterns as the starting point for the validation checks and
234
verification scripts that you generate in the remaining steps of this phase.
235
236
2. **Define validation checks**: Outline validation steps to verify that the
237
deployed infrastructure meets the workload's requirements:
238
239
- **Deployment dry-run**: Commands like `terraform plan` to preview
240
changes. Include instructions to run agent deployment in dry-run mode
241
(e.g., using `agents-cli deploy --dry-run` or `-n`) to preview steps and
242
Terraform executions before pushing to production.
243
- **Local testing and quality verification**: Recommend using the Agents
244
CLI to run and test agent logic locally (`agents-cli run`) and conduct
245
systematic evaluations (`agents-cli eval run`) to verify agent quality
246
and performance before deploying.
247
- **Connectivity and routing**: Verification of network paths, load
248
balancer routing, and service endpoints.
249
- **Security policies**: Verification of restricted access, firewall
250
rules, and IAM enforcement.
251
252
3. **Generate verification scripts**: Draft lightweight scripts or command-line
253
instructions (e.g. using `curl`, `gcloud`, or `agents-cli`) that the user
254
can run to perform these validation checks.
255
256
- The validation plan MUST include instructions using the Agents CLI for
257
local runs, evaluations, and post-deployment validation checks (e.g.,
258
`agents-cli run --url <service-url>` to test the deployed service
259
endpoint).
260
261
4. **Compile validation plan**: Document the validation steps, verification
262
scripts, and expected outcomes in a single Markdown file adhering to the
263
format in [validation-template.md](assets/validation-template.md). Save this
264
document in the workspace as `validation-plan.md`.
265
266
5. **Request review**: Present the validation plan to the user and explicitly
267
request their feedback or approval on the validation plan.
268
269
6. **Conduct validation and finalize**: Assist the user in executing the
270
validation checks and troubleshooting any deployment issues. After the
271
solution is validated successfully, request final approval from the user.
272
273
7. **Iterate**: If the user requests changes, generate an updated validation
274
plan and repeat the steps from "Define validation checks" through "Request
275
review" until the user approves the validation plan.
276
277
--------------------------------------------------------------------------------
278
279
## References & Supporting Links
280
281
* For the complete list of Google Cloud architectural documentation, product
282
manuals, development kits, and checklists used by this skill, see
283
[related-guidance.md](references/related-guidance.md).
284

© Google LLC · Apache 2.0 · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…