adk-samples / rag-agent-search
AGENTS.md11k starsChanged 45 days agoApache-2.0View on GitHub
A clone-and-study RAG agent grounded on Agent Platform Search (Discovery Engine). Drop documents in a GCS bucket and a managed Data Connector ingests, chunks, embeds, and indexes them — the agent answers over that data store with almost no ingestion code. The interesting part is not the agent (a thin wrapper around one search tool); it's the Terraform + data-connector plumbing. - The user wants a RAG agent without building/maintaining an ingestion pipeline (the managed connector handles chunking + embeddings).…
- Reads credentials
1 other project uses a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- google/adk-recipesword for word, first seen Oct 13, 2026
Who's talking about google/adk-samples
- @stephanjanssen.be“Google just open sourced a Python Agent Development Kit @ github.com/google/adk-p... Native Streaming and …”Bluesky · Apr 9, 2025 · 12 likes
- google/adk-python“stream_query and HTTP Streaming to Vertex AI Agent Return Empty/Exhausted Responses (Works via ADK Web)”GitHub · Jul 8, 2025 · 5 reactions
- google/adk-recipes“Support running agents fully locally without Vertex AI (offline mode)”GitHub · Apr 14, 2025 · 4 reactions
- google/adk-recipes“[BUG]: Deployment of Data Science agent to Agent Engine fails ”GitHub · Oct 1, 2025 · 3 reactions
- A Hacker News story“CaMeL-Powered Secure Agent Demo with ADK”Hacker News · Aug 9, 2025 · 3 points
The biggest 5 of 32 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 32
Talked about on GitHub, Bluesky, Hacker News and Stack Overflow (32 times).
On GitHub · 23
- Jul 8, 2025stream_query and HTTP Streaming to Vertex AI Agent Return Empty/Exhausted Responses (Works via ADK Web) — google/adk-python5 reactions
- Apr 14, 2025Support running agents fully locally without Vertex AI (offline mode) — google/adk-recipes4 reactions · 7 comments
- Oct 1, 2025[BUG]: Deployment of Data Science agent to Agent Engine fails — google/adk-recipes3 reactions · 1 comment
- Oct 28, 2026docs: fix 5 broken internal anchor links and 1 dead external link — google-gemini/gemini-cli1 reaction · 4 comments
- Oct 20, 2026Update adk-samples references and python/agents discovery paths for google/adk-recipes restructure — google/agents-cli1 reaction · 2 comments
18 more on GitHub
- Oct 12, 2026list: scan the template dir we cloned, not the clone root — GoogleCloudPlatform/agent-starter-pack1 reaction
- Feb 12, 2026interrupted sometimes didn't work — google/adk-python1 reaction · 10 comments
- Jan 8, 2026Implement 5 ADK agent projects that can be easily run by newbies — addyosmani/adk-product-engineers1 reaction
- Nov 20, 2025[BUG]: deep-search/gemini-fullstack: Wrong prompt to access session state — google/adk-recipes1 reaction
- Jun 21, 2025unable to import StdioServerParameters — google/adk-recipes1 reaction · 2 comments
- Jun 17, 2025VertexAiRagRetrieval needs llama-index package — google/adk-recipes1 reaction · 3 comments
- Jun 5, 2025Bug: display_name in file uploads causes error with Google.GenAI backend (non-Vertex) — google/adk-python1 reaction · 6 comments
- May 18, 2025Missing Image — google/adk-recipes1 reaction
- Apr 11, 2025Duplicate key name — google/adk-recipes1 reaction · 1 comment
- Oct 18, 2026Fix(audit,#17387): Day4 Track2 tranche 1 -- Lab8/Lab9 reformulations honnetes, cures accents — jsboige/CoursIA0 reactions · 14 comments
- Sep 17, 2026Rename sample references to recipe across repository — google/adk-recipes0 reactions
- Sep 12, 2026docs(deep-search): fix cloud deployment instructions and scaffold path (#2575) — google/adk-recipes0 reactions · 4 comments
- Sep 12, 2026docs: fix 404 link to relocated Deep Search sample — google/adk-docs0 reactions · 1 comment
- Sep 9, 2026Add repo skills instructions and documentation links to AI issue response workflow — google/adk-recipes0 reactions
- Jul 24, 2026Fix broken adk-samples links from deleted sample agents and notebooks — google/adk-docs0 reactions · 1 comment
- Jun 12, 2026ci: run the spam-detection bot via the adk-samples reusable workflow — google/adk-go0 reactions · 1 comment
- May 27, 2026Add Deep Search Agent project to portfolio showcase — asafsilner/silner-showcase-prime0 reactions
- Feb 12, 2026fix: path typo in story teller example — google/adk-recipes0 reactions · 3 comments
On Bluesky · 4
- Apr 9, 2025Google just open sourced a Python Agent Development Kit @ github.com/google/adk-p... Native Streaming and #MCP support out of the box 👀… — @stephanjanssen.be12 likes and reposts
- Jul 12, 2026Exploring the ADK Samples repo from Google—it’s like a guidebook for building intelligent agents. Seeing multi-language support reflects… — @iam.slys.dev1 likes and repost
- Dec 9, 2025📦 google / adk-samples ⭐ 6,900 (+67) 🗒 Python A collection of sample agents built with Agent Development Kit (ADK) — @github-trending.bsky.social1 likes and repost
- May 20, 2025Explore practical use-cases & build! 🧪 Hands-on Patent Search Codelab: codelabs.developers.google.com/patent-searc... 📚 Check out sample… — @kweinmeister.bsky.social0 likes and reposts · 1 reply
On Hacker News · 3
- Aug 9, 2025CaMeL-Powered Secure Agent Demo with ADK3 points · 1 comment
- Jun 13, 2025A collection of sample agents built with Agent Development (ADK)2 points
- Aug 13, 2025CaMeL agent to protect against indirect prompt injection1 point · 1 comment
On Stack Overflow · 2
- Aug 30, 2025Google ADK SequentialAgent sub_agents not waiting for user input1 vote
- Aug 29, 2025Issue with deploying ADK Agent on Google Agent Engine0 votes
Other versions1 project uses a version of this.
Word for word · 1
- google/adk-recipes★ 11k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- contrib/kotlin/llm-auditor/AGENTS.mdAGENTS.md
- core/python/adk-voice-agent/AGENTS.mdAGENTS.md
- core/python/adk-voice-agent/sandbox/home/AGENTS.mdAGENTS.md
- core/python/adk-voice-agent/tests/eval/fixtures/alex/repos/portland-trip/AGENTS.mdAGENTS.md
- core/python/ambient-expense-agent/AGENTS.mdAGENTS.md
- core/python/ambient-quality-agent/AGENTS.mdAGENTS.md
- core/python/cross-session-memory/AGENTS.mdAGENTS.md
- core/python/deep-search/AGENTS.mdAGENTS.md
- core/python/genmedia-for-commerce/AGENTS.mdAGENTS.md
- core/python/long-horizon-harness/AGENTS.mdAGENTS.md
- core/python/oauth-user-consent-flow/AGENTS.mdAGENTS.md
- core/python/rag-vector-search/AGENTS.mdAGENTS.md
- core/python/safety-plugins/AGENTS.mdAGENTS.md
- core/python/adk-voice-agent/sandbox/home/CLAUDE.mdCLAUDE.md
- core/python/genmedia-for-commerce/CLAUDE.mdCLAUDE.md
- align-recipe-pyprojectSkill
- extract-python-environment-variablesSkill
- generate-manifestSkill
- generate-python-runnability-testSkill
- github-pr-reviewSkill
- make-python-recipe-deployableSkill
- prepare-python-recipeSkill
- repo-oracleSkill
- scaffold-python-recipeSkill
- blog-writerSkill
- content-research-writerSkill
- approvalsSkill
- coding-workflowSkill
- connected-apps-mcpSkill
- deliverablesSkill
- filesystemSkill
- recommendationsSkill
- agents-cli-aquaSkill
- custom-investigationSkill
- rcaSkill
- bootstrap-google-toolsSkill
- find-skillsSkill
- google-workspaceSkill
- policySkill
- routinesSkill
- retail-product-searchSkill
- retail-virtual-tryonSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Minimum Score: not enforced — custom_response_quality graded 1–5 (aim ≥ 4)
- Very specific: line 114
The data store ID and collection are auto-generated: After make setup-infra, copy the data_store_id and data_store_collection Terraform …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RAG Agent — Agent Platform Search
Intent
A clone-and-study RAG agent grounded on Agent Platform Search (Discovery Engine). Drop documents in a GCS bucket and a managed Data Connector ingests, chunks, embeds, and indexes them — the agent answers over that data store with almost no ingestion code. The interesting part is not the agent (a thin wrapper around one search tool); it's the Terraform + data-connector plumbing.
When To Use
- The user wants a RAG agent without building/maintaining an ingestion pipeline (the managed connector handles chunking + embeddings).
- Source documents are unstructured files (PDF/HTML/TXT) in Cloud Storage.
- The user wants a Discovery Engine grounding example with reproducible Terraform.
Eval
- Scenarios Path:
tests/eval/datasets/(config:tests/eval/eval_config.yaml) - Minimum Score: not enforced —
custom_response_qualitygraded 1–5 (aim ≥ 4)
End-to-end flow
docs uploaded to GCS bucket
-> GCS Data Connector (setUpDataConnectorV2, data_schema="content")
-> auto-created Discovery Engine data store (managed ingest + embeddings)
-> agent queries it at runtime via VertexAiSearchTool(data_store_id=data_store_path)You never write chunking/embedding code: the Data Connector ingests and indexes
unstructured files for you. The price is a fiddly control plane (auto-generated
IDs, collection placement, LRO polling) — which is exactly what the Terraform
and the scripts/ wrappers exist to tame.
Most interesting files to study (in order)
Terraform + data connector (the bulk of the logic)
infra/terraform/agent_platform_search.tf— the heart of the recipe. Shows the whole pattern: agoogle_storage_bucketfor docs, anull_resource.data_connectorwhose create/destroylocal-execprovisioners shell out to Python scripts, adata "external" "data_store_id"source that reads back the auto-generated data store, and agoogle_discovery_engine_search_enginebuilt on top. Note how the search engine'scollection_idanddata_store_idscome from thedata.externalresult, not hard-coded values.infra/terraform/scripts/setup_data_connector.py— what the create provisioner runs. Idempotent (checksgetDataConnectorfirst), then callssetUpDataConnectorV2with acollectionId, an entity nameddocuments, and schema-specific params (content→CONTENT_REQUIRED). Then polls the long-running operation. This is the canonical "create a managed GCS→Search ingestion connector via the REST API" recipe.infra/terraform/scripts/get_data_store_id.py— solves the auto-generated ID problem. The connector creates a data store whose ID and collection you don't choose. This script reads the connector and parses the data store's full resource name to return BOTHdata_store_idandcollection_idas JSON, which Terraform consumes through thedata.externaldata source. Study this together with file #1 to see the Terraform↔script handshake.infra/terraform/datastore_outputs.tf— the bridge between infra and the running agent. Exposesdata_store_id,data_store_collection, and a ready-to-pastedata_store_path. You copy these into.envso the agent targets the right (auto-generated) data store.infra/terraform/scripts/delete_data_connector.py— the destroy-time provisioner. Deletes the whole collection (and its data store) soterraform destroyis clean. Good example of wiring teardown into anull_resource'swhen = destroyprovisioner viaself.triggers.infra/terraform/scripts/start_connector_run.py— a standalone helper (not wired into Terraform) that triggers an immediateImportDocumentsrun (reconciliationMode: FULL) and prints a console URL. Use it to force a sync instead of waiting for the periodic refresh.
Terraform config & providers
infra/terraform/apis.tf&providers.tf— enables the required services (notediscoveryengine.googleapis.comand thevertex_saservice identity) and declares providers. Note thebilling_overridealiased provider withuser_project_override = true, used by the search engine for Discovery Engine quota attribution.infra/terraform/variables.tf&agent_platform_search_variables.tf&vars/env.tfvars— the knobs:project_id,project_name(drives resource naming),region,data_store_region(defaultglobal),data_connector_refresh_interval, anddata_connector_data_schema.
Agent (thin layer — read last)
app/agent.py— how the runtime consumes the infra. Loads.env, buildsdata_store_pathfromDATA_STORE_REGION/DATA_STORE_COLLECTION/DATA_STORE_IDenv vars and hands it tocreate_search_tool. The agent itself is a singleAgentwith one tool.app/retrievers.py—create_search_tool()returns a realVertexAiSearchToolbound to the data store, or a mock function whenINTEGRATION_TEST=TRUE. The seam that lets tests run without live Search.
Data handling
- Ingestion is fully managed. The GCS Data Connector
(
data_schema = "content") ingests unstructured files (PDF, HTML, TXT, …) — one document per file, IDs derived from the file URI — and Discovery Engine handles chunking/embeddings/indexing. No pipeline code in this recipe. - Docs bucket:
${project_id}-${project_name}-docs. Drop files here; the connector syncs them on itsdata_connector_refresh_interval(default daily,86400s), or runstart_connector_run.pyto sync immediately. - Other schemas are supported by
setup_data_connector.py(document/NDJSON,csv,custom) via the--data-schemaflag /data_connector_data_schemavariable. - Sample docs:
sample_data/ships a small fictional knowledge base;make upload-sample-data && make ingestloads it so you can query right away.
Gotchas / things to know
- The data store ID and collection are auto-generated. After
make setup-infra, copy thedata_store_idanddata_store_collectionTerraform outputs into.env— the defaults in.env.example/agent.pymay not match what the connector created. - The data store lives in
<project_name>-collection, notdefault_collection. That's whyget_data_store_id.pyresolves the real collection from the API instead of assuming a value. make setup-infrashells out touv runscripts from Terraform provisioners, souvmust be installed on the machine runningterraform apply.- Tests need credentials.
tests/integration/test_agent.pymakes a live Gemini call and is skipped without ADC; the retriever is mocked viaINTEGRATION_TEST=TRUE(set automatically bymake test). - Provisioner runs are not auto-retried by Terraform — connector setup polls
its own LRO; re-running
applyis safe because the script is idempotent.
Where to run things
Makefile targets: make setup-infra (provision), make install,
make playground (local ADK web UI), make test, make lint.
Eval lives under tests/eval/ (eval_config.yaml + datasets/).
Reuse (copy as-is)
infra/terraform/is self-contained (it provisions the datastore only) — copy the whole directory, includingscripts/, into another project. Setproject_idinvars/env.tfvars(and optionallyproject_name, which drives every resource name). The only host requirement isuvon the machine runningterraform apply(provisioners call the PEP-723 scripts viauv run).- There is no code coupling to
app/: the agent reaches the datastore purely through theDATA_STORE_REGION/DATA_STORE_COLLECTION/DATA_STORE_IDenv vars, which you populate from the Terraform outputs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

