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 */ },
});
soat.sessions.listSessions()
List sessions
- Method:
GET - Path:
/api/v1/sessions
await soat.sessions.listSessions({
query: { /* + optional */ },
});
soat.sessions.getSession()
Get a session
- Method:
GET - Path:
/api/v1/sessions/{session_id}
await soat.sessions.getSession();
soat.sessions.updateSession()
Update a session
- Method:
PATCH - Path:
/api/v1/sessions/{session_id}
await soat.sessions.updateSession({
body: { /* + optional */ },
});
soat.sessions.deleteSession()
Delete a session
- Method:
DELETE - Path:
/api/v1/sessions/{session_id}
await soat.sessions.deleteSession();
soat.sessions.addSessionMessage()
Add a user message
- Method:
POST - Path:
/api/v1/sessions/{session_id}/messages
await soat.sessions.addSessionMessage({
body,
});
soat.sessions.generateSessionResponse()
Trigger agent generation
- Method:
POST - Path:
/api/v1/sessions/{session_id}/generate
await soat.sessions.generateSessionResponse({
query: { /* + optional */ },
body: { /* + optional */ },
});
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 },
});
soat.sessions.getSessionTags()
Get session tags
- Method:
GET - Path:
/api/v1/sessions/{session_id}/tags
await soat.sessions.getSessionTags();
soat.sessions.replaceSessionTags()
Replace session tags
- Method:
PUT - Path:
/api/v1/sessions/{session_id}/tags
await soat.sessions.replaceSessionTags({
body,
});
soat.sessions.mergeSessionTags()
Merge session tags
- Method:
PATCH - Path:
/api/v1/sessions/{session_id}/tags
await soat.sessions.mergeSessionTags({
body,
});