Memory Overview
AnyLLM has two types of "memory" that serve different purposes: short-term and long-term. Understanding their differences will help you use the agent effectively.
Short-Term Memory (Sessions)
-
What is it? This is the memory of the current, active work session. It is stored in the
.anyllm/project_context.jsonfile. -
What it remembers:
- The overall task for the session (
<task>). - The to-do list (
<todo>). - Recently executed commands (
<terminal>). - Files you have recently read or modified (
<files>).
- The overall task for the session (
-
Purpose: It allows the agent to not lose context within a single work session. If you close the terminal and reopen it, the agent can pick up right where you left off, thanks to the session.
You can read more about sessions in the corresponding section.
Long-Term Memory (RAG)
-
What is it? This is the agent's ability to look into the archive of all past, completed sessions. This feature is optional and disabled by default.
-
What it remembers:
- Dialogues from past sessions.
- Decisions you have made previously.
- Errors you have encountered before and how they were solved.
-
Purpose: It helps solve problems that have occurred in the past and maintains continuity in project work over a long period (weeks or months). The agent can "remember" how it fixed a similar bug and apply the same solution again.
You can read more about Long-Term Memory (RAG) in the corresponding section.