Memory
Memory management operations
Memory management operations
Append to memory
Append messages to existing memory content
Path Parameters
Memory reference
Key and messages to append
Response Body
curl -X POST "https://loading/api/v0/memory/string/append" \
-H "Content-Type: application/json" \
-d '{
"key": "string",
"messages": [
{
"property1": null,
"property2": null
}
]
}'
{
"data": {
"appended": 0,
"key": "string",
"success": true,
"total_count": 0
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
Clear memory
Clear all memory content with confirmation
Path Parameters
Memory reference
Key and clear options
Response Body
curl -X POST "https://loading/api/v0/memory/string/clear" \
-H "Content-Type: application/json" \
-d '{
"confirm": true,
"key": "string"
}'
{
"data": {
"backup_created": true,
"key": "string",
"messages_cleared": 0,
"success": true
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
Delete memory
Delete all memory content for a specific key
Path Parameters
Memory reference
Key to delete
Response Body
curl -X POST "https://loading/api/v0/memory/string/delete" \
-H "Content-Type: application/json" \
-d '{
"key": "string"
}'
{
"data": {
"key": "string",
"success": true
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
Flush memory
Flush memory content with optional summarization. The actual_strategy field in the response indicates which flush strategy was used.
Path Parameters
Memory reference
Key and flush options
Response Body
curl -X POST "https://loading/api/v0/memory/string/flush" \
-H "Content-Type: application/json" \
-d '{
"key": "string"
}'
{
"data": {
"actual_strategy": "string",
"dry_run": true,
"error": "string",
"key": "string",
"message_count": 0,
"success": true,
"summary_generated": true,
"token_count": 0,
"would_flush": true
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
Check memory health
Get health status and metrics for memory
Path Parameters
Memory reference
Query Parameters
Memory key
Include detailed stats
Response Body
curl -X GET "https://loading/api/v0/memory/string/health?key=string&include_stats=true"
{
"data": {
"actual_strategy": "string",
"current_tokens": 0,
"healthy": true,
"key": "string",
"last_flush": "string",
"message_count": 0,
"token_count": 0
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
Read memory content
Retrieve memory content for a specific memory reference and key
Path Parameters
Memory reference
Query Parameters
Memory key
Maximum number of messages to return (default: 50, max: 1000)
Number of messages to skip (for pagination)
Response Body
curl -X GET "https://loading/api/v0/memory/string/read?key=string&limit=0&offset=0"
{
"data": {
"has_more": true,
"key": "string",
"limit": 0,
"messages": [
{
"content": "string",
"role": "string"
}
],
"offset": 0,
"total_count": 0
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
Get memory statistics
Retrieve detailed statistics about memory content
Path Parameters
Memory reference
Query Parameters
Memory key
Limit for role distribution calculation (default: 100, max: 10000)
Offset for role distribution calculation
Response Body
curl -X GET "https://loading/api/v0/memory/string/stats?key=string&limit=0&offset=0"
{
"data": {
"context_window_used": 0,
"key": "string",
"message_count": 0,
"pagination_info": {
"has_more": true,
"limit": 0,
"offset": 0,
"total_count": 0
},
"role_distribution": {
"property1": 0,
"property2": 0
},
"token_count": 0,
"token_limit": 0,
"token_utilization": 0
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
Write memory content
Write or replace memory content for a specific memory reference and key
Path Parameters
Memory reference
Key and messages to write
Response Body
curl -X POST "https://loading/api/v0/memory/string/write" \
-H "Content-Type: application/json" \
-d '{
"key": "string",
"messages": [
{
"property1": null,
"property2": null
}
]
}'
{
"data": {
"count": 0,
"key": "string",
"success": true
},
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
{
"data": null,
"error": {
"code": "string",
"details": "string",
"message": "string"
},
"message": "string",
"status": 0
}
curl -X GET "https://loading/api/v0/memory/health"
{
"healthy": true,
"healthy_instances": 0,
"instance_health": {
"property1": {
"consecutive_failures": 0,
"error_message": "string",
"healthy": true,
"last_checked": "string",
"memory_id": "string",
"token_usage": {
"max_tokens": 0,
"near_limit": true,
"usage_percentage": 0,
"used": 0
}
},
"property2": {
"consecutive_failures": 0,
"error_message": "string",
"healthy": true,
"last_checked": "string",
"memory_id": "string",
"token_usage": {
"max_tokens": 0,
"near_limit": true,
"usage_percentage": 0,
"used": 0
}
}
},
"last_checked": "string",
"system_errors": [
"string"
],
"total_instances": 0,
"unhealthy_instances": 0
}
{
"healthy": true,
"healthy_instances": 0,
"instance_health": {
"property1": {
"consecutive_failures": 0,
"error_message": "string",
"healthy": true,
"last_checked": "string",
"memory_id": "string",
"token_usage": {
"max_tokens": 0,
"near_limit": true,
"usage_percentage": 0,
"used": 0
}
},
"property2": {
"consecutive_failures": 0,
"error_message": "string",
"healthy": true,
"last_checked": "string",
"memory_id": "string",
"token_usage": {
"max_tokens": 0,
"near_limit": true,
"usage_percentage": 0,
"used": 0
}
}
},
"last_checked": "string",
"system_errors": [
"string"
],
"total_instances": 0,
"unhealthy_instances": 0
}
Get memory instance health
Returns health information for a specific memory instance
Path Parameters
Memory Instance ID
Response Body
curl -X GET "https://loading/api/v0/memory/health/string"
{
"consecutive_failures": 0,
"error_message": "string",
"healthy": true,
"last_checked": "string",
"memory_id": "string",
"token_usage": {
"max_tokens": 0,
"near_limit": true,
"usage_percentage": 0,
"used": 0
}
}
{
"property1": null,
"property2": null
}