https://github.blog/ai-and-ml/github-copilot/building-an-agentic-memory-system-for-github-copilot/
intro
- Vision: Enable Github Copilot to become an ecosystem of agents that collaborate.
- Multi-agent workflows - moving beyond isolated interactions and toward a cumulative knowledge base that grows with every use.
- Cross-agent memory: agents remembering and learning from experiences across the development workflow without relying on user instruction.
design
- Challenge: what to remember and when to forget.
- Memory system must handle code changes, abandoned branches, and conflicting observations.
- One could have an offline curation service, but this is complex and expensive at large scale.
- solution: Just-In-Time (JIT) verification
- information retrieval is hard to solve but easy to verify
- store memories with citations, references to specific code locations. When an agent encounters a memory, it verifies the citation in real-time before using it
- memory creation as a MCP tool call - Agents invoke the tool when they discover something likely to have implications for the future.
- Agent can call a store_memory tool, which invokes a memory API and writes to the memory DB
- example - While reviewing a PR, Copilot discovers that API version must be synced across three different parts of the codebase. It can write a memory to remember this information
memory usage
- at the start of a session, retrieve the most recent memories for the target repo and include it in the prompt
- before applying a memory, the agent verifies accuracy and relevance by checking citations. When there is a contradiction, the agent stores the corrected version with new evidence
- for security, memories stay within the targeted repo and are only created through actions by contributors with permission
- biggest concern: impact of outdated or bad memories
- found that agents consistently verified citations, and the memory pool would self-heal