ovos-memory-plugin-entity: durable user facts

July 31, 2026 · View on GitHub

EntityMemory distills durable facts about the user from the conversation, such as their name, preferences, relationships, constraints, and goals, and re-injects these facts into every turn. Unlike a recency window, it recalls facts no matter how long ago they were said. Unlike RAG, it needs no embeddings or vector store.

It is "clever by chaining a prompt": after each exchange it asks a local OpenAI-compatible endpoint to extract short fact lines, then merges them (deduplicated) into a per-session fact store. Local-first, the same kind of endpoint longterm uses, never a hosted provider. If the endpoint is unreachable, extraction simply no-ops and the turn proceeds.

How it works

  update_history(exchange)
      └─ LLM: "extract durable facts about the USER … else NONE"
              → parse "- fact" lines → dedup/merge into the fact store

  build_conversation_context(utterance)
      → [system?] + [SYSTEM: "Known facts about the user: …"] + [USER: utterance]

Configuration

KeyDefaultDescription
api_urlhttp://localhost:8000/v1OpenAI-compatible endpoint.
modelauto-detectedModel name. Pulled from /models when empty.
max_facts50Cap per session (oldest dropped past the cap).
max_extract_tokens128max_tokens for the extraction call.
request_timeout30HTTP timeout (seconds).
backendjsonjson (persisted) or memory (ephemeral).
db_path~/.local/share/ovos/entity_memory.jsonJSON store path.
extraction_prompt(built-in)Override the extraction template (must contain {exchange}).
facts_headerKnown facts about the user:Heading for the injected block.
system_prompt""Persona system prompt.

Example

{
  "memory_module": "ovos-memory-plugin-entity",
  "ovos-memory-plugin-entity": {
    "api_url": "http://localhost:8000/v1",
    "max_facts": 40,
    "system_prompt": "You are a helpful assistant."
  }
}

Pair it with a recall backend in a composite (e.g. entity facts

  • local-rag) so the model gets both stable user facts and relevant past detail.

← Recency · Home · Composite →