Documentation
Advanced Capabilities
Tools for nuanced retrieval, graph traversal, and data hygiene.
1. Search & Retrieval
We offer three distinct search endpoints depending on your precision needs:
- Semantic Search: Finds memories based on contextual meaning.
- Hybrid Search: Combines semantic meaning with exact-keyword boosting.
- Full-Text Search (FTS): Strict string matching using boolean operators.
Python
JavaScript
payload = {
"query": "Docker deployment pipeline",
"limit": 5
}
response = requests.post(f"{API_URL}/memories/hybrid-search", json=payload, headers=HEADERS)
const payload = {
query: "Docker deployment pipeline",
limit: 5
};
const response = await fetch(API_URL + '/memories/hybrid-search', {
method: 'POST',
headers: HEADERS,
body: JSON.stringify(payload)
});
2. Contextual Memory Graphs
Navigate the relationships between a user's memories.
Python
JavaScript
# Get Graph Neighborhood
response = requests.get(f"{API_URL}/memories/42/graph", headers=HEADERS)
graph = response.json()
print(f"Connected memories: {graph['total_connections']}")
// Get Graph Neighborhood
const response = await fetch(API_URL + '/memories/42/graph', { headers: HEADERS });
const graph = await response.json();
console.log('Connected memories: ' + graph.total_connections);
3. Version History & Rollback
Every modification creates an immutable snapshot. Use these to view audit trails or revert changes.
Python
JavaScript
# View History
response = requests.get(f"{API_URL}/memories/42/history", headers=HEADERS)
// View History
const response = await fetch(API_URL + '/memories/42/history', { headers: HEADERS });
4. Deduplication Engine
Scan a user's memory vault to find and merge semantic duplicates.
Python
JavaScript
payload = {
"similarity_threshold": 0.90,
"dry_run": True, # Returns duplicates without merging
"auto_merge": False
}
response = requests.post(f"{API_URL}/memories/deduplicate", json=payload, headers=HEADERS)
const payload = {
similarity_threshold: 0.90,
dry_run: true,
auto_merge: false
};
const response = await fetch(API_URL + '/memories/deduplicate', {
method: 'POST',
headers: HEADERS,
body: JSON.stringify(payload)
});
5. Analytics & Insights
Python
JavaScript
response = requests.get(f"{API_URL}/memories/analytics?time_range=30d", headers=HEADERS)
const response = await fetch(API_URL + '/memories/analytics?time_range=30d', { headers: HEADERS });