Agentic AI takes Gemini in Android Studio to the next level

Agentic AI takes Gemini in Android Studio to the next level

Home » News » Agentic AI takes Gemini in Android Studio to the next level
Table of Contents

Posted by Sandhya Mohan – Product Supervisor, and Jose Alcérreca – Developer Relations Engineer

Software program improvement is present process a major evolution, shifting past reactive assistants to clever brokers. These brokers do not simply provide strategies; they’ll create execution plans, make the most of exterior instruments, and make advanced, multi-file modifications. This ends in a extra succesful AI that may iteratively clear up difficult issues, basically 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 atmosphere (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 creating Android apps in ways in which had been by no means doable earlier than. We at the moment are extremely excited to announce the subsequent frontier in Android improvement with the provision 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 likely 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’s essential to construct higher apps, sooner.

Agent Mode

Gemini in Android Studio’s Agent Mode is a brand new experimental functionality designed to deal with advanced improvement duties that transcend what you possibly can expertise by simply chatting with Gemini.

With Agent Mode, you possibly can describe a fancy objective in pure language — from producing unit exams to advanced refactors — and the agent formulates an execution plan that may span a number of recordsdata in your venture and executes beneath your course. Agent Mode makes use of a spread of IDE instruments for studying and modifying code, constructing the venture, looking out the codebase and extra to assist Gemini full advanced 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 process you’d just like the agent to carry out. Some examples of duties you possibly can 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 assist for darkish mode to my utility
    • Given an connected 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 possibly can evaluate, settle for, or reject the proposed modifications alongside the best way, and ask the agent to iterate in your suggestions.

moving image showing Gemini breaking tasks down into a plan with simple steps, and the list of IDE tools it needs to complete each step

Gemini breaks duties down right into a plan with easy steps. It additionally exhibits the record of IDE instruments it wants to finish every step.

Whereas highly effective, you might be firmly in management, with the power to evaluate, refine and information the agent’s output at each step. When the agent proposes code modifications, you possibly can select to just accept or reject them.

screenshot of Gemini in Android Studio showing the Agent prompting the user to accept or reject a change

The Agent waits for the developer to approve or reject a change.

Moreover, you possibly can allow “Auto-approve” in case you are feeling fortunate 😎 — particularly helpful if you need to iterate on concepts as quickly as doable.

You possibly can 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 possibly can count on to see extra agentic performance over the subsequent a number of releases.

moving image showing that Gemini understanding the context of an app

Gemini is able to understanding the context of your app

Supercharge Agent Mode along with your Gemini API key

screenshot of Gemini API key prompt in Android Studio

The default Gemini mannequin has a beneficiant no-cost every day quota with a restricted context window. Nevertheless, now you can add your individual Gemini API key to develop Agent Mode’s context window to an enormous 1 million tokens with Gemini 2.5 Professional.

A bigger context window permits 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 gives Gemini 2.5 Professional with the power to motive about advanced or long-running duties.

screenshot of how to add your API Key in the Gemini settings

Add your API key within the Gemini settings

To allow this function, get a Gemini API key by navigating to Google AI Studio. Check in 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.

Be sure you safeguard your Gemini API key, as extra fees apply for Gemini API utilization related to a private API key. You possibly can monitor your Gemini API key utilization by navigating to AI Studio and deciding on Get API key > Utilization & Billing.

Notice that enterprise tier subscribers already get entry to Gemini 2.5 Professional and the expanded context window mechanically with their Gemini Code Help license, so these builders won’t see an API key choice.

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 function gives a standardized approach for Agent Mode to make use of instruments and prolong data and capabilities with the exterior atmosphere.

There are a lot of instruments you possibly can connect with the MCP Host in Android Studio. For instance you might combine with the Github MCP Server to create pull requests immediately from Android Studio. Listed below are some extra use instances to contemplate.

On this preliminary launch of MCP assist 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": "<YOUR_TOKEN>"
      }
    }
  }  
}
Instance configuration with two MCP servers

For this preliminary launch, we assist interacting with exterior instruments by way of the stdio transport as outlined within the MCP specification. We plan to assist the total 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 easy 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 give attention to extra modern and gratifying facets of app improvement. Obtain the newest preview model of Android Studio on the canary launch channel right this moment to attempt it out, and tell us how a lot sooner app improvement is for you!

As at all times, your suggestions is essential to us – verify recognized points, report bugs, recommend enhancements, and be a part of our vibrant group on LinkedIn, Medium, YouTube, or X. Let’s construct the way forward for Android apps collectively!



Supply hyperlink

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
share this article.

Enjoying my articles?

Sign up to get new content delivered straight to your inbox.

Please enable JavaScript in your browser to complete this form.
Name