---
title: "Set Session Stream"
method: POST
path: "/sessions/streams/"
tags: ["Sessions", "Sessions"]
---

# Set Session Stream

`POST /sessions/streams/`

## Request body

- SessionStreamCommandRequest — The set_session_stream edit: a state mutation over the lock/row nest. Runs nothing itself — the runner (execution plane) is the only thing that runs. `data` mirrors the workflow-invoke shape (`WorkflowServiceRequestData`, keyed on `.inputs`) so the discriminator aligns with `WorkflowInvokeRequest.data.inputs` rather than a bespoke `prompt` string.
  - `session_id` string, required
  - `data` WorkflowRequestData
    - `revision` object, nullable
    - `parameters` object, nullable
    - `testcase` object, nullable
    - `inputs` object, nullable
    - `trace` object, nullable
    - `outputs` unknown
  - `force` boolean
  - `detached` boolean

## Response `200`

Successful Response

- SessionStreamCommandResponse
  - `mode` 'send' | 'steer' | 'cancel' | 'attach', required — Derived from the inputs/data × force matrix.
  - `session_id` string, required
  - `turn_id` string, nullable
  - `watcher_id` string, nullable
  - `detached` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/ea6421d829f1/schema)
