Official agent skill

Agent Platform RAG Engine Management

by google in google/skills

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK.

OfficialApache-2.0Auto-check passedAI & LLM Engineering

Install Agent Platform RAG Engine Management

skills CLI
$ npx skills add google/skills --skill agent-platform-rag-engine-management -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google/skills agent-platform-rag-engine-management --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cloud/agent-platform-rag-engine-management .claude/skills/agent-platform-rag-engine-management && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-platform-rag-engine-management
GitHub stars
21k
Token cost
~2.4k tokens
SKILL.md length
764 words
Files
1
Skills in repo
147
Repo updated
First seen
Licence
Apache-2.0

At a glance

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK.

  • Works in 5 steps: Environment Setup → Listing Corpora and Files (Discovery) → Getting / Inspecting an Agent Platform… → …
  • Listing RAG corpora
  • SKILL.md covers Safety & Confirmation Tiers…, Phase 0: Environment Setup, Workflow Decision Tree and 1. Listing Corpora and Files…, plus 3 more sections
  • Calls python3

What it does

Agent Platform RAG Engine Management is an agent skill from google/skills, published by the product's own GitHub organization. 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.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Retrieval-augmented generation and Cloud office suites. It works with SQL, Google Workspace and Python. The repository describes itself as: Agent Skills for Google products and technologies. The licence is Apache-2.0.

When your agent uses it

  • Listing RAG corpora
  • Inspecting a corpus
  • Retrieving contexts
  • Generating content grounded in a RAG corpus

Example prompts

  • “/agent-platform-rag-engine-management”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Environment Setup
  2. Listing Corpora and Files (Discovery)
  3. Getting / Inspecting an Agent Platform RAG Engine Corpus
  4. Retrieving Contexts
  5. Answering the User with Retrieved Context

What it can do on your machine

Read from SKILL.md and the folder at commit 5120a76. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Platform RAG Engine Management loads about 2.4k tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 764 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google/skills at commit 5120a76, republished under its Apache-2.0 licence (© google). 764 words, ~2,406 tokens.

Download SKILL.mdSave it as .claude/skills/agent-platform-rag-engine-management/SKILL.md (or your agent's skills folder).
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.
metadata.version
1.0.1
metadata.category
AiAndMachineLearning

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.

Show full SKILL.md (322 more words)Show less

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.")
for c in all_corpora:
    print(f"Corpus Name: {c.name} | Display Name: {c.display_name}")

# Approach B: Manual Pagination (for very large projects)
pager = rag.list_corpora(page_size=10)
# Process first page
for c in pager:
    print(f"Corpus: {c.display_name}")

# Get next page if needed
if pager.next_page_token:
    second_page = rag.list_corpora(
        page_size=10, page_token=pager.next_page_token
    )
1.2 Listing and Discovering Files

To understand what files (and types) are in a corpus, list them and inspect the display_name (usually includes the extension).

python
import vertexai
from vertexai.preview import rag

vertexai.init(project="{project_id}", location="{region}")
corpus_name = (
    "projects/{project_id}/locations/{region}/ragCorpora/{corpus_id}"
)

# List files with automatic pagination
files = list(rag.list_files(corpus_name=corpus_name))
print(f"Found {len(files)} files.")

for f in files:
    # High-level SDK RagFile objects usually have name, display_name,
    # description
    print(f"File: {f.display_name} | Resource: {f.name}")
    # Tip: Check extension to understand file type (PDF, TXT, etc.)
    if f.display_name.lower().endswith(".pdf"):
        print("  Type: PDF")
    elif f.display_name.lower().endswith(".txt"):
        print("  Type: Plain Text")

2. Getting / Inspecting an Agent Platform RAG Engine Corpus

To retrieve details about an existing Agent Platform RAG Engine corpus:

python
import vertexai
from vertexai.preview import rag

vertexai.init(project="{project_id}", location="{region}")

# To get details of a specific corpus
corpus_name = (
    "projects/{project_id}/locations/{region}/ragCorpora/{corpus_id}"
)
corpus = rag.get_corpus(name=corpus_name)
print(f"Corpus Name: {corpus.name}")
print(f"Display Name: {corpus.display_name}")

3. Retrieving Contexts

To retrieve relevant contexts from a RAG Engine corpus based on a query. If no contexts come back, that is a valid answer: report it with the corpus and query you used. If a broader search is reasonable, try it in the same script (for example a larger similarity_top_k) rather than as a separate command.

python
import vertexai
from vertexai.preview import rag

vertexai.init(project="{project_id}", location="{region}")

corpus_name = (
    "projects/{project_id}/locations/{region}/ragCorpora/{corpus_id}"
)
query = "What is the speed of light?"

# Retrieve contexts
response = rag.retrieval_query(
    rag_corpora=[corpus_name],
    text=query,
    similarity_top_k=3
)

for context in response.contexts.contexts:
    print(f"Context text: {context.text}")
    print(f"Source: {context.source_uri}")

4. Answering the User with Retrieved Context

To use the retrieved context alongside an Agent Platform model to generate a grounded response:

python
from google import genai
from google.genai import types

client = genai.Client(enterprise=True, project="{project_id}", location="{region}")
corpus_name = (
    "projects/{project_id}/locations/{region}/ragCorpora/{corpus_id}"
)

# Define the Agent Platform RAG Engine tool pointing to the corpus
rag_tool = types.Tool(
    retrieval=types.Retrieval(
        vertex_rag_store=types.VertexRagStore(
            rag_resources=[types.VertexRagStoreRagResource(rag_corpus=corpus_name)],
            rag_retrieval_config=types.RagRetrievalConfig(
                top_k=3,
                filter=types.RagRetrievalConfigFilter(
                    vector_similarity_threshold=0.5,
                ),
            ),
        )
    )
)

# Generate content using the RAG Engine tool
response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="What is the speed of light?",
    config=types.GenerateContentConfig(
        tools=[rag_tool]
    )
)
print(response.text)

© google, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cloud/agent-platform-rag-engine-management of google/skills.

Open the folder on GitHubat commit 5120a76

Compare with similar skills

Agent Platform RAG Engine Management next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Platform RAG Engine Management compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Platform RAG Engine Management this skillgoogle/skills21k—~2.4kAutomated safety check: PassApache-2.0
Aliyun Opensearch Searchcinience/alicloud-skills397—~1.1kAutomated safety check: PassMIT
DBoracle/skills876—~1.4kAutomated safety check: PassUPL-1.0
Google WorkspaceRedWoodOG/Hermes-Desktop177—~2.1kAutomated safety check: PassMIT
Community Google WorkspaceArgentAIOS/argentos-core126—~2.8kAutomated safety check: PassMIT
Google WorkspaceTommy-yw/RunbookHermes5461 repos~2.7kAutomated safety check: PassMIT

Similar skills

  • Aliyun Opensearch Search

    cinience/alicloud-skills

    A skill your agent uses when working with OpenSearch vector search edition via the Python SDK (ha3engine) to push documents and run HA/SQL searches.

    397 GitHub stars~1.1k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • DB

    oracle/skills

    Official

    Oracle Database guidance for SQL, PL/SQL, SQLcl, ORDS, Oracle Vector SDK, administration, app development, performance, security, migrations, and agent-safe database workflows.

    876 GitHub stars~1.4k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Google Workspace

    RedWoodOG/Hermes-Desktop

    Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration via Python.

    177 GitHub stars~2.1k tokensUpdated 4 mo ago
    Backend & APIsAuto-check passed
  • Community Google Workspace

    ArgentAIOS/argentos-core

    Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration for community skills.

    126 GitHub stars~2.8k tokensUpdated 3 mo ago
    Documents & OfficeAuto-check passed
  • Google Workspace

    Tommy-yw/RunbookHermes

    Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration for Hermes.

    546 GitHub starsUsed in 1 repo~2.7k tokens
    Documents & OfficeAuto-check passed
  • Detecting Email Account Compromise

    mukul975/Anthropic-Cybersecurity-Skills

    Detect compromised O365 and Google Workspace email accounts by analyzing Unified Audit Logs and Azure AD sign-in logs for impossible travel, inbox rule creation/deletion (Set-InboxRule…

    34k GitHub stars~823 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed

More from google/skills

All 147 skills in this repo
  • Official

    Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services.

    21k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Writes Terraform alerting policies for AI agents that emit OpenTelemetry metrics, covering reliability, cost, safety, security and quality signals on Google Cloud.

    21k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploys open models or custom weights from Model Garden to Agent Platform endpoints, checks deployment status and cleans up endpoints, confirming before any change.

    21k GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Official

    Searches, manages and scaffolds skills in the Gemini Enterprise Agent Platform Skill Registry using bundled Python scripts and Google Cloud credentials.

    21k GitHub stars~584 tokensUpdated today
    Auto-check passed
  • Designs GCP infrastructure as local Terraform, validates and scans it against best practices, then imports it to Application Design Center for deployment and troubleshooting.

    21k GitHub stars~4.4k tokensUpdated today
    Auto-check passed

Questions about Agent Platform RAG Engine Management

What does Agent Platform RAG Engine Management do?

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Agent Platform RAG Engine Management is an agent skill from google/skills, published by the product's own GitHub organization. Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK.

When should I use Agent Platform RAG Engine Management?

Agent Platform RAG Engine Management fits situations like: listing RAG corpora; inspecting a corpus; retrieving contexts; generating content grounded in a RAG corpus.

How do I install Agent Platform RAG Engine Management in Claude Code?

Run `npx skills add google/skills --skill agent-platform-rag-engine-management -a claude-code`. Or copy the skill folder (skills/cloud/agent-platform-rag-engine-management in google/skills) into .claude/skills/agent-platform-rag-engine-management in your project. Claude Code loads it when a task matches its description.

How do I install Agent Platform RAG Engine Management in Codex?

Run `npx skills add google/skills --skill agent-platform-rag-engine-management -a codex`. Or copy the skill folder (skills/cloud/agent-platform-rag-engine-management in google/skills) into .agents/skills/agent-platform-rag-engine-management in your project. Codex loads it when a task matches its description.

Can I use Agent Platform RAG Engine Management in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google/skills --skill agent-platform-rag-engine-management -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-platform-rag-engine-management, .gemini/skills/agent-platform-rag-engine-management, .github/skills/agent-platform-rag-engine-management and .opencode/skills/agent-platform-rag-engine-management in your project.

What does Agent Platform RAG Engine Management need to run?

Going by SKILL.md and its folder, Agent Platform RAG Engine Management needs the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Agent Platform RAG Engine Management access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Platform RAG Engine Management safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Platform RAG Engine Management use?

Agent Platform RAG Engine Management is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Platform RAG Engine Management use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Platform RAG Engine Management?

Skills that share tags, products or a category with Agent Platform RAG Engine Management: Aliyun Opensearch Search (cinience/alicloud-skills, 397 stars), DB (oracle/skills, 876 stars), Google Workspace (RedWoodOG/Hermes-Desktop, 177 stars) and Community Google Workspace (ArgentAIOS/argentos-core, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Platform RAG Engine Management?

google (a GitHub organization, an official publisher) maintains it in google/skills, which has 21,069 GitHub stars. The repository holds 147 skills in this directory. The repository was last updated on October 9, 2026.

Source: google/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.