Ritual
Overview
Facilitates an isolated meeting, or "ritual" between multiple agents or subagents in order to brainstorm, provide feedback, execute concurrent work related to the same task, reach consensus, etc. The ritual discussion takes place simultaneously using available rooms extension tools.
Requirements
The rooms extension must be installed. See rooms.
When to Use
When multiple agents need to communicate in the same shared context to brainstorm, provide feedback, execute concurrent work related to the same task/project, reach consensus, etc.
Workflow
Step 1: Accept Input
id - The unique identifier of the room ID so that it can be isolated from other rituals. If no ID is provided, one should be chosen by the agent handling the request to initiate a ritual.
facilitator - The agent ID of the agent responsible for facilitating the ritual. This agent can be a member of the ritual as well, but that is not required. The facilitator steers the conversation to remain on topic and surfaces any necessary information or requests to the user. The facilitator should provide regular status updates as to the progress of the ritual, since the user will not be able to see the discussion taking place. If no facilitator is provided, the current agent should assume the role. If an agent ID is provided, a new subagent for that agent ID should be spun up specifically for the ritual. If provided with an existing session ID, connect the live session's agent to the ritual as the facilitator.
members - A list of agents or subagents that will be added to the ritual and expected to participate in the discussion. Existing session IDs can be provided to include current sessions' agents; otherwise, new subagents of the specified agent IDs will be spun up specifically for the ritual.
mode - The spawn mode for subagents created for the ritual. Defaults to run (one-shot, internal only — no Discord threads created). Set to session for multi-phase rituals that require human input between steps (requires thread: true on spawn, which creates Discord threads). Use run for simple, single-phase rituals. Use session when the facilitator needs to steer agents between phases via sessions_send or subagents(action=steer).
purpose - The reason for the ritual. This could be a topic to brainstorm, an issue to troubleshoot, a concept to research, a request for consensus on a decision, or any other topic that would require coordination between multiple entities.
Step 2: Setup the Room
- If the
facilitator is not the agent handling the request, then the agent handling the request should hand this process off to the facilitator and step back
- If no
id was provided, the facilitator should generate one
- The
facilitator should join a new room with the appropriate ID (this will create the room if it doesn't exist)
- If
members includes subagents, the facilitator should spawn any requested subagents using the specified mode (default run). If mode is session, pass thread: true on the spawn call. Include instructions to read this skill document and await the ritual prompt
- If
members includes live agents, the facilitator should message those agents' sessions with instructions to read this skill document and await the ritual prompt
Step 3: Perform the Ritual
- Once all ritual members have announced themselves in the room, the
facilitator should provide them with the ritual prompt
- When the ritual prompt has been received,
members should begin the discussion requested by the ritual prompt, following instructions from the facilitator when provided
- If the
facilitator is included in members, they should participate in the ritual discussion as well as facilitate it
- The
facilitator should help keep the conversation on track, settle disputes, and regularly surface information about the ritual's progress to the user
Step 4: Conclude the Ritual
- If a stalemate has been reached or the conversation is carrying on too long, the
facilitator should request guidance from the user
- When the conversation has concluded (either from consensus or at the user's request), the
facilitator should provide a summary of the ritual to the user and instruct all members to leave the room
Cost Consciousness
Rituals multiply token usage roughly in proportion to the number of participating agents. Each agent runs its own session with full context (system prompt, skill instructions, room history), and every round of discussion means every agent reads and responds.
As a rough guide:
| Setup |
Approximate Token Usage |
| Single agent task |
~15-25k tokens |
| 4-agent ritual, 2 rounds |
~80-100k tokens |
| 4-agent ritual, 4 rounds |
~150-200k+ tokens |
The cost scales with:
- Number of agents — each one is a full session
- Number of discussion rounds — every round means every agent processes and responds
- Context size — agents with larger system prompts or longer room histories use more input tokens
For cost-sensitive situations, keep rituals focused: fewer agents, fewer rounds, and clear prompts that minimize back-and-forth. A well-scoped 2-agent ritual can be just as effective as a 5-agent free-for-all.
Tool Reference
Room Tools
These are the core communication tools for the ritual.
room_join — Join a named room (creates it if it doesn't exist). Used by the facilitator and all members during setup.
room_send — Broadcast a message to all other members in the room. Primary communication method during the ritual.
room_recv — Receive pending messages from the room. Members should poll this to read what others have said.
room_list — List rooms you belong to, or list members of a specific room. Useful for the facilitator to verify all members have joined.
room_leave — Leave the room. Used by all participants when the ritual concludes.
Session Management
These tools handle spawning, messaging, and managing the agents involved.
sessions_spawn — Spawn a new subagent for a given agent ID. Used when members or facilitator specifies an agent ID rather than an existing session.
sessions_send — Send a message to an existing session. Used when members or facilitator references a live session ID.
sessions_list — List active sessions. Useful for resolving session references or verifying agent availability.
subagents (list/steer/kill) — Manage subagents spawned for the ritual. The facilitator can steer participants back on track or kill subagents when the ritual concludes.
1---2name: ritual3description: Facilitates an isolated meeting, or "ritual" between multiple agents or subagents in order to brainstorm, provide feedback, execute concurrent work related to the same task, reach consensus, etc.4---56# Ritual78## Overview910Facilitates an isolated meeting, or "ritual" between multiple agents or subagents in order to brainstorm, provide feedback, execute concurrent work related to the same task, reach consensus, etc. The ritual discussion takes place simultaneously using available `rooms` extension tools.1112## Requirements1314The `rooms` extension must be installed. See [rooms](https://github.com/haliphax-openclaw/extensions/tree/main/rooms).1516## When to Use1718When multiple agents need to communicate in the same shared context to brainstorm, provide feedback, execute concurrent work related to the same task/project, reach consensus, etc.1920## Workflow2122### Step 1: Accept Input2324- `id` - The unique identifier of the room ID so that it can be isolated from other rituals. If no ID is provided, one should be chosen by the agent handling the request to initiate a ritual.25- `facilitator` - The agent ID of the agent responsible for facilitating the ritual. This agent can be a member of the ritual as well, but that is not required. The facilitator steers the conversation to remain on topic and surfaces any necessary information or requests to the user. The facilitator should provide regular status updates as to the progress of the ritual, since the user will not be able to see the discussion taking place. If no facilitator is provided, the current agent should assume the role. If an agent ID is provided, a new subagent for that agent ID should be spun up specifically for the ritual. If provided with an existing session ID, connect the live session's agent to the ritual as the facilitator.26- `members` - A list of agents or subagents that will be added to the ritual and expected to participate in the discussion. Existing session IDs can be provided to include current sessions' agents; otherwise, new subagents of the specified agent IDs will be spun up specifically for the ritual.27- `mode` - The spawn mode for subagents created for the ritual. Defaults to `run` (one-shot, internal only — no Discord threads created). Set to `session` for multi-phase rituals that require human input between steps (requires `thread: true` on spawn, which creates Discord threads). Use `run` for simple, single-phase rituals. Use `session` when the facilitator needs to steer agents between phases via `sessions_send` or `subagents(action=steer)`.28- `purpose` - The reason for the ritual. This could be a topic to brainstorm, an issue to troubleshoot, a concept to research, a request for consensus on a decision, or any other topic that would require coordination between multiple entities.2930### Step 2: Setup the Room3132- If the `facilitator` is not the agent handling the request, then the agent handling the request should hand this process off to the facilitator and step back33- If no `id` was provided, the `facilitator` should generate one34- The `facilitator` should join a new room with the appropriate ID (this will create the room if it doesn't exist)35- If `members` includes subagents, the `facilitator` should spawn any requested subagents using the specified `mode` (default `run`). If `mode` is `session`, pass `thread: true` on the spawn call. Include instructions to read this skill document and await the ritual prompt36- If `members` includes live agents, the `facilitator` should message those agents' sessions with instructions to read this skill document and await the ritual prompt3738### Step 3: Perform the Ritual3940- Once all ritual members have announced themselves in the room, the `facilitator` should provide them with the ritual prompt41- When the ritual prompt has been received, `members` should begin the discussion requested by the ritual prompt, following instructions from the `facilitator` when provided42- If the `facilitator` is included in `members`, they should participate in the ritual discussion as well as facilitate it43- The `facilitator` should help keep the conversation on track, settle disputes, and regularly surface information about the ritual's progress to the user4445### Step 4: Conclude the Ritual4647- If a stalemate has been reached or the conversation is carrying on too long, the `facilitator` should request guidance from the user48- When the conversation has concluded (either from consensus or at the user's request), the `facilitator` should provide a summary of the ritual to the user and instruct all `members` to leave the room4950## Cost Consciousness5152Rituals multiply token usage roughly in proportion to the number of participating agents. Each agent runs its own session with full context (system prompt, skill instructions, room history), and every round of discussion means every agent reads and responds.5354As a rough guide:5556| Setup | Approximate Token Usage |57|---|---|58| Single agent task | ~15-25k tokens |59| 4-agent ritual, 2 rounds | ~80-100k tokens |60| 4-agent ritual, 4 rounds | ~150-200k+ tokens |6162The cost scales with:63- **Number of agents** — each one is a full session64- **Number of discussion rounds** — every round means every agent processes and responds65- **Context size** — agents with larger system prompts or longer room histories use more input tokens6667For cost-sensitive situations, keep rituals focused: fewer agents, fewer rounds, and clear prompts that minimize back-and-forth. A well-scoped 2-agent ritual can be just as effective as a 5-agent free-for-all.6869## Tool Reference7071### Room Tools7273These are the core communication tools for the ritual.7475- `room_join` — Join a named room (creates it if it doesn't exist). Used by the facilitator and all members during setup.76- `room_send` — Broadcast a message to all other members in the room. Primary communication method during the ritual.77- `room_recv` — Receive pending messages from the room. Members should poll this to read what others have said.78- `room_list` — List rooms you belong to, or list members of a specific room. Useful for the facilitator to verify all members have joined.79- `room_leave` — Leave the room. Used by all participants when the ritual concludes.8081### Session Management8283These tools handle spawning, messaging, and managing the agents involved.8485- `sessions_spawn` — Spawn a new subagent for a given agent ID. Used when `members` or `facilitator` specifies an agent ID rather than an existing session.86- `sessions_send` — Send a message to an existing session. Used when `members` or `facilitator` references a live session ID.87- `sessions_list` — List active sessions. Useful for resolving session references or verifying agent availability.88- `subagents` (list/steer/kill) — Manage subagents spawned for the ritual. The facilitator can steer participants back on track or kill subagents when the ritual concludes.