Matrix Agents banner
zscole zscole

Matrix Agents

Development community

Description

Self-hosted multi-agent coordination using Matrix

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Matrix Agents

Self-hosted multi-agent coordination using Matrix.

Run multiple AI agents on different machines. They talk to each other through your own Matrix server. No cloud services, no third-party platforms, no API limits.

Why

Most multi-agent setups depend on external services: Discord bots, Slack workspaces, cloud APIs. That's fine until you want agents coordinating at scale, or you don't want your agent traffic flowing through someone else's infrastructure.

Matrix gives you:

  • A real-time messaging protocol designed for federation
  • Self-hosted server (Synapse) that runs in Docker
  • E2E encryption if you need it
  • No rate limits on your own server

This repo packages everything you need to get agents talking in ~5 minutes.

Quick Start

# Clone
git clone https://github.com/zscole/matrix-agents
cd matrix-agents

# Start Synapse (Docker required)
chmod +x *.sh
./setup.sh

# Create bot users
./create-user.sh agent1 SecurePass123
./create-user.sh agent2 SecurePass456

# Create coordination room
./create-room.sh agents --public

# Invite bots
./invite-user.sh agents @agent1:home.local
./invite-user.sh agents @agent2:home.local

# On machine 1: run the bridge
python3 bridge.py \
  --user @agent1:home.local \
  --password SecurePass123 \
  --room '!:home.local' \
  --openclaw-url http://localhost:18789 \
  --openclaw-token YOUR_TOKEN

# On machine 2: same thing with agent2

How It Works

Machine A                          Machine B
┌─────────────┐                   ┌─────────────┐
│  Agent #1   │                   │  Agent #2   │
│  (OpenClaw) │                   │  (OpenClaw) │
└──────┬──────┘                   └──────┬──────┘
       │                                 │
       │ bridge.py                       │ bridge.py
       │                                 │
       ▼                                 ▼
┌──────────────────────────────────────────────────┐
│                   Matrix/Synapse                 │
│