Skip to main content

Sessions

SDK methods for the Sessions module, accessed via soat.sessions. See the Sessions module docs for permissions and data model, and each method's REST page for the full request/response schema.

soat.sessions.createSession()

Create a session

  • Method: POST
  • Path: /api/v1/sessions
await soat.sessions.createSession({
body: { agent_id, /* + optional */ },
});

Request & response schema

soat.sessions.listSessions()

List sessions

  • Method: GET
  • Path: /api/v1/sessions
await soat.sessions.listSessions({
query: { /* + optional */ },
});

Request & response schema

soat.sessions.getSession()

Get a session

  • Method: GET
  • Path: /api/v1/sessions/{session_id}
await soat.sessions.getSession();

Request & response schema

soat.sessions.updateSession()

Update a session

  • Method: PATCH
  • Path: /api/v1/sessions/{session_id}
await soat.sessions.updateSession({
body: { /* + optional */ },
});

Request & response schema

soat.sessions.deleteSession()

Delete a session

  • Method: DELETE
  • Path: /api/v1/sessions/{session_id}
await soat.sessions.deleteSession();

Request & response schema

soat.sessions.addSessionMessage()

Add a user message

  • Method: POST
  • Path: /api/v1/sessions/{session_id}/messages
await soat.sessions.addSessionMessage({
body,
});

Request & response schema

soat.sessions.generateSessionResponse()

Trigger agent generation

  • Method: POST
  • Path: /api/v1/sessions/{session_id}/generate
await soat.sessions.generateSessionResponse({
query: { /* + optional */ },
body: { /* + optional */ },
});

Request & response schema

soat.sessions.submitSessionToolOutputs()

Submit tool outputs

  • Method: POST
  • Path: /api/v1/sessions/{session_id}/tool-outputs
await soat.sessions.submitSessionToolOutputs({
body: { generation_id, tool_outputs },
});

Request & response schema

soat.sessions.getSessionTags()

Get session tags

  • Method: GET
  • Path: /api/v1/sessions/{session_id}/tags
await soat.sessions.getSessionTags();

Request & response schema

soat.sessions.replaceSessionTags()

Replace session tags

  • Method: PUT
  • Path: /api/v1/sessions/{session_id}/tags
await soat.sessions.replaceSessionTags({
body,
});

Request & response schema

soat.sessions.mergeSessionTags()

Merge session tags

  • Method: PATCH
  • Path: /api/v1/sessions/{session_id}/tags
await soat.sessions.mergeSessionTags({
body,
});

Request & response schema