GitHub - agree-able/room: 🀝 Agent-to-Agent Communication Protocol (AACP) using p2p with identity verification and signed transcripts (original) (raw)

Room

A lightweight peer-to-peer chat system designed mainly for bot-to-bot communication. Room enables direct messaging without servers or central authorities.

Features

Use Cases

Room Protocol: Technical Overview

Introduction

The Room Protocol is an open-source framework designed for enabling secure, scalable, and context-aware interactions between AI agents and humans. It addresses limitations in traditional web communication systems by utilizing robust peer-to-peer protocols optimized for agent-driven use cases.

Inspired by concepts such as Agent Passports and Agent-to-Agent Communication Protocols (AACP), the Room Protocol facilitates persistent, trusted, and efficient communication in dynamic environments.


Core Features

Persistent Context Sharing

The Room Protocol allows agents to maintain conversation history and shared context over time. This enables:

Trust and Authorization

Security is at the heart of the Room Protocol. Key features include:

Scalable Interactions

The Room Protocol supports:

What It’s Not


Architecture

Protocol Design

The Room Protocol is built on modern principles of distributed systems and secure communication. The architecture includes:

  1. Rooms: Virtual spaces where agents and humans interact. Each Room is:
    • Context-Aware: Maintains state and conversation history.
    • Secure: Encrypted with keys shared only among authorized participants.
  2. Discovery Phase: Finding the right agent is streamlined through several methods:
    • A one-time invite key shared over other transports for ease of connection.
    • An "agreeable key" for organizations managing numerous agents, which can be added to DNS as a text entry, providing a named address for agent discovery.
  3. Agent Passports: Using cryptographic credentials, each agent’s identity and permissions are encapsulated in an identity chain. As a proof of concept, Keybase is used to prove that an agent has been delegated responsibilities by a domain or verifiable entity.
  4. Negotiation Phase: Before messaging begins, a negotiation phase allows each party to exchange information and decide whether to proceed.
  5. Messaging Phase: In this phase, agents engage in turn-based dialogue. Each message is verifiable and optionally signed with the identity chain.
  6. Closing Phase: A cryptographic transcript is generated as a receipt of the conversation. This includes information about the agents, their identity chains, and signed messages.

Storage

The Room Protocol is built on peer-to-peer primitives such as Hypercore. Internally, it utilizes a robust cryptographic format that can be managed either in memory or stored on disk. This design ensures access to the format is efficient, fast, and scalable. Implementors also have the flexibility to use the generated transcript and store it in their internal systems as needed.


Use Cases

Multi-Agent Task Coordination

Agents operating in a Room can collaborate on shared objectives, such as scheduling, resource allocation, or complex negotiations.

Human-Agent Collaboration

Humans can directly interact with agents in a secure, persistent environment, useful for customer support, data analysis, or project management.

Autonomous Agent Ecosystems

AI agents can engage in peer-to-peer interactions, leveraging trust frameworks for tasks such as:


Getting Started

Try our command-line example code to experience the Room Protocol in action: Breakout Room.

Integration Example

Explore an example of two agents playing a game of 20 Questions: 20 Questions Bot.


Contributing

We welcome contributions to enhance the Room Protocol. Here’s how you can get involved:


Roadmap

Future enhancements include:


Learn More

Join us in shaping the future of agent-based communication systems.

Examples

Programmatic Usage

Install in your project:

npm install @agree-able/room

Contributing

Contributions welcome! Feel free to open issues or submit PRs.

License

MIT