Skip to content

Add /remember command to save notes into session context #32

Description

@assapir

Problem

Currently the LLM has no way to receive persistent user-provided context. Session memory (#29) will carry task history forward, but there's no way for the user to inject notes, preferences, or corrections that persist across tasks.

Proposed solution

Add a /remember <text> slash command that stores a user note and includes it in the context sent to the thinker on every subsequent task.

Example

golem> /remember I prefer concise answers, no bullet points
  ✓ remembered

golem> /remember the project uses Rust 2024 edition
  ✓ remembered

golem> explain ownership
=> (LLM sees both notes in its context and responds concisely, referencing Rust 2024)

golem> /memories
  1. I prefer concise answers, no bullet points
  2. the project uses Rust 2024 edition

golem> /forget 1
  ✓ forgot: I prefer concise answers, no bullet points

Commands

Command Description
/remember <text> Save a note to session memory
/memories List all saved notes
/forget <n> Remove a note by number

Implementation

  • Add a Vec<String> of user memories to the REPL state (or SessionInfo)
  • Pass memories into the Context struct so the thinker sees them
  • Add a user_notes: Vec<String> field to Context in src/thinker/mod.rs
  • Include user notes in the system prompt or as a preamble in the first user message
  • Memories live for the session only (cleared on exit) — persistence can come with Add session memory: carry context across tasks in the REPL #29

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions