Skip to content

feat: timeline event tracking — chronological history per memory #347

Closed

Description

@ajianaz

Motivation

GBrain tracks every entity with a timeline (add_timeline_entry, get_timeline). Each interaction has a timestamp, enabling "what happened with X over time" queries.

Uteke currently has created_at and last_accessed, but no explicit event log per memory. This means we can't answer: "When was this memory updated and why?"

Proposal

Add a lightweight event log table that tracks state changes per memory.

Timeline Table

CREATE TABLE IF NOT EXISTS timeline_events (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    memory_id TEXT NOT NULL,
    event_type TEXT NOT NULL,  -- created, updated, recalled, consolidated, tagged, forgot
    event_data TEXT,           -- JSON: what changed (optional)
    created_at TEXT NOT NULL,
    FOREIGN KEY (memory_id) REFERENCES memories(id)
);
CREATE INDEX idx_timeline_memory ON timeline_events(memory_id);
CREATE INDEX idx_timeline_type ON timeline_events(event_type);
CREATE INDEX idx_timeline_created ON timeline_events(created_at);

Event Types (enum)

pub enum TimelineEventType {
    Created,       // memory first written
    Updated,       // content changed
    Recalled,      // memory was retrieved via search/recall
    Consolidated,  // merged with another memory
    TagAdded,      // tag added
    TagRemoved,    // tag removed
    Edged,         // relationship edge added/removed
    Forgotten,     // soft-deleted or pruned
    Pinned,        // pinned/unpinned
    Imported,      // imported via JSONL
}

Auto-Recording (no user action needed)

Every existing operation (remember, recall, forget, consolidate, etc.) automatically writes a timeline event. Zero changes to user workflow.

CLI Commands

uteke timeline <memory-id>              # show all events for a memory
uteke timeline <memory-id> --type recalled  # filter by event type
uteke timeline --since "2026-06-01"     # events across all memories since date
uteke timeline --namespace work         # events in a namespace

MCP / Server Endpoints

  • GET /timeline/<memory_id> → event list
  • GET /timeline?type=consolidated&limit=50 → filtered events

Scope

  • Add timeline_events SQLite table + migration (schema v5)
  • Define TimelineEventType enum + serde
  • Hook into existing operations (remember, recall, forget, consolidate, tag ops)
  • Add uteke timeline CLI subcommand
  • Add timeline endpoint to uteke-server
  • Add timeline to MCP server tools
  • Tests: event creation, filtering, pagination, namespace scoping

Non-Goals

  • LLM-based event summarization (out of scope)
  • Timeline visualization / charts (separate concern)
  • Cross-memory timeline correlation (future)

References

  • GBrain: add_timeline_entry, get_timeline operations
  • Current: only created_at / updated_at / last_accessed fields

Activity

  1. added this to the milestone on Jun 14, 2026
  2. added
    enhancement
    scope:core
    type:feature
    epic:memory-engine
    on Jun 14, 2026
  3. modified the milestones: , v0.2.1 — DX & Ecosystem on Jun 14, 2026
  4. added 4 commits that reference this issue on Jun 18, 2026
  5. added a commit that references this issue on Jun 19, 2026
  6. added a commit that references this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementepic:memory-enginepriority:mediumscope:coretype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions