Manage persisted conversations and messages¶
Read and maintain workspace sessions visible to the current identity. Numeric session and message IDs belong to this service and differ from Agent A2A task/context IDs. For invocation, see Agent tasks and sessions.
List and read¶
Configure credentials using API call basics:
curl "$PRODUCT_API_BASE_URL/workspaces/$WORKSPACE_ID/llm/sessions?page=1&page_size=20" \
-H "X-API-Key: $PRODUCT_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"
Select a conversation ID from data.sessions, save it as SESSION_ID, and paginate using data.total. Use source, keyword, and tag to filter.
curl "$PRODUCT_API_BASE_URL/workspaces/$WORKSPACE_ID/llm/sessions/$SESSION_ID/messages" \
-H "X-API-Key: $PRODUCT_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"
Messages return in data.messages. Check session ownership, numeric roles, status, and content. Lists use after and limit. Set the next after to the previous page’s last message id, continuing until an empty array. data.total counts messages matching role/status filters, not remaining messages after the cursor.
Maintenance¶
Method and path |
Input or result |
|---|---|
|
Read session details. |
|
JSON such as |
|
Preserve needed messages first, then inspect the list afterward. |
|
Save a message record; this does not invoke model generation. |
Omitting expected_title or setting it to null disables the title condition. A mismatch can still return HTTP 200; compare the returned title to confirm whether the update took effect. Only nonempty title and config strings are updated; omission, null and empty strings preserve existing values.
Maintain message responses separately from model regeneration. Numeric IDs come from the same conversation service, not display names. For call sequences, see the SDK guide Manage Conversation Records and the CLI guide Agents, Conversations, and Automations.