Vertex AI Skill Registry
Skill Registry, Gemini Enterprise Agent Platform के Build-pillar की वह सेवा है जो संस्करणित SKILL.md पैकेजों को zip आर्काइव के रूप में aiplatform.googleapis.com पर संग्रहीत करती है। ADK-Rust इसके साथ केवल consume-only रूप में एकीकृत होता है:
एजेंट केंद्रीय रूप से नियंत्रित skills को खोजते, डाउनलोड करते और लोड करते हैं, जबकि provisioning (create, update, delete, publish) platform tooling के पास रहता है।
नोट: Skill Registry API केवल
us-central1,europe-west4औरus-east5में क्षेत्रीयhttps://{location}-aiplatform.googleapis.comendpoints से उपलब्ध v1beta1 (Preview) है। यह Agent Registry से अलग है, जो agents को catalog करने वाली Govern-pillar की एक अलग सेवा है।
सेटअप
adk-skill पर feature सक्षम करें (और commands के लिए adk-cli पर भी):
[dependencies]
adk-skill = { version = "2.1.0", features = ["vertex-skill-registry"] }
Authentication में Application Default Credentials
(gcloud auth application-default login) का उपयोग होता है। Configuration GOOGLE_CLOUD_PROJECT और GOOGLE_CLOUD_LOCATION से या स्पष्ट मानों से प्राप्त होती है।
client क्या करता है — और क्या नहीं करता
| ऑपरेशन | इंटरफ़ेस |
|---|---|
| पेलोड के साथ कौशल प्राप्त करें | SkillRegistryClient::get_skill |
| कौशलों की सूची बनाएँ | SkillRegistryClient::list_skills |
| अर्थगत खोज | SkillRegistryClient::search_skills |
| संशोधनों की सूची बनाएँ / प्राप्त करें | list_skill_revisions, get_skill_revision |
| डाउनलोड करें, सत्यापित करें, निकालें | fetch_skill_content, fetch_skill_revision_content |
| बनाएँ / अपडेट करें / हटाएँ | कार्यान्वित नहीं किया गया — प्लेटफ़ॉर्म टूलिंग जीवनचक्र का प्रबंधन करती है |
प्रत्येक डाउनलोड किए गए payload को रजिस्ट्री के डाइजेस्ट के विरुद्ध SHA-256 से सत्यापित किया जाता है और किसी भी बाइट का उपयोग किए जाने से पहले डिफेंस-इन-डेप्थ zip सत्यापन (एंट्री संख्या, पाथ ट्रैवर्सल, सिमलिंक्स, डुप्लिकेट नाम, आकार, कम्प्रेशन अनुपात और गहराई सीमाएँ) के साथ निकाला जाता है।
किसी agent में रजिस्ट्री skills लोड करें
load_skill_index_from_registry एक मानक SkillIndex तैयार करता है, इसलिए
इंजेक्शन, चयन और समन्वय filesystem skills की तरह ही काम करते हैं:
use adk_skill::registry::{
RegistrySkillFilter, SkillRegistryClient, SkillRegistryConfig,
load_skill_index_from_registry, merge_skill_indexes,
};
use adk_skill::load_skill_index;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = SkillRegistryClient::new_with_adc(SkillRegistryConfig::from_env()?)?;
// Select by semantic search…
let remote = load_skill_index_from_registry(
&client,
RegistrySkillFilter::by_query("quarterly reporting").with_top_k(5),
)
.await?;
// …or by explicit names, optionally pinned to a revision.
let pinned = load_skill_index_from_registry(
&client,
RegistrySkillFilter::by_names(["report-writer"]).with_revision("3"),
)
.await?;
// Merge with project-local skills — local wins on name collision,
// matching the project-local-over-global precedence of
// load_skill_index_with_extras.
let local = load_skill_index(".")?;
let merged = merge_skill_indexes(local, remote);
println!("{} skill(s) available ({} pinned)", merged.len(), pinned.len());
Ok(())
}
रजिस्ट्री-समर्थित SkillDocuments को filesystem skills के समान parser और
hashing के माध्यम से बनाया जाता है; इनमें {resource name}/SKILL.md का वर्चुअल
path होता है और कोई last_modified timestamp नहीं होता।
search_skills agent tool
SkillSearchTool LLM agents के लिए रजिस्ट्री खोज उपलब्ध कराता है। यह केवल-पठन
और concurrency-safe है, इसलिए यह समानांतर tool dispatch में भाग लेता है:
use adk_skill::registry::{SkillRegistryClient, SkillRegistryConfig, SkillSearchTool};
use std::sync::Arc;
fn build_tool() -> adk_core::Result<SkillSearchTool> {
let client = SkillRegistryClient::new_with_adc(SkillRegistryConfig::from_env()?)?;
Ok(SkillSearchTool::new(Arc::new(client)))
}
इनपुट {"query": string, "top_k"?: integer} है; आउटपुट JSON array में
{name, skillName, description} objects होते हैं, जिनमें सबसे अच्छा मिलान पहले आता है
(API कोई score नहीं लौटाता)।
CLI
adk-rust binary को vertex-skill-registry feature के अंतर्गत दो केवल-पठन
subcommands मिलते हैं:
[dependencies]
adk-cli = { version = "2.1.0", features = ["vertex-skill-registry"] }
# Semantic search (best match first)
adk-rust skills search "quarterly reporting" --top-k 5
# Materialize a skill package under .skills/<skill-id>/
adk-rust skills pull report-writer
# Pin a revision and choose the target directory
adk-rust skills pull report-writer --revision 3 --dir vendored-skills
दोनों commands --project/--location flags पढ़ते हैं और उपलब्ध न होने पर
GOOGLE_CLOUD_PROJECT/GOOGLE_CLOUD_LOCATION पर fallback करते हैं। डाउनलोड की गई skills
मानक skills layout (SKILL.md और उसका references/) में रखी जाती हैं, इसलिए
skills list, skills match और agent skill discovery उन्हें तुरंत पहचान लेते हैं।
कोई push command नहीं है — publishing platform tooling के माध्यम से होता है।