The Hippocampal Index: Temporal Chains and Sequence Reconstruction

In the human brain, the hippocampus contains specialized "time-cells" that fire at specific moments during a sequence of events. These cells act as a chronological metronome, allowing us to record experiences as linear narratives rather than isolated packets of data.

Spector replicates this using the TemporalChain index, allowing agents to reconstruct step-by-step histories.


The Temporal Chain Structure

Every episodic memory node has a pointer to its predecessor \(m_{prev}\) and successor \(m_{next}\). This forms a doubly-linked temporal list off-heap.

[Episode t-2] <---> [Episode t-1] <---> [Episode t] <---> [Episode t+1]

Reconstructing Causal History

When an agent retrieves a seed memory (such as a specific error log), it doesn't just read that node. It queries the temporal chain to look backward and forward in time:

  • Temporal Backtracking: Queries the preceding nodes to find what actions or inputs led to the event (causal analysis).
  • Temporal Projection: Queries subsequent nodes to see what outcomes followed.

This temporal context is injected into the LLM context, allowing the agent to answer narrative questions like: "What did the user do right before the database connection timed out?"