Agent skill

Agent Relay

by AgentWorkforce in AgentWorkforce/relay

A skill your agent uses 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…

Apache-2.0Auto-check passedAgent Workflows

Install Agent Relay

skills CLI
$ npx skills add AgentWorkforce/relay --skill agent-relay -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AgentWorkforce/relay agent-relay --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AgentWorkforce/relay.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/codex-relay-skill .claude/skills/agent-relay && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-relay
GitHub stars
865
Token cost
~1.7k tokens
SKILL.md length
923 words
Files
10 (incl. scripts)
Skills in repo
14
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses 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…

  • Works in 6 steps: Set up a workspace. → Register as an agent. Call… → Keep workspace credentials out of… → …
  • You need Codex to coordinate multiple agents through Agent Relay for peer-to-peer messaging
  • SKILL.md covers Auto-setup, Startup protocol, Critical rule and Working rules, plus 4 more sections
  • Runs Shell scripts from its folder; reaches agentrelay.com; needs RELAY_WORKSPACE_KEY and RELAY_API_KEY

What it does

Agent Relay is an agent skill from AgentWorkforce/relay. 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.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts (for example `README.md`, `agents/openai.yaml` and `hooks/hooks.json`).

It sits in Agent Workflows, covering Subagents and Project management. The repository describes itself as: Infrastructure for coding agents. The licence is Apache-2.0.

When your agent uses it

  • You need Codex to coordinate multiple agents through Agent Relay for peer-to-peer messaging
  • Lead/worker handoffs
  • Shared status tracking across sub-agents and terminals

Example prompts

  • “/agent-relay”

Requirements

  • A Bash shell
  • A credential in RELAY_WORKSPACE_KEY
  • A credential in RELAY_API_KEY

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Set up a workspace.
  2. Register as an agent. Call register_agent with your agent name and type: "agent". Use RELAY_AGENT_NAME from the environment if set…
  3. Keep workspace credentials out of output. Never print the workspace key
  4. Check the relay inbox. Call check_inbox to see if there are any pending messages or task assignments.
  5. Send an ACK. If you received a task assignment, send ACK: to your lead via send_dm. If the assignment is unclear, send BLOCKED: instead of…
  6. When the task is complete, send DONE: before stopping.

What it can do on your machine

Read from SKILL.md and the folder at commit 734600d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • agentrelay.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • RELAY_WORKSPACE_KEY
    • RELAY_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Relay loads about 1.7k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 923 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from AgentWorkforce/relay at commit 734600d, republished under its Apache-2.0 licence (© AgentWorkforce). 923 words, ~1,732 tokens.

Download SKILL.mdSave it as .claude/skills/agent-relay/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
agent-relay
description
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.

Agent Relay

Use this skill when Codex needs real-time coordination across multiple agents. It gives Codex a repeatable workflow for:

  • connecting to an Agent Relay workspace
  • spawning relay-aware workers
  • sending direct messages, channel updates, and thread replies
  • keeping lead and worker state synchronized through ACK, STATUS, BLOCKED, and DONE signals

Relay fills the peer-to-peer gap in Codex sub-agent workflows. Codex can spawn and collect worker results, but Agent Relay gives those workers a shared message bus so they can talk to the lead and to each other.

Auto-setup

On first activation, this skill auto-configures Codex by running scripts/setup.sh. This adds the Agent Relay MCP server to .codex/config.toml, enables hooks, installs hooks.json, and copies the relay-worker.toml agent definition. No manual setup is required after installing the skill.

Startup protocol

Every relay-connected Codex agent must complete these steps IN ORDER before substantive work:

  1. Set up a workspace.

    • If RELAY_WORKSPACE_KEY is set in the environment, call set_workspace_key with that key.
    • If only the legacy RELAY_API_KEY alias is set, treat it as the same workspace key.
    • If no key is available, call create_workspace to auto-create one. This returns a workspace key — save it for workers.
  2. Register as an agent. Call register_agent with your agent name and type: "agent". Use RELAY_AGENT_NAME from the environment if set, otherwise derive a name from the task context (e.g., lead, auth-worker).

  3. Keep workspace credentials out of output. Never print the workspace key or construct an observer URL from it — it is an administrative credential. When the user asks to follow the conversation, run agent-relay observer and print the URL it returns. That mints a scoped, read-only token (ot_live_...) that expires in 24 hours and excludes agent DMs, so the link is safe to share. Narrow it further with --channels, widen it with --include-dms or --expires, and revoke it with agent-relay observer revoke <id>.

  4. Check the relay inbox. Call check_inbox to see if there are any pending messages or task assignments.

  5. Send an ACK. If you received a task assignment, send ACK: <one-sentence understanding> to your lead via send_dm. If the assignment is unclear, send BLOCKED: <question> instead of guessing.

  6. When the task is complete, send DONE: <summary with evidence> before stopping.

If workspace creation or registration fails, retry once, then report the failure to the user — do not proceed without a relay connection.

Critical rule

Do not assume the current MCP session already has an active Agent Relay workspace. Always call set_workspace_key or create_workspace before registering.

Working rules

  • Include as: "<agent-name>" on relay calls that support explicit attribution.
  • Keep the relay identity stable for the whole task. Do not switch names mid-task.
  • Check the inbox again after meaningful milestones, before long-running work, and before stopping.
  • Prefer direct messages for lead/worker coordination. Use channels only when multiple agents need the same update.
  • Keep status messages short, factual, and scoped to the assigned work.
  • Do not spawn additional relay workers unless the lead explicitly asks for more delegation.
  • If the lead updates the task, follow the newest explicit instruction.

Message templates

  • ACK: I understand the assignment and I am starting work on <scope>.
  • STATUS: Finished <milestone>; next I am doing <next-step>.
  • BLOCKED: I cannot continue because <blocker>.
  • DONE: Completed <scope>. Evidence: <files changed, commands run, tests, or decisions>.

Worker patterns

There are two current ways to involve more agents. Use the right one for the job.

Show full SKILL.md (362 more words)Show less
Registered workspace identities

Use register_agent for an agent process that is already running and only needs a Relay identity. Registration does not start a new model runtime.

Lead steps:

  1. Ensure workspace exists (set_workspace_key or create_workspace).
  2. Register the lead (register_agent).
  3. Give the other running process the workspace key and tell it to call register_agent with a stable name.
  4. Send the assignment via send_dm(to: "worker-name", text: "...").
  5. Poll lead inbox for ACK (check_inbox).

Worker steps:

  1. Call set_workspace_key with the shared key.
  2. Register with register_agent.
  3. Check inbox (check_inbox).
  4. Send ACK to lead via send_dm.
  5. Perform the assigned scope.
  6. Send DONE to lead via send_dm.
Relay-spawned workers

Use add_agent when the lead should ask Relay to start a provider-backed worker. The current tool requires name, cli, and task; optional fields include channel, persona, and model.

Lead steps:

  1. Ensure workspace exists and lead is registered.
  2. Spawn the worker with add_agent(name: "worker-name", cli: "codex", task: "...").
  3. Include https://agentrelay.com/skill, the lead name, exact scope, and completion criteria in the task prompt.
  4. Poll lead inbox for ACK (check_inbox).
  5. Release the worker with remove_agent after the work is accepted.

Worker steps:

  1. Follow the using-agent-relay role from https://agentrelay.com/skill.
  2. Check inbox, send ACK, do the assigned work, and send DONE.
Codex sub-agents

If your Codex surface has a sub-agent spawn capability, use the bundled relay-worker agent definition for code-heavy work that needs a separate Codex runtime with file access and tools. Include the workspace key, relay name, lead name, exact scope, and completion criteria in the sub-agent prompt. If that spawn capability is not available, use add_agent instead.

Worker ACK fallback

If a worker does not ACK within 30 seconds:

  1. Check whether the worker appears in list_agents.
  2. If this is a running process, have it call register_agent.
  3. If this should be a spawned worker, call add_agent with name, cli, and task.
  4. Send (or re-send) the assignment via send_dm.
  5. Poll the lead inbox again for ACK.
  6. If still no ACK after a second attempt, report the exact failed step to the user.

Handoff template

text
Worker: api-worker
Type: relay-spawned worker (use add_agent with name, cli, and task)
Lead: lead
Scope: check the Agent Relay inbox and confirm connectivity
Protocol:
  1. Check inbox
  2. DM lead with ACK
  3. Perform scope
  4. DM lead with DONE

For code-heavy tasks, change the type line to:

text
Type: Codex sub-agent (use relay-worker if your Codex surface provides sub-agent spawning)

© AgentWorkforce, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts) in plugins/codex-relay-skill of AgentWorkforce/relay.

  • SKILL.md
  • README.md
  • agents/openai.yaml
  • codex-config/config.toml
  • codex-config/relay-worker.toml
  • hooks/hooks.json
  • hooks/prompt-inbox.sh
  • hooks/session-start.sh
  • hooks/stop-inbox.sh
  • scripts/setup.sh

Open the folder on GitHubat commit 734600d

Compare with similar skills

Agent Relay next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Relay compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Relay this skillAgentWorkforce/relay865—~1.7kAutomated safety check: PassApache-2.0
Coherence AuditorGoogleChrome/modern-web-guidance-src1.1k—~901Automated safety check: PassApache-2.0
CCPM Project Managementautomazeio/ccpm8.4k—~1.1kAutomated safety check: PassMIT
Sagawarpdotdev/common-skills606—~4.1kAutomated safety check: PassMIT
Gh Issuestrpc-group/trpc-agent-go1.8k8 repos~8.7kAutomated safety check: PassApache-2.0
PmApra-Labs/apra-fleet101—~5.4kAutomated safety check: PassCustom licence

Similar skills

  • Coherence Auditor

    GoogleChrome/modern-web-guidance-src

    Run a document coherence, link integrity, and git repository status audit across repository markdown files using a dedicated subagent.

    1.1k GitHub stars~901 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Runs a spec-driven workflow from PRD to epic to GitHub issues to parallel agents, with status, standup and blocked-work reports from bundled scripts.

    8.4k GitHub stars~1.1k tokensUpdated 6 mo ago
    Product & Project ManagementAuto-check passed
  • Saga

    warpdotdev/common-skills

    Run an autonomous, spec-driven development "saga" for medium-to-large features using an orchestrator agent and a fleet of worker subagents.

    606 GitHub stars~4.1k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Gh Issues

    trpc-group/trpc-agent-go

    Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments.

    1.8k GitHub starsUsed in 8 repos~8.7k tokens
    Agent WorkflowsAuto-check passed
  • Pm

    Apra-Labs/apra-fleet

    Project Manager skill. An agent skill from Apra-Labs/apra-fleet.

    101 GitHub stars~5.4k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Extracting Requirements

    prime-radiant-inc/iterative-development

    Reads human-written spec documents and produces per-epic requirement files with proof obligations plus behavior scenarios with stable IDs, using parallel chunked extraction.

    181 GitHub stars~2.7k tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed

More from AgentWorkforce/relay

All 14 skills in this repo
  • A skill your agent uses when testing web applications with visual verification - automates Chrome browser interactions, element selection, and screenshot capture for confirming UI functionality

    865 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Debugging Websocket Issues

    AgentWorkforce/relay

    A skill your agent uses when seeing WebSocket errors like "Invalid frame header", "RSV1 must be clear", or "WSERRUNEXPECTEDRSV1" - covers multiple WebSocketServer conflicts, compression issues, and…

    865 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • GitHub OAuth Nango Integration

    AgentWorkforce/relay

    A skill your agent uses when implementing GitHub OAuth + GitHub App authentication with Nango - provides two-connection pattern for user login and repo access with webhook handling

    865 GitHub starsUsed in 1 repo~3.4k tokens
    Auto-check passed
  • Implementing Command Palettes

    AgentWorkforce/relay

    A skill your agent uses when building Cmd+K command palettes in React - covers keyboard navigation with arrow keys, keeping selected items in view with scrollIntoView, filtering with shortcut…

    865 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using Agent Relay

    AgentWorkforce/relay

    A skill your agent uses when you are a registered relay agent (a spawned worker, or a lead that called registeragent) coordinating with peers in real time over current Agent Relay MCP tools -…

    865 GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • A skill your agent uses when deploying changes to staging across relay, relay-dashboard, and relay-cloud repos - coordinates multi-repo branch syncing using git worktrees, automatically triggers…

    865 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed

Questions about Agent Relay

What does Agent Relay do?

A skill your agent uses 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…. Agent Relay is an agent skill from AgentWorkforce/relay. 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.

When should I use Agent Relay?

Agent Relay fits situations like: you need Codex to coordinate multiple agents through Agent Relay for peer-to-peer messaging; lead/worker handoffs; shared status tracking across sub-agents and terminals.

How do I install Agent Relay in Claude Code?

Run `npx skills add AgentWorkforce/relay --skill agent-relay -a claude-code`. Or copy the skill folder (plugins/codex-relay-skill in AgentWorkforce/relay) into .claude/skills/agent-relay in your project. Claude Code loads it when a task matches its description.

How do I install Agent Relay in Codex?

Run `npx skills add AgentWorkforce/relay --skill agent-relay -a codex`. Or copy the skill folder (plugins/codex-relay-skill in AgentWorkforce/relay) into .agents/skills/agent-relay in your project. Codex loads it when a task matches its description.

Can I use Agent Relay in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AgentWorkforce/relay --skill agent-relay -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-relay, .gemini/skills/agent-relay, .github/skills/agent-relay and .opencode/skills/agent-relay in your project.

What does Agent Relay need to run?

Going by SKILL.md and its folder, Agent Relay needs a shell for the scripts in its folder and credentials named RELAY_WORKSPACE_KEY and RELAY_API_KEY. Our summary lists: A Bash shell; A credential in RELAY_WORKSPACE_KEY; A credential in RELAY_API_KEY.

Does Agent Relay access the network?

SKILL.md names 1 domain. In commands or code: agentrelay.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Agent Relay safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Agent Relay use?

Agent Relay is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Relay use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Relay?

Skills that share tags, products or a category with Agent Relay: Coherence Auditor (GoogleChrome/modern-web-guidance-src, 1.1k stars), CCPM Project Management (automazeio/ccpm, 8.4k stars), Saga (warpdotdev/common-skills, 606 stars) and Gh Issues (trpc-group/trpc-agent-go, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Relay?

AgentWorkforce (a GitHub organization) maintains it in AgentWorkforce/relay, which has 865 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.

Source: AgentWorkforce/relay on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.