GET /api/v1/forward/sessions/{session_id}/events/stream
セッションイベントを Server-Sent Events としてストリーミングします。data ペイロードは、イベント履歴エンドポイントと同じ Forward フィルタリングモデルを使用します。
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Accept | Yes | text/event-stream |
Last-Event-ID | No | この Event ID の後から再開します。 |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Session ID。 |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | - | Event の種類でフィルターします。カンマ区切りの値に対応。 |
types[] | string | No | - | 配列形式の Event 種類フィルター。 |
include_tool_calls | boolean | No | true | ツール呼び出しイベントを含めます。 |
include_thinking | boolean | No | true | 思考イベントを含めます。 |
Example request
Example response
HTTP 200 OKIncremental streaming example
Session がincremental_streaming_enabled=true で作成された場合、ストリームには最終的な agent.message の前に増分イベントが含まれることがあります。
Response fields
| Field | Description |
|---|---|
id | SSE イベント ID。Event ID と等しくなります。 |
event | Event の種類。 |
data | フィルタリング済みの Forward Event JSON。ペイロードフィールドは List Session Events に記載された Event type のマトリクスに従います。 |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 400 | invalid_request_error | invalid_event_cursor | Last-Event-ID がこの Session に属していない。 |
| 401 | authentication_error | authentication_required | PAT が無効または期限切れ。 |
| 404 | not_found_error | session_not_found | Session が存在しない。 |
Notes
- 増分ストリーミングは Session の作成リクエストで制御され、このエンドポイントで有効化することはできません。
- 未知の Event 種類は、利用可能な場合はエンベロープのみのイベントとして転送されます。
include_thinking=falseは思考イベントと認識可能な思考デルタをフィルタリングします。include_tool_calls=falseはツール使用イベントと認識可能なツール入出力デルタをフィルタリングします。