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.
Delete all memory items for a user.
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerUser Resolution:
Required Headers:
WARNING: This operation cannot be undone. All memories for the resolved user will be permanently deleted.
Optional user ID to delete memories for (if not provided, uses authenticated user)
Optional user ID to delete memories for (if not provided, uses authenticated user)
Optional user ID to delete memories for (if not provided, uses authenticated user)
Optional external user ID to resolve and delete memories for
Optional external user ID to resolve and delete memories for
Optional external user ID to resolve and delete memories for
curl -i -X DELETE \
'http://memory.papr.ai/v1/memory/all?external_user_id=string&skip_parse=false&user_id=string' \
-H 'X-API-Key: YOUR_API_KEY_HERE'All memories successfully deleted
Human-readable status message
Human-readable status message
Human-readable status message
Batch-level error message, if any
Batch-level error message, if any
Batch-level error message, if any
Additional error details or context
Additional error details or context
Additional error details or context
{ "code": 200, "status": "success", "message": "string", "error": "string", "details": {}, "successful": [ { … } ], "errors": [ { … } ], "total_processed": 0, "total_successful": 0, "total_failed": 0, "total_content_size": 0, "total_storage_size": 0 }
Search through memories with authentication required.
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerResponse Format Options: Choose between standard JSON or TOON (Token-Oriented Object Notation) format:
response_format=toon query parametertext/plain with TOON-formatted content/v1/memory/search?response_format=toonCustom Schema Support: This endpoint supports both system-defined and custom user-defined node types:
When custom schema nodes are returned:
schema_id field referencing the UserGraphSchemaschemas_used array listing all schema IDs usedGET /v1/schemas/{schema_id} to retrieve full schema definitions including:Recommended Headers:
Accept-Encoding: gzipThe API supports response compression for improved performance. Responses larger than 1KB will be automatically compressed when this header is present.
HIGHLY RECOMMENDED SETTINGS FOR BEST RESULTS:
enable_agentic_graph: true for intelligent, context-aware search that can understand ambiguous referencesmax_memories: 15-20 for comprehensive memory coveragemax_nodes: 10-15 for comprehensive graph entity relationshipsresponse_format: toon when integrating with LLMs to reduce token costs by 30-60%Agentic Graph Benefits: When enabled, the system can understand vague references by first identifying specific entities from your memory graph, then performing targeted searches. For example:
Role-Based Memory Filtering: Filter memories by role and category using metadata fields:
metadata.role: Filter by "user" or "assistant"metadata.category: Filter by category (user: preference, task, goal, facts, context | assistant: skills, learning)User Resolution Precedence:
HIGHLY RECOMMENDED: Maximum number of memories to return. Use at least 15-20 for comprehensive results. Lower values (5-10) may miss relevant information. Default is 20 for optimal coverage.
HIGHLY RECOMMENDED: Maximum number of neo nodes to return. Use at least 10-15 for comprehensive graph results. Lower values may miss important entity relationships. Default is 15 for optimal coverage.
Detailed search query describing what you're looking for. For best results, write 2-3 sentences that include specific details, context, and time frame. Examples: 'Find recurring customer complaints about API performance from the last month. Focus on issues where customers specifically mentioned timeout errors or slow response times in their conversations.' 'What are the main issues and blockers in my current projects? Focus on technical challenges and timeline impacts.' 'Find insights about team collaboration and communication patterns from recent meetings and discussions.'
HIGHLY RECOMMENDED: Enable agentic graph search for intelligent, context-aware results. When enabled, the system can understand ambiguous references by first identifying specific entities from your memory graph, then performing targeted searches. Examples: 'customer feedback' → identifies your customers first, then finds their specific feedback; 'project issues' → identifies your projects first, then finds related issues; 'team meeting notes' → identifies team members first, then finds meeting notes. This provides much more relevant and comprehensive results. Set to false only if you need faster, simpler keyword-based search.
Your application's user identifier to filter search results. This is the primary way to identify users. Use this for your app's user IDs (e.g., 'user_alice_123', UUID, email).
Your application's user identifier to filter search results. This is the primary way to identify users. Use this for your app's user IDs (e.g., 'user_alice_123', UUID, email).
Your application's user identifier to filter search results. This is the primary way to identify users. Use this for your app's user IDs (e.g., 'user_alice_123', UUID, email).
Optional organization ID for multi-tenant search scoping. When provided, search is scoped to memories within this organization.
Optional organization ID for multi-tenant search scoping. When provided, search is scoped to memories within this organization.
Optional organization ID for multi-tenant search scoping. When provided, search is scoped to memories within this organization.
Optional namespace ID for multi-tenant search scoping. When provided, search is scoped to memories within this namespace.
Optional namespace ID for multi-tenant search scoping. When provided, search is scoped to memories within this namespace.
Optional namespace ID for multi-tenant search scoping. When provided, search is scoped to memories within this namespace.
Optional user-defined schema ID to use for this search. If provided, this schema (plus system schema) will be used for query generation. If not provided, system will automatically select relevant schema based on query content.
Optional user-defined schema ID to use for this search. If provided, this schema (plus system schema) will be used for query generation. If not provided, system will automatically select relevant schema based on query content.
Optional user-defined schema ID to use for this search. If provided, this schema (plus system schema) will be used for query generation. If not provided, system will automatically select relevant schema based on query content.
Optional metadata filter. Any field in MemoryMetadata (including custom fields) can be used for filtering.
Optional metadata filter. Any field in MemoryMetadata (including custom fields) can be used for filtering.
OPTIONAL: Override automatic search query generation with your own exact graph pattern and filters. ⚡ AUTOMATIC BY DEFAULT: If not provided, the system automatically generates optimized Cypher queries using AI - no action required! 🎯 USE WHEN: You want precise control over search patterns, have specific graph traversals in mind, or want to bypass AI query generation for performance. 📋 VALIDATION: All patterns and filters must comply with your schema definitions.
OPTIONAL: Override automatic search query generation with your own exact graph pattern and filters. ⚡ AUTOMATIC BY DEFAULT: If not provided, the system automatically generates optimized Cypher queries using AI - no action required! 🎯 USE WHEN: You want precise control over search patterns, have specific graph traversals in mind, or want to bypass AI query generation for performance. 📋 VALIDATION: All patterns and filters must comply with your schema definitions.
Optional reranking configuration. If provided, enables reranking with specified provider (OpenAI or Cohere) and model. If not provided but rank_results=True, uses default OpenAI reranking.
Optional reranking configuration. If provided, enables reranking with specified provider (OpenAI or Cohere) and model. If not provided but rank_results=True, uses default OpenAI reranking.
Optional holographic neural embedding configuration. Enables H-COND (Holographic CONDitional) phase alignment scoring for improved semantic relevance. Uses 13 brain-inspired frequency bands.
Optional holographic neural embedding configuration. Enables H-COND (Holographic CONDitional) phase alignment scoring for improved semantic relevance. Uses 13 brain-inspired frequency bands.
Optional OMO (Open Memory Object) safety filter. Filter search results by consent level and/or risk level. Use this to exclude memories without proper consent or flagged content from search results.
Optional OMO (Open Memory Object) safety filter. Filter search results by consent level and/or risk level. Use this to exclude memories without proper consent or flagged content from search results.
DEPRECATED: Use 'reranking_config' instead. Whether to enable additional ranking of search results. Default is false because results are already ranked when using an LLM for search (recommended approach). Only enable this if you're not using an LLM in your search pipeline and need additional result ranking. Migration: Replace 'rank_results: true' with 'reranking_config: {reranking_enabled: true, reranking_provider: "cohere", reranking_model: "rerank-v3.5"}'
DEPRECATED: Use 'external_user_id' instead. Internal Papr Parse user ID. Most developers should not use this field directly.
DEPRECATED: Use 'external_user_id' instead. Internal Papr Parse user ID. Most developers should not use this field directly.
DEPRECATED: Use 'external_user_id' instead. Internal Papr Parse user ID. Most developers should not use this field directly.
curl -i -X POST \
'http://memory.papr.ai/v1/memory/search?max_memories=20&max_nodes=15&response_format=json' \
-H 'Accept-Encoding: gzip' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"enable_agentic_graph": false,
"external_user_id": "external_user_123",
"query": "Find recurring customer complaints about API performance from the last month. Focus on issues that multiple customers have mentioned and any specific feature requests or workflow improvements they'\''ve suggested.",
"rank_results": true
}'Successfully retrieved memories
Search results if successful
Search results if successful
Error message if failed
Error message if failed
Error message if failed
Additional error details or context
Additional error details or context
Additional error details or context
Unique identifier for this search query, maps to QueryLog objectId in Parse Server
Unique identifier for this search query, maps to QueryLog objectId in Parse Server
Unique identifier for this search query, maps to QueryLog objectId in Parse Server
Standard response when only system-defined node types are found
{ "code": 200, "status": "success", "data": { "memories": [ … ], "nodes": [ … ] }, "search_id": "search-789" }
curl -i -X POST \
http://memory.papr.ai/v1/user \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"email": "user@example.com",
"external_id": "user123",
"metadata": {
"name": "John Doe",
"preferences": {
"theme": "dark"
}
},
"type": "developerUser"
}'{ "code": 200, "created_at": "2024-03-20T10:00:00.000Z", "email": "user@example.com", "external_id": "user123", "metadata": { "name": "John Doe", "preferences": { … } }, "status": "success", "updated_at": "2024-03-20T10:00:00.000Z", "user_id": "abc123" }