API Operations A–Z
Use this complete customer memory API index to choose the right operation. Every entry below is verified against the current REST route and both supported SDKs; private, admin, and infrastructure endpoints are intentionally excluded.
Choose by task
What does your application need to do?
Store one memory candidate
Submit one focused fact, preference, decision, event, or outcome and handle either a created or skipped result.
Use: add
Store several candidates
Submit between 1 and 50 independent items and inspect the outcome for every item.
Use: bulk_add / bulkAdd
Find or read memory
Search by meaning when you have a question, or fetch one record when you already have its returned ID.
Use: query or get
Maintain memory
Change supported descriptive fields or delete selected records through a product lifecycle workflow.
Use: update or forget
Derive, connect, or move memory
Create a summary, compose bounded context, relate two records, or export the current scope.
Complete method index
| Operation | Python SDK | Node.js SDK | REST route | Use |
|---|---|---|---|---|
| Add | add(text, …) | add({ text, … }) | POST /memory/add | Store one candidate; handle created or skipped. |
| Bulk add | bulk_add(items, …) | bulkAdd(items, …) | POST /memory/bulk-add | Store 1–50 candidates with per-item outcomes. |
| Compose | compose(prompt_template, …) | compose({ promptTemplate, … }) | POST /memory/compose | Build a bounded prompt from scoped retrieval. |
| Create relation | create_relation(from_id, …) | createRelation(fromId, …) | POST /memory/{id}/relations | Connect two existing memories with a documented type. |
| Export all | export_all() | exportAll() | GET /memory/export | Export memories in the authenticated scope. |
| Forget | forget(memory_ids, …) | forget(memoryIds, …) | DELETE /memory/forget | Delete selected memories. |
| Get | get(memory_id) | get(memoryId) | GET /memory/{id} | Fetch one memory by its returned ID. |
| Query | query(query, …) | query({ query, … }) | POST /memory/query | Retrieve candidates for a natural-language task. |
| Summarize | summarize(memory_ids, …) | summarize({ memoryIds, … }) | POST /memory/summarize | Create a summary from selected memories. |
| Update | update(memory_id, …) | update(memoryId, …) | PATCH /memory/{id} | Replace supported descriptive fields. |
Understand each result
Select an operation for its stable behavior
Add
Send text plus optional source, tags, importance, and metadata. A successful response is either a created memory or a skipped result with no new ID.
Use: Add Memory API
Bulk add
Send 1–50 items. The response reports created, skipped, and rejected totals plus one status for each original index.
Use: Bulk Add Memory API
Compose
Send a prompt template with optional retrieval and token limits. The result reports the composed prompt, memories used, token count, and whether it was truncated.
Use: Memory API overview
Create relation
Connect two different memory IDs in the same authorized scope with a documented relationship type and optional confidence or metadata.
Export all
Retrieve the current authenticated scope as an export object containing memories and a generation timestamp.
Use: Export Memory API
Forget
Send a non-empty memory ID list and an optional reason. The response contains the IDs actually deleted.
Use: Forget Memory API
Get
Fetch one memory by a positive returned ID. A missing or out-of-scope record follows the documented not-found path.
Use: Get Memory API
Query
Send a natural-language query with optional limit, filters, session context, or traversal depth. The memories array can be empty.
Use: Query Memory API
Summarize
Send a non-empty memory ID list and optional lossless flag. The result follows the public memory object.
Use: Summarize Memory API
Update
Replace one or more of tags, importance, metadata, source, or event type. Memory text, identity, and scope are not editable here.
Use: Update Memory API
Keep the operation boundary safe
Before the call
Your server establishes trust and scope.
- Authorize the product action.
- Select the project and stable opaque end-user ID.
- Load the API key from server-side secrets.
- Validate IDs and user-controlled values.
After the call
Your application owns the business outcome.
- Branch on documented result shapes.
- Treat returned text as untrusted data.
- Keep source systems authoritative.
- Handle deletion, export, and retries through explicit workflows.