-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Currently memory structure is flat and list_memories just returns the memory names. This is impractical for projects with many memories or for memories where the content isn't easily represented by just the file name.
The solution @opcode81 and I agreed on now is the following:
- Memories can be in subdirectories, the directory enters the memory name. So we can have the list of names like
global_mem, auth/login_logic, auth/token_verification - Write memory can receive a name with a "/" and will then write to the respective subdir
- Memories can have frontmatter, which is at the top of the markdown file, between two lines with
---. The frontmatter for now will only containsummary: ....or be empty or missing. list_memoriesreturns memory names and any non-empty frontmatter that was found as answer to the agent.list_memoriescan receive a path (optionally, by default "", and the kwarg should be called something liketopic) and then only lists the memories in that subdir- The tool docstrings are adjusted to make the agent group relevant memories together in subdirs (semantically into topics, arbitrary nesting) and write frontmatter if necessary. The agent is also encouraged to structure existing memories and to add frontmatter to them if appropriate.
I think for restructuring existing memories, we should add a new tool RenameMemoryTool, a renaming to something with "/" will then move the file - @opcode81 do you agree?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers