Skip to content

feat(agentregistry): add package foundation and REST transport#1122

Open
wolo-lab wants to merge 1 commit into
mainfrom
wolo/agentregistry-3p-transport
Open

feat(agentregistry): add package foundation and REST transport#1122
wolo-lab wants to merge 1 commit into
mainfrom
wolo/agentregistry-3p-transport

Conversation

@wolo-lab

@wolo-lab wolo-lab commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Problem:
adk-go has no client for the Google Cloud Agent Registry
(agentregistry.googleapis.com) — the governed catalog of A2A agents, MCP
servers, and model endpoints. adk-python already ships one, so we need a Go
equivalent with matching behavior to discover and construct agents/toolsets from
the registry.

Solution:
Add the agentregistry package foundation — everything the discovery
methods and the RemoteAgent/McpToolset factory helpers (follow-up PRs in this
stack) build on. This PR is additive: a new package, no changes to existing
public APIs.

  • Client surface: Config, Client, and New — ADC-authenticated by
    default, or a caller-supplied *http.Client.
  • REST transport: an authenticated Transport to
    agentregistry.googleapis.com, resolving resource paths (absolute
    projects/... vs. parent-relative), setting the x-goog-user-project quota
    header, and returning non-2xx responses as a typed *APIError. Transport is
    an interface seam so alternative transports can back the same Client.
  • mTLS endpoint selection: honors GOOGLE_API_USE_MTLS_ENDPOINT
    (auto/always/never). In auto, the mTLS endpoint is chosen only when
    client-cert use is opted in (GOOGLE_API_USE_CLIENT_CERTIFICATE) and a
    default client-certificate source is actually present on the machine —
    matching adk-python / google-auth (has_default_client_cert_source) and
    avoiding targeting the mTLS endpoint with no client cert.
  • Quota project: x-goog-user-project prefers the ADC credentials' quota
    project (GOOGLE_CLOUD_QUOTA_PROJECT → credentials JSON quota_project_id)
    and falls back to the configured ProjectID, matching adk-python's
    credentials.quota_project_id or project_id.
  • Wire types & options: Agent, McpServer, Endpoint, Protocol,
    Interface, Skill, Card, the *Page list responses, and ListOptions
    (WithFilter / WithPageSize / WithPageToken).
  • Resolution helpers (parity with adk-python): connectionURI
    (_get_connection_uri), cleanName (_clean_name), and the
    protocol-binding → A2A transport map (_TRANSPORT_MAPPING).

@wolo-lab wolo-lab force-pushed the wolo/agentregistry-3p-transport branch from e6fe607 to a0f3254 Compare July 3, 2026 15:47
@wolo-lab wolo-lab marked this pull request as ready for review July 3, 2026 16:14
@wolo-lab wolo-lab force-pushed the wolo/agentregistry-3p-transport branch 4 times, most recently from 12ddefb to 016e6f5 Compare July 4, 2026 12:46
Introduce the agentregistry package client foundation: Config/Client/New,
an authenticated REST Transport to agentregistry.googleapis.com using
Application Default Credentials with mTLS endpoint selection, a typed
APIError, the service wire types and list options, and the resolution
helpers (connectionURI, cleanName, transport-binding map) ported from
adk-python for behavioral parity.

Bug: 530514942
@wolo-lab wolo-lab force-pushed the wolo/agentregistry-3p-transport branch from 016e6f5 to 3ef6255 Compare July 4, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant