Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Simple History

Minimal reference implementation of memory.history: an unbounded, in-memory slice with no persistence. Useful for tests, demos, and short-lived sessions where the sliding-window/pair-safe machinery of nexus.memory.capped adds no value.

Details

IDnexus.memory.simple
Capabilitymemory.history
DependenciesNone

Configuration

No configuration required.

Events

Subscribes To

EventPriorityPurpose
io.input10Records user messages
llm.response10Records assistant responses (with ToolCalls populated)
tool.invoke10Tracks ParentCallID filter set only; no message appended
tool.result10Records tool role messages (unless internally dispatched)
memory.history.query50Responds with the current buffer in LLM-native order
memory.compacted50Replaces the buffer with the compacted message set

Emits

None.

Behaviour

  • Storage mirrors events.Message exactly so consumers feed the buffer directly into an LLMRequest without translation.
  • Internal tool calls (ParentCallID != "") are filtered so the LLM never sees tool_use_ids it didn’t generate — same invariant as nexus.memory.capped.
  • llm.response events tagged with Metadata["_source"] (planner replies, summariser replies) are ignored so only user-facing turns land in the buffer.
  • No persistence: history is lost on process exit.

When to Use

  • Integration tests where the default capped plugin’s JSONL persistence is overhead.
  • Experimental agents where bounded history would confuse the outcome.
  • Reference for building a new memory.history provider.

Example Configuration

capabilities:
  memory.history: nexus.memory.simple

plugins:
  active:
    - nexus.agent.react
    - nexus.memory.simple