a2a_pack.discovery
Agent discovery surface available via ctx.discover.
Agents find each other by capability/tag/skill — never by hardcoded URL.
The runtime attaches a :class:DiscoveryClient; the canonical impl
queries the platform's agent registry (control plane).
ControlPlaneDiscovery (class)
ControlPlaneDiscovery(api_url: 'str', *, token: 'str | None' = None, timeout: 'float' = 10.0) -> 'None'Hits the platform's agent registry (control plane).
__init__ (method)
__init__(self, api_url: 'str', *, token: 'str | None' = None, timeout: 'float' = 10.0) -> 'None'Initialize self. See help(type(self)) for accurate signature.
find_agents (method)
find_agents(self, *, tags: 'Sequence[str]' = (), capability: 'str | None' = None, skill: 'str | None' = None, limit: 'int' = 10) -> 'list[DiscoveredAgent]'(no docstring)
get_agent (method)
get_agent(self, name: 'str') -> 'DiscoveredAgent'(no docstring)
DiscoveredAgent (class)
DiscoveredAgent(name: 'str', url: 'str | None', card: 'AgentCard') -> NoneA registry hit. url is what the caller hands to ctx.call.
__init__ (method)
__init__(self, name: 'str', url: 'str | None', card: 'AgentCard') -> NoneInitialize self. See help(type(self)) for accurate signature.
DiscoveryClient (class)
DiscoveryClient()Discovery surface.
find_agents (method)
find_agents(self, *, tags: 'Sequence[str]' = (), capability: 'str | None' = None, skill: 'str | None' = None, limit: 'int' = 10) -> 'list[DiscoveredAgent]'(no docstring)
get_agent (method)
get_agent(self, name: 'str') -> 'DiscoveredAgent'(no docstring)
InMemoryDiscovery (class)
InMemoryDiscovery(agents: 'dict[str, DiscoveredAgent]') -> 'None'Discovery surface.
__init__ (method)
__init__(self, agents: 'dict[str, DiscoveredAgent]') -> 'None'Initialize self. See help(type(self)) for accurate signature.
find_agents (method)
find_agents(self, *, tags: 'Sequence[str]' = (), capability: 'str | None' = None, skill: 'str | None' = None, limit: 'int' = 10) -> 'list[DiscoveredAgent]'(no docstring)
get_agent (method)
get_agent(self, name: 'str') -> 'DiscoveredAgent'(no docstring)
Source: apps/a2a/a2a_pack/discovery.py