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

Update Session

Request

Update session properties (e.g., title, metadata).

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

Updatable Fields:

  • title: Update the conversation title
  • metadata: Update session metadata (merged with existing)

Example Request:

{
    "title": "Updated Session Title",
    "metadata": {"custom_field": "value"}
}
Path
session_idstring(Session Id)required
Bodyapplication/jsonrequired
titleTitle (string) or Title (null)(Title)

New title for the session

Any of:

New title for the session

string(Title)

New title for the session

metadataMetadata (object) or Metadata (null)(Metadata)

Metadata to merge with existing session metadata

Any of:

Metadata to merge with existing session metadata

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": {}
  }'

Responses

Session updated successfully

Bodyapplication/json
any
Response
application/json
null

Get Session Status

Request

Get processing status for messages in a session.

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

Status Information:

  • Total messages in session
  • Processing status breakdown (queued, analyzing, completed, failed)
  • Any messages with processing errors
Path
session_idstring(Session Id)required
curl -i -X GET \
  'http://memory.papr.ai/v1/messages/sessions/{session_id}/status' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Session processing status

Bodyapplication/json
any
Response
application/json
null

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": [] } }

Memory

Operations

User

Operations

Feedback

Operations

Schema Management

Operations

Messages

Operations

omo

Operations

Sync

Operations

Telemetry

Operations

Document

Operations

GraphQL

Operations

Authentication

Operations