Documentation Index
Fetch the complete documentation index at: https://docs.splox.io/llms.txt
Use this file to discover all available pages before exploring further.
Perform actions on an agent node’s context memory. Supports summarize, trim, clear, and export.
Actions Overview
| Action | Description |
|---|
summarize | Compress older messages into an LLM-generated summary, keeping recent messages intact. |
trim | Drop the oldest messages to bring the count under a limit. |
clear | Remove all messages from the memory instance. |
export | Return all messages without modifying them. |
Summarize
Replaces older messages with a concise LLM-generated summary. The agent node’s configured LLM provider and model are used for summarization.
curl -X POST "https://app.splox.io/api/v1/chat-memory/AGENT_NODE_ID/actions" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "summarize",
"context_memory_id": "SESSION_ID",
"workflow_version_id": "VERSION_ID",
"keep_last_n": 5
}'
Summarize Parameters
| Parameter | Type | Required | Description |
|---|
action | string | ✅ | Must be "summarize". |
context_memory_id | string | ✅ | The context memory ID (resolved chat/session ID). |
workflow_version_id | string (uuid) | ✅ | The workflow version ID. |
keep_last_n | integer | — | Keep this many recent messages; summarize the rest. Defaults to keeping the last 2. |
summarize_prompt | string | — | Custom summarization prompt. Falls back to the agent’s configured prompt. |
Trim
Removes the oldest messages to bring the total count under the specified limit.
result = client.memory.trim(
"AGENT_NODE_ID",
context_memory_id="SESSION_ID",
workflow_version_id="VERSION_ID",
max_messages=20,
)
print(f"Trimmed {result.deleted_count}, {result.remaining_count} remaining")
Trim Parameters
| Parameter | Type | Required | Description |
|---|
action | string | ✅ | Must be "trim". |
context_memory_id | string | ✅ | The context memory ID. |
workflow_version_id | string (uuid) | ✅ | The workflow version ID. |
max_messages | integer | — | Maximum messages to keep (default 10). |
Clear
Removes all messages from the memory instance and resets the context window size to 0.
result = client.memory.clear(
"AGENT_NODE_ID",
context_memory_id="SESSION_ID",
workflow_version_id="VERSION_ID",
)
print(f"Cleared {result.deleted_count} messages")
Export
Returns all memory messages without modifying them.
result = client.memory.export(
"AGENT_NODE_ID",
context_memory_id="SESSION_ID",
workflow_version_id="VERSION_ID",
)
for msg in result.messages:
print(f"[{msg.role}] {msg.content}")
Response
All actions return the same response shape:
{
"action": "summarize",
"message": "Memory summarized successfully",
"deleted_count": 18,
"summary": "[Previous Conversation Summary]\nThe user asked about...",
"remaining_count": 6,
"messages": null
}
| Field | Type | Description |
|---|
action | string | The action that was performed. |
message | string | Human-readable status message. |
deleted_count | integer | Number of messages removed. |
summary | string | The generated summary text (only for summarize). |
messages | array | Full message list (only for export). |
remaining_count | integer | Messages remaining after the action. |