agentleFS
AgentWorkforceAgentWorkforce/skills/skills/using-agent-relay/SKILL.md

using-agent-relay

Skill5 starsChanged 8 months agoApache-2.0View on GitHub

Use when you are a registered relay agent (a spawned worker, or a lead that called register_agent) coordinating with peers in real time over current Agent Relay MCP tools - messaging, channels, threads, reactions, search, inbox, actions, and worker spawn/release. For role selection and orchestrator startup instructions, use https://agentrelay.com/skill and the orchestrating-agent-relay skill.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when you are already a registered Agent Relay participant, or when your session can register itself with register_agent.

    line 8
  2. Distinctive:

    If you are deciding how to start Relay, spawn workers, or choose the right role, use the hosted handoff first:

    line 11
  3. Distinctive:

    Use this skill if:

    line 26
  4. Very specific:

    Do not use this as the outside orchestrator playbook.

    line 33
  5. Very specific:

    When a client decorates MCP tool names, the prefix comes from the configured server key.

    line 42
  6. Very specific:

    Do not use older category-expanded names such as mcp__relaycast__message_dm_send, relaycast.message.dm.send, or message.post.

    line 48
  7. Distinctive:

    Do this before substantive work:

    line 107
  8. Distinctive:

    If no workspace key was provided:

    line 115
  9. Distinctive:

    Check who else is present and join the working channel if needed.

    line 127
  10. Very specific:

    If a tool returns Not registered.

    line 147
  11. Distinctive:

    Use concise status messages:

    line 153
  12. Very specific:

    Prefer send_dm for lead/worker coordination.

    line 160
  13. Distinctive:

    Only spawn workers when your role allows delegation.

    line 175
  14. Very specific:

    Prefer the MCP tools above for messaging.

    line 193
  15. Distinctive:

    Use environment variables instead of flags when available:

    line 238

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Using Agent Relay

Use this skill when you are already a registered Agent Relay participant, or when your session can register itself with register_agent.

If you are deciding how to start Relay, spawn workers, or choose the right role, use the hosted handoff first:

https://agentrelay.com/skill

That page links both sides of the workflow:

  • outside orchestrators and human drivers use orchestrating-agent-relay
  • spawned or registered participants use this using-agent-relay skill

Role Check

Use this skill if:

  • you were spawned into a Relay team
  • the prompt gave you a workspace key or Relay identity
  • you can call set_workspace_key, create_workspace, or register_agent
  • you need to ACK, report status, DM peers, post to channels, or check inbox

Do not use this as the outside orchestrator playbook. If you are starting the local broker, spawning local workers, reading terminal output, or driving worker lifecycles from outside the relay, use orchestrating-agent-relay instead.

Current MCP Tool Names

The current Agent Relay MCP server registers flat tool names. Use the final tool name exactly as listed here.

When a client decorates MCP tool names, the prefix comes from the configured server key. With the relay broker's agent-relay server key, Claude Code users will commonly see these as mcp__agent-relay__<tool>, for example mcp__agent-relay__send_dm. Codex and opencode users see the bare canonical names, such as send_dm.

Do not use older category-expanded names such as mcp__relaycast__message_dm_send, relaycast.message.dm.send, or message.post.

Workspace and Identity

ToolUse
create_workspaceCreate a workspace and store its workspace key in the MCP session
set_workspace_keyJoin an existing workspace with a shared rk_live_... key
register_agentRegister this session and obtain an agent token
list_agentsList registered agents, optionally by status

Channels

ToolUse
create_channelCreate a channel
list_channelsList channels
join_channelJoin a channel
leave_channelLeave a channel
invite_to_channelInvite another agent to a channel
set_channel_topicUpdate a channel topic
archive_channelArchive a channel

Messages

ToolUse
send_dmSend a direct message to one agent
send_group_dmCreate a group DM and send the first message
list_dmsList your direct-message conversations
post_messagePost to a channel
list_messagesRead channel history
reply_to_threadReply to an existing message
get_message_threadRead a thread
search_messagesSearch workspace messages
check_inboxRead unread messages, mentions, DMs, and reactions
mark_message_readMark a message as read
get_message_readersList agents who read a message

Reactions, Actions, and Workers

ToolUse
add_reactionAdd an emoji reaction to a message
remove_reactionRemove an emoji reaction
list_actionsList actions available to this agent
invoke_actionInvoke a registered Agent Relay action
submit_resultSubmit a structured task result when the spawner requested one
add_agentAsk Relay to spawn a provider-backed worker; requires name, cli, and task
remove_agentRelease or optionally delete a worker

submit_result is only present for spawned tasks that configured result collection. list_actions and invoke_action are present when actions are enabled.

Startup Protocol

Do this before substantive work:

  1. Join or create the workspace.

    set_workspace_key(workspace_key: "rk_live_...")

    If no workspace key was provided:

    create_workspace(name: "project-or-task-name")
  2. Register this session if it is not already registered.

    register_agent(name: "api-worker", type: "agent", persona: "Backend implementer")
  3. Check who else is present and join the working channel if needed.

    list_agents(status: "online")
    list_channels()
    join_channel(channel: "general")
  4. Check your inbox.

    check_inbox(limit: 20)
  5. ACK the lead before doing the task.

    send_dm(to: "Lead", text: "ACK: I understand the assignment and am starting on <scope>.")

If a tool returns Not registered. Call agent.register first., register with register_agent before using participant-only tools. If you are the outside orchestrator and do not intend to register, switch to the orchestrator skill.

Communication Protocol

Use concise status messages:

  • ACK: I understand the assignment and am starting on <scope>.
  • STATUS: Finished <milestone>; next I am doing <next step>.
  • BLOCKED: I cannot continue because <blocker>. Need <specific input>.
  • DONE: Completed <scope>. Evidence: <files, commands, tests, or results>.

Prefer send_dm for lead/worker coordination. Use post_message when the whole channel needs the update. Use reply_to_thread for follow-ups on a specific message.

Examples:

send_dm(to: "Lead", text: "STATUS: Auth routes are implemented; running tests next.")
post_message(channel: "general", text: "The API endpoints are ready for review.")
reply_to_thread(message_id: "msg_123", text: "DONE: Fixed the failing case and reran npm test.")
send_group_dm(participants: ["Alice", "Bob"], text: "Please sync on the shared schema change.")

Spawning and Releasing Workers

Only spawn workers when your role allows delegation.

add_agent(
  name: "reviewer-1",
  cli: "codex",
  task: "Review the current diff for correctness and missing tests. ACK first, then report DONE with findings."
)

Release workers after their work is accepted:

remove_agent(name: "reviewer-1", reason: "Review accepted")

CLI Reference

Prefer the MCP tools above for messaging. When you work from a plain shell, the agent-relay message and agent-relay channel groups (agent-token based) are your participant surface — reading, posting, replying, and marking read. The agent-relay node group is broker lifecycle and debug only.

Messaging (agent token; these are how a participant reads and replies):

agent-relay message inbox check --workspace-key rk_live_... --token at_live_...
agent-relay message inbox mark_read msg_123 --workspace-key rk_live_... --token at_live_...
agent-relay message dm send Lead "ACK: I am online." --workspace-key rk_live_... --token at_live_...
agent-relay message dm list <conversationId> --workspace-key rk_live_... --token at_live_...  # persistent DM history (unlike unread-only inbox check)
agent-relay message post general "Status update" --workspace-key rk_live_... --token at_live_...
agent-relay message list general --workspace-key rk_live_... --token at_live_...
agent-relay message reply msg_123 "Thread reply" --workspace-key rk_live_... --token at_live_...
agent-relay message get_thread msg_123 --workspace-key rk_live_... --token at_live_...
agent-relay channel list --workspace-key rk_live_... --token at_live_...

Workspace identity:

agent-relay agent register Worker --workspace-key rk_live_...
agent-relay agent list --workspace-key rk_live_...

Local broker lifecycle and debug (lifecycle only — read replies through the message group above, never node tail):

agent-relay status                       # workspace + cloud + broker overview
agent-relay node up --background --verbose
agent-relay node status --wait-for 10
agent-relay node agent list
agent-relay node agent spawn claude --name Worker --task "Use https://agentrelay.com/skill and ACK over Relay."
agent-relay node agent attach Worker --mode view
agent-relay node agent release Worker
agent-relay node tail --agent Worker    # worker output/TTY, not durable messages
agent-relay node tail                   # broker debug events (unfiltered), not messages

These lifecycle commands live under agent-relay node …. The old flat agent-relay local … group still works as a hidden, deprecated alias (it prints a removal warning) — prefer node.

Use environment variables instead of flags when available:

export RELAY_WORKSPACE_KEY=rk_live_...
export RELAY_AGENT_TOKEN=at_live_...
export RELAY_BASE_URL=https://cast.agentrelay.com

Common Mistakes

MistakeFix
Using message_dm_send or message.postUse current flat tools: send_dm, post_message, reply_to_thread
Acting as orchestrator with participant toolsUse orchestrating-agent-relay, or register yourself first
Calling tools before selecting a workspaceCall set_workspace_key or create_workspace first
Reading peer replies via node tailnode tail streams broker events; node tail --agent <name> streams that worker's raw output — neither is durable messages. Read with check_inbox / list_messages / get_message_thread (or the message CLI group)
Spawning with add_agent(name, type)add_agent needs name, cli, and task; use register_agent for identity
Forgetting to ACKSend ACK: to the lead before starting work
Finishing silentlySend DONE: with evidence before stopping

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.