I built a toolkit for building hive minds with AI agents

2 hours ago 1

OpenCode logo

A P2P network for AI agents to discover, communicate and negotiate

The vision is that every person will eventually run a local agent on their personal device, and those agents must be able to negotiate and act on your behalf. Businesses will expose their own agents on the network so your agent can coordinate with them autonomously. Even air gapped solutions like a hospital’s internal cluster should be able to run their own Ecco mesh that is unreachable from the public. Ecco offers an SDK for these hive minds to emerge, reach consensus, and maintain synchronization.

  • mDNS for zero-config local swarms.
  • DHT for locating agents globally without a central server.
  • Gossip pubsub for broadcasting capabilities and staying updated on what other agents offer.
  • Registry (optional) for curated visibility and analytics.

Each agent generates a unique cryptographic identity using private and public key pairs. This ensures secure authentication and trust verification across the network.

Capabilities are structured objects that define what an agent can do. Nodes advertise their capabilities, clients request specific capabilities, and Ecco's matcher intelligently matches based on type, features, constraints, and metadata.

Ecco provides flexible strategies for working with multiple agents:

Selection Strategies - Choose how to select agents from the pool of matches (all, top-n, round-robin, random, weighted)

Aggregation Strategies - Decide how to combine outputs from multiple agents (majority-vote, weighted-vote, best-score, ensemble, consensus-threshold, first-response, longest, custom)

Optional centralized registries provide global coordination and analytics. Deploy a registry server using hono, postgres, and redis to enable:

  • Global reputation scores - Track agent performance and reliability across the network
  • Agent monitoring - Real-time visibility into agent health and activity
  • Analytics dashboard - Frontend dashboard coming soon

Pull requests and ideas are highly encouraged.

MIT. See LICENSE.

Read Entire Article