官方更新 Google Developers Blog 正文 ok 2678 words

三层架构、一个仓库:走进 google/adk-recipes

英文标题:Three layers, one repo: a tour of google/adk-recipes

Google 将原有的 `google/adk-samples` 重构为 `google/adk-recipes`,以 `core/`、`plugins/` 和 `contrib/` 三个层级统一管理 AI Agent 开发资源,并作为 Agent Platform 的单一事实来源。该仓库为 Agents CLI、Agent Garden 和 Gemini Enterprise app 提供可发现、可安装、可验证的 Agent 配方,重点面向 AI 编程助手进行机器可读设计。`core/` 提供 Horizon 等参考架构,`plugins/` 提供零售商品搜索和虚拟试穿等可安装垂直技能,`contrib/` 则承载多语言端到端可部署服务。对于开发者而言,这意味着可通过命令行或 Claude Code、Cursor 等工具快速复用 Agent 模式、部署云服务并执行评估。
打开原文相关 5 · 机会 4
media11.7 KB media241.2 KB media105.7 KB media184.0 KB media385.4 KB media199.6 KB media139.6 KB media28.5 KB media216.5 KB media111.4 KB media142.3 KB media22.4 KB media178.9 KB

中文

为 Google Cloud 的 Agents CLI、Agent Garden 和 Gemini Enterprise app 提供支持的精选 ADK 配方库。

1(1)

引言

如今,在 Google Cloud 上进行开发的开发者可以从终端脚手架化一个具备长期记忆能力的 Agent;只用一行命令,就能将零售垂直技能安装到编程助手中;还可以将一个已完整接线的生产服务部署到 Cloud Run、Agent Runtime、Agent Garden 或 Gemini Enterprise app——所有这些都来自同一棵经过精选的源代码树。这棵树就是 google/adk-recipes:它是 google/adk-samples 重构后的继任者,如今从单一事实来源为 Agent Platform 提供服务。

ADK 配方对 Agent 友好:我们让你的 Agent 能够轻松完成两件事:1)为各类 Agent 使用场景发现相关配方;2)从你偏好的执行框架中自动安装并使用这些配方。

google/adk-recipes 将内容划分为三个顶层文件夹:core/ 用于由 Agents CLI 和 DevRel 团队精选的参考模式;plugins/ 用于按照 Agent Plugins v1.0.0 规范打包、可安装的垂直技能,即 Plugin Recipes;contrib/ 用于覆盖五种语言的端到端可部署服务。每一部分都以机器可读性为首要设计考量。

下文将带你了解该仓库的结构、三个实际示例(每层一个),以及这一新结构所带来的能力。

仓库中包含什么

三个顶层根目录,每一个都对应一种读者操作:

每个配方都附带经过验证的 manifest.yaml,以及一份 AGENTS.md,用于向打开它的编程助手说明该配方是什么、如何使用。contrib/ 和 plugins/ 中的配方还包括 Dockerfile 和可运行性测试。CI 会在每次 PR 中强制执行这些标准;仓库中的一套编程助手技能(prepare-python-recipe、generate-manifest、github-pr-review 等)会完成大部分准备工作,因此你的 Agent 可以端到端地脚手架化、验证并提交一个配方。

面向编程助手构建,而不只是面向开发者

每一份 AGENTS.md、每一份 manifest.yaml、每一份 SKILL.md,主要都是为代表你打开仓库的 AI 编程助手编写;README.md 文件仍然主要供人类阅读。手册词汇表概括了这种双重定位:“Recipe(配方)——位于 _core/_、 _contrib/_或 _plugins/_之下、可运行的 Agent 示例(或可导入的 Agent 模块),由 ADK 开发者和编程 Agent 共同使用。”

它如何为整个 Agent Platform 提供支持

adk-recipes 是三个使用它的 Agent Platform 产品界面中 ADK 内容的单一事实来源。每个界面通过自己的协议读取该仓库。

Agents CLI 读取 core/。当开发者运行 uvx --from google-agents-cli agents-cli create my-agent 时,Agents CLI 可以按需脚手架化一个 core/ 配方。该 CLI 于今年早些时候在 Google Cloud Next 发布,提供完整的“脚手架化 → 部署 → 评估 → 发布”生命周期;它提供的基础内容来自我们的配方。下文将介绍的参考执行框架 Horizon,就是 Agents CLI 视为生产模板的示例模式。

Agent Garden 展示经过精选的一部分内容。开发者进入仓库的路径是向 contrib/ 提交拉取请求:一个配方进入 GitHub 后,便成为公共 ADK 生态的一部分,并从那一刻起可被其他开发者以及读取该仓库的编程助手发现。是否出现在 Agent Garden 画廊中,则是由 Agent Garden 团队作出的另一项独立编辑决策;他们会挑选部分配方,并按照自己的节奏将其推广至公共目录。一旦某个 Agent 进入画廊,Google Cloud 项目中的任何开发者都可以一键安装。

除这些主要产品界面外,Google Cloud 自身的基础设施组件也作为构建模块出现在配方中。Horizon 使用 Agent Platform Sandboxes 实现按用户划分的沙箱隔离,使用 Memory Bank 实现持久记忆,并使用 Agent Platform Sessions 管理会话状态。零售商品搜索 Plugin Recipe 使用 Gemini Enterprise Agent Platform 上的 Vector Search 2.0,并结合 BigQuery。零售虚拟试穿 Plugin Recipe 使用 Gemini 图像模型生成静态合成图,并使用 Veo 3.1 Reference-to-Video 生成动画输出。这些配方不只是与 Agent Platform 并存;它们还记录了 Agent Platform 的实际用法。

对于使用 Google Cloud 工具链以外编程助手的开发者(Claude Code、Antigravity、Cursor、Windsurf、Zed 等),Plugin Recipes 还可通过由 vercel-labs 维护的开放 npx skills CLI 安装。

Horizon:面向 core/ 的参考模式

构建一个能够处理单次对话的 Agent,是一个已经被充分理解的问题。构建一个能在数天交互中持续发挥作用的 Agent——记得用户昨天做了什么,并为明天规划任务——则是完全不同的工作。无论 Agent 的具体目标是什么,这类长期运行系统的难点都是相同的:跨会话记忆、工具执行的按用户沙箱隔离、密钥管理、防止行为失控的护栏,以及使多步骤任务能够恢复执行的编排原语。位于 core/python/long-horizon-harness 的 Horizon,是我们为将这些原语汇集在一处而构建的参考执行框架。

从全新克隆仓库到运行 Horizon 实例的最短路径:

text uvx google-agents-cli setup gcloud auth application-default login gcloud config set project YOUR_PROJECT_ID gcloud services enable aiplatform.googleapis.com

git clone --depth 1 --filter=blob:none --sparse https://github.com/google/adk-recipes.git cd adk-recipes git sparse-checkout set core/python/long-horizon-harness cd core/python/long-horizon-harness

Default: LHA_ENVIRONMENT_BACKEND=local, in-memory sessions, no cloud deploys needed

make dev-local

make deploy 会通过 Terraform 将后端部署到 Cloud Run;make destroy 则会将其销毁。Horizon 的评估套件位于 tests/eval/evalsets/,其中包含 18 个具名行为评估量表,涵盖记忆回忆、基于注入的外泄尝试、对抗性输入下的护栏停止、工具选择纪律,以及旅程级别的情节工件评估。这些量表通过 uv run pytest tests/eval 执行。

针对正在运行的后端进行首次聊天交互,即可确认记忆层是否正确连接:

Horizon 是我们让编程助手在构建更复杂系统前首先学习的执行框架。当开发者要求其助手构建一个必须跨数天交互运行的 Agent 时,正确的下一步是以 Horizon 作为脚手架运行 uvx google-agents-cli create,执行框架其余部分便会随之就位。

零售 Plugin Recipe

Horizon 编码的是一种参考模式,而不是一个垂直领域。为此,仓库的第二层包含 Plugin Recipes,每一个都面向特定行业领域。本次发布中首个获得完整覆盖的垂直领域是零售,可在 plugins/retail/ 下获取。

Plugin Recipe 格式建立在发布于 agent-plugins.org 的 Agent Plugins v1.0.0 规范之上;该规范是一项开放标准,用于在各类编程助手之间打包可安装的 AI 技能。该规范将插件定义为包含一个或多个技能的捆绑包,其顶层 plugin.json 清单声明名称、版本、许可证和所有权。每项技能都是自包含文件夹,内含作为对话式安装程序的 SKILL.md、README.md、包含质量门槛的 EVAL.yaml,以及该技能完成工作所需的脚本和资源。零售插件的结构如下:

text plugins/retail/ ├── plugin.json └── skills/ ├── product-search/ │ ├── SKILL.md # Q-MODE conversational installer │ ├── README.md │ ├── EVAL.yaml # LLM-as-judge rubrics + deterministic assertions │ ├── scripts/ │ ├── references/ │ └── assets/ └── virtual-tryon/ └── ...

目前,这个插件包含两项技能。第一项是 retail-product-search,它构建一个 ADK Agent,配备由 Gemini Enterprise Agent Platform 上的 Vector Search 2.0 和 BigQuery 商品目录支持的向量搜索检索工具。该技能负责整个流水线:将 CSV 或 JSON 商品目录导入 BigQuery、使用 Vertex AI Embeddings 生成多模态和文本嵌入、构建 Vector Search 集合、脚手架化带有 retrieve_docs 工具的 ADK Agent,以及部署到 Cloud Run。该 Agent 被刻意设计为单 Agent:一个 root_agent、一个检索工具,没有协调器层。语义复杂性位于检索流水线和评估器量表中,而非 Agent 间通信;加入编排层会模糊模式,而不是使其更清晰。

第二项技能是 retail-virtual-tryon,它生成模特穿戴或手持商品的照片级真实合成图,并可额外生成一段八秒的影棚走秀视频。它默认使用 gemini-2.5-flash-image,当编辑质量比延迟更重要时则回退至 gemini-2.5-pro-image。视频部分使用 Reference-to-Video 模式下的 veo-3.1-generate-001,使生成的动作以图像流水线生成的静态图为条件。这项技能还提供飞行前商品抠图分类器和可配置的安全级别——这些运营细节通常会在第三次实际生产部署后变得显而易见。

两项技能都可通过一条命令安装到任何能够读取 skills 的编程助手中:

text

From Antigravity, Claude Code, Codex, Cursor …

npx skills add google/adk-recipes --skill retail-product-search --full-depth npx skills add google/adk-recipes --skill retail-virtual-tryon --full-depth

--full-depth 标志会指示 CLI 越过其默认的顶层查找范围,发现嵌套的 plugins/retail/skills/ 结构。安装内容会落在 ~/.agents/skills/<skill-name>/,并被符号链接到本地机器上检测到的每一个编程助手:

text $ npx skills add google/adk-recipes --skill retail-product-search --full-depth -g

● claude-code_2-1-288_agent Agent detected — installing non-interactively ◇ Source: https://github.com/google/adk-recipes.git ◇ Repository cloned ◇ Found 11 skills

● Installing to: Antigravity CLI, Augment, IBM Bob, Claude Code, OpenClaw, CodeBuddy, Continue, Crush, Droid, Goose, Junie, iFlow CLI, Kilo Code, Kiro CLI, Kode, MCPJam, Mux, OpenHands, Qoder, Qwen Code, Roo Code, Trae, Windsurf, Zencoder, …

◇ Installation Summary ──────────────────────────────────────────────────╮ │ ~/.agents/skills/retail-product-search │ │ universal: Antigravity CLI, Droid, Kilo Code, Amp +15 │ │ symlink → Augment, IBM Bob, Claude Code, OpenClaw, CodeBuddy +25 │ ├────────────────────────────────────────────────────────────────────────╯

◇ Installed 1 skill └ Done! Review skills before use; they run with full agent permissions.

技能生态系统被设计为可组合的。若尚未安装,retail-product-search SKILL.md 会指示宿主编程助手从 google/skills 拉取两项配套技能,将 BigQuery 基础知识和 Gemini API 用法等横向关注点集中在一处,并可由多个垂直插件复用。

安装完成后,编程助手会读取 SKILL.md 并启动 Q-MODE 访谈。对于 retail-product-search,快速开始只需回答两个问题(GCP 项目 ID 和商品数据路径,两者都有合理默认值);完整设置则额外增加两个问题,涵盖商品字段层级和 GCP 区域。访谈结束时,该技能会写入一份反映项目实际结构的 ./design-spec.md,并执行 scripts/setup.py,将商品目录导入 BigQuery、生成嵌入、构建 Vector Search 集合,并针对结果运行 EVAL.yaml。如果量表与断言检查的通过率低于 80% 的目标,该技能会停止执行,并列出具体失败项。

对随附的五商品演示目录进行一次端到端设置运行,将产生:

text $ .venv/bin/python scripts/setup.py --config ./design-spec.md

INFO:main: SETUP PIPELINE (driven by design-spec.md) INFO:main: Project: testproject-425813 INFO:main: Region: us-central1 INFO:main: Validating sample data... Validated 5 records. INFO:main: Ingesting into BigQuery... INFO:ingest_bigquery: Creating dataset testproject-425813.retail_skill_products INFO:ingest_bigquery: Loaded 5 valid products INFO:main: Creating Vector Search collection... INFO:ingest_vertex_search: Collection created successfully INFO:ingest_vertex_search: Ingestion complete: 5 created, 0 skipped, 0 errors INFO:main: SETUP COMPLETE

针对该技能刚刚配置的集合进行一次实时检索,将返回:

text

from app.agent import retrieve_docs retrieve_docs("wireless headphones under 200")

text Product 1: Wireless Headphones $199.99 by Sony (Audio) rated 4.5/5 Premium noise-cancelling over-ear headphones with 30-hour battery Product 2: Laptop Stand $49.99 by Generic (Accessories) rated 4.2/5 Product 3: Mechanical Keyboard $129.99 by Keychron (Peripherals) rated 4.6/5 Product 4: USB-C Cable $19.99 by Anker (Cables) rated 4.7/5 Product 5: Monitor Light Bar $59.99 by BenQ (Lighting) rated 4.4/5

虚拟试穿技能则可以更快地通过交互方式演示。直接调用 `generate_tryon_image

English / 原文

The curated library of ADK recipes powering Google Cloud's Agents CLI, Agent Garden, and Gemini Enterprise app.

1 (1)

Introduction

A developer building on Google Cloud today can scaffold a long-horizon memory agent from the terminal, install a retail vertical skill into a coding assistant with one line, and deploy a fully-wired production service to Cloud Run, Agent Runtime, Agent Garden, or Gemini Enterprise app — all from the same curated source tree. That tree is google/adk-recipes, the restructured successor to google/adk-samples that now serves Agent Platform from a single source of truth.

ADK recipes are agent-friendly: we've made it easy for your agents to 1) discover relevant recipes for various agent use cases, and 2) install and use them automatically from your favorite harness.

google/adk-recipes splits its content into three top-level folders: core/ for reference patterns curated by the Agents CLI and DevRel teams, plugins/ for installable vertical skills packaged as Plugin Recipes conforming to the Agent Plugins v1.0.0 spec, and contrib/ for end-to-end deployable services across five languages. Every piece has been designed with machine readability as the primary consideration.

What follows is a walkthrough of the repository's shape, three worked examples (one per layer), and a reflection on what the new structure enables.

What's in the repo

Three top-level roots, each anchored on one reader action:

Every recipe ships a validated manifest.yaml, an AGENTS.md that tells the coding assistant opening it what the recipe is and how to use it, and (for contrib/ and plugins/) a Dockerfile plus a runnability test. CI enforces the standards on every PR, and a suite of coding-assistant skills in the repo (prepare-python-recipe, generate-manifest, github-pr-review, and others) does most of the preparation, so your agent can scaffold, validate, and submit a recipe end-to-end.

Built for coding assistants, not just developers

Every AGENTS.md, every manifest.yaml, every SKILL.md is written primarily for the AI coding assistant that will open the repo on your behalf; README.md files are what humans still read. The handbook glossary captures the dual framing: "Recipe — a runnable agent example (or importable agent module) under _core/_, _contrib/_, or _plugins/_, consumed by ADK developers and coding agents alike."

What it powers across the Agent Platform

adk-recipes serves as the single source of truth for ADK content across the three Agent Platform surfaces that consume it. Each reads the repository through its own protocol.

Agents CLI reads core/. When a developer runs uvx --from google-agents-cli agents-cli create my-agent, Agents CLI can scaffold on demand a core/ recipe. The CLI, launched earlier this year at Google Cloud Next, exposes the full scaffold → deploy → evaluate → publish lifecycle; the base content it serves comes from our recipes. Horizon, the reference harness we examine below, is an example pattern Agents CLI treats as a production template.

Agent Garden features a curated selection. The developer-facing path into the repository is a pull request to contrib/: a recipe lands in GitHub, becomes part of the public ADK ecosystem, and from that moment is discoverable by other developers and by coding assistants reading the repository. Appearing in the Agent Garden gallery is a separate editorial decision made by the Agent Garden team, which curates a subset of recipes and promotes them to the public catalog on their own cadence. Once an agent is in the gallery, any developer in a Google Cloud project gets a one-click install.

Beyond these primary surfaces, Google Cloud's own infrastructure components appear as building blocks inside the recipes themselves. Horizon uses Agent Platform Sandboxes for per-user sandboxing, Memory Bank for durable memory, and Agent Platform Sessions for session state. The retail product-search Plugin Recipe uses Vector Search 2.0 on Gemini Enterprise Agent Platform paired with BigQuery. The retail virtual-tryon Plugin Recipe uses Gemini image models for still composites and Veo 3.1 Reference-to-Video for animated outputs. The recipes do not just live alongside Agent Platform; they document it in use.

For developers working with coding assistants outside Google Cloud's tooling (Claude Code, Antigravity, Cursor, Windsurf, Zed, and others), Plugin Recipes additionally install through the open npx skills CLI maintained by vercel-labs.

Horizon: a reference pattern for core/

Building an agent that can handle a single conversation is a well-understood problem. Building one that holds its own across days of interaction, remembering what the user did yesterday and planning tasks for tomorrow, is a materially different undertaking. The hard parts of such a long-horizon system are the same regardless of what the agent is being built to do: cross-session memory, per-user sandboxing of tool execution, secrets management, guardrails against runaway behaviour, and the orchestration primitives that make multi-step tasks resumable. Horizon, which lives at core/python/long-horizon-harness, is the reference harness we built to collect these primitives in one place.

The shortest path from a fresh clone to a running Horizon instance:

uvx google-agents-cli setup
gcloud auth application-default login
gcloud config set project YOUR_PROJECT_ID
gcloud services enable aiplatform.googleapis.com

git clone --depth 1 --filter=blob:none --sparse https://github.com/google/adk-recipes.git
cd adk-recipes
git sparse-checkout set core/python/long-horizon-harness
cd core/python/long-horizon-harness

# Default: LHA_ENVIRONMENT_BACKEND=local, in-memory sessions, no cloud deploys needed
make dev-local

Plain text

make deploy rolls the backend to Cloud Run through Terraform; make destroy tears it back down. Horizon's evaluation suite lives in tests/eval/evalsets/ as eighteen named behavioural rubrics covering memory recall, injection-based exfiltration attempts, guardrail halting under adversarial input, tool-selection discipline, and a journey-level plot-artifact evaluation. The rubrics are executed with uv run pytest tests/eval.

A first chat turn against the running backend confirms the memory layer is wired correctly:

Horizon is the harness we give coding assistants to study before building something harder. When a developer asks their assistant to build an agent that must run across days of interaction, the right next step is uvx google-agents-cli create with Horizon as the scaffold, and the rest of the harness falls into place.

The retail Plugin Recipe

Horizon encodes a reference pattern. It does not encode a vertical. For that, the second layer of the repository holds Plugin Recipes, each addressing a specific industry domain. The first vertical fully covered in this launch is retail, available under plugins/retail/.

The Plugin Recipe format sits on top of the Agent Plugins v1.0.0 specification published at agent-plugins.org, an open standard for packaging installable AI skills across coding assistants. The specification defines a plugin as a bundle of one or more skills with a top-level plugin.json manifest declaring name, version, license, and ownership. Each skill is a self-contained folder with a SKILL.md conversational installer, a README.md, an EVAL.yaml of quality gates, and the scripts and assets the skill needs to do its work. The retail plugin's layout is:

plugins/retail/
├── plugin.json
└── skills/
    ├── product-search/
    │   ├── SKILL.md       # Q-MODE conversational installer
    │   ├── README.md
    │   ├── EVAL.yaml      # LLM-as-judge rubrics + deterministic assertions
    │   ├── scripts/
    │   ├── references/
    │   └── assets/
    └── virtual-tryon/
        └── ...

Plain text

Two skills ship in this plugin today. The first, retail-product-search, builds an ADK agent with a vector-search retrieval tool backed by Vector Search 2.0 on the Gemini Enterprise Agent Platform and a BigQuery catalog. The skill handles the entire pipeline: ingesting a CSV or JSON catalog into BigQuery, generating multimodal and text embeddings with Vertex AI Embeddings, building the Vector Search collection, scaffolding the ADK agent with a retrieve_docs tool, and deploying to Cloud Run. The agent is deliberately single-agent: one root_agent with one retrieval tool and no coordinator layer. The semantic complexity sits in the retrieval pipeline and the evaluator rubric, not in agent-to-agent communication; adding orchestration layers would obscure the pattern rather than clarify it.

The second skill, retail-virtual-tryon, generates a photorealistic composite of a model wearing or holding a product, with an optional eight-second studio catwalk video on top. It uses gemini-2.5-flash-image by default, falling back to gemini-2.5-pro-image when editorial quality matters more than latency. For video it uses veo-3.1-generate-001 in Reference-to-Video mode, conditioning the generated motion on the still produced by the image pipeline. The skill ships a pre-flight product-cutout classifier and configurable safety levels, operational details that become obvious after the third real production deployment.

Both skills install into any coding assistant that reads skills with a single command:

# From Antigravity, Claude Code, Codex, Cursor …
npx skills add google/adk-recipes --skill retail-product-search --full-depth
npx skills add google/adk-recipes --skill retail-virtual-tryon --full-depth

Plain text

The --full-depth flag instructs the CLI to walk past its default top-level lookup and discover the nested plugins/retail/skills/ structure. The install lands in ~/.agents/skills/<skill-name>/ and is symlinked into every detected coding assistant on the local machine:

$ npx skills add google/adk-recipes --skill retail-product-search --full-depth -g

●  claude-code_2-1-288_agent  Agent detected — installing non-interactively
◇  Source: https://github.com/google/adk-recipes.git
◇  Repository cloned
◇  Found 11 skills

●  Installing to: Antigravity CLI, Augment, IBM Bob, Claude Code, OpenClaw,
   CodeBuddy, Continue, Crush, Droid, Goose, Junie, iFlow CLI,
   Kilo Code, Kiro CLI, Kode, MCPJam, Mux, OpenHands, Qoder, Qwen Code,
   Roo Code, Trae, Windsurf, Zencoder, …

◇  Installation Summary ──────────────────────────────────────────────────╮
│  ~/.agents/skills/retail-product-search                                │
│    universal: Antigravity CLI, Droid, Kilo Code, Amp +15   │
│    symlink → Augment, IBM Bob, Claude Code, OpenClaw, CodeBuddy +25    │
├────────────────────────────────────────────────────────────────────────╯

◇  Installed 1 skill
└  Done!  Review skills before use; they run with full agent permissions.

Plain text

The skill ecosystem is designed to compose. The retail-product-search SKILL.md instructs the host coding assistant to pull two companion skills from google/skills if they are not already installed, keeping cross-cutting concerns like BigQuery basics and Gemini API usage in one place and reusable by multiple vertical plugins.

Once installed, the coding assistant reads SKILL.md and initiates a Q-MODE interview. For retail-product-search, Quick Start is two questions (GCP project ID and the path to product data, with sensible defaults for both); Full Setup adds two more covering product-fields level and GCP region. By the end of the interview the skill has written a ./design-spec.md reflecting the project's actual shape and executed scripts/setup.py to land the catalog in BigQuery, generate the embeddings, build the Vector Search collection, and run EVAL.yaml against the result. If the rubric and assertion checks fall below the 80 percent passing target, the skill halts and surfaces the specific failures.

An end-to-end setup run on the bundled five-product demo catalog produces:

$ .venv/bin/python scripts/setup.py --config ./design-spec.md

INFO:__main__: SETUP PIPELINE (driven by design-spec.md)
INFO:__main__:   Project:      testproject-425813
INFO:__main__:   Region:       us-central1
INFO:__main__:   Validating sample data... Validated 5 records.
INFO:__main__:   Ingesting into BigQuery...
INFO:ingest_bigquery: Creating dataset testproject-425813.retail_skill_products
INFO:ingest_bigquery: Loaded 5 valid products
INFO:__main__:   Creating Vector Search collection...
INFO:ingest_vertex_search: Collection created successfully
INFO:ingest_vertex_search: Ingestion complete: 5 created, 0 skipped, 0 errors
INFO:__main__: SETUP COMPLETE

Plain text

A live retrieval against the collection the skill has just provisioned returns:

>>> from app.agent import retrieve_docs
>>> retrieve_docs("wireless headphones under 200")

Plain text

Product 1: Wireless Headphones  $199.99  by Sony      (Audio)       rated 4.5/5
          Premium noise-cancelling over-ear headphones with 30-hour battery
Product 2: Laptop Stand         $49.99   by Generic   (Accessories) rated 4.2/5
Product 3: Mechanical Keyboard  $129.99  by Keychron  (Peripherals) rated 4.6/5
Product 4: USB-C Cable          $19.99   by Anker     (Cables)      rated 4.7/5
Product 5: Monitor Light Bar    $59.99   by BenQ      (Lighting)    rated 4.4/5

Plain text

The virtual-tryon skill is faster to demonstrate interactively. A direct call to generate_tryon_image with a user portrait and a product image produces the photorealistic composite shown at the top of this section in roughly ten seconds. The same inputs piped through generate_tryon_video and Veo Reference-to-Video turn that still into an eight-second studio catwalk animation of the composite in motion.

The pipeline is category-agnostic. Swapping the product image for a pair of sunglasses, with product_category='eyewear', invokes the same generate_tryon_image call and produces a composite in the correct category without any further configuration:

Retail is the first vertical fully covered in this format. Additional verticals will land as their own folders under plugins/, following the same anatomy and the same Agent Plugins specification, so developers can expect a consistent install experience across industries.

In contrib/: a retail agent built on the plugin

The contrib/ layer is where ADK recipes become end-to-end deployable services. Twelve Python agents live there today, spanning the kinds of applications ADK is typically used to build in practice: finance (financial advisor, small-business loan processor), evaluation (LLM auditor), document and knowledge pipelines (high-volume document analyzer, multiformat hybrid RAG), content and brand (brand-aligned presentations, brand-search optimization, on-brand genmedia), retail (product search, virtual try-on), and framework examples (agent-skills tutorial, staged UI widgets). Java, Go, TypeScript, and Kotlin each carry smaller sets. Every entry in contrib/ is a worked example of how a core/ pattern or a plugins/ skill becomes a running service.

To make the relationship between a plugin and its deployable counterpart concrete, take contrib/python/retail-product-search as the example. The retail plugin from the previous section walked a developer through a conversational install that provisioned the Vector Search collection, the BigQuery catalog, and the embeddings. The contrib agent is the deployable counterpart: a long-running service that reads from that collection and answers natural-language shopping queries over it. The plugin owns the one-shot setup; the contrib agent owns the service shape. Both are maintained by the same team to stay synchronised, and the agent's README directs new users to run the plugin's setup first:

make -C plugins/retail/skills/product-search setup PROJECT_ID=your-project

Plain text

Once the collection (retail-skill-products-collection) is populated, the agent is cloned out of contrib/python/retail-product-search, pointed at a GCP project, and surfaced on one of five deployment personas controlled by boolean flags in .env.

Once the deployment is live, the agent exposes a hosted shopping-assistant endpoint. The same retrieve_docs tool we called directly from Python now sits behind a chat interface, reachable through the deployed Reasoning Engine or, during development, through the ADK Web UI. The exact same agent code answering the exact same shopping query, run locally for inspection:

The agent graph on the left of the UI confirms the single-agent architecture (product_search_agent → retrieve_docs). The right panel traces each tool invocation. The response grounds in a real catalog row from Vector Search: "Sony Wireless Headphones · Price: $199.99 · Brand: Sony · Rating: 4.5/5 (50 in stock) · Premium noise-cancelling over-ear headphones featuring an impressive 30-hour battery life." No products are hallucinated; the Vector Search collection on top of BigQuery is the source of truth.

That is what the retail plugin gives a team. The plugin encodes the data-pipeline setup once, through a conversational install any coding assistant can execute. The contrib agent is the running service, deployable in five shapes, that any organisation can take as a starting point and swap in its own catalog. The virtual-tryon counterpart in contrib/python/retail-virtual-tryon follows the same pattern: a smaller root agent that orchestrates try_on_product_image and try_on_product_video tools, deployable in the same five shapes, built on the virtual-tryon plugin's one-shot setup.

Why this matters

A reference harness without a vertical is a toy; a vertical skill without a deployable artifact is a slide; a deployable agent without a reference pattern is a prototype no one can repeat. Shipping all three in one repository, under a shared manifest schema and governance pipeline, lets a developer or a coding assistant walk the stack in either direction, with every Agent Platform surface reading from the same source of truth.

The practical result is a lower barrier from "I need an agent that does X" to a running production service: a coding assistant can scaffold a Horizon-shaped agent, install a vertical Plugin Recipe, and reach the deployment transcripts in contrib/ without translating between repositories or reconciling manifest formats. For teams building vertical solutions, Plugin Recipes package domain expertise once and distribute it to every coding assistant on the market with the same install flow and quality gates.

Get started

# Install Agents CLI
uvx --from google-agents-cli agents-cli setup

# Scaffold a Horizon-shaped agent
uvx --from google-agents-cli agents-cli create my-agent

# Install a retail skill into your coding assistant
npx skills add google/adk-recipes --skill retail-product-search --full-depth

# Launch the deployable retail agent as a managed artifact
uvx --from google-agents-cli agents-cli create retail-product-search

Plain text

Not an officially supported Google product. Recipes are for demonstration and as starting points, not production use.