Prototyped improvements for memory subagent#22898
Conversation
This reverts commit 8650157.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement to the system's memory management capabilities by integrating an experimental Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new experimental MemoryManagerAgent to replace the save_memory tool. This new agent is more powerful, allowing for hierarchical memory management across global and project scopes. It includes a detailed system prompt, logic to discover context files, and a specific security policy. The changes also include updating configuration, schemas, and documentation to support this new feature. My review found one critical issue where the agent's model configuration in the implementation does not match the test, which could impact performance and cost, and needs to be addressed.
Note: Security Review did not run due to the size of the PR.
| modelConfig: { | ||
| model: 'gemini-3-flash-preview', | ||
| }, |
There was a problem hiding this comment.
The model configuration for the MemoryManagerAgent does not align with its corresponding test (memory-manager-agent.test.ts). The test explicitly checks for the gemini-2.5-flash-base model and a thinkingBudget of 0 to ensure efficiency. The current implementation uses gemini-3-flash-preview and lacks the thinkingBudget configuration.
To ensure the agent is optimized for performance and cost as intended, and to make the tests pass, the model configuration should be updated to use a base model with thinking disabled.
modelConfig: {
model: 'gemini-2.5-flash-base',
generateContentConfig: {
thinkingConfig: {
thinkingBudget: 0,
},
},
},8d2ff18 to
6949763
Compare
| # Insufficient context | ||
| If you find that you have insufficient context to read or modify the memories as described, | ||
| reply with what you need, and exit. Do not search the codebase for the missing context. | ||
| ${getInitialContext()} |
There was a problem hiding this comment.
The initial context is a snapshot from process startup - if the user modifies GEMINI.md files during the session (or we used save_memory earlier in this session), the agent gets stale context.
4708017
into
st/feat/experimental-memory-manager-agent
Summary
Quick and dirty prototypes of: