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.
Add a new memory item to the system with size validation and background processing.
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerRequired Headers:
Role-Based Memory Categories:
New Metadata Fields:
metadata.role: Optional field to specify who generated the memory (user or assistant)metadata.category: Optional field for memory categorization based on roleThe API validates content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).
If True, skips adding background tasks for processing
If True, applies holographic neural transforms and stores in holographic collection
Response format. Use 'omo' for Open Memory Object standard format (portable across platforms).
Response format. Use 'omo' for Open Memory Object standard format (portable across platforms).
Response format. Use 'omo' for Open Memory Object standard format (portable across platforms).
Unified policy for graph generation and OMO safety. Use mode='auto' (LLM extraction, constraints applied if provided) or 'manual' (exact nodes). Includes consent, risk, and ACL settings. If schema_id is set, schema's memory_policy is used as defaults.
Unified policy for graph generation and OMO safety. Use mode='auto' (LLM extraction, constraints applied if provided) or 'manual' (exact nodes). Includes consent, risk, and ACL settings. If schema_id is set, schema's memory_policy is used as defaults.
Shorthand DSL for node/edge constraints. Expands to memory_policy.node_constraints and edge_constraints. Formats: - String: 'Task:title' (semantic match on Task.title) - List: ['Task:title', 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}} (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact), 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special: '$this', '$previous', '$context:N' Example: 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
Shorthand DSL for node/edge constraints. Expands to memory_policy.node_constraints and edge_constraints. Formats: - String: 'Task:title' (semantic match on Task.title) - List: ['Task:title', 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}} (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact), 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special: '$this', '$previous', '$context:N' Example: 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
Shorthand DSL for node/edge constraints. Expands to memory_policy.node_constraints and edge_constraints. Formats: - String: 'Task:title' (semantic match on Task.title) - List: ['Task:title', 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}} (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact), 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special: '$this', '$previous', '$context:N' Example: 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
The content of the memory item you want to add to memory
Memory item type; defaults to 'text' if omitted
Optional organization ID for multi-tenant memory scoping. When provided, memory is associated with this organization.
Optional organization ID for multi-tenant memory scoping. When provided, memory is associated with this organization.
Optional organization ID for multi-tenant memory scoping. When provided, memory is associated with this organization.
Optional namespace ID for multi-tenant memory scoping. When provided, memory is associated with this namespace.
Optional namespace ID for multi-tenant memory scoping. When provided, memory is associated with this namespace.
Optional namespace ID for multi-tenant memory scoping. When provided, memory is associated with this namespace.
Your application's user identifier. This is the primary way to identify users. Use this for your app's user IDs (e.g., 'user_alice_123', UUID, email). Papr will automatically resolve or create internal users as needed.
Your application's user identifier. This is the primary way to identify users. Use this for your app's user IDs (e.g., 'user_alice_123', UUID, email). Papr will automatically resolve or create internal users as needed.
Your application's user identifier. This is the primary way to identify users. Use this for your app's user IDs (e.g., 'user_alice_123', UUID, email). Papr will automatically resolve or create internal users as needed.
Metadata used in graph and vector store for a memory item. Include role and category here.
Metadata used in graph and vector store for a memory item. Include role and category here.
Conversation history context for this memory. Use for providing message history when adding a memory. Format: [{role: 'user'|'assistant', content: '...'}]
Conversation history context for this memory. Use for providing message history when adding a memory. Format: [{role: 'user'|'assistant', content: '...'}]
DEPRECATED: Use 'memory_policy' instead. Legacy graph generation configuration. If both memory_policy and graph_generation are provided, memory_policy takes precedence.
DEPRECATED: Use 'memory_policy' instead. Legacy graph generation configuration. If both memory_policy and graph_generation are provided, memory_policy takes precedence.
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.
DEPRECATED: Use 'memory_policy' instead. Migration options: 1. Specific memory: relationships=[{source: '$this', target: 'mem_123', type: 'FOLLOWS'}] 2. Previous memory: link_to_previous_memory=True 3. Related memories: link_to_related_memories=3
DEPRECATED: Use 'memory_policy' instead. Migration options: 1. Specific memory: relationships=[{source: '$this', target: 'mem_123', type: 'FOLLOWS'}] 2. Previous memory: link_to_previous_memory=True 3. Related memories: link_to_related_memories=3
curl -i -X POST \
'http://memory.papr.ai/v1/memory?enable_holographic=false&format=string&skip_background_processing=false' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"content": "Meeting with John Smith from Acme Corp about the Q4 project timeline",
"context": [
{
"content": "Let'\''s discuss the Q4 project timeline with John",
"role": "user"
},
{
"content": "I'\''ll help you prepare for the timeline discussion. What are your key milestones?",
"role": "assistant"
}
],
"graph_override": {
"nodes": [
{
"id": "person_john_smith",
"label": "Person",
"properties": {
"name": "John Smith",
"role": "Project Manager",
"description": "Senior PM at Acme Corp"
}
},
{
"id": "company_acme_corp",
"label": "Company",
"properties": {
"name": "Acme Corp",
"description": "Client company for Q4 project"
}
}
],
"relationships": [
{
"properties": {
"role": "Project Manager"
},
"relationship_type": "WORKS_FOR",
"source_node_id": "person_john_smith",
"target_node_id": "company_acme_corp"
}
]
},
"metadata": {
"conversationId": "conv-123",
"createdAt": "2024-10-04T10:00:00Z",
"emoji_tags": "📅,👥,📋",
"emotion_tags": "focused, productive",
"external_user_id": "external_user_123",
"external_user_read_access": [
"external_user_123",
"external_user_789"
],
"external_user_write_access": [
"external_user_123"
],
"hierarchical_structures": "Business/Meetings/Project Planning",
"location": "Conference Room A",
"sourceUrl": "https://calendar.example.com/meeting/123",
"topics": [
"product",
"planning"
]
},
"type": "text"
}'{ "code": 200, "status": "success", "data": [ { … } ] }
Update an existing memory item by ID.
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerRequired Headers:
The API validates content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).
Unified policy for graph generation and OMO safety. Use mode='auto' (LLM extraction, constraints applied if provided) or 'manual' (exact nodes). Includes consent, risk, and ACL settings. If schema_id is set, schema's memory_policy is used as defaults.
Unified policy for graph generation and OMO safety. Use mode='auto' (LLM extraction, constraints applied if provided) or 'manual' (exact nodes). Includes consent, risk, and ACL settings. If schema_id is set, schema's memory_policy is used as defaults.
Shorthand DSL for node/edge constraints. Expands to memory_policy.node_constraints and edge_constraints. Formats: - String: 'Task:title' (semantic match on Task.title) - List: ['Task:title', 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}} (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact), 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special: '$this', '$previous', '$context:N' Example: 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
Shorthand DSL for node/edge constraints. Expands to memory_policy.node_constraints and edge_constraints. Formats: - String: 'Task:title' (semantic match on Task.title) - List: ['Task:title', 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}} (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact), 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special: '$this', '$previous', '$context:N' Example: 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
Shorthand DSL for node/edge constraints. Expands to memory_policy.node_constraints and edge_constraints. Formats: - String: 'Task:title' (semantic match on Task.title) - List: ['Task:title', 'Person:email'] (multiple constraints) - Dict: {'Task:title': {'set': {...}}} (with options) Syntax: - Node: 'Type:property', 'Type:prop=value' (exact), 'Type:prop~value' (semantic) - Edge: 'Source->EDGE->Target:property' (arrow syntax) - Via: 'Type.via(EDGE->Target:prop)' (relationship traversal) - Special: '$this', '$previous', '$context:N' Example: 'SecurityBehavior->MITIGATES->TacticDef:name' with {'create': 'never'}
The new content of the memory item
The new content of the memory item
The new content of the memory item
Content type of the memory item
Content type of the memory item
Content type of the memory item
Updated metadata for Neo4J and Pinecone
Updated metadata for Neo4J and Pinecone
Updated context for the memory item
Updated context for the memory item
Updated relationships for Graph DB (neo4J)
Updated relationships for Graph DB (neo4J)
Optional organization ID for multi-tenant memory scoping. When provided, update is scoped to memories within this organization.
Optional organization ID for multi-tenant memory scoping. When provided, update is scoped to memories within this organization.
Optional organization ID for multi-tenant memory scoping. When provided, update is scoped to memories within this organization.
Optional namespace ID for multi-tenant memory scoping. When provided, update is scoped to memories within this namespace.
Optional namespace ID for multi-tenant memory scoping. When provided, update is scoped to memories within this namespace.
Optional namespace ID for multi-tenant memory scoping. When provided, update is scoped to memories within this namespace.
DEPRECATED: Use 'memory_policy' instead. Legacy graph generation configuration. If both memory_policy and graph_generation are provided, memory_policy takes precedence.
DEPRECATED: Use 'memory_policy' instead. Legacy graph generation configuration. If both memory_policy and graph_generation are provided, memory_policy takes precedence.
curl -i -X PUT \
'http://memory.papr.ai/v1/memory/{memory_id}' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"content": "Updated meeting notes from the product planning session",
"context": [
{
"content": "Let'\''s update the Q2 product roadmap",
"role": "user"
},
{
"content": "I'\''ll help you update the roadmap. What changes would you like to make?",
"role": "assistant"
}
],
"metadata": {
"emoji tags": "📊,💡,📝,✨",
"emotion tags": "focused, productive, satisfied",
"hierarchical structures": "Business/Planning/Product/Updates",
"topics": "product, planning, updates"
},
"relationships_json": [
{
"metadata": {
"relevance": "high"
},
"related_item_id": "previous_memory_item_id",
"related_item_type": "TextMemoryItem",
"relation_type": "updates"
}
],
"type": "text"
}'Memory successfully updated
List of updated memory items if successful
List of updated memory items 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
Status message
Status message
Status message
{ "code": 200, "status": "success", "memory_items": [ { … } ], "error": "string", "details": {}, "message": "string", "status_obj": { "pinecone": false, "neo4j": false, "parse": false } }
curl -i -X DELETE \
'http://memory.papr.ai/v1/memory/{memory_id}?skip_parse=false' \
-H 'X-API-Key: YOUR_API_KEY_HERE'{ "code": 200, "status": "success", "message": "string", "error": "string", "memoryId": "", "objectId": "", "deletion_status": { "pinecone": false, "neo4j": false, "parse": false, "qdrant": false }, "details": {} }