Agent Registry — 検出、登録、リモート呼び出し

Agent Registry は Gemini Enterprise Agent Platform の Govern pillar です。プロジェクト スコープのエージェント、MCP サーバー、エンドポイントのカタログです。ADK-Rust は 3 つの方法で参加します。

機能特徴クレート
登録済みエージェント(AgentRegistryClient、AgentSearchTool)を検索して解決するvertex-agent-registryadk-tool
自己ホスト型エージェント、MCP サーバー、および CLI からのエンドポイントを登録するvertex-agent-registryadk-cli
登録済みの Agent Engine をサブエージェントとして呼び出す (RemoteReasoningEngineAgent)vertex-remote-engineadk-server

注: これらの機能は、ローカルエージェントレジストリ REST API、adk-server 上の agent-registry 機能(Server API を参照)、および Agent Registry(agents/MCP servers/endpoints)とは無関係です。Agent Registry は Skill Registry(SKILL.md パッケージ — docs/official_docs/skills/skill-registry.md を参照)とは異なるプラットフォームサービスです。

自動登録と手動登録

Agent Engine のデプロイメントは自動的に自身を登録します。エンジンを作成すると(たとえば adk-rust deploy agent-engine を使用した場合)、そのエンジンがレジストリに追加され、エントリのライフサイクルが同期され続けます。再度登録しないでください。手動エントリを追加すると、別の URN 名前空間の下で重複することになります。

それ以外のすべてについては手動登録が利用でき、そのための機能が CLI です。機能 cargo install adk-cli --features vertex-agent-registry を指定して CLI をインストールします(バイナリは adk-rust です)。

# 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

# The same agent described by its URL and protocol (jsonrpc, grpc, or http-json)
adk-rust registry register-agent --service-id my-agent \
  --url https://agents.example.com/jsonrpc --protocol jsonrpc

# 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 (--type agent, the default, or mcp-server)
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 サーバー、またはエンドポイント(component_type)を検索し、エージェントの {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 へのワンショットフォールバックが行われます。

完全なパターン(1 つのオーケストレーターでのレジストリ検索とリモート委譲)については、adk-playground の agent_orchestrator の例を参照してください。

すべてを有効にする

[dependencies]
adk-rust = { version = "3.0.0", features = ["minimal", "gemini-agent-platform"] }

gemini-agent-platform メタ機能には、vertex-agent-registry と vertex-remote-engine に加えて、その他すべてのプラットフォーム統合が含まれます。

Agent Registry — 検出、登録、リモート呼び出し - ADK-Rust ドキュメント | ADK-Rust