Relay

Real-time agent to agent communication

AgentWorkforce
作者 AgentWorkforce
AI 与机器学习 · Apache-2.0 · TypeScript · 更新时间: 7 months ago
605
星标
45
Forks
已验证
A
安全:
优秀
A
质量:
agent-collaborationagent-communicationagentic-aiagentsreal-time

Agent Relay

Featured on OSSCAR

Agent Relay is real-time communication infrastructure for agent-to-agent work. Spawn agents from code, give them shared channels, direct messages, threads, reactions, and presence, and let them coordinate in the same workspace.

It is not a framework or a harness. Your agents keep running however they already run. Agent Relay is the communication layer that helps them talk to each other and take action together.

Website: agentrelay.com · Docs: agentrelay.com/docs

Why Agent Relay

Install

TypeScript / Node.js

npm install @agent-relay/sdk
# or
bun add @agent-relay/sdk

Python

pip install agent-relay-sdk

See the Python SDK for Python usage and adapters.

Quick example

import { AgentRelay, Models } from '@agent-relay/sdk';

const relay = new AgentRelay();

relay.onMessageReceived = (msg) => {
  console.log(`[${msg.from} → ${msg.to}]: ${msg.text}`);
};

const channels = ['tic-tac-toe'];

const x = await relay.claude.spawn({
  name: 'PlayerX',
  model: Models.Claude.SONNET,
  channels,
  task: 'Play tic-tac-toe as X against PlayerO. You go first.',
});

const o = await relay.codex.spawn({
  name: 'PlayerO',
  model: Models.Codex.GPT_5_3_CODEX_SPARK,
  channels,
  task: 'Play tic-tac-toe as O against PlayerX.',
});

await Promise.all([relay.waitForAgentReady('PlayerX'), relay.waitForAgentReady('PlayerO')]);

relay.system().sendMessage({ to: 'PlayerX', text: 'Start.' });

await AgentRelay.waitForAny([x, o], 5 * 60 * 1000);
await relay.shutdown();

Want more than a toy example? Start with:

What you can build

Claude Code plugin

Use Agent Relay directly inside Claude Code, no SDK required. The plugin adds multi-agent coordination via slash commands or natural language.

/plugin marketplace add Agentworkforce/skills
/plugin install claude-relay-plugin

Once installed, you can coordinate teams of agents with built-in skills:

> /relay-team Refactor the auth module, split the middleware, update tests, and update docs
> /relay-fanout Run linting fixes across all packages in the monorepo
> /relay-pipeline Analyze the API logs, generate a summary report, then draft an email

Or just describe what you want in plain language:

> Use relay fan-out to lint all packages in parallel
> Split the migration into three relay workers, one for the schema, one for the API, and one for the frontend

See docs/plugin-claude-code.md and the plugin README for more.

Agent Relay CLI

Install the CLI with:

curl -fsSL https://raw.githubusercontent.com/AgentWorkforce/relay/main/install.sh | bash

Then use Agent Relay to bring agents into a shared workspace and route work between them.

Supported agents and runtimes

Agent Relay is designed for terminal-native agents and SDK-driven workflows. This repo currently includes first-class support for:

The broader SDK and workflow surface also includes additional integrations in the codebase. See the package docs for details.

Development

If you want to work on the repo itself:

npm install
npm run build
npm test

Useful references:

License

Apache-2.0 — Copyright 2026 Agent Workforce Incorporated


Links: Website · Documentation · Docs (Markdown) · Discord

🔓 登录解锁更多
使用 GitHub 登录