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.
| Kind | Typical content |
|---|---|
| preference | How an operator or team likes work to be done |
| business_rule | Policy or operational logic the agent should respect |
| metric_definition | Canonical definitions for metrics and calculations |
| thread_note | Short-lived context from a specific thread |
| correction | A correction to prior agent behavior or context |
| company_context | Durable information about the business |
| other | Context 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.
