Google has announced the integration of Gemini in Android Studio’s Agent Mode into the latest canary release of Android Studio, Android Studio Narwhal preview. According to Google, the new Agent Mode is designed to handle multi-step development tasks that span across several files.
Agent Mode takes Gemini integration in Android Studio a step forward by going beyond what was previously possible through simple chat interactions. Specifically, Agent Mode uses the entire project as context, not just the contents of the chat window. Its deeper integration with the IDE also allows it to directly modify the project, rather than merely suggesting code snippets to copy and paste. Most importantly, it can execute multi-step tasks.
With Agent Mode, you can describe a complex goal in natural language — from generating unit tests to complex refactors — and the agent formulates an execution plan that can span multiple files in your project and executes under your direction.
Examples of tasks you can ask Agent Mode to perform include building a project and fixing all errors, extracting hardcoded strings and migrating them to strings.xml
, adding support for dark mode to an existing application, and more.
The agent carries out requested tasks step by step, allowing developers to review the changes. If they’re not satisfied, they can provide feedback and ask the agent to provide a new solution based on it until the result meets their expectations.
Agent Mode can interact with external tools via the Model Context Protocol (MCP), for example to create a pull request directly from Android Studio, or use any of the MCP servers currently available. The initial implementation of MCP support in this preview is partial, as only the stdio transport is available, with support for Streamable HTTP transport planned for a future release, along with external context resources, and prompt templates.
Agent Mode can be used with the Gemini’s free tier, which supports a limited context window though. Alternatively, you can use a one million tokens window by upgrading to Gemini 2.5 Pro.
Google highlights that Agent Mode is especially useful for routine, time-consuming tasks, helping free up developers’ time for more creative work. This could be seen as a subtle way to set expectation right about what this tool can bring to a developer’s workflow, or a hint at the most appropriate way to use it day to day.
As this is still a preview release, it’s expected that not all features will work flawlessly in every scenario. Early adopters of Gemini in Android Studio’s Agent Mode have reported several shortcomings, including issues seemingly related to the tool’s inability to run external tools to access source files or modify them. Google is aware of these issues and is actively working to address them.