[Feat]: Agent automatic discovery (on local machine / k8s)
- Lingua principale
- Shell
- Stelle
- 25.7k
- Fork
- 2.6k
- Merge medio
- 3g 6h
- PR unite (30g)
- 16
Descrizione
### Is your feature request related to a problem? Please describe.
The problem is that agents need to be told which other agents they can talk to.
Agent card is nice declarative info about the agent, but it does not solve discovery.
For agent fleet, we need to either use private registry, or tell agent explicitly which agents are available.
This adds inconsistency and extra complexity.
### Describe the solution you'd like
## discovery on local machine
Use [mDNS](https://datatracker.ietf.org/doc/html/rfc6762) / DNS-SD (Multicast DNS / DNS-Based Service Discovery)
Technology behind Apple's Bonjour and Zeroconf. Instead of relying on a central DNS server, devices use special multicast addresses (like 224.0.0.251 for IPv4) to send DNS-like queries and announcements directly to all other devices on the same local network link. DNS-SD builds on mDNS to allow services to advertise not just their name/IP but also their type, port, and other metadata (using TXT records).
- An A2A agent starts up and advertises a service, for example, named MyAgent of type _a2a._tcp.local running on port 8080
- Another agent wanting to discover peers browses for services of type _a2a._tcp.local. It receives responses from advertising agents, learning their names, IP addresses, ports, and any TXT record data. It can then connect and fetch the Agent Card.
## k8s agent discovery
- An agent could query the Kubernetes API (if granted permissions) to list Services within its namespace that have a specific label (e.g., app: `a2a-agent`).
- Once a service endpoint (IP/port) is found, the agent could attempt to fetch the Agent Card from the standard /.well-known/agent.json path on that endpoint or a pre-agreed port.
## Suggested changes
- In [agent capabilities](https://google.github.io/A2A/specification/agent-card/#representation), add `autodiscovery` as agent ability
- add standard recomendation for auto-discovery
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
The issue proposes adding mDNS/DNS-SD for local discovery and Kubernetes API queries for cluster discovery. Start by reviewing the agent capabilities section of the specification linked in the issue. Look for existing agent startup and networking code to understand how agents currently connect. 'Done' means agents can automatically discover peers on a local network or within a Kubernetes namespace without manual configuration.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, kubernetes, shell
- Ambito
- backend, distributed-systems, networking
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100