POST /v1/sessions/{sessionId}/events to send
user.* events. Use GET /v1/sessions/{sessionId}/events
and GET /v1/sessions/{sessionId}/events/stream
to receive agent.* and session.* events.
Event envelope
Every listed or streamed event is wrapped in an envelope:| Field | Type | Description |
|---|---|---|
id | string | Gateway event ID. |
type | string | Event type, duplicated from payload.type. |
sessionId | string | Session ID. |
sequence | integer | Monotonic sequence number within the session. |
status | string | Event processing status. |
payload | object | Event-specific payload. |
processedAt | string | ISO timestamp when processing completed, when available. |
createdAt | string | ISO timestamp when the event was created. |
Shared types
Text content block
text value can be up to
20,000 characters.
Stop reason
session.status_idle.stop_reason is one of:
type is requires_action, send the matching user.* response event.
User events
User events are accepted byPOST /v1/sessions/{sessionId}/events.
user.message
Starts a new agent turn.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.message. |
content | text block[] | Yes | User message content. |
user.message is allowed per request. A new user.message is rejected
while another turn is already running.
user.steer
Adds steering text to the current session without starting a normal prompt.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.steer. |
message | string | Yes | Steering instruction. |
user.interrupt
Interrupts the active turn.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.interrupt. |
message | string | No | Optional reason or UI note. |
user.tool_confirmation
Allows or denies a built-in or MCP tool call that requires approval.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.tool_confirmation. |
tool_use_id | string | Yes | id from agent.tool_use or agent.mcp_tool_use. |
result | string | Yes | allow or deny. |
scope | string | No | once, session, or always. Defaults to once when omitted. |
user.custom_tool_result
Returns the result of an application-owned custom tool.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.custom_tool_result. |
tool_use_id | string | Yes | id from agent.custom_tool_use. |
content | text block[] | Yes | Tool result content shown to the model. |
is_error | boolean | No | Defaults to false. Set to true when your tool failed. |
user.clarify_result
Answers an agent clarification request.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.clarify_result. |
request_id | string | Yes | request_id from agent.clarify_request. |
answer | string | Yes | User answer. Empty string means skip. |
user.sudo_result
Supplies a sudo password for a blocked runtime request.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.sudo_result. |
request_id | string | Yes | Runtime request ID. |
password | string | Yes | Password value forwarded to Hermes. |
user.secret_result
Supplies a requested secret value.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be user.secret_result. |
request_id | string | Yes | Runtime request ID. |
value | string | Yes | Secret value forwarded to Hermes. |
Session events
Session events describe turn status and session metadata changes.session.status_running
The agent turn is running.
session.status_idle
The agent turn ended, errored, or paused for required action.
| Field | Type | Description |
|---|---|---|
type | string | session.status_idle. |
stop_reason | object | Why the turn is idle. |
session.title_updated
Live-only event emitted when the gateway generates a session title.
Agent events
Agent events are emitted by the Hermes runtime through the gateway.agent.message
Assistant response content.
| Field | Type | Description |
|---|---|---|
content | text block[] | Assistant text. |
delta | boolean | true for streaming chunks, false for complete durable messages. |
agent.thinking
Reasoning content emitted by the model or runtime.
| Field | Type | Description |
|---|---|---|
content | text block[] | Reasoning text. |
delta | boolean | true for streaming chunks, false for finalized durable reasoning. |
agent.tool_use
Built-in Hermes tool call.
| Field | Type | Description |
|---|---|---|
id | string | Tool use ID. |
tool | string | Tool name. |
input | object | Tool input. |
status | string | Currently running. |
preview | string | Optional human-readable preview. |
requires_action | boolean | Present when the tool requires user.tool_confirmation. |
agent.tool_result
Built-in Hermes tool result.
| Field | Type | Description |
|---|---|---|
tool_use_id | string | ID of the matching agent.tool_use. |
tool | string | Tool name. |
status | string | completed or failed. |
content | text block[] | Tool result text. |
is_error | boolean | Whether the tool result is an error. |
agent.mcp_tool_use
MCP tool call. Shape matches agent.tool_use.
agent.mcp_tool_result
MCP tool result. Shape matches agent.tool_result.
agent.custom_tool_use
Application-owned custom tool request. Your application must execute the tool and
return user.custom_tool_result.
| Field | Type | Description |
|---|---|---|
id | string | Tool use ID to return as user.custom_tool_result.tool_use_id. |
tool | string | Custom tool name from the agent configuration. |
input | object | Model-supplied tool input. |
agent.clarify_request
Blocking clarification question from the agent.
| Field | Type | Description |
|---|---|---|
request_id | string | ID to return as user.clarify_result.request_id. |
question | string | Question to display to the user. |
choices | string[] or null | Multiple-choice options, or null for open-ended answers. |
agent.thread_message_sent
Parent agent delegated work to a subagent or thread.
agent.thread_message_received
Parent agent received a subagent or thread result.
Custom tool handling
Custom tools are host-executed. Herm only brokers the request and response.- Declare a
custom_toolin the agent’stoolsarray. - The model calls the tool during a turn.
- The stream emits
agent.custom_tool_usewith the toolid,toolname, andinput. - The stream emits
session.status_idlewithstop_reason.type: "requires_action"and the custom tool ID. - Your application executes the tool.
- Your application posts
user.custom_tool_resultwithtool_use_idequal to theagent.custom_tool_use.id. - The gateway forwards the result to Hermes and the paused turn continues streaming.

