Docs menuMemory and Context
Docs/Build

Memory and Context

Manage durable team knowledge, personal layers, pending memories, and integrity checks.

Memory model

OpenNeko stores durable context in work_memory. Memory records carry kind, scope, text, confidence, metadata, source references, suppression and override links, HMAC integrity, expiration, archive state, and a 384-dimensional embedding for semantic retrieval.

KindTypical content
preferenceHow an operator or team likes work to be done
business_rulePolicy or operational logic the agent should respect
metric_definitionCanonical definitions for metrics and calculations
thread_noteShort-lived context from a specific thread
correctionA correction to prior agent behavior or context
company_contextDurable information about the business
otherContext that does not fit a more specific kind

Review flow

Agent runs can propose pending memory instead of directly changing durable context. Pending memory is accepted or declined by an operator, with reasoning, conflict information, and a final decision text stored alongside the proposal.

  • Pending memory statuses are proposed, accepted, and declined.
  • Pending memory expires after 14 days if it is not reviewed.
  • Thread notes expire after 30 days by default.
  • Tampered memory rows fail HMAC verification and are dropped from agent context.

Team and personal layers

Members can write personal memory when the run has a member actor and user id. The active personal layer is governed by the context_versioning feature; without the entitlement, resolved context falls back to the team layer.

Memory search uses local embeddings from Xenova/all-MiniLM-L6-v2 and the pgvector extension. Semantic retrieval defaults to the five nearest saved memories unless a caller supplies a different limit. Use precise memory kinds and scopes so matches stay useful under repeated operational work.