Skip to main content
PATCH
Update session state
Use stateDelta to update selected state keys; unspecified keys are retained. The service records the state change and returns the updated session without running the agent
This operation changes an existing session, and subsequent invocations use the updated state. Confirm the application, user, session, and values to overwrite before sending the request

Authorizations

Authorization
string
header
required

Optional locally without a gateway; cloud deployments use the Runtime API key or user-pool JWT required by that deployment, never the model API key

Path Parameters

app_name
string
required

Application name; harness_agent for the CLI deployment

user_id
string
required

User ID

session_id
string
required

Session ID

Body

application/json
stateDelta
Statedelta · object
required

Session state changes to apply

Response

Successful response

id
string
required

Identifier

appName
string
required

Application name

userId
string
required

User ID

state
State · object

Session state as key-value pairs

events
Event · object[]

Session events

lastUpdateTime
number
default:0

Last update time as a Unix timestamp in seconds

Last modified on September 19, 2026