Gemini Code Assist Agent Mode: A Detailed Summary
Key Concepts:
- Agent Mode: A collaborative pair programming mode in Gemini Code Assist.
- Multi-file Editing: The ability to make changes across the entire codebase at once.
- Full Project Context: The agent analyzes the whole codebase for more accurate suggestions.
- Gemini CLI: Google's command-line interface for interacting with Gemini models.
- MCP (Memory Context Provider): A tool used by Gemini CLI and Agent Mode to maintain context and memory.
- Memory Discovery Service: A service that finds and loads Gemini MD files for context.
- YOLO Mode: A configuration where the agent doesn't ask for approval before making changes.
1. Introduction of Gemini Code Assist Agent Mode
Google has launched Agent Mode for Gemini Code Assist, making it more Agentic. This new feature, currently in preview for individual users, aims to transform Gemini Code Assist into a collaborative pair programmer, similar to tools like Klein or Rode.
2. Functionality and Workflow of Agent Mode
- Collaborative Planning: Agent Mode presents a plan for complex, multi-step tasks before execution, allowing users to review, edit, request changes, approve, or deny any part of the suggested plan. No changes are made without user approval.
- Multi-file Editing: Unlike the previous version, Agent Mode supports editing across multiple files simultaneously, enabling large-scale refactoring or feature additions that affect various parts of the codebase.
- Reverting Changes: An option to revert local files to an earlier state is available, providing a safety net for undoing changes made by the agent.
- Full Project Context: The agent analyzes the entire codebase, pulling in relevant files and folders to provide more accurate and context-aware suggestions. This includes understanding project structure, dependencies, and coding patterns.
- Integration with Gemini CLI: Agent Mode leverages the same underlying technology as Gemini CLI, including the use of Gemini MD files for maintaining context and memory, and MCP tools. It searches for MCP tools in the same path as Gemini CLI.
- Memory Discovery Service: The agent uses a memory discovery service to find and load Gemini MD files, searching hierarchically from the current working directory up to the project root and home directory, as well as in subdirectories.
- Slash Commands: Agent Mode includes slash commands for interacting with the agent.
- YOLO Mode: Users can configure a "YOLO mode" where the agent executes tasks without requiring approval.
- Usage Limits: Agent Mode shares the same usage limits as Gemini Code Assist (1,000 requests per day).
3. Enabling and Using Agent Mode
- Upgrade to the Latest Version: Ensure the Gemini Code Assist extension is updated to the latest version.
- Enable Insider Build: To activate Agent Mode, users need to manually enable the Gemini Code Assist insider build by adding a specific element to the
settings.jsonfile in VS Code.- Open the command palette (Command+Shift+P).
- Select "Open User Settings (JSON)".
- Add the following element to the JSON file:
"googleCloudCode.gemini.codeAssist.enableAgentMode": true - Restart VS Code.
- Enable Agent Mode: After restarting VS Code, enable the Agent Mode option in the settings.
- Slash Commands: Once enabled, slash commands like
/mcpand/aboutbecome available. - Example Usage: The video demonstrates using Agent Mode to add a feature to filter models in a leaderboard based on the provider. The agent reads files, edits code, and uses MCPs (if configured), requesting approval for each step.
4. Comparison with Other Agentic Coders
Agent Mode is compared to tools like Klein and Rode. While not as feature-rich as these established tools, it is considered a promising initial implementation. The presenter notes that Agent Mode is likely to improve as Gemini CLI is updated, given its reliance on the CLI's backend.
5. Limitations and Considerations
- Preview Status: Agent Mode is currently in preview and only available for individual users.
- Feature Limitations: Agent Mode does not support code customization or some tools available in regular mode.
- Project Limitations: It only works in projects with a single root directory.
- Data Usage: Google uses data from Agent Mode for training purposes.
6. Ninja Chat Advertisement
The video includes a brief advertisement for Ninja Chat, an AI platform offering access to multiple AI models (GPT-4o, Claude 3.7 Sonnet, Gemini 2.0 Flash) for a monthly fee. A discount code ("king25" for 25% off any plan or "king40yearly" for 40% off annual subscriptions) is provided.
7. Conclusion
The new Agent Mode in Gemini Code Assist significantly enhances its usability by providing more control, better context awareness, and the ability to work across multiple files. While still in preview and subject to limitations, it represents a valuable addition to the tool, particularly for individual users. The integration with Gemini CLI ensures that Agent Mode will likely benefit from future improvements to the CLI.
AI summaries can miss context or contain errors. Check important details against the original video.





