adk-rag-agent
Build RAG (Retrieval-Augmented Generation) agents with Google ADK and Vertex AI RAG Engine. Use when implementing document Q&A, knowledge base search, or citation-backed responses. Covers VertexAiRagRetrieval tool, corpus setup, and citation formatting.
npx skills add majiayu000/claude-skill-registry --skill adk-rag-agent-cuba6112-skillfactory --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Google ADK RAG Agent Build agents that answer questions from document corpora using Vertex AI RAG Engine. ## Requirements - Vertex AI backend (not Gemini API) - Google Cloud project with Vertex AI enabled - RAG corpus created in Vertex AI ## Environment Variables ```bash GOOGLE_GENAI_USE_VERTEXAI=1 GOOGLE_CLOUD_PROJECT=your-project-id GOOGLE_CLOUD_LOCATION=us-central1 RAG_CORPUS=projects/{PROJECT_ID}/locations/{LOCATION}/ragCorpora/{CORPUS_ID} ``` ## Core Implementation ```python from google.adk import Agent from google.adk.tools import VertexAiRagRetrieval # Configure RAG retrieval tool rag_tool = VertexAiRagRetrieval( name="retrieve_docs", description="Retrieve relevant documentation for the question", rag_corpus=os.environ["RAG_CORPUS"], similarity_top_k=10, vector_distance_threshold=0.6, ) # Create agent with RAG tool agent = Agent( name="rag_agent", model="gemini-2.0-flash-001", instruction=INSTRUCTION_PROMPT, tools=[rag_tool], ) ``` ## Instruction Prompt Pattern ```python INSTRUCTION_PROMPT = """ You are an AI assistant with access to a specialized document corpus. RETRIEVAL: - Use retrieve_docs for specific knowledge questions - Skip retrieval for casual conversation - Ask
- Requirements
- Environment Variables
- Core Implementation
- Instruction Prompt Pattern
- Corpus Setup
- Key Parameters
- Citation Best Practices
- References
What does the adk-rag-agent skill do?
Build RAG (Retrieval-Augmented Generation) agents with Google ADK and Vertex AI RAG Engine. Use when implementing document Q&A, knowledge base search, or citation-backed responses. Covers VertexAiRagRetrieval tool, corpus setup, and citation formatting.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill adk-rag-agent-cuba6112-skillfactory --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
