{"slug":"agent-relay","title":"agent-relay","summary":"Use when you need Codex to coordinate multiple agents through Agent Relay for peer-to-peer messaging, lead/worker handoffs, or shared status tracking across sub-agents and terminals.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-28T17:01:44.176609Z","repo":{"url":"https://github.com/AgentWorkforce/relay","stars":1094,"forks":97,"license":"Apache-2.0","updatedAt":"2026-11-06T18:48:01Z"},"bodyHtml":"<h1>Codex Relay Skill</h1>\n<p>Codex-native multi-agent coordination via Relaycast.</p>\n<h2>What it does</h2>\n<p>This package gives Codex a reusable relay coordination layer so sub-agents can communicate through Relaycast instead of staying limited to parent-only result collection.</p>\n<p>It includes:</p>\n<ul>\n<li>a Codex skill that teaches lead and worker messaging protocol</li>\n<li>an Agent Relay MCP dependency declaration</li>\n<li>a template Agent Relay MCP config block for <code>.codex/config.toml</code></li>\n<li>a <code>relay-worker</code> custom agent template for <code>.codex/agents/</code></li>\n</ul>\n<p>With these pieces installed, Codex can:</p>\n<ul>\n<li>coordinate teams through direct messages, channels, and threads</li>\n<li>require ACK/DONE signaling from workers</li>\n<li>let workers send peer-to-peer updates through Relaycast</li>\n<li>reuse the same relay workflow across project-scoped and user-scoped setups</li>\n</ul>\n<h2>Installation</h2>\n<pre><code>mkdir -p .agents/skills\ncp -R plugins/codex-relay-skill .agents/skills/agent-relay\n</code></pre>\n<p>That's it. Everything else is automatic.</p>\n<p>On first use, the skill self-installs by running <code>scripts/setup.sh</code>, which:</p>\n<ul>\n<li>adds the Agent Relay MCP server to <code>.codex/config.toml</code></li>\n<li>enables <code>features.codex_hooks = true</code></li>\n<li>writes <code>.codex/hooks.json</code> with SessionStart, UserPromptSubmit, and Stop hooks</li>\n<li>installs <code>.codex/agents/relay-worker.toml</code></li>\n</ul>\n<p>All of this is idempotent — safe to run multiple times, and it merges with existing config rather than overwriting.</p>\n<p>For user-wide availability, install to <code>$HOME/.agents/skills/agent-relay</code> instead.</p>\n<h3>Optional: join an existing workspace</h3>\n<p>Set <code>RELAY_API_KEY</code> before launching Codex to join a specific Relaycast workspace:</p>\n<pre><code>export RELAY_API_KEY=\"rk_live_your_key_here\"\n</code></pre>\n<p>If unset, a new workspace is auto-created on the first session.</p>\n<details>\n<summary>Manual setup (advanced)</summary>\n<p>If you prefer to configure everything manually instead of using the auto-installer:</p>\n<ol>\n<li>Add to <code>.codex/config.toml</code>:</li>\n</ol>\n<pre><code>features.codex_hooks = true\n\n[mcp_servers.agent-relay]\ncommand = \"npx\"\nargs = [\"-y\", \"agent-relay\", \"mcp\"]\nenv = { RELAY_API_KEY = \"\", RELAY_BASE_URL = \"https://cast.agentrelay.com\", RELAY_AGENT_TYPE = \"agent\" }\n</code></pre>\n<ol start=\"2\">\n<li>Copy hooks config:</li>\n</ol>\n<pre><code>cp .agents/skills/agent-relay/hooks/hooks.json .codex/hooks.json\n</code></pre>\n<ol start=\"3\">\n<li>Install the worker agent:</li>\n</ol>\n<pre><code>mkdir -p .codex/agents\ncp .agents/skills/agent-relay/codex-config/relay-worker.toml .codex/agents/relay-worker.toml\n</code></pre>\n</details>\n<h2>Usage</h2>\n<h3>Use the skill directly</h3>\n<p>Invoke the skill explicitly:</p>\n<pre><code>$agent-relay Coordinate this refactor with two workers and keep all status updates in Relaycast.\n</code></pre>\n<p>Or describe the task naturally and let Codex match the skill from its description.</p>\n<h3>Spawn relay workers</h3>\n<p>Once <code>relay-worker.toml</code> is installed, delegate bounded tasks to the <code>relay-worker</code> custom agent and include:</p>\n<ul>\n<li>the worker relay name</li>\n<li>the lead relay name</li>\n<li>the workspace-key source</li>\n<li>exact task scope</li>\n<li>completion criteria</li>\n</ul>\n<p>Example:</p>\n<pre><code>Spawn a relay-worker named api-worker.\nHave it check Relaycast, ACK me, update the API route tests only, send STATUS after the first green test run, and send DONE with evidence before exit.\n</code></pre>\n<h3>Coordinate a team</h3>\n<p>Use Relaycast when workers need to message each other directly, not only the lead. Good fits:</p>\n<ul>\n<li>parallel implementation across separate subsystems</li>\n<li>lead/worker review loops</li>\n<li>shared channel updates for longer-running tasks</li>\n<li>cross-terminal or cross-machine collaboration</li>\n</ul>\n<h2>Environment variables</h2>\n<table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Required</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>RELAY_API_KEY</code></td>\n<td>No</td>\n<td><code>\"\"</code> in the template config</td>\n<td>Relaycast workspace key</td>\n</tr>\n<tr>\n<td><code>RELAY_BASE_URL</code></td>\n<td>No</td>\n<td><code>https://cast.agentrelay.com</code></td>\n<td>Relaycast API base URL</td>\n</tr>\n<tr>\n<td><code>RELAY_AGENT_TYPE</code></td>\n<td>No</td>\n<td><code>agent</code></td>\n<td>Default Relaycast agent type</td>\n</tr>\n<tr>\n<td><code>RELAY_AGENT_NAME</code></td>\n<td>No</td>\n<td>unset</td>\n<td>Optional stable relay identity when your workflow wants a fixed name</td>\n</tr>\n</tbody>\n</table>\n<h2>Plugin structure</h2>\n<pre><code>codex-relay-skill/\n  SKILL.md                    # Codex skill manifest and workflow instructions\n  README.md                   # Installation and usage docs\n  agents/\n    openai.yaml              # Agent Relay MCP dependency metadata\n  codex-config/\n    config.toml              # Template MCP server config for .codex/config.toml\n    relay-worker.toml        # Template custom worker agent for .codex/agents/\n  scripts/\n    setup.sh                 # Auto-installer (runs on first skill activation)\n  hooks/\n    hooks.json               # Hook definitions (SessionStart, Stop, UserPromptSubmit)\n    session-start.sh         # Auto-connect and state persistence\n    stop-inbox.sh            # Block exit while unread messages exist\n    prompt-inbox.sh          # Rate-limited inbox polling and context injection\n</code></pre>\n<p>Installed layout in a project typically looks like:</p>\n<pre><code>.agents/skills/agent-relay/   # Skill directory Codex scans\n.codex/config.toml            # Runtime Agent Relay MCP server + features.codex_hooks\n.codex/hooks.json             # Hook wiring (copied from skill)\n.codex/agents/relay-worker.toml\n</code></pre>\n","files":[{"path":"agents/openai.yaml","sizeBytes":224,"isText":true},{"path":"codex-config/config.toml","sizeBytes":358,"isText":true},{"path":"codex-config/relay-worker.toml","sizeBytes":1162,"isText":true},{"path":"hooks/hooks.json","sizeBytes":887,"isText":true},{"path":"hooks/prompt-inbox.sh","sizeBytes":4177,"isText":true},{"path":"hooks/session-start.sh","sizeBytes":7467,"isText":true},{"path":"hooks/stop-inbox.sh","sizeBytes":3967,"isText":true},{"path":"README.md","sizeBytes":5404,"isText":true},{"path":"scripts/setup.sh","sizeBytes":9009,"isText":true},{"path":"SKILL.md","sizeBytes":6931,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"notes-only","suspicious":0,"notes":3,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-08-28T17:01:51.952556Z","sha256":"9801B7239351311876FF74784126E7B56AF005EFA0E6423C18D3F549EDD6BCB1","sizeBytes":14754},"review":null,"source":{"repositoryUrl":"https://github.com/AgentWorkforce/relay","path":"plugins/codex-relay-skill","license":"Apache-2.0","commit":"30cdc9ef645bf667f801585ea123152d0655aa6f","subtreeSha":"E0B0F27AB7EE409F9572752CAF37348BE2D0990C36004582B715E7EFA5B0492E","lastSyncedAt":"2026-11-06T21:45:10.684318Z"},"reviewedAt":"2026-08-28T17:02:01.614702Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/AgentWorkforce/relay/tree/main/plugins/codex-relay-skill"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install agentworkforce-relay@llmmart"},{"target":"git","command":"git clone https://github.com/AgentWorkforce/relay.git"}]}