Skip to main content

Long-term memory

  • Sells as: the memory product (a product-scoped API key). This capability has no separate product-face contract — its public product route reuses the capability contract below; see the Edge route table's Product face row.

Per-(organization, user) cross-session agent memory as a shared capability. Consumers: voice + aakhara (agent products that need the user remembered across calls/sessions) = >=2. INTERNAL (no product-face). Fail-closed: /v1/memories returns 503 when the LLM extraction edge (provider-gateway) is unconfigured.

  • Group: Voice & AI
  • Contract: contracts/long-term-memory/v1/openapi.yaml
  • Console: Manage the memory product in the console →
  • Runbook: operational checklist for long-term-memoryinternal (Vagary Labs ops; not part of this public site): docs/runbooks/capability-operations.md#long-term-memory
  • Public base: https://api.vagarylabs.com (the consolidated API gateway — one host, per-brand sibling api.<zone>)
  • Auth: a product API key (vgk_…) issued from the console — Authorization: Bearer vgk_…
  • Product face (customer-keyed):
    • https://api.vagarylabs.com/product/v1/memory/store

Edge route table

The routes this capability actually serves on the public edge — live-synced from GET https://api.vagarylabs.com/product/v1/_meta/catalog (snapshot v1). The metric is the request-granularity billing counter; the scope is the key permission required.

Product face (customer-keyed)

MethodPathMetricScope
POST/product/v1/memory/storememory_operationswrite

Endpoints

MethodPathSummary
POST/v1/memoriesAdd memories from raw turns/text (extract → consolidate/dedup → store)
GET/v1/memoriesList a user's memories (most-recently-updated first)
DELETE/v1/memoriesGDPR (Art.17) erasure — forget EVERY memory for a user within the tenant
GET/v1/memories/searchSemantic recall of a user's memories relevant to a query (ranked)
DELETE/v1/memories/&#123;memory_id&#125;Forget one memory (IDOR-safe — scoped by org+user+id)
GET/healthliveness (db + embedder + llm-configured)
GET/metricsPrometheus exposition

Schemas

Error

FieldTypeDescription
errorstringstable machine code (slug), e.g. validation_error, unauthorized, upstream_failed, internal
reasonstringhuman-readable one-line explanation (no secrets/PII)
detailobject
request_idstring

AddMemoryRequest

FieldTypeDescription
organization_idstringproduct-tier tenant (I6); resolved anti-spoof when identity is wired
user_idstringend-user within the tenant (sub-tenant scope)
messagesarraychat turns to extract memories FROM (alt to text)
textstringraw text to extract memories FROM (alt to messages)
metadataobjectstored on new memories

AddMemoryResponse

FieldTypeDescription
memory_idsarrayids added or updated this call
addedinteger
updatedinteger
deletedinteger

Memory

FieldTypeDescription
idstring
contentstring
metadataobject
scorenumbersearch only — 1 - cosine distance (higher = more relevant)
created_atstring
updated_atstring

MemoryList

FieldTypeDescription
organization_idstring
user_idstring
countinteger
memoriesarray

SearchResponse

FieldTypeDescription
organization_idstring
user_idstring
countinteger
memoriesarray

Generated by scripts/gen-capability-docs.py from contracts/long-term-memory/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page. The Edge route table section is synced from the live edge catalog snapshot (v1) — re-sync with python3 scripts/sync-edge-catalog.py.