Papr Memory API (1.0.0)

API for managing personal memory items with authentication and user-specific data.

Authentication

This API supports three authentication methods:

  • API Key: Include your API key in the X-API-Key header
    X-API-Key: <your-api-key>
  • Session Token: Include your session token in the X-Session-Token header
    X-Session-Token: <your-session-token>
  • Bearer Token: Include your OAuth2 token from Auth0 in the Authorization header
    Authorization: Bearer <token>

All endpoints require one of these authentication methods.

Download OpenAPI description
Languages
Servers
Production server
http://memory.papr.ai/

v1

Operations

Compress Session

Request

Get compressed conversation context for a session.

Compress your conversation into hierarchical summaries with rich metadata, perfect for reducing token usage in LLM context windows.

Authentication Required: Bearer token, API key, or session token

What it returns:

  • short_term: Last 15 messages compressed
  • medium_term: Last ~100 messages compressed
  • long_term: Full session compressed
  • topics: Key topics discussed
  • enhanced_fields: Project context, tech stack, key decisions, next steps, files accessed

Perfect for:

  • Reducing token usage in LLM prompts (96% savings)
  • Providing conversation context without full history
  • Quick conversation overview for AI agents
  • Project documentation and status snapshots

Input: Just the session ID - all context is extracted automatically

Path
session_idstring(Session Id)required
curl -i -X GET \
  'http://memory.papr.ai/v1/messages/sessions/{session_id}/compress' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Session summary (compressed context)

Bodyapplication/json
session_idstring(Session Id)required

Session ID of the conversation

Example: "session_123"
summariesobject(ConversationSummaryResponse)required

Hierarchical conversation summaries

Example: {"last_updated":"2024-01-15T10:31:00Z","long_term":"Product planning and strategy conversation focused on Q4 roadmap development and execution.","medium_term":"Ongoing product planning discussion for Q4, covering objectives, timelines, and resource allocation.","short_term":"User requested help planning Q4 product roadmap. Assistant offered to help identify key objectives.","topics":["product planning","Q4 roadmap","objectives","strategy"]}
summaries.​short_termShort Term (string) or Short Term (null)(Short Term)

Summary of last 15 messages

Example: "User requested help planning Q4 product roadmap. Assistant offered to help identify key objectives."
Any of:

Summary of last 15 messages

string(Short Term)

Summary of last 15 messages

summaries.​medium_termMedium Term (string) or Medium Term (null)(Medium Term)

Summary of last ~100 messages

Example: "Ongoing product planning discussion for Q4, covering objectives, timelines, and resource allocation."
Any of:

Summary of last ~100 messages

string(Medium Term)

Summary of last ~100 messages

summaries.​long_termLong Term (string) or Long Term (null)(Long Term)

Full session summary

Example: "Product planning and strategy conversation focused on Q4 roadmap development and execution."
Any of:

Full session summary

string(Long Term)

Full session summary

summaries.​topicsArray of strings(Topics)

Key topics discussed

Example: ["product planning","Q4 roadmap","objectives","strategy"]
summaries.​last_updatedLast Updated (string) or Last Updated (null)(Last Updated)

When summaries were last updated

Example: "2024-01-15T10:31:00Z"
Any of:

When summaries were last updated

string(date-time)(Last Updated)

When summaries were last updated

ai_agent_notestring(Ai Agent Note)required

Instructions for AI agents on how to search for more details about this conversation

Example: "To find more details about this conversation, search memories with metadata filter: sessionId='session_123'"
from_cacheboolean(From Cache)required

Whether summaries were retrieved from cache (true) or just generated (false)

Example: true
message_countMessage Count (integer) or Message Count (null)(Message Count)

Number of messages summarized (only present if just generated)

Any of:

Number of messages summarized (only present if just generated)

integer(Message Count)

Number of messages summarized (only present if just generated)

Response
application/json
{ "ai_agent_note": "To find more details about this conversation, search memories with metadata filter: sessionId='session_123'", "from_cache": true, "session_id": "session_123", "summaries": { "last_updated": "2024-01-15T10:31:00Z", "long_term": "Product planning and strategy conversation focused on Q4 roadmap development and execution.", "medium_term": "Ongoing product planning discussion for Q4, covering objectives, timelines, and resource allocation.", "short_term": "User requested help planning Q4 product roadmap. Assistant offered to help identify key objectives.", "topics": [] } }

Process Session Messages

Request

Process all stored messages in a session that were previously stored with process_messages=false.

Authentication Required: Bearer token, API key, or session token

This endpoint allows you to retroactively process messages that were initially stored without processing. Useful for:

  • Processing messages after deciding you want them as memories
  • Batch processing large conversation sessions
  • Re-processing sessions with updated AI models

Processing Behavior:

  • Only processes messages with status 'stored_only' or 'pending'
  • Uses the same smart batch analysis (every 15 messages)
  • Respects existing memory creation pipeline
Path
session_idstring(Session Id)required
curl -i -X POST \
  'http://memory.papr.ai/v1/messages/sessions/{session_id}/process' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Session messages queued for processing

Bodyapplication/json
any
Response
application/json
null

Export memories to OMO format

Request

Export memories in Open Memory Object (OMO) standard format.

This enables memory portability to other OMO-compliant platforms. The exported format follows the OMO v1 schema.

OMO Standard: https://github.com/papr-ai/open-memory-object

Bodyapplication/jsonrequired
memory_idsArray of strings(Memory Ids)required

List of memory IDs to export

curl -i -X POST \
  http://memory.papr.ai/v1/omo/export \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "memory_ids": [
      "string"
    ]
  }'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)
Default 200
statusstring(Status)
Default "success"
countinteger(Count)required

Number of memories exported

memoriesArray of objects(Memories)required

Memories in OMO v1 format

memories[].​property name*anyadditional property
errorError (string) or Error (null)(Error)
Any of:
string(Error)
Response
application/json
{ "code": 200, "status": "success", "count": 0, "memories": [ {} ], "error": "string" }

Memory

Operations

User

Operations

Feedback

Operations

Schema Management

Operations

Messages

Operations

omo

Operations

Sync

Operations

Telemetry

Operations

Document

Operations

GraphQL

Operations

Authentication

Operations