Memory options
Describe the feature or problem you'd like to solve
Often I experience the agent forgetting its context and current request
Proposed solution
I would like more clarity and options in regards to what the agents "memory" is and how it is used and optimized. What context is the agent actually using for each request? How close to the limit of the active LLMs context length is it?
I have f.ex. asked for a task to be performed within a session where I had already had it perform several tasks, and it ended up asking me how to proceed with a previous task instead of solving and responding to a new task and goal that I had just given it. It did then remember what I had asked it about when I asked why it changed the focus to another task, but that is annoying to deal with. Not sure what is happening in the backend... maybe RAG is used? I hope not. RAG hides what actually happens. Control over context is extremely important for these agents to avoid misunderstandings, mistakes and all the problems that can come from that. I have been wondering why Copilot CLI never asks about compressing / compacting / summarizing its current context or session data. That strongly suggests there might be a RAG solution or similar "helping" the LLM with each prompt.
Is agents.md always in the context directly? If so, make some commands that can help show what is in that file or other direct context files for each prompt and maybe ways to ask the LLM to optimize whatever it might use in its context.
It can be done in several ways. Currently I see the agent / LLM having problems with performing requests and find it hard to debug.
Example prompts or workflows
/memory <- show an overview of what the agent puts into its context for the next prompts. /sessionoverview <- a way to look into previous responses and what exactly the LLM was given as context. Maybe a way to dump this to a file. I suspect this wont happen because you might not want to share such data, but its hard to improve something where the actual actions and what they are based on are hidden.
Additional context
No response
Same question as the original poster, I'm also looking at ways to compress the context and improve its memory management.