エージェントレジストリ — 検出、登録、リモート呼び出し
エージェントレジストリは、Gemini Enterprise Agent Platform のガバナンス領域を担うものです。プロジェクトスコープのエージェント、MCP サーバー、エンドポイントのカタログです。ADK-Rust は3つの方法で関与します。
| 機能 | 特徴 | Crate |
|---|---|---|
登録済みエージェントの検索と解決(AgentRegistryClient、AgentSearchTool) | vertex-agent-registry | adk-tool |
| セルフホスト型エージェント、MCPサーバー、およびCLIからのエンドポイントの登録 | vertex-agent-registry | adk-cli |
登録済みの Agent Engine をサブエージェントとして呼び出す(RemoteReasoningEngineAgent) | vertex-remote-engine | adk-server |
注: これらの機能は
adk-server上のローカルな YAMLagent-registry機能とは無関係であり、Agent Registry(agents/MCP servers/endpoints)は Skill Registry(SKILL.md パッケージ —docs/official_docs/skills/skill-registry.mdを参照)とは異なるプラットフォームサービスです。
自動登録と手動登録
Agent Engine のデプロイは自動的に登録されます: エンジンを作成すると(たとえば adk-rust deploy agent-engine を使用)、レジストリに追加され、エントリのライフサイクルとの同期が維持されます。再度登録しないでください — 手動エントリを追加すると、異なる URN 名前空間に重複して登録されます。
それ以外のすべてには手動登録が存在し、その方法を CLI で説明しています:
# A self-hosted adk-server agent, described by its A2A agent card
adk-rust registry register-agent --service-id my-agent --card agent-card.json
# An external MCP server (you supply the tools/list payload; no introspection)
adk-rust registry register-mcp --service-id my-mcp --tool-spec tools-list.json \
--url https://mcp.example.com/rpc
# A bare governed endpoint
adk-rust registry register-endpoint --service-id my-api --url https://api.example.com/v1
# Discovery
adk-rust registry search "travel planner" --type agent
すべてのコマンドは --project/--location を使用し(GOOGLE_CLOUD_PROJECT/GOOGLE_CLOUD_LOCATION にフォールバック)、べき等です: 既存のサービス ID を再登録すると、変更されたフィールドだけにパッチが適用され、変更がない場合は書き込みが行われません。手動エントリはライフサイクルと同期されません — 更新または削除は利用者の責任で行ってください。us/eu のマルチリージョンは手動登録をサポートしていません。リージョンまたは global を使用してください。
エージェントからエージェントを検出する
AgentSearchTool は、通常の読み取り専用ツールとして LlmAgent レジストリ検索を提供します:
use adk_tool::{AgentRegistryClient, AgentRegistryConfig, AgentSearchTool};
use std::sync::Arc;
# fn build() -> adk_core::Result<()> {
let registry = AgentRegistryClient::new_with_adc(
AgentRegistryConfig::new("my-project", "us-central1"),
)?;
let search_tool = Arc::new(AgentSearchTool::new(Arc::new(registry)));
# let _ = search_tool;
# Ok(())
# }
このツールは、エージェント、MCP サーバー、またはエンドポイントにまたがる {urn, displayName, description, skills, endpoint} の概要を返します。
デプロイ済みエンジンへの委譲
RemoteReasoningEngineAgent は、デプロイ済みの Agent Engine を通常のサブエージェントとして扱います — reasoningEngines:streamQuery 経由でターンを転送し、リモートイベントを ADK イベントとして返します:
use adk_server::agent_engine::remote::RemoteReasoningEngineAgent;
# async fn build() -> adk_core::Result<()> {
let remote = RemoteReasoningEngineAgent::builder("specialist")
.resource_name("projects/my-project/locations/us-central1/reasoningEngines/4242")
.build()
.await?;
# let _ = remote;
# Ok(())
# }
エンジンはレジストリ URN(.urn(...) と .registry(...))によって指定することもできます。リソース名はエントリのランタイム参照から解決されます。デフォルトのクラスメソッドは streaming_agent_run_with_events で、非 ADK エンジンの場合は stream_query に一度だけフォールバックします。
完全なパターンについてはexamples/agent_orchestratorを参照してください。1つのオーケストレーターで、レジストリ検索とリモート委譲を組み合わせています。
すべてを有効にする
[dependencies]
adk-rust = { version = "2.1.0", features = ["minimal", "gemini-agent-platform"] }
gemini-agent-platformメタ機能には、vertex-agent-registryおよびvertex-remote-engineと、その他すべてのプラットフォーム統合が含まれています。