agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK.
Skill by googleOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/google-agent-platform-rag-engine-management
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, ml, writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-platform-rag-engine-management
What's inside
- Skill name
agent-platform-rag-engine-management- Description
- Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google Workspace RAG, or other RAG products like gRAG.
- License
- Apache-2.0
- Metadata
- version: 1.0.1 · category: AiAndMachineLearning
- Instructions
- 254 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Agent Platform RAG Engine Management
This skill provides instructions on how to interact with Agent Platform RAG
Engine using the Agent Platform Python SDK. You MUST use the `vertexai` Python
SDK to perform RAG Engine operations, rather than raw REST calls or MCP tools,
because this code is intended to be run by external clients.
## Safety & Confirmation Tiers (CRITICAL)
Before executing any commands or scripts on behalf of the user, you must adhere
to the following safety tiers based on the action requested:
1. **Tier R: Read-only (`list_corpora`, `list_files`, `get_corpus`,
`retrieval_query`)**
* No confirmation needed. Execute immediately to gather information or
retrieve grounded contexts.
2. **Tier RC: Read-only but consumes Compute Resources
(`client.models.generate_content`)**
* Requires **interactive confirmation** with 'Yes'/'No' options before
executing grounded content generation. The confirmation prompt MUST
clearly explain the proposed generation execution and its key parameters
(e.g., target corpus ID, query text, target model). Natural-language
paraphrases without specifying exact parameters are insufficient, as
explicit parameter listing is required to ensure unambiguous user
approval of the specific resource and configuration.
* **Same-turn restriction**: Do not execute the generation code in the
same turn as presenting the confirmation prompt. Stop and wait for the
user's reply; only execute after explicit 'Yes' / approval.
* **Gold Standard Example**:
> I will perform grounded content generation with the following
> parameters. Please confirm this information before I proceed:
>
> * **Target Corpus ID**: `projects/123/locations/us/ragCorpora/abc`
> * **Target Model**: `gemini-2.5-pro`
> * **Query Text**: "What are the company policies on remote work?"
>
> Do you confirm? [Yes/No]
## Phase 0: Environment Setup
**CRITICAL**: Before running any of the Python snippets below, you must ensure
the environment is correctly initialized by following these steps:
1. **Google Cloud Authentication**: Authenticate with your Google Cloud
credentials and configure active Application Default Credentials (ADC) for
Agent Platform access:
```bash
gcloud auth login
gcloud auth application-default login
```
2. **Python Dependencies**: This skill needs `google-cloud-aiplatform` and
`google-genai`, which the sandbox already provides. Do **not** create a
virtual environment — it starts empty and hides packages the environment
already provides, forcing a redundant install. Do not spend a separate
command checking for them: run the snippet directly, and only if it fails
with `ModuleNotFoundError`, install in the same command as the retry:
```bash
pip install -q google-cloud-aiplatform google-genai && python3 - <<'PY'
...
PY
```
3. **Execution**: Run each snippet as a quoted heredoc, `python3 - <<'PY'` ...
`PY`, rather than `python3 -c '...'`, whose nested quotes break easily.
There is no environment to activate first. When one step needs several of
the snippets below (for example, list the corpora and then the files in
each), combine them into one script and one command. The
`vertexai.preview.rag` deprecation warning printed on stderr is expected;
keep using these snippets rather than switching clients because of it.
## Workflow Decision Tree
1. **Information Gathering**: Has the user provided the Project ID, Region, and
Corpus ID?
* **No** -> Proceed to [1. Listing Corpora and Files] to discover the
necessary Resource Names and IDs. Only ask the user if discovery fails.
* **Yes** -> Proceed.
2. **Task Type**: What does the user want to do?
* **List Corpora and Files** -> Proceed to [1. Listing Corpora and Files].
* **Inspect a Corpus** -> Proceed to [2. Getting / Inspecting a RAG Engine
Corpus].
* **Search for Contexts** -> Proceed to [3. Retrieving Contexts].
* **Answer questions using RAG Engine** -> Proceed to [4. Answering the
User with Retrieved Context].
> [!TIP]
>
> **Placeholder Parameter Replacement:** The Python scripts below use bracketed
> string placeholders (like `"{project_id}"`, `"{region}"`, and
> `"{corpus_id}"`). You **MUST** dynamically replace these placeholders with the
> actual Project ID, Region, and Corpus ID values provided in the user's prompt
> (or active context) before generating, providing, or executing the scripts.
## 1. Listing Corpora and Files (Discovery)
If you do not know the Resource Name of the corpus or file, you MUST list them
first to discover them. The SDK handles pagination automatically when converted
to a list, but you can also use manual pagination for large sets.
### 1.1 Listing and Discovering Corpora
```python
import vertexai
from vertexai.preview import rag
vertexai.init(project="{project_id}", location="{region}")
# Approach A: List ALL (Automatic Pagination)
# The SDK's Pager iterates through all pages for you.
all_corpora = list(rag.list_corpora())
print(f"Found {len(all_corpora)} corpora in total.")From google/skills, Apache-2.0.
More from google/skills
- 0.865score
google-ads-api-account-diagnostics
google-ads-api-teamOfficial
Diagnoses Google Ads account performance issues such as conversion loss (value or volume), low lead flow/volume, and lost impression share (opportunities) due…
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-triage
Google LLCOfficial
Expert guidance for security alert triage in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-detection-engineering
Google LLCOfficial
Author, validate, test, and deploy YARA-L 2.0 detection rules and evaluate end-to-end detection coverage gaps in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-hunt
Google LLCOfficial
Expert guidance for proactive threat hunting in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-cases
Google LLCOfficial
Manage Google Security Operations (SecOps) SOAR cases throughout their lifecycle.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-investigate
Google LLCOfficial
Expert guidance for deep security incident and entity investigations in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.824score
google-ads-api-quickstart
google-ads-api-teamOfficial
Guides developers through Google Ads API quickstart: credential setup, choosing from 6 client libraries/REST, configuring environments, and running a…
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.819score
google-ads-api-mcp-setup
google-ads-api-teamOfficial
Guides developers through downloading, configuring, and installing the official open-source Google Ads MCP Server.
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.815score
ima-dai-sdk
Google LLCOfficial
Integrates the Google Interactive Media Ads (IMA) Dynamic Ad Insertion (DAI) SDK into websites, web apps, mobile apps, or TV apps.
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.815score
ima-sdk-client-side
Google LLCOfficial
Supports Interactive Media Ads (IMA) SDK.
SkillBFreshness: B★ 21.5KClaude Code +9 - 0.699score
gcloud
googleOfficial
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-deploy
googleOfficial
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up…
SkillAFreshness: A★ 21.5KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 21,542
- Forks
- 1,821
- Open issues
- 21
- Last commit (this folder)
- Oct 8, 2026 (20 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.1
- License
- Apache-2.0
- Repository
- github.com/google/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from google
- 0.699score
retrieving-developer-knowledge
googleOfficial
Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI/Gemini, Android, Chrome, Web, Flutter, Go, Firebase, and…
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
data-manager-api-setup
googleOfficial
Guides developers through client library installation and authentication setup steps for the Data Manager API.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-migrate-from-ai-studio
googleOfficial
Guides agents and users through migrating from Gemini API in Google AI Studio to Gemini Enterprise Agent Platform (formerly Vertex AI).
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
gcloud
googleOfficial
Provides safety-critical validation, guardrails, and data reduction for gcloud CLI operations across Google Cloud Platform (GCP) services and infrastructure.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
google-cloud-recipe-onboarding
googleOfficial
Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.699score
agent-platform-deploy
googleOfficial
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up…
SkillAFreshness: A★ 21.5KClaude Code +9
Cite this page
agent-platform-rag-engine-management skill. Agent Mart. https://agentmart.dev/skills/google-agent-platform-rag-engine-management (last updated 2026-10-24)