dcdpr / dcdpr/jp

Long-term memory system

Open
#102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
16
Forks
3
Avg merge
1d 1h
Merged PRs (30d)
121

Description

Currently, the memory of the LLM is scoped to individual conversations, optionally enhanced with attachments, and optionally expanded with tool calls (e.g. searching the web).

I think we can and should expand on this by allowing cross-conversation long-term memory.

To start, we do already support this in some way, by allowing to define personas in which you can add instructions, and you can choose which persona to set for a given conversation (and switch mid-conversation). But this requires manually keeping those "memory notes" in sync.

We can go further, by doing two things:

  • Add a built-in tool which allows LLMs to search through past conversations
  • Add a new concept of tagging certain parts of a conversation to be stored for long-term memory purposes. These snippets would then (somehow) be attached either automatically or using some tag-based pattern matching system, to future conversations.

As for the workflow of adding text to the long-term memory, I can see several approaches:

  • Having it be done through the LLM by asking it to "retain this knowledge..." or "remember this ...", which would then trigger us to either do one of two things:
    • Pull out the paragraph that contained "remember this" and store it in the long-term memory, or
    • Send the query to the LLM but instruct it to include some kind of structured data in which we ask it to summarize what it wants to keep in its long-term memory, so that we can pull that out from the reply in the background.
  • We can allow manual memory management through jp memory
  • We can add a clickable hyperlink similar to what we do for fenced code blocks (see f5a72f), which would open the last turn in your editor, at which point point you delete or rewrite the text, and save the file to store the text in memory.
  • any other yet to imagine way to handle memory...

In any case, the goal is to increase accuracy and project knowledge from the LLM, not just for the state the project is currently in, but the state it has been in in the past, and why certain decisions were made.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing persona instructions, conversation attachments, tool calls, and the jp memory entry point. The linked fenced-code-block commit shows a related editor-link workflow to compare. Done would require a settled design and implementation for searching past conversations, storing tagged memory, and managing it manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.