adk-scaffold
google/adk-docs
Scaffold new ADK agent projects or enhance existing ones with deployment, CI/CD, and infrastructure templates.
What is adk-scaffold?
Use the agent-starter-pack CLI to create new ADK agent projects from templates or add deployment, CI/CD, and infrastructure scaffolding to existing projects. Start with a prototype, gather requirements, write a design spec, then scaffold with your chosen deployment target and optional features like RAG or agent-to-agent coordination.
- Create new ADK agent projects with templates (standard, A2A, or RAG)
- Enhance existing projects with deployment targets (Agent Engine, Cloud Run, GKE)
- Add CI/CD pipelines (GitHub Actions or Google Cloud Build)
- Scaffold RAG with data ingestion (Vertex AI Search or Vector Search)
- Generate Terraform, Dockerfiles, and infrastructure-as-code
- Support agent-to-agent (A2A) protocol for multi-agent systems
How to install adk-scaffold
npx skills add https://github.com/google/adk-docs --skill adk-scaffold- Node.js and npm (to run npx)
- uvx installed (for running agent-starter-pack)
- GCP project with Vertex AI API enabled (for deployment targets)
- Git repository (optional, for CI/CD scaffolding)
How to use adk-scaffold
- 1.Gather requirements: define the agent's purpose, external APIs, safety constraints, and deployment preference
- 2.Write DESIGN_SPEC.md with overview, use cases, tools, constraints, success criteria, and edge cases; present for approval
- 3.Run uvx agent-starter-pack create <project-name> --agent <template> --deployment-target <target> --prototype -y to create a new project
- 4.For existing projects, run uvx agent-starter-pack enhance . --deployment-target <target> -y from the project root
- 5.Save the approved DESIGN_SPEC.md to the project root
- 6.Load /adk-dev-guide for development workflow and coding guidelines
Use cases
- Building a new search agent from scratch with RAG and Cloud Run deployment
- Adding CI/CD and Terraform to an existing prototype agent
- Scaffolding an agent-to-agent service to coordinate with other agents
- Converting a prototype to production with Agent Engine deployment
- Adding persistent session storage (Cloud SQL) to an existing agent
- Developers building agents with the ADK framework
- Teams deploying agents to Google Cloud (Vertex AI, Cloud Run, GKE)
- Engineers setting up CI/CD pipelines for agent projects
- Architects designing multi-agent systems with A2A coordination
adk-scaffold FAQ
Start with --prototype to skip CI/CD and Terraform. Focus on getting the agent working first, then use enhance to add deployment later when ready.
Project names must be 26 characters or less, using only lowercase letters, numbers, and hyphens. Do not mkdir the directory before running create — the CLI creates it automatically.
Run uvx agent-starter-pack enhance . --base-template agentic_rag --datastore <choice> -y, where <choice> is vertex_ai_search or vertex_ai_vector_search.
Agent Engine is fully managed by Google with automatic session handling. Cloud Run offers more control with containers. GKE provides full Kubernetes control. Choose based on your operational needs.
Pass --agent-directory <dir> to the create or enhance command to specify the correct location (e.g., --agent-directory agent).
Full instructions (SKILL.md)
Source of truth, from google/adk-docs.
name: adk-scaffold description: > MUST READ before creating or enhancing any ADK agent project. Use when the user wants to build a new agent (e.g. "build me a search agent") or enhance an existing project (e.g. "add CI/CD to my project", "add RAG"). metadata: license: Apache-2.0 author: Google
ADK Project Scaffolding Guide
Use the agent-starter-pack CLI (via uvx) to create new ADK agent projects or enhance existing ones with deployment, CI/CD, and infrastructure scaffolding.
Step 1: Gather Requirements
Start with the use case, then ask follow-ups based on answers.
Always ask:
- What problem will the agent solve? — Core purpose and capabilities
- External APIs or data sources needed? — Tools, integrations, auth requirements
- Safety constraints? — What the agent must NOT do, guardrails
- Deployment preference? — Prototype first (recommended) or full deployment? If deploying: Agent Engine, Cloud Run, or GKE?
Ask based on context:
- If retrieval or search over data mentioned (RAG, semantic search, vector search, embeddings, similarity search, data ingestion) → Datastore? Use
--agent agentic_rag --datastore <choice>:vertex_ai_vector_search— for embeddings, similarity search, vector searchvertex_ai_search— for document search, search engine
- If agent should be available to other agents → A2A protocol? Use
--agent adk_a2ato expose the agent as an A2A-compatible service. - If full deployment chosen → CI/CD runner? GitHub Actions (default) or Google Cloud Build?
- If Cloud Run or GKE chosen → Session storage? In-memory (default), Cloud SQL (persistent), or Agent Engine (managed).
- If deployment with CI/CD chosen → Git repository? Does one already exist, or should one be created? If creating, public or private?
Step 2: Write DESIGN_SPEC.md
Compose a detailed spec with these sections. Present the full spec for user approval before scaffolding.
# DESIGN_SPEC.md
## Overview
2-3 paragraphs describing the agent's purpose and how it works.
## Example Use Cases
3-5 concrete examples with expected inputs and outputs.
## Tools Required
Each tool with its purpose, API details, and authentication needs.
## Constraints & Safety Rules
Specific rules — not just generic statements.
## Success Criteria
Measurable outcomes for evaluation.
## Edge Cases to Handle
At least 3-5 scenarios the agent must handle gracefully.
The spec should be thorough enough for another developer to implement the agent without additional context.
Step 3: Create or Enhance the Project
Create a New Project
uvx agent-starter-pack create <project-name> \
--agent <template> \
--deployment-target <target> \
--region <region> \
--prototype \
-y
Constraints:
- Project name must be 26 characters or less, lowercase letters, numbers, and hyphens only.
- Do NOT
mkdirthe project directory before runningcreate— the CLI creates it automatically. If you mkdir first,createwill fail or behave unexpectedly. - Auto-detect the guidance filename based on the IDE you are running in and pass
--agent-guidance-filenameaccordingly. - When enhancing an existing project, check where the agent code lives. If it's not in
app/, pass--agent-directory <dir>(e.g.--agent-directory agent). Getting this wrong causes enhance to miss or misplace files.
Create Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--agent | -a | adk | Agent template (see template table below) |
--deployment-target | -d | agent_engine | Deployment target (agent_engine, cloud_run, gke, none) |
--region | us-central1 | GCP region | |
--prototype | -p | off | Skip CI/CD and Terraform (recommended for first pass) |
--cicd-runner | skip | github_actions or google_cloud_build | |
--datastore | -ds | — | Datastore for data ingestion (vertex_ai_search, vertex_ai_vector_search) |
--session-type | in_memory | Session storage (in_memory, cloud_sql, agent_engine) | |
--auto-approve | -y | off | Skip confirmation prompts |
--skip-checks | -s | off | Skip GCP/Vertex AI verification checks |
--agent-directory | -dir | app | Agent code directory name |
--agent-guidance-filename | GEMINI.md | Guidance file name (CLAUDE.md, AGENTS.md) | |
--debug | off | Enable debug logging for troubleshooting |
By default, the scaffolded project uses Google Cloud credentials (Vertex AI). For API key setup and model configuration, see Configuring Gemini models and Supported models.
Enhance an Existing Project
uvx agent-starter-pack enhance . \
--deployment-target <target> \
-y
Run this from inside the project directory (or pass the path instead of .). Remember that enhance creates new files (.github/, deployment/, tests/load_test/, etc.) that need to be committed.
Enhance Flags
All create flags are supported, plus:
| Flag | Short | Default | Description |
|---|---|---|---|
--name | -n | directory name | Project name for templating |
--base-template | -bt | — | Override base template (e.g. agentic_rag to add RAG) |
--dry-run | off | Preview changes without applying | |
--force | off | Force overwrite all files (skip smart-merge) |
Common Workflows
Always ask the user before running these commands. Present the options (CI/CD runner, deployment target, etc.) and confirm before executing.
# Add deployment to an existing prototype
uvx agent-starter-pack enhance . --deployment-target agent_engine -y
# Add CI/CD pipeline (ask: GitHub Actions or Cloud Build?)
uvx agent-starter-pack enhance . --cicd-runner github_actions -y
# Add RAG with data ingestion
uvx agent-starter-pack enhance . --base-template agentic_rag --datastore vertex_ai_search -y
# Preview what would change (dry run)
uvx agent-starter-pack enhance . --deployment-target cloud_run --dry-run -y
Template Options
| Template | Deployment | Description |
|---|---|---|
adk | Agent Engine, Cloud Run, GKE | Standard ADK agent (default) |
adk_a2a | Agent Engine, Cloud Run, GKE | Agent-to-agent coordination (A2A protocol) |
agentic_rag | Agent Engine, Cloud Run, GKE | RAG with data ingestion pipeline |
Deployment Options
| Target | Description |
|---|---|
agent_engine | Managed by Google (Vertex AI Agent Engine). Sessions handled automatically. |
cloud_run | Container-based deployment. More control, requires Dockerfile. |
gke | Container-based on GKE Autopilot. Full Kubernetes control. |
none | No deployment scaffolding. Code only. |
"Prototype First" Pattern (Recommended)
Start with --prototype to skip CI/CD and Terraform. Focus on getting the agent working first, then add deployment later with enhance:
# Step 1: Create a prototype
uvx agent-starter-pack create my-agent --agent adk --prototype -y
# Step 2: Iterate on the agent code...
# Step 3: Add deployment when ready
uvx agent-starter-pack enhance . --deployment-target agent_engine -y
Agent Engine and session_type
When using agent_engine as the deployment target, Agent Engine manages sessions internally. If your code sets a session_type, clear it — Agent Engine overrides it.
Step 4: Save DESIGN_SPEC.md and Load Dev Workflow
After scaffolding, save the approved spec from Step 2 to the project root as DESIGN_SPEC.md.
Then immediately load /adk-dev-guide — it contains the development workflow, coding guidelines, and operational rules you must follow when implementing the agent.
Scaffold as Reference
When you need specific files (Terraform, CI/CD workflows, Dockerfile) but don't want to scaffold the current project directly, create a temporary reference project in /tmp/:
uvx agent-starter-pack create /tmp/ref-project \
--agent adk \
--deployment-target cloud_run \
--cicd-runner github_actions \
-y
Inspect the generated files, adapt what you need, and copy into the actual project. Delete the reference project when done.
This is useful for:
- Non-standard project structures that
enhancecan't handle - Cherry-picking specific infrastructure files
- Understanding what ASP generates before committing to it
Critical Rules
- NEVER change the model in existing code unless explicitly asked
- NEVER
mkdirbeforecreate— the CLI creates the directory; pre-creating it causes enhance mode instead of create mode - NEVER create a Git repo or push to remote without asking — confirm repo name, public vs private, and whether the user wants it created at all
- Always ask before choosing CI/CD runner — present GitHub Actions and Cloud Build as options, don't default silently
- Agent Engine clears session_type — if deploying to
agent_engine, remove anysession_typesetting from your code - Start with
--prototypefor quick iteration — add deployment later withenhance - Project names must be ≤26 characters, lowercase, letters/numbers/hyphens only
- NEVER write A2A code from scratch — the A2A Python API surface (import paths,
AgentCardschema,to_a2a()signature) is non-trivial and changes across versions. Always use--agent adk_a2ato scaffold A2A projects.
Examples
Using scaffold as reference: User says: "I need a Dockerfile for my non-standard project" Actions:
- Create temp project:
uvx agent-starter-pack create /tmp/ref --agent adk --deployment-target cloud_run -y - Copy relevant files (Dockerfile, etc.) from /tmp/ref
- Delete temp project Result: Infrastructure files adapted to the actual project
A2A project: User says: "Build me a Python agent that exposes A2A and deploys to Cloud Run" Actions:
- Follow the standard flow (gather requirements, DESIGN_SPEC, scaffold)
uvx agent-starter-pack create my-a2a-agent --agent adk_a2a --deployment-target cloud_run --prototype -yResult: Valid A2A imports and Dockerfile — no manual A2A code written.
Troubleshooting
uvx command not found
Install uv following the official installation guide.
If uv is not an option, use pip instead:
# macOS/Linux
python -m venv .venv && source .venv/bin/activate
# Windows
python -m venv .venv && .venv\Scripts\activate
pip install agent-starter-pack
agent-starter-pack create <project-name> ...
For all available options, run uvx agent-starter-pack create --help.
Related skills
More from google/adk-docs and the wider catalog.

adk-cheatsheet
Python ADK API quick reference for agent types, tools, orchestration, and state management.

adk-deploy-guide
Deploy ADK agents to Google Cloud with confidence—Agent Engine, Cloud Run, GKE, and CI/CD pipelines.

adk-dev-guide
ADK development lifecycle, spec-driven workflow, and mandatory coding guidelines for agent implementation.

adk-eval-guide
ADK evaluation methodology guide — metrics, evalsets, LLM-as-judge, and debugging eval failures.

google-agents-cli-adk-code
Quick reference for ADK Python API patterns, tools, callbacks, and agent code examples.

google-agents-cli-deploy
Deploy ADK agents to Agent Runtime, Cloud Run, or GKE with managed infrastructure and CI/CD.