ADK workflow design
Produce the smallest justified orchestration change, or an actionable design/review
when implementation is not requested. Establish what constitutes a usable result,
how work stops, and which evidence supports the outcome. The skill is self-contained;
the book and companion repository are optional provenance, not prerequisites.
Inspect before selecting a pattern
Read project instructions, status/diff, manifests and lockfiles, entry points,
existing tests and startup/cleanup commands. Preserve the package manager,
conventions and unrelated changes. Inspect configuration names without printing
credential values or importing application modules just to inspect them.
Record the target Python, ADK and GenAI versions, model/backend, current result
contract, state ownership, side effects and relevant test commands. Use the
existing project interpreter. The read-only helper can provide an initial map:
python /path/to/adk-workflow-design/scripts/inspect_project.py --project .
Replace the skill path with its installed location. Read
compatibility.md before using an SDK recipe or
interpreting the helper. A different/missing version blocks claims of tested
compatibility, not independent planning. Resolve the target API contract or
report the exact blocker; never silently change dependency pins.
Define acceptance in observable terms: ordered handoff, two preserved branch
outputs, bounded refinement with an explicit result, typed node output, or a
callback action. An import, HTTP 200 or plausible paragraph is insufficient.
List missing prerequisites together. Ask only for decisions the project and
request cannot settle; continue independent offline work.
Inspection is complete when the chosen mode, version baseline, output contract
and validation path are known, or their specific blockers are recorded.
Choose a mode
| Need |
Mode and next reference |
| Known rules; no model judgement needed |
Prefer ordinary Python. Use orchestration.md only if ADK coordination adds value. |
| Fixed order, independent concurrent work, bounded refinement, typed graph, or runtime-sized work |
Selection/implementation/review: read orchestration.md. Preserve an existing supported pattern unless changing it solves the requested problem. |
| Missing final result, lost state, streaming, restart or paused-run semantics |
Runtime contract: read runtime.md. |
| Logging hooks, deterministic short-circuits, tool visibility or call-time policy |
Callback boundary: read callbacks.md. |
| Local startup, actual HTTP/UI checks, buffering, timing or retained sessions |
Reader/runtime operation: read local-runbook.md. |
Modes can combine within one task. Read only relevant references. Cloud hosting,
retrieval, long-term memory and tenant authentication may be architectural
recommendations; implementing them is a separate scope decision.
Implement or advise
- Present a short plan before broad edits. For a planning/review request, give
the selected pattern, alternatives that materially affect the decision, output
contract, failure boundaries and acceptance plan; stop short of generating an
unsolicited application.
- For authorised implementation, reproduce the reported failure through the
public runner, CLI, HTTP or UI path before a narrow correction. Reuse existing
orchestration and change only the boundary causing the defect. Keep a regression
case. Greenfield work starts from the actual user task, not a travel/clock demo.
- Account for each output, model/tool attempt and state writer. A prompt is not
authorisation; a loop limit is not a request budget; a checkpoint is not
exactly-once execution. Label simulated inputs/results explicitly.
- Keep proposed production controls distinct from implemented controls. Add
deadlines, idempotency, persistence or observability when the task requires
them, and validate each claim. Do not copy a historical campaign's limits or
hard-coded identities into a new project.
Authority and external work
Repository/cloud inspection is read-only by default. Code-generation permission
does not authorise deployment or paid model calls. Before API activation, IAM or
secret changes, data migration, provisioning, deployment, deletion or live paid
tests, present exact project/account, region, model, resource IDs, commands,
request/retry limits, execution window and cleanup plan; obtain explicit approval.
Reuse an approval only when it already covers those exact operations and scope.
Billing linkage, upgrades and quota increases need separate approval.
Use synthetic data and short-lived ADC/workload identity where applicable. Keep
credentials out of code, model inputs/results, session state and reports; use
placeholder-only environment examples. Use least privilege, never Owner/Editor
or wildcard grants as a shortcut. Read external-validation.md
only when real-service acceptance or cloud prerequisites are in scope.
Keep cleanup separate from setup. Obtain confirmation for deletion, target only
resources this task created, retain an ownership inventory, and make setup and
cleanup repeatable. Prepare reviewable commands before seeking approval. Missing
approval leaves consequential work pending; it does not stop safe local checks.
Validate and finish
Follow validation.md for mode-specific assertions,
offline boundary doubles, browser timings and a concise result format. Run the
project's relevant tests and static/build checks, including a real application
path where applicable. Prove concurrent branches overlap, state survives only as
claimed, and failure cannot be reported as success. Repeat setup/adaptation to
check that it preserves existing work rather than duplicating it.
For strict paid-request limits, SDK retries or campaign restart, read
model-call-controls.md before choosing the
enforcement point. A callback counter alone does not establish a transport cap.
Report changed files, exact commands and versions, actual outcomes, warnings,
manual prerequisites and outstanding work. Separate PASS/FAIL/BLOCKED/NOT RUN/N/A
for offline execution, live behaviour, browser functionality, latency and cleanup
as applicable; use INCONCLUSIVE when observations cannot resolve a threshold.
Historical companion results are provenance, not a pass for the
target project. Read provenance.md only to trace a rule
or assess the scope of that prior evidence.
This is an independent community project, not affiliated with or endorsed by Google.
1---2name: adk-workflow-design3description: Select, implement or review Google ADK workflow control flow, event consumption, session-state handoffs and callback boundaries. Use when choosing between ordinary code, sequential, parallel, bounded-loop, graph or dynamic orchestration, or repairing those runtime contracts in an existing agent. Do not activate for unrelated UI edits, general LLM explanations, standalone cloud deployment, or implementing RAG, memory or SQL services.4license: MIT5---67# ADK workflow design89Produce the smallest justified orchestration change, or an actionable design/review10when implementation is not requested. Establish what constitutes a usable result,11how work stops, and which evidence supports the outcome. The skill is self-contained;12the book and companion repository are optional provenance, not prerequisites.1314## Inspect before selecting a pattern15161. Read project instructions, status/diff, manifests and lockfiles, entry points,17 existing tests and startup/cleanup commands. Preserve the package manager,18 conventions and unrelated changes. Inspect configuration names without printing19 credential values or importing application modules just to inspect them.202. Record the target Python, ADK and GenAI versions, model/backend, current result21 contract, state ownership, side effects and relevant test commands. Use the22 existing project interpreter. The read-only helper can provide an initial map:2324 ```bash25 python /path/to/adk-workflow-design/scripts/inspect_project.py --project .26 ```2728 Replace the skill path with its installed location. Read29 [compatibility.md](references/compatibility.md) before using an SDK recipe or30 interpreting the helper. A different/missing version blocks claims of tested31 compatibility, not independent planning. Resolve the target API contract or32 report the exact blocker; never silently change dependency pins.333. Define acceptance in observable terms: ordered handoff, two preserved branch34 outputs, bounded refinement with an explicit result, typed node output, or a35 callback action. An import, HTTP 200 or plausible paragraph is insufficient.36 List missing prerequisites together. Ask only for decisions the project and37 request cannot settle; continue independent offline work.3839Inspection is complete when the chosen mode, version baseline, output contract40and validation path are known, or their specific blockers are recorded.4142## Choose a mode4344| Need | Mode and next reference |45| --- | --- |46| Known rules; no model judgement needed | Prefer ordinary Python. Use [orchestration.md](references/orchestration.md) only if ADK coordination adds value. |47| Fixed order, independent concurrent work, bounded refinement, typed graph, or runtime-sized work | Selection/implementation/review: read [orchestration.md](references/orchestration.md). Preserve an existing supported pattern unless changing it solves the requested problem. |48| Missing final result, lost state, streaming, restart or paused-run semantics | Runtime contract: read [runtime.md](references/runtime.md). |49| Logging hooks, deterministic short-circuits, tool visibility or call-time policy | Callback boundary: read [callbacks.md](references/callbacks.md). |50| Local startup, actual HTTP/UI checks, buffering, timing or retained sessions | Reader/runtime operation: read [local-runbook.md](references/local-runbook.md). |5152Modes can combine within one task. Read only relevant references. Cloud hosting,53retrieval, long-term memory and tenant authentication may be architectural54recommendations; implementing them is a separate scope decision.5556## Implement or advise57581. Present a short plan before broad edits. For a planning/review request, give59 the selected pattern, alternatives that materially affect the decision, output60 contract, failure boundaries and acceptance plan; stop short of generating an61 unsolicited application.622. For authorised implementation, reproduce the reported failure through the63 public runner, CLI, HTTP or UI path before a narrow correction. Reuse existing64 orchestration and change only the boundary causing the defect. Keep a regression65 case. Greenfield work starts from the actual user task, not a travel/clock demo.663. Account for each output, model/tool attempt and state writer. A prompt is not67 authorisation; a loop limit is not a request budget; a checkpoint is not68 exactly-once execution. Label simulated inputs/results explicitly.694. Keep proposed production controls distinct from implemented controls. Add70 deadlines, idempotency, persistence or observability when the task requires71 them, and validate each claim. Do not copy a historical campaign's limits or72 hard-coded identities into a new project.7374## Authority and external work7576Repository/cloud inspection is read-only by default. Code-generation permission77does not authorise deployment or paid model calls. Before API activation, IAM or78secret changes, data migration, provisioning, deployment, deletion or live paid79tests, present exact project/account, region, model, resource IDs, commands,80request/retry limits, execution window and cleanup plan; obtain explicit approval.81Reuse an approval only when it already covers those exact operations and scope.82Billing linkage, upgrades and quota increases need separate approval.8384Use synthetic data and short-lived ADC/workload identity where applicable. Keep85credentials out of code, model inputs/results, session state and reports; use86placeholder-only environment examples. Use least privilege, never Owner/Editor87or wildcard grants as a shortcut. Read [external-validation.md](references/external-validation.md)88only when real-service acceptance or cloud prerequisites are in scope.8990Keep cleanup separate from setup. Obtain confirmation for deletion, target only91resources this task created, retain an ownership inventory, and make setup and92cleanup repeatable. Prepare reviewable commands before seeking approval. Missing93approval leaves consequential work pending; it does not stop safe local checks.9495## Validate and finish9697Follow [validation.md](references/validation.md) for mode-specific assertions,98offline boundary doubles, browser timings and a concise result format. Run the99project's relevant tests and static/build checks, including a real application100path where applicable. Prove concurrent branches overlap, state survives only as101claimed, and failure cannot be reported as success. Repeat setup/adaptation to102check that it preserves existing work rather than duplicating it.103104For strict paid-request limits, SDK retries or campaign restart, read105[model-call-controls.md](references/model-call-controls.md) before choosing the106enforcement point. A callback counter alone does not establish a transport cap.107108Report changed files, exact commands and versions, actual outcomes, warnings,109manual prerequisites and outstanding work. Separate PASS/FAIL/BLOCKED/NOT RUN/N/A110for offline execution, live behaviour, browser functionality, latency and cleanup111as applicable; use INCONCLUSIVE when observations cannot resolve a threshold.112Historical companion results are provenance, not a pass for the113target project. Read [provenance.md](references/provenance.md) only to trace a rule114or assess the scope of that prior evidence.115116This is an independent community project, not affiliated with or endorsed by Google.