API for managing personal memory items with authentication and user-specific data.
API for managing personal memory items with authentication and user-specific data.
This API supports three authentication methods:
X-API-Key headerX-API-Key: <your-api-key>X-Session-Token headerX-Session-Token: <your-session-token>Authorization headerAuthorization: Bearer <token>All endpoints require one of these authentication methods.
Retrieve message history for a specific conversation session.
Authentication Required: Bearer token, API key, or session token
Pagination:
limit and skip parameters for paginationtotal_count indicates total messages in the sessionSummaries (if available):
context_for_llm field with pre-compressed context/sessions/{session_id}/compress endpoint to retrieve on-demandAccess Control:
curl -i -X GET \
'http://memory.papr.ai/v1/messages/sessions/{session_id}?limit=50&skip=0' \
-H 'X-API-Key: YOUR_API_KEY_HERE'Message history retrieved
List of messages in chronological order
Parse Server objectId of the stored message
Role of the message sender
Content of the message - can be a simple string or structured content objects
Content of the message - can be a simple string or structured content objects
Content of the message - can be a simple string or structured content objects
When the message was created
Hierarchical conversation summaries for context compression
Hierarchical conversation summaries for context compression
Pre-formatted compressed context ready for LLM consumption (summaries + recent messages)
Pre-formatted compressed context ready for LLM consumption (summaries + recent messages)
Pre-formatted compressed context ready for LLM consumption (summaries + recent messages)
{ "context_for_llm": "FULL SESSION: Product planning and strategy conversation\nRECENT (last ~100): Ongoing product planning discussion for Q4\nCURRENT (last 15): User requested help planning Q4 product roadmap", "messages": [ { … }, { … } ], "sessionId": "session_123", "summaries": { "long_term": "Product planning and strategy conversation", "medium_term": "Ongoing product planning discussion for Q4", "short_term": "User requested help planning Q4 product roadmap", "topics": [ … ] }, "total_count": 2 }
Update session properties (e.g., title, metadata).
Authentication Required: Bearer token, API key, or session token
Updatable Fields:
title: Update the conversation titlemetadata: Update session metadata (merged with existing)Example Request:
{
"title": "Updated Session Title",
"metadata": {"custom_field": "value"}
}New title for the session
New title for the session
New title for the session
curl -i -X PATCH \
'http://memory.papr.ai/v1/messages/sessions/{session_id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"title": "string",
"metadata": {}
}'curl -i -X GET \
'http://memory.papr.ai/v1/messages/sessions/{session_id}/status' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'