agent-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…
от AgentWorkforce★ 1 167 звёзд на GitHubОб этом скилле
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:
Set up a workspace.
- If
RELAY_WORKSPACE_KEYis set in the environment, callset_workspace_keywith that key. - If only the legacy
RELAY_API_KEYalias is set, treat it as the same workspace key. - If no key is available, call
create_workspaceto auto-create one. This returns a workspace key — save it for workers.
- If
Register as an agent. Call
register_agentwith your agent name andtype: "agent". UseRELAY_AGENT_NAMEfrom the environment if set, otherwise derive a name from the task context (e.g.,lead,auth-worker).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 observerand 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-dmsor--expires, and revoke it withagent-relay observer revoke <id>.Check the relay inbox. Call
check_inboxto see if there are any pending messages or task assignments.Send an ACK. If you received a task assignment, send
ACK: <one-sentence understanding>to your lead viasend_dm. If the assignment is unclear, sendBLOCKED: <question>instead of guessing.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.
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:
- Ensure workspace exists (
set_workspace_keyorcreate_workspace). - Register the lead (
register_agent). - Give the other running process the workspace key and tell it to call
register_agentwith a stable name. - Send the assignment via
send_dm(to: "worker-name", text: "..."). - Poll lead inbox for ACK (
check_inbox).
Worker steps:
- Call
set_workspace_keywith the shared key. - Register with
register_agent. - Check inbox (
check_inbox). - Send ACK to lead via
send_dm. - Perform the assigned scope.
- 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:
- Ensure workspace exists and lead is registered.
- Spawn the worker with `add_agent(name: "worker-n
Установить agent-relay в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл agent-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.
Как установить скилл agent-relay?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-relay запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic