Skip to main content
Docs
Open console

MemoryNode integration

Start here: Two-call integration — the canonical developer path for POST /v1/memories and POST /v1/search.

Stack recipes: Integration recipes — save → recall → inject into your existing LLM (REST/OpenAI/Anthropic for production app flows; MCP only for Cursor/Claude build path).

That doc covers authentication, owner_id, copy-paste examples (cURL, TypeScript, Python), the SaaS copilot session 1 → session 2 proof, and what you can skip for first recall.

This page covers what runs automatically once the two calls are already wired and working.

Context-pack-first workflow

After POST /v1/memories and POST /v1/search work, use POST /v1/context when you want a single payload for the model: ranked memories and citations assembled as context_text.

Recommended flow:

  1. Save what you learned (POST /v1/memories).
  2. Recall with search when you only need ranked hits (POST /v1/search).
  3. Build context when you are ready to answer (POST /v1/context) — paste the returned pack into your chat prompt.

The console Playground follows this order: save → build context → copy context_text.

Archive vs forget

ActionAPI / consoleEffect
ArchivePOST /v1/memories/:id/archive · Memories → ArchiveHides the memory from active recall; keeps the row for audit and optional review.
Forget (delete)DELETE /v1/memories/:id · Memories → ForgetHard delete with chunks and links removed.

Use archive when a fact is outdated but you may want history; use forget when the user or policy requires removal.

What you get without extra code

These run on every write/search; you do not configure separate services for them.

CapabilityWhat it means for your app
Lifecycle intelligenceConfidence, volatility, expiry, and supersession are applied on ingest and reflected in ranking — not a separate “lifecycle API”.
Semantic dedupeNear-duplicate text or embeddings can return { deduped: true, memory_id, dedupe_kind } instead of a second row.
Contradiction handlingConflicting facts are resolved on write; check intelligence.conflict_state on new memories.
SQL recall + Worker rankingPostgres returns candidates; business ranking (lifecycle, learning, freshness) runs in the Worker after fusion.
Retrieval rankingPostgres returns candidates; ranking (lifecycle, freshness) runs in the Worker after fusion.
Worker-side LLM (operator)Extraction and evolution on ingest use CHAT_PROVIDER on the MemoryNode Worker (OpenAI, Anthropic, or Gemini). This is not “use Claude in your app” — your product still calls your own model; MemoryNode only uses these keys for optional extract/evolve on write. Embeddings stay OpenAI/stub with per-chunk version metadata.

Details: API_USAGE.md §4 (lifecycle, providers, retrieval architecture).

TypeScript SDK

@memorynodeai/sdk wraps the same routes with retries, typed errors, and explain for ranking debug. See DEBUGGING.md.

Deeper reference

Type to search all pages. navigate · Enter open · Esc close