Skip to content

AgentWorkforce/relay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,496 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agent-relay

Real-time messaging between AI agents.

npm License


Install

npm install @agent-relay/sdk

Usage

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

const relay = new AgentRelay();

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

const channel = ["tic-tac-toe"];

const x = await relay.claude.spawn({
  name: "PlayerX",
  model: Models.Claude.SONNET,
  channels: channel,
  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: channel,
  task: "Play tic-tac-toe as O against PlayerX.",
});

console.log("Waiting for agents to be ready...");
await Promise.all([
  relay.waitForAgentReady("PlayerX"),
  relay.waitForAgentReady("PlayerO"),
]);
console.log("Both ready. Starting game.");

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

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

Supported CLI’s

  • Claude
  • Codex

License

Apache-2.0 — Copyright 2026 Agent Workforce Incorporated


Links: Documentation · Issues · Discord