npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

multi-agent-protocol

v0.0.4

Published

Multi-Agent Protocol (MAP) - A protocol for observing, coordinating, and routing messages within multi-agent AI systems

Readme

Multi-Agent Protocol (MAP)

A JSON-RPC based protocol for observing, coordinating, and routing messages within multi-agent AI systems.

Overview

Unlike protocols designed for single-agent interaction (ACP) or peer-to-peer agent delegation (A2A), MAP provides a window into a multi-agent system with visibility into its internal structure, agent relationships, and message flows.

MAP provides a standardized way for:

  • Clients to observe and interact with agent systems (with configurable visibility)
  • Agents to communicate, form hierarchies, and join scopes
  • Systems to federate and route messages across boundaries

Protocol Landscape

| Protocol | Relationship | Visibility | Primary Use | |----------|--------------|------------|-------------| | MCP | Agent → Tool | N/A | Tool invocation | | ACP | Client → Agent | Opaque | Single-agent sessions | | A2A | Agent → Agent (peer) | Opaque | Cross-org delegation | | MAP | Client → System | Transparent | Internal orchestration |

Packages

| Package | Description | |---------|-------------| | @multi-agent-protocol/sdk | TypeScript SDK for MAP |

Quick Start

npm install @multi-agent-protocol/sdk
import { ClientConnection, createStreamPair } from '@multi-agent-protocol/sdk';

// Connect to a MAP server
const client = new ClientConnection(stream, { name: 'My Client' });
await client.connect();

// Subscribe to events
const subscription = await client.subscribe({
  eventTypes: ['agent.registered', 'agent.state.changed'],
});

for await (const event of subscription) {
  console.log(event.type, event.data);
}

Features

  • Real-time streaming - Subscribe to events with backpressure support
  • Auto-reconnection - Exponential backoff with subscription restoration
  • Permission system - 4-layer access control (system, participant, scope, agent)
  • Federation - Connect multiple MAP systems with envelope-based routing
  • Causal ordering - Events released in dependency order

Documentation

Schema

The protocol schema is defined in schema/:

  • schema.json - Complete JSON Schema for all MAP message types
  • meta.json - Method metadata, tiers, and error codes

Repository Structure

multi-agent-protocol/
├── docs/                   # Design specifications
├── schema/                 # JSON Schema and metadata
│   ├── schema.json         # Protocol message schemas
│   └── meta.json           # Method tiers and error codes
└── ts-sdk/                 # TypeScript SDK implementation
    ├── src/                # Source code
    └── docs/               # SDK-specific docs (gap analysis)

Development

# Install dependencies
npm install

# Build SDK
npm run build -w ts-sdk

# Run tests
npm test -w ts-sdk

# Type check
npm run typecheck -w ts-sdk

Protocol Methods

The protocol defines 27 methods across three tiers:

Core (Required): map/connect, map/disconnect, map/send, map/subscribe, map/unsubscribe, map/agents/list, map/agents/get

Structure (Recommended): Agent lifecycle (register, spawn, unregister, update, stop, suspend, resume), scope management (scopes/create, join, leave), and structure queries

Extensions (Optional): Federation (federation/connect, federation/route), session management, and steering (map/inject)

License

MIT

Authors

Created and maintened by the sudocode team.