ovos-memory-plugin-recency: short-term buffer

July 31, 2026 · View on GitHub

RecencyMemory keeps a sliding window of the most recent turns, bounded by a message count and, optionally, by age (time decay). It is the lightest possible memory: no LLM, no embeddings, no extra dependencies, fully local.

Use it as a persona's memory_module for plain short-term context, or as the primary (history-providing) member inside a composite alongside heavier recall backends.

Configuration

KeyDefaultDescription
max_history10Messages kept verbatim. 0 = unbounded.
max_agenullIf set, drop messages older than this many seconds (decay).
system_prompt""Persona system prompt.
db_pathnullOptional JSON file. When set, the window persists across restarts.

build_conversation_context returns [system?] + recent window + [USER utterance], pruning any trailing user turn so the new utterance is the only tail user message.

JSON persistence (db_path) stores message role and content. Tool-call structure (tool_calls, tool_call_id) is not persisted across restarts.

Example

{
  "memory_module": "ovos-memory-plugin-recency",
  "ovos-memory-plugin-recency": {
    "max_history": 8,
    "max_age": 1800,
    "system_prompt": "You are a helpful assistant."
  }
}

← Lexical · Home · Entity →