Reference for the Session and Event objects returned by the Forward Session API.
Session object
The Create, Get, List, Update, and Archive Session endpoints all return this object.
{
"id": "sess_xxx",
"type": "session",
"identity_id": "idn_xxx",
"template": {
"id": "tmpl_support",
"type": "template",
"name": "Customer support assistant",
"model": "ultimate",
"version": 3
},
"source_type": "api",
"status": "idle",
"title": "Customer support conversation",
"incremental_streaming_enabled": true,
"metadata": {
"source": "web",
"biz_id": "ticket_123"
},
"config": {
"environment_variables": {
"API_KEY": "sk-xxx"
}
},
"stats": {
"active_seconds": 30,
"duration_seconds": 3600
},
"usage": {
"credits": 12.5
},
"archived_at": null,
"created_at": "2026-06-22T10:00:00Z",
"updated_at": "2026-06-22T11:00:00Z"
}
|
Field |
Type |
Always returned |
Description |
|
|
string |
Yes |
Session ID prefixed with |
|
|
string |
Yes |
Always |
|
|
string |
Yes |
Forward Identity ID that identifies the end user this Session belongs to. |
|
|
object |
Yes |
Forward Template summary. See the Template summary table below. |
|
|
string |
Yes |
Session source: |
|
|
string |
Yes |
Session runtime status: |
|
|
string |
Yes |
Session title. |
|
|
boolean |
Yes |
Whether incremental streaming events are enabled for this Session. Defaults to |
|
|
object |
No |
Caller-defined business metadata. |
|
|
object |
No |
Session configuration. Omitted when no configuration was provided. |
|
|
object |
No |
Session-level environment variables as key-value pairs. |
|
|
object |
No |
Session usage statistics. See the Session stats table below. |
|
|
object |
No |
Usage information. May be omitted when the billing module is not enabled. |
|
|
number |
No |
Credits consumed. |
|
|
string | null |
Yes |
Archival timestamp. |
|
|
string |
Yes |
Creation time in RFC 3339 format. |
|
|
string |
Yes |
Last update time in RFC 3339 format. |
Template summary
|
Field |
Type |
Always returned |
Description |
|
|
string |
Yes |
Forward Template ID. |
|
|
string |
Yes |
Always |
|
|
string |
Yes |
Template name. |
|
|
string |
Yes |
Model tier or model identifier used by the Template. |
|
|
integer |
Yes |
Template version number. |
Session stats
|
Field |
Type |
Always returned |
Description |
|
|
integer |
No |
Active processing time in seconds. Typically |
|
|
integer |
No |
Total session duration in seconds. Typically |
Event object
Events returned by the API are JSON objects whose payload varies with type. Every event carries the same set of common fields, plus type-specific payload fields.
{
"id": "evt_xxx",
"type": "agent.message",
"session_id": "sess_xxx",
"content": [
{
"type": "text",
"text": "Here is the analysis result."
}
],
"processed_at": "2026-06-22T11:00:03Z"
}
|
Field |
Type |
Always returned |
Description |
|
|
string |
Yes |
Event ID prefixed with |
|
|
string |
Yes |
Event type. |
|
|
string |
Yes |
ID of the Session this event belongs to. |
|
|
string |
No |
Time the event was processed, in RFC 3339 format. May be absent on certain agent-generated or incremental events. |
Payload fields allowed on each event type are listed below. The common fields id, type, session_id, and processed_at are not repeated in the table.
|
Event type |
Allowed fields |
|
|
|
|
|
None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None |
|
|
|
|
|
None |
|
|
|
|
|
|
Client-writable event types
POST /api/v1/forward/sessions/{session_id}/events only accepts the event types below.
|
Type |
Required fields |
Description |
|
|
|
User message. |
|
|
None |
Requests that the current turn be interrupted. |
|
|
|
Tool call confirmation. |
|
|
|
Returns the result of a built-in tool. |
|
|
|
Returns the result of a client-defined custom tool. |
|
|
|
Defines the desired outcome and its evaluation rubric. |
system.message is a public event type but is not accepted as a Forward client-writable event.
Public event types
When you query event history or subscribe to the SSE stream, you may receive any of the following public event types:
user.message, user.interrupt, user.tool_confirmation, user.tool_result, user.custom_tool_result, user.define_outcome, system.message, agent.message, agent.thinking, agent.message_start, agent.content_block_start, agent.content_block_delta, agent.content_block_stop, agent.message_delta, agent.message_stop, agent.tool_use, agent.tool_result, agent.custom_tool_use, agent.mcp_tool_use, agent.mcp_tool_result, agent.artifact_delivered, session.status_running, session.status_idle, session.status_terminated, session.error, and session.updated.
Incremental streaming events
Whether incremental streaming events are exposed is controlled by the incremental_streaming_enabled field set at Session creation, not by request parameters on history queries or SSE subscriptions:
-
true: The event stream returns partial assistant output before the finalagent.message. History queries return the same incremental events. -
falseor omitted: Standard mode. Only complete public events are returned; no incremental events are emitted.
When incremental streaming is enabled, the final complete agent.message is still returned. Clients can use incremental events for immediate rendering and rely on the final agent.message as the source of truth for persistence and display reconciliation.
Only the following six top-level event types are incremental:
|
Event type |
Key fields |
Description |
|
|
|
Marks the start of an assistant message. |
|
|
|
Marks the start of a content block, such as text, thinking, or tool use. |
|
|
|
Delivers an incremental fragment for the content block at |
|
|
|
Marks the end of the content block at |
|
|
|
Delivers message-level increments such as |
|
|
|
Marks the end of an assistant message. |
text_delta, thinking_delta, signature_delta, input_json_delta, and tool_output_delta are not top-level event types. They only appear as values of agent.content_block_delta.delta.type.
|
|
Field |
Description |
|
|
|
Text output fragment. Clients can concatenate |
|
|
|
A fragment of the model or provider's thinking output. |
|
|
|
Signature fragment for a thinking block. Emitted only when a signature is present. |
|
|
|
Fragment of the tool input JSON. |
|
|
varies |
Reserved for future streaming of tool output. Today, the complete |
Example of an agent.content_block_delta:
{
"id": "evt_delta_xxx",
"type": "agent.content_block_delta",
"session_id": "sess_xxx",
"message_id": "msg_xxx",
"index": 0,
"delta": {
"type": "text_delta",
"text": "Here"
},
"processed_at": "2026-06-22T11:00:01Z"
}
Rules for parsing incremental events:
-
Both the SSE
event:line and JSONdata.typeuse the public event types. -
agent.content_block_delta.indexdistinguishes between multiple content blocks. -
processed_atmay be absent on incremental events. Clients should treat it as optional. -
After a network interruption, use the
Last-Event-IDheader carrying the last received Event ID to resume. -
Setting
include_thinking=falsefilters outthinking_delta,signature_delta, and any recognizable thinking content block start/stop events. -
Setting
include_tool_calls=falsefilters outinput_json_delta,tool_output_delta, and any recognizable tool content block start/stop events.