Session object
This object is returned by the endpoints that create, get, list, update, and archive a Session.Template summary
Session stats
Event object
The Events returned by the endpoints are JSON objects that vary bytype. Every returned Event includes the common fields, while different event types carry different payload fields.
The payload fields allowed for each event type are listed below. The table does not repeat the common fields
id, type, session_id, and processed_at.
Event types the client can send
POST /api/v1/forward/sessions/{session_id}/events accepts only the following event types.
system.message is a public Event type, but it is not open as a Forward client write event.
Public event types
When querying history and subscribing to the SSE event stream, you may receive 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, event_start, event_delta, 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.
event_start and event_delta are only returned when subscribing to SSE with event_deltas[].
Incremental streaming events
Forward currently supports two incremental streaming mechanisms:- Event delta streaming (recommended): Subscribe with
event_deltas[]when connecting to the Session Event Stream. - Legacy incremental streaming: Controlled by the
incremental_streaming_enabledfield set at Session creation. Retained for backward compatibility but not recommended for new integrations.
Event delta streaming
Event delta streaming is enabled by passing theevent_deltas[] query parameter when subscribing to the Session Event Stream. It supports repeated parameters with the following allowed values:
When enabled, the SSE stream may additionally return two top-level Event types:
event_start.event fields:
event_delta.delta fields:
event_start example:
event_delta example:
event_start/event_deltaare only returned when subscribing to SSE withevent_deltas[]; history queries do not return these events.- The final complete public event is still returned. Clients can use event delta frames for instant display, then use the final complete event as the persisted or display-calibrated result.
include_thinking=falsefiltersagent.thinkingevent start signals anddelta.content.type=thinkingfragments.include_tool_calls=falsedoes not affectevent_deltas[]currently supported types (agent.messageandagent.thinking), but still filters standard tool-use events and legacy tool input/output deltas.- If the Session was created with
incremental_streaming_enabled=true, that Session uses legacy streaming andevent_deltas[]will not enable event delta streaming.
Legacy incremental streaming
Legacy incremental streaming is controlled by theincremental_streaming_enabled field set when creating the Session, not by request parameters. This feature is retained for backward compatibility but not recommended for new integrations:
true: The event stream returns assistant output fragments before the final completeagent.message; history queries also return the same batch of incremental events.falseor omitted: Normal mode. Only complete public events are returned.
agent.message is still returned. The client can use incremental events for instant display, then use the final agent.message as the persisted or display-calibrated result.
There are only the following 6 legacy top-level incremental event types:
text_delta, thinking_delta, signature_delta, input_json_delta, and tool_output_delta are not top-level Event types; they only appear as agent.content_block_delta.delta.type.
agent.content_block_delta example:
- Both the SSE
event:and the JSONdata.typeuse public Event types. agent.content_block_delta.indexis used to distinguish between multiple content blocks.processed_atmay be missing on incremental events; the client should treat it as an optional field.- After a network interruption, you can use
Last-Event-IDto carry the last received Event ID when reconnecting. - When
include_thinking=false,thinking_delta,signature_delta, and recognizable thinking content block start/stop events are filtered out. - When
include_tool_calls=false,input_json_delta,tool_output_delta, and recognizable tool content block start/stop events are filtered out.