using-agent-relay

Use when coordinating multiple AI agents in real-time - provides inter-agent messaging via tmux wrapper (sub-5ms latency) or file-based team inbox for async workflows

242 stars

Best use case

using-agent-relay is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Use when coordinating multiple AI agents in real-time - provides inter-agent messaging via tmux wrapper (sub-5ms latency) or file-based team inbox for async workflows

Use when coordinating multiple AI agents in real-time - provides inter-agent messaging via tmux wrapper (sub-5ms latency) or file-based team inbox for async workflows

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "using-agent-relay" skill to help with this workflow task. Context: Use when coordinating multiple AI agents in real-time - provides inter-agent messaging via tmux wrapper (sub-5ms latency) or file-based team inbox for async workflows

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/using-agent-relay/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/agentworkforce/using-agent-relay/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/using-agent-relay/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How using-agent-relay Compares

Feature / Agentusing-agent-relayStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when coordinating multiple AI agents in real-time - provides inter-agent messaging via tmux wrapper (sub-5ms latency) or file-based team inbox for async workflows

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Using agent-relay

## Overview

Real-time agent-to-agent messaging. Two modes: **tmux wrapper** (real-time, sub-5ms) and **file-based team** (async, simpler).

## When to Use

- Multiple agents coordinating on shared codebase
- Turn-based interactions (games, reviews, task handoff)
- Parallel task distribution
- Real-time Claude/Codex/Gemini collaboration

**Don't use:** Single agent, cross-host networking, guaranteed delivery required.

## Quick Reference

| Pattern | Description |
|---------|-------------|
| `->relay:Name <<<`...`>>>` | **Default format** - always use fenced format |
| `->relay:* <<<`...`>>>` | Broadcast to all agents |
| `[[RELAY]]{"to":"Name","body":"msg"}[[/RELAY]]` | Structured JSON |
| `\->relay:` | Escape (literal output) |
| `relay read <id>` | Read truncated message |

## CLI Commands

```bash
relay -f                    # Start daemon + dashboard
relay --status              # Check daemon
relay --stop                # Stop daemon
relay wrap -n Alice claude  # Wrap agent with messaging
relay read abc123           # Read truncated message
```

### Team Commands (file-based)

```bash
relay team send -n You -t Recipient -m "Message"
relay team send -n You -t "*" -m "Broadcast"
relay team check -n You --no-wait     # Non-blocking
relay team check -n You --clear       # Clear after read
relay team status                     # Show team
```

## Sending Messages (Tmux Mode)

**Output the pattern directly** - don't use bash commands. Always use the fenced format:

```
->relay:BlueLake <<<
I've finished the API refactor.>>>

->relay:* <<<
STATUS: Starting auth module.>>>
```

### Fenced Format (Default)

The fenced format is the default for all messages:

```
->relay:Reviewer <<<
REVIEW REQUEST: Auth Module

Please check:
- src/auth/login.ts
- src/auth/session.ts

Key changes:
1. Added JWT validation
2. Fixed session expiry>>>
```

**CRITICAL:** Always end with `>>>` at the end of the last line of content! The `<<<` opens, `>>>` closes.

**Limits:** Fenced messages max 200 lines. For longer content, send summary with reference ID.

**Fallback:** If you forget `>>>`, message auto-closes on double blank line.

### Pattern Rules

Pattern must be at line start (whitespace/prefixes OK):

```
->relay:Name message          # Works
  ->relay:Name message        # Works
- ->relay:Name message        # Works
Some text ->relay:Name msg    # Won't work
```

## Receiving Messages

Messages appear as:
```
Relay message from Alice [abc123]: Message here
```

### Truncated Messages

Long messages show `[TRUNCATED...]`. Read full content:
```bash
relay read abc123
```

**Rule:** If message ends abruptly, always read full message before responding.

## Coordination Patterns

```
# Task assignment
->relay:Developer <<<
TASK: Implement /api/register>>>

# Status broadcast
->relay:* <<<
STATUS: Starting auth module>>>

->relay:* <<<
DONE: Auth complete>>>

# Review request
->relay:Reviewer <<<
REVIEW: src/auth/*.ts>>>

# Question
->relay:Architect <<<
QUESTION: JWT or sessions?>>>

# Blocked
->relay:* <<<
BLOCKED: Need DB credentials>>>
```

## Spawning Agents

Any agent can spawn worker agents to delegate tasks:

```
# Spawn a worker
->relay:spawn WorkerName cli "task description"

# Examples
->relay:spawn Dev1 claude "Implement the login endpoint"
->relay:spawn Tester claude "Write unit tests for auth module"

# Release when done
->relay:release WorkerName
```

Workers run in separate tmux windows and can communicate back via `->relay:` patterns.

## Multi-Project Bridge

```bash
# Bridge multiple projects
relay bridge ~/auth ~/frontend ~/api

# Cross-project messaging
@relay:projectId:agent Message
@relay:*:lead Broadcast to leads
```

## Common Mistakes

| Mistake | Fix |
|---------|-----|
| Using bash to send real-time messages | Output `->relay:` directly as text |
| Messages not sending | `relay --status` to check daemon |
| Incomplete message content | `relay read <id>` for full text |
| Pattern not at line start | Move `->relay:` to beginning |
| Forgetting to clear inbox | Use `--clear` flag |

## Troubleshooting

```bash
relay --status                    # Check daemon
relay --stop && relay -f          # Restart
ls -la /tmp/agent-relay.sock      # Verify socket
```

Related Skills

using-neon

242
from aiskillstore/marketplace

Guides and best practices for working with Neon Serverless Postgres. Covers getting started, local development with Neon, choosing a connection method, Neon features, authentication (@neondatabase/auth), PostgREST-style data API (@neondatabase/neon-js), Neon CLI, and Neon's Platform API/SDKs. Use for any Neon-related questions.

when-using-flow-nexus-platform-use-flow-nexus-platform

242
from aiskillstore/marketplace

Comprehensive Flow Nexus platform management covering authentication, sandboxes, storage, databases, app deployment, payments, and monitoring. This SOP provides end-to-end platform operations.

when-using-advanced-swarm-use-swarm-advanced

242
from aiskillstore/marketplace

Advanced swarm patterns with dynamic topology switching and self-organizing behaviors for complex multi-agent coordination

using-superpowers

242
from aiskillstore/marketplace

Meta-skill enforcing skill discovery and invocation discipline through mandatory workflows. Use when starting any conversation to check for relevant skills before any response, ensuring skill-first workflow before proceeding.

using-git-worktrees

242
from aiskillstore/marketplace

Git worktree–based workspace isolation for parallel or non-disruptive development. Use when work must occur without modifying or interfering with the current working tree.

using-argc-argcfile

242
from aiskillstore/marketplace

Create and modify Argcfiles using the special syntax required. Use this when editing Argcfile.sh, @argc, or any shell script that contains `argc --argc-eval`.

using-beads-bv

242
from aiskillstore/marketplace

Use when coordinating dependency-aware task planning with beads (bd) CLI and bv graph sidecar - covers ready work selection, priority management, and robot flags for deterministic outputs

using-xtool

242
from aiskillstore/marketplace

This skill should be used when building iOS apps with xtool (Xcode-free iOS development), creating xtool projects, adding app extensions, or configuring xtool.yml. Triggers on "xtool", "SwiftPM iOS", "iOS on Linux", "iOS on Windows", "Xcode-free", "app extension", "widget extension", "share extension". Covers project setup, app extensions, and deployment.

azure-quotas

242
from aiskillstore/marketplace

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".

DevOps & Infrastructure

raindrop-io

242
from aiskillstore/marketplace

Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.

Data & Research

zlibrary-to-notebooklm

242
from aiskillstore/marketplace

自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。

discover-skills

242
from aiskillstore/marketplace

当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。