Client Messages
The Diminuendo protocol defines 21 distinct client-to-server message types. Every message is a JSON object with atype field that identifies the message kind. The gateway validates each inbound message against an Effect Schema union and rejects anything that does not match with an INVALID_MESSAGE error.
Messages are organized into six functional categories:
| Category | Messages | Count |
|---|---|---|
| Authentication | authenticate | 1 |
| Session Management | list_sessions, create_session, rename_session, archive_session, unarchive_session, delete_session | 6 |
| Session Interaction | join_session, leave_session, run_turn, stop_turn, steer, answer_question | 6 |
| Data Retrieval | get_history, get_events, ping | 3 |
| File Access | list_files, read_file, file_history, file_at_iteration | 4 |
| Administration | manage_members | 1 |
Authentication
authenticate
Authenticates the client with the gateway. Must be the first message sent when the welcome event indicates requiresAuth: true. The gateway validates the token (JWT via Auth0 JWKS in production) and responds with either authenticated or an error with code AUTH_FAILED.
Must be
"authenticate".A valid JWT or API key. In production, this is an Auth0-issued access token. In dev mode, any non-empty string is accepted (or authentication is bypassed entirely).
authenticated on success; error (code AUTH_FAILED or AUTH_RATE_LIMITED) on failure.
Session Management
list_sessions
Retrieves all sessions belonging to the authenticated user’s tenant.
Must be
"list_sessions".When
true, includes archived sessions in the response. Defaults to false.session_list containing an array of SessionMeta objects.
create_session
Creates a new session with the specified agent type. The session is created in inactive status and must be joined before events will flow.
Must be
"create_session".The type of agent to associate with this session (e.g.,
"coding-agent", "echo"). Determines which Podium agent template is instantiated when a turn is run.An optional human-readable name for the session. If omitted, the session’s
name field will be null.An optional key-value map of arbitrary metadata to attach to the session. Stored but not interpreted by the gateway.
session_created containing the full SessionMeta of the new session.
rename_session
Updates the display name of an existing session.
Must be
"rename_session".The UUID of the session to rename.
The new name for the session.
session_updated containing the updated SessionMeta.
archive_session
Marks a session as archived. Archived sessions are hidden from list_sessions by default (unless includeArchived: true is specified) but retain all their data.
Must be
"archive_session".The UUID of the session to archive.
session_archived containing the updated SessionMeta with archived: true.
unarchive_session
Restores a previously archived session to active status.
Must be
"unarchive_session".The UUID of the session to unarchive.
session_unarchived (or session_updated with archived: false).
delete_session
Permanently deletes a session and all associated data — conversation history, events, and workspace files. This operation is irreversible.
Must be
"delete_session".The UUID of the session to delete.
session_deleted confirming the deletion.
Session Interaction
join_session
Joins a session and subscribes to its event stream. The gateway responds with a state_snapshot containing the session’s current state, any in-progress turn, recent conversation history, and sandbox status.
Must be
"join_session".The UUID of the session to join.
If provided, the gateway replays all persistent events with
seq > afterSeq before switching to real-time streaming. Used for reconnection. Omit for a fresh join.state_snapshot on success; error with code SessionNotFound if the session does not exist.
leave_session
Unsubscribes from a session’s event stream. The client will no longer receive events for this session. This is a fire-and-forget message — no response is sent.
Must be
"leave_session".The UUID of the session to leave.
run_turn
Initiates a new agent turn. The gateway reserves billing credits, persists the user message, establishes a Podium agent connection (if not already active), and sends the text to the agent. Events from the agent’s execution stream to all subscribed clients.
Must be
"run_turn".The UUID of the session in which to run the turn.
The user’s message text to send to the agent.
An optional client-generated turn ID for idempotency and correlation. If omitted, the gateway generates a UUID.
turn_started, followed by text_delta / tool_call / thinking.start events, and concluding with turn_complete or turn_error.
The gateway checks billing credits before starting the turn. If the tenant has insufficient credits, an
INSUFFICIENT_CREDITS error is returned immediately, and no agent interaction occurs. A credit reservation is held for the estimated cost of the turn and settled when the turn completes.stop_turn
Requests that the currently running turn be stopped. The gateway forwards the stop signal to the Podium agent, transitions the session state to ready, and broadcasts a session_state event with reason user_stopped.
Must be
"stop_turn".The UUID of the session whose turn should be stopped.
session_state event with state: "idle" and reason: "user_stopped" is broadcast to the session. A stop_acknowledged event may also be sent.
steer
Sends a steering message to the agent while a turn is in progress. Steering allows the user to redirect the agent’s behavior mid-turn without stopping and restarting. The gateway assigns a steerId and broadcasts a steer_sent event to confirm delivery.
Must be
"steer".The UUID of the session.
The steering instruction text.
steer_sent event is broadcast to the session, confirming the steer was delivered to the agent.
answer_question
Responds to a question_requested event from the agent. The agent may ask interactive questions during a turn (e.g., “Which database migration strategy do you prefer?”). This message provides the answers and resumes the turn.
Must be
"answer_question".The UUID of the session.
The
requestId from the corresponding question_requested event. Correlates the answer to the specific question.A map of question IDs to answer strings. Each key corresponds to a question
id from the questions array in the question_requested event.When
true, indicates the user dismissed the question without answering. The agent receives “Question dismissed” and proceeds accordingly. Defaults to false.running state as the agent resumes processing with the provided answers.
Data Retrieval
get_history
Retrieves the conversation message history for a session. Returns messages (user and assistant) ordered by creation time, with optional pagination.
Must be
"get_history".The UUID of the session.
Return only messages after this sequence number. Defaults to
0 (return from the beginning).Maximum number of messages to return. Defaults to
50.history containing an array of message items.
get_events
Retrieves the raw event log for a session. Returns persisted events (turn lifecycle, tool calls, etc.) with their sequence numbers, enabling full event replay.
Must be
"get_events".The UUID of the session.
Return only events after this sequence number. Defaults to
0.Maximum number of events to return. Defaults to
200.events containing an array of event objects with seq, type, data, and createdAt fields.
ping
Measures round-trip latency between the client and gateway. The gateway echoes back the client’s timestamp alongside its own, enabling latency calculation and clock skew estimation.
Must be
"ping".The client’s current Unix timestamp in milliseconds.
pong containing both clientTs (echoed) and serverTs (gateway’s timestamp).
File Access
list_files
Lists files and directories in the agent’s workspace. Requires an active Podium agent connection for the session.
Must be
"list_files".The UUID of the session.
The directory path to list. Defaults to the workspace root if omitted.
Maximum directory traversal depth. Omit for single-level listing.
file_list containing an array of FileEntry objects.
read_file
Reads the contents of a file from the agent’s workspace.
Must be
"read_file".The UUID of the session.
The file path relative to the workspace root.
file_content containing the file’s content, encoding, and size.
file_history
Retrieves the version history (iterations) of a file in the agent’s workspace. Each iteration represents a snapshot of the file at a point in time.
Must be
"file_history".The UUID of the session.
The file path relative to the workspace root.
file_history_result containing an array of IterationMeta objects with iteration number, timestamp, size, and optional hash.
file_at_iteration
Reads the contents of a file at a specific historical iteration, enabling diff views and rollback.
Must be
"file_at_iteration".The UUID of the session.
The file path relative to the workspace root.
The iteration number to retrieve (from
file_history results).file_content containing the file’s content at the specified iteration.
Administration
manage_members
Manages tenant membership: listing members, assigning roles, and removing members. Available actions depend on the caller’s role — listing requires member:read permission, role assignment requires member:write, and removal requires member:delete.
Must be
"manage_members".One of
"list", "set_role", or "remove".Required for
set_role and remove actions. The user ID of the member to modify.Required for
set_role. The new role to assign. Valid roles: "owner", "admin", "member"."list"returnsmember_listwith an array ofMemberRecordobjects."set_role"returnsmember_updatedwith the user ID and new role."remove"returnsmember_removedwith the user ID.
- List Members
- Set Role
- Remove Member