Golden Paths
Golden paths are the four canonical integration routes for Papr. Start with one path, ship value quickly, then expand.
Quick Context: Why These Paths Work
Most teams building AI memory start with simple storage (SQLite, keyword search). These paths give you that simplicity — but without the production failures (vocabulary mismatch, memory drift, context explosion).
Each path below shows:
- What you'd build with a DIY approach
- What breaks in production
- How Papr solves it with the same simple API
1) Chat Memory Path
Best for assistants, copilots, and support chat.
What You'd Build (DIY)
# Store in SQLite
db.execute("INSERT INTO messages (content, user_id, session_id) VALUES (?, ?, ?)")
# Retrieve with keyword search
messages = db.execute("SELECT * FROM messages WHERE session_id = ? AND content MATCH ?")Works for: Basic recall of exact phrases
Breaks on: Vocabulary mismatch ("refund policy" vs "return process"), cross-session context, memory consolidation
Papr Approach (Same Simplicity, Production-Ready)
# Store with automatic analysis
client.messages.store(
content=message,
role="user",
session_id=session_id,
process_messages=True # Auto-extracts: refund → subscription → cancellation
)
# Retrieve with hybrid search (keyword + semantic + graph)
results = client.memory.search(
query="What did they say about returns?", # Matches "refund policy"
enable_agentic_graph=True # Follows relationships automatically
)Minimal Flow
POST /v1/messageswithsessionIdandprocess_messages=trueGET /v1/messages/sessions/{session_id}for historyGET /v1/messages/sessions/{session_id}/compressforcontext_for_llmPOST /v1/memory/searchwithenable_agentic_graph=true
Read Next
2) Document Memory Path
Best for document Q&A, policy lookup, and internal knowledge.
Minimal Flow
POST /v1/documentGET /v1/document/status/{upload_id}until completePOST /v1/memory/searchwith agentic graph enabled- Optional:
POST /v1/graphqlfor analytics
Read Next
3) Structured Data Memory Path
Best for CRM, product catalogs, tickets, finance, and operational data.
Minimal Flow
- Model entities and relationships (
mode: "manual") POST /v1/memoryor/v1/memory/batchwithmemory_policy.nodesandmemory_policy.relationshipsPOST /v1/memory/searchand/orPOST /v1/graphql- Apply schema with
schema_idfor consistency
Read Next
4) Agent Memory Path
Best for agents that need long-term operational memory and self-improvement loops.
Minimal Flow
- Store reasoning outcomes and workflows via
POST /v1/memory - Tag with
metadata.role="assistant"and category labels - Retrieve with
POST /v1/memory/searchbefore decisions - Feed quality signal through feedback endpoints
Read Next
Path Selection Heuristic
Use this quick rule:
- Starting from chat logs -> Chat Memory Path
- Starting from files and docs -> Document Memory Path
- Starting from rows/events/APIs -> Structured Data Memory Path
- Starting from autonomous agent actions -> Agent Memory Path
If you have multiple sources, start with one path, then converge into a unified graph model.