MemorySync
Deep Dive

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.

Use: summarize, compose, create_relation, or export_all

Complete method index

OperationPython SDKNode.js SDKREST routeUse
Addadd(text, …)add({ text, … })POST /memory/addStore one candidate; handle created or skipped.
Bulk addbulk_add(items, …)bulkAdd(items, …)POST /memory/bulk-addStore 1–50 candidates with per-item outcomes.
Composecompose(prompt_template, …)compose({ promptTemplate, … })POST /memory/composeBuild a bounded prompt from scoped retrieval.
Create relationcreate_relation(from_id, …)createRelation(fromId, …)POST /memory/{id}/relationsConnect two existing memories with a documented type.
Export allexport_all()exportAll()GET /memory/exportExport memories in the authenticated scope.
Forgetforget(memory_ids, …)forget(memoryIds, …)DELETE /memory/forgetDelete selected memories.
Getget(memory_id)get(memoryId)GET /memory/{id}Fetch one memory by its returned ID.
Queryquery(query, …)query({ query, … })POST /memory/queryRetrieve candidates for a natural-language task.
Summarizesummarize(memory_ids, …)summarize({ memoryIds, … })POST /memory/summarizeCreate a summary from selected memories.
Updateupdate(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.

Use: Create Memory Relation API

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

Operation safety checklist

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.

Continue