Installation
Initialize
Core Methods
add(messages, …)
Add memories from a conversation. Automatically extracts entities, facts, episodes, and procedures.add_text(text, …)
Add memories from plain text instead of chat messages.add() except text instead of messages.
add_file(file_path, …)
Upload a file and extract structured memories. Supports PDF (vision AI extraction), DOCX, TXT, and MD. Each page/chunk counts as 1 add from your quota. Returns immediately — processing happens in background.
File size limits: Free 10MB, Pro 50MB, Business 100MB.
search(query, …)
Semantic search across the knowledge graph with re-ranking.search_all(query, …)
Unified search across all 3 memory types.get_all() / get_all_full()
get(name) / delete(name)
Cognitive Profile
get_profile(…)
Generate a Cognitive Profile — a ready-to-use system prompt summarizing a user.rules(…)
Generate a CLAUDE.md, .cursorrules, or .windsurfrules file from memory.Episodic Memory
episodes(…)
Search or list episodic memories (events, experiences, interactions).Procedural Memory
procedures(…)
Search or list learned workflows.procedure_feedback(id, …)
Report success/failure. On failure with context, triggers experience-driven evolution.procedure_history(id) / procedure_evolution(id)
Knowledge Graph & Timeline
graph(…)
Get the full knowledge graph — nodes and edges.timeline(…)
Temporal search — facts within a time range.feed(…)
Activity feed — recent memory changes.stats(…)
Get usage statistics.Memory Management
Insights & Reflections
Agents
Smart Triggers
Webhooks
Teams
API Keys
Billing
Jobs
Import Data
user_id, chunk_size/chunk_chars, and on_progress callback.
Error Handling
QuotaExceededError
Raised when your monthly plan limit is reached (HTTP 402). Not retried.Retry Behavior
The client automatically retries on transient errors (429, 502, 503, 504) with exponential backoff up to 3 attempts. 402 (quota exceeded) is never retried.Quota Usage
After any API call, check your current quota usage via the.quota property:
X-Quota-Add-Used, X-Quota-Add-Limit, X-Quota-Search-Used, X-Quota-Search-Limit) and reflects usage at the time of the last API call.