Runs

Sessions

Persist local Studio conversations and continue them across runs.

Sessions store conversation history for one registered agent. Use them to replay development cases and compare behavior after changing instructions or tools.

Create a Session

curl -X POST http://localhost:4021/sessions \
  -H 'content-type: application/json' \
  -d '{"agentId":"support-operations","title":"Order triage"}'
{
  "id": "session_123",
  "agentId": "support-operations",
  "title": "Order triage",
  "messageCount": 0
}

Run With a Session

curl -X POST http://localhost:4021/agents/support-operations/runs \
  -H 'content-type: application/json' \
  -d '{
    "sessionId": "session_123",
    "message": "Check order ORD-1001."
  }'

When sessionId is present, Studio passes the stored messages as history and appends the new run after the final response.

List Sessions

curl 'http://localhost:4021/sessions?agentId=support-operations'

The limit query parameter defaults to 50 and is capped at 100.

Read or Delete a Session

curl http://localhost:4021/sessions/session_123
curl -X DELETE http://localhost:4021/sessions/session_123

Deleting a session also removes its stored traces from the default SQLite store.