Posted by Sandhya Mohan – Product Supervisor, and Jose Alcérreca – Developer Relations Engineer
Software program improvement is present process a big evolution, transferring past reactive assistants to clever brokers. These brokers do not simply supply ideas; they will create execution plans, make the most of exterior instruments, and make complicated, multi-file adjustments. This ends in a extra succesful AI that may iteratively resolve difficult issues, essentially altering how builders work.
At Google I/O 2025, we supplied a glimpse into our work on agentic AI in Android Studio, the built-in improvement surroundings (IDE) centered on Android improvement. We showcased that by combining agentic AI with the built-in portfolio of instruments within Android Studio, the IDE is ready to help you in growing Android apps in ways in which have been by no means potential earlier than. We are actually extremely excited to announce the subsequent frontier in Android improvement with the supply of ‘Agent Mode’ for Gemini in Android Studio.
These options can be found within the newest Android Studio Narwhal Characteristic Drop Canary launch, and will probably be rolled out to enterprise tier subscribers within the coming days. As with all new Android Studio options, we invite builders to present suggestions to direct our improvement efforts and guarantee we’re creating the instruments it is advisable to construct higher apps, sooner.
Agent Mode
Gemini in Android Studio’s Agent Mode is a brand new experimental functionality designed to deal with complicated improvement duties that transcend what you’ll be able to expertise by simply chatting with Gemini.
With Agent Mode, you’ll be able to describe a posh objective in pure language — from producing unit assessments to complicated refactors — and the agent formulates an execution plan that may span a number of recordsdata in your venture and executes beneath your route. Agent Mode makes use of a variety of IDE instruments for studying and modifying code, constructing the venture, looking the codebase and extra to assist Gemini full complicated duties from begin to end with minimal oversight from you.
To make use of Agent Mode, click on Gemini within the sidebar, then choose the Agent tab, and describe a activity you’d just like the agent to carry out. Some examples of duties you’ll be able to attempt in Agent Mode embody:
- Construct my venture and repair any errors
- Extract any hardcoded strings used throughout my venture and migrate to strings.xml
- Add help for darkish mode to my utility
- Given an hooked up screenshot, implement a brand new display in my utility utilizing Materials 3
The agent then suggests edits and iteratively fixes bugs to finish duties. You’ll be able to overview, settle for, or reject the proposed adjustments alongside the best way, and ask the agent to iterate in your suggestions.

Whereas highly effective, you might be firmly in management, with the flexibility to overview, refine and information the agent’s output at each step. When the agent proposes code adjustments, you’ll be able to select to just accept or reject them.

Moreover, you’ll be able to allow “Auto-approve” in case you are feeling fortunate 😎 — particularly helpful once you need to iterate on concepts as quickly as potential.
You’ll be able to delegate routine, time-consuming work to the agent, releasing up your time for extra inventive, high-value work. Check out Agent Mode within the newest preview model of Android Studio – we sit up for seeing what you construct! We’re investing in constructing extra agentic experiences for Gemini in Android Studio to make your improvement much more intuitive, so you’ll be able to count on to see extra agentic performance over the subsequent a number of releases.

Supercharge Agent Mode together with your Gemini API key

The default Gemini mannequin has a beneficiant no-cost each day quota with a restricted context window. Nevertheless, now you can add your personal Gemini API key to increase Agent Mode’s context window to an enormous 1 million tokens with Gemini 2.5 Professional.
A bigger context window helps you to ship extra directions, code and attachments to Gemini, resulting in even larger high quality responses. That is particularly helpful when working with brokers, because the bigger context offers Gemini 2.5 Professional with the flexibility to motive about complicated or long-running duties.

To allow this characteristic, get a Gemini API key by navigating to Google AI Studio. Register and get a key by clicking on the “Get API key” button. Then, again in Android Studio, navigate to the settings by going to File (Android Studio on macOS) > Settings > Instruments > Gemini to enter your Gemini API key. Relaunch Gemini in Android Studio and get even higher responses from Agent Mode.
You should definitely safeguard your Gemini API key, as further fees apply for Gemini API utilization related to a private API key. You’ll be able to monitor your Gemini API key utilization by navigating to AI Studio and deciding on Get API key > Utilization & Billing.
Be aware that enterprise tier subscribers already get entry to Gemini 2.5 Professional and the expanded context window robotically with their Gemini Code Help license, so these builders won’t see an API key possibility.
Mannequin Context Protocol (MCP)
Gemini in Android Studio’s Agent Mode can now work together with exterior instruments by way of the Mannequin Context Protocol (MCP). This characteristic offers a standardized method for Agent Mode to make use of instruments and lengthen information and capabilities with the exterior surroundings.
There are various instruments you’ll be able to connect with the MCP Host in Android Studio. For instance you may combine with the Github MCP Server to create pull requests immediately from Android Studio. Listed here are some further use circumstances to think about.
On this preliminary launch of MCP help within the IDE you’ll configure your MCP servers by a mcp.json file positioned within the configuration listing of Studio, utilizing the next format:
{ "mcpServers": { "reminiscence": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-memory" ] }, "sequential-thinking": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-sequential-thinking" ] }, "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "" } } } }
For this preliminary launch, we help interacting with exterior instruments by way of the stdio transport as outlined within the MCP specification. We plan to help the complete suite of MCP options in upcoming Android Studio releases, together with the Streamable HTTP transport, exterior context sources, and immediate templates.
For extra info on methods to use MCP in Studio, together with the mcp.json configuration file format, please confer with the Android Studio MCP Host documentation.
By delegating routine duties to Gemini by Agent Mode, you’ll be capable of concentrate on extra revolutionary and pleasing features of app improvement. Obtain the newest preview model of Android Studio on the canary launch channel right now to attempt it out, and tell us how a lot sooner app improvement is for you!
As all the time, your suggestions is necessary to us – verify identified points, report bugs, recommend enhancements, and be a part of our vibrant neighborhood on LinkedIn, Medium, YouTube, or X. Let’s construct the way forward for Android apps collectively!