Development Guide¶
This guide covers the full development workflow — from defining what you're building to monitoring it in production. It follows the same phases your coding agent uses via the google-agents-cli-workflow skill.
Phase 0: Understand¶
Before writing any code, define what you're building.
If you're working with a coding agent, it will ask you these questions automatically. If you're working manually, answer them yourself:
- 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
- Deployment preference? — Prototype first, or full deployment (Agent Runtime, Cloud Run, GKE)?
Write your answers into a DESIGN_SPEC.md at minimum covering: overview, example use cases, tools required, constraints, and success criteria. This becomes the source of truth for everything that follows.
Phase 1: Scaffold¶
Create a new project from a template:
Choose your agent template (adk, adk_a2a, agentic_rag) and deployment target during creation. For fast prototyping without infrastructure decisions:
You can add deployment support later with agents-cli scaffold enhance.
See Agent Templates for all options.
Phase 2: Build & Iterate¶
With a coding agent¶
Open your coding agent and activate the workflow skill:
Describe what you want to build. Your coding agent uses the installed skills to write agent logic, create tools, and test changes — all following ADK best practices.
Manually¶
Edit your agent logic in app/agent.py and test with:
agents-cli playground— launches the ADK web playground atlocalhost:8080with hot reloadagents-cli run "your prompt"— quick smoke test from the terminal
Code Quality¶
agents-cli lint # Ruff checks and formatting
uv run pytest tests/unit tests/integration # Run unit and integration tests
Package Management¶
Add and remove dependencies with uv:
uv add <package>uv remove <package>
Phase 3: Evaluate¶
Run structured evaluations to validate agent behavior. This uses the ADK eval CLI under the hood.
Expect 5-10+ iterations of the eval-fix loop before your agent consistently passes. Start with 1-2 core eval cases, fix failures, then expand coverage.
See the Evaluation Guide for metrics, evalset schemas, and the full methodology.
Phase 4: Deploy¶
Once evaluation thresholds are met, deploy to Google Cloud.
-
Add a deployment target (if you started with
--prototype): -
Deploy:
Tip
To enable observability features (prompt-response logging, content logs), run agents-cli infra single-project after deploying. See the Observability Guide for details.
For production pipelines with staging, approval gates, and CI/CD, see Deployment and CI/CD & Production.
Phase 5: Publish (optional)¶
Register your deployed agent with Gemini Enterprise:
Not all agents need this — only if you're distributing through Gemini Enterprise.
Phase 6: Observe¶
Monitor your agent in production. Cloud Trace is enabled by default in all deployed agents — no configuration needed.
- Cloud Trace — distributed tracing, latency analysis, error visibility
- BigQuery Agent Analytics — opt-in advanced analytics for token usage, conversation patterns, and LLM-as-judge scoring
See the Observability Guide for setup and usage.
For all commands and flags, see the CLI Reference. For details on the skills your coding agent uses at each phase, see Skills.