Most Android developers who use AI coding agents have had the same awkward arrangement: the IDE on one side, an agent in a terminal on the other, and you playing messenger between them. Android Studio Rabbit 2 is meant to end that. Its Bring Your Own Agent feature, usually shortened to BYOA, lets you plug Claude Agent, OpenAI Codex or Google Antigravity straight into the IDE, and the release notes Google updated on October 21, 2026 add agent-assisted memory-leak fixing and a way to manage Android skills from inside Studio.
This guide covers how to get a build that has BYOA, connect an agent, check that it can see your project, try the LeakCanary integration, and fix the things that usually go wrong. It also covers the less glamorous question of who should bother. I've stuck to what Google's documentation says, and where something is my own judgment I've labeled it as such.
What changed in Rabbit 2
The headline is BYOA, introduced in Android Studio Rabbit 2 Canary 2. It builds on Studio's earlier support for custom AI models, which let you point the IDE at a model of your choice. BYOA goes a step further and lets you bring a whole agent. The connection uses the open Agent Client Protocol, or ACP, which is a standard way for an editor to talk to a coding agent. Google lists Claude Agent, OpenAI Codex and Google Antigravity as the agents you can pick by default, and says any ACP-compliant agent will work.
What you get beyond a plain chat window is context. Google says Studio passes the full project graph, build diagnostics and emulator controls to your agent, which is meant to speed up execution and lower token use. The documented capabilities are direct access to build diagnostics, Android SDK tools, terminal and shell execution, and emulator management. In practice that means an agent can read why your Gradle build failed from the IDE's own diagnostics instead of scraping log output, and it can drive the emulator without you copying screenshots into a prompt.
Three other items arrived in the same release. Studio now integrates LeakCanary with the AI agent, so memory leak explanations and suggested code changes appear in the IDE. It's easier to discover, install and manage Android skills, the specialized instructions an agent uses. And the Running Devices tool window got a small quality-of-life fix: double-click empty space around a device and the window resizes to fit the display.
Requirements and compatibility
The first thing to understand is that BYOA is a preview. Google says Agents are in Preview, and the picker in the Agent window shows that message. It's tied to the Canary channel: the feature arrived in Rabbit 2 Canary 2, and the release-notes page lists Rabbit 2 at the RC stage in its version table, so the preview label on the agents themselves is the thing to go by. If you're on the stable Android Studio, don't expect to see the option.
| Item | What you need |
|---|---|
| Android Studio | Rabbit 2 Canary 2 or later (preview) |
| Agent | Claude Agent, Codex, Google Antigravity, or another ACP-compliant agent |
| Sign-in | A plan with the agent's provider, or an API key |
| Built-in agent | Still available at no extra charge |
On accounts: you authenticate with your own subscriptions, personal or enterprise, or with an API key. Google's wording is that the sign-in options support personal API keys and consumer subscriptions, and that enterprise and consumer plans are both supported, subject to the agent provider. So the cost of using Claude Agent or Codex is whatever your plan with Anthropic or OpenAI already costs you. The built-in agent in Android Studio remains available at no extra charge, which is the comparison point.
There's one more requirement that matters: Studio starts its own instance of the agent through ACP. Google's quickstart is clear that it doesn't connect to an agent that's already running, such as one in a terminal. If you've got a Claude or Codex session going in a terminal, it's separate from the one in Studio.
Step 1: Get a build that has it
If you're not already on a Canary build, download the latest Canary from the Android Studio preview page. I'd install it alongside your stable Studio rather than replacing it. Canary builds can be unstable, and you don't want a preview bug interrupting a release week. Both can coexist, and they keep separate settings.
If you already run Canary, update from within Studio to the latest build. Then confirm you've got Rabbit 2 Canary 2 or later from the About screen.
Step 2: Open the Agent window and pick an agent
Open your project and bring up the Agent window. In its toolbar there's an agent picker. In Google's screenshot the list shows the Built-in Agent, Claude Agent (described as an ACP wrapper for Anthropic's Claude), Codex (an ACP adapter for OpenAI's coding assistant) and Google Antigravity, followed by a Configure Agents option and the Agents are in Preview note.
Select the agent you want. Google's instructions are to sign in or provide an API key. If you've got a subscription with that provider, sign in with it. If you'd rather pay per token or you're on a team that issues API keys, provide a key instead. Which is better depends on how much you'll use it: a subscription is easier to predict, and a key can be cheaper if you only use it now and then.
Step 3: Add other agents from the registry
If your preferred agent isn't in the default three, look in the registry. Google gives the path as File, then Settings, then Tools, then AI, then Agents, and on macOS the first menu is Android Studio instead of File. Additional ACP agents can be found there. That's also where Configure Agents in the picker takes you.
I'd add agents deliberately rather than collecting them. Each one has its own sign-in, its own pricing and its own habits, and trying three at once makes it hard to judge any of them.
Step 4: Check the agent can actually see your project
The best test of BYOA isn't a clever prompt; it's whether the agent knows things only the IDE knows. Try a simple request, like asking it to explain why the project's last build failed, or to list the modules in the project. If it answers with specifics from your build diagnostics and your project graph, the integration is working. If it answers generically, or asks you to paste a log, something about the connection is off.
Then try something that uses the emulator or the SDK tools, since Google lists those as documented capabilities. For example, ask the agent to build the app and run it on a running emulator. You should be able to watch it act, and Studio's own tool windows will show the work. If you're nervous about an agent running terminal commands, read what it proposes before you approve, as you would with any tool that can run shell commands on your machine.
Step 5: Try the agentic LeakCanary fixes
This one's easy to miss. Google says that starting in Rabbit 2, Studio directly integrates LeakCanary with the AI agent to help diagnose and fix memory leaks without leaving the IDE. The integration has LeakCanary give a more meaningful narrative explanation of the underlying cause and suggest specific code changes. Google's pointer is to try it in the LeakCanary task in the Profiler.
My advice is to try it on a leak you already understand. That's the quickest way to judge whether the explanation is accurate and whether the suggested change is sensible. A leak you don't understand is a worse test, since you can't tell a good fix from a plausible one. As with any suggested code change, review it, run your tests and check that it really removes the leak rather than hiding the symptom.
Step 6: Manage Android skills
Google says that in Rabbit 2 it's easier to discover, install and manage Android skills directly in the IDE, giving you control over the specialized workflows and procedural guidance available to the agent. If you work outside the IDE too, Google's Android CLI has matching commands. According to Google's announcement of Android CLI 1.0, you can initialize your environment and install the base skill with the first command below, list skills with the second, and add one with the third.
android init android skills list android skills add --skill=<skill-name> The skills are worth a look because they're how an agent learns the Android-specific way of doing things, rather than falling back on generic advice. I wouldn't install everything on the list. Pick the ones that match what you actually do, such as the workflow for your build setup or your testing approach, and add more when you hit a gap.
A small fix worth knowing: resizing Running Devices
If you use the Running Devices tool window, double-click anywhere in the empty background around the device screen and Studio resizes to wrap the display. In docked windows it adjusts width or height to remove the extra margin. In floating windows it resizes both. In split views it adjusts the internal splitters. It's minor, but it's the sort of thing you'll use constantly once you know it exists.
Prompts that take advantage of the IDE
An agent inside Studio can do things a terminal agent can't, so it's worth asking for them. Instead of "fix the build," try "the last Gradle sync failed; read the build diagnostics and tell me which dependency is the problem before changing anything." Asking for a diagnosis first and a change second keeps you in control, and it plays to the strength Google describes, which is direct access to build diagnostics rather than guesswork from pasted output.
For UI work, ask the agent to run the app on an emulator and report what it sees. That uses the emulator management Google lists, and it's a quick way to find out whether the agent's idea of "done" matches yours. For tests, ask it to write one, run it, and show you the failure before it fixes anything. A test it has never seen fail isn't worth much.
Keep requests small. The project graph helps an agent find the right files, but a vague, sprawling task still produces a sprawling diff that's tedious to review. I'd rather approve five small changes than untangle one large one.
Thinking about cost
Because BYOA uses your own plan or API key, the cost sits with the provider and not with Google. Google says the design is meant to lower token consumption by giving the agent structured IDE information instead of making it rebuild the project from raw files, but that's a design goal, not a number you can count on. Watch your first few sessions on whichever plan you use and see how fast you burn through your allowance.
If you're on a team, agree on which agent and which plan to use before several people start experimenting on separate keys. It's far easier to compare results and costs when everyone's using the same setup, and it avoids a surprise at the end of the month.
Who should switch, and who shouldn't
This is my judgment, not Google's. If you already pay for Claude or Codex and you've been shuttling context between a terminal and Studio, BYOA is worth trying today, on a Canary install that sits next to your stable one. The context Studio passes in is the real advantage, and the integration saves you the copy-paste work.
If you're happy with the built-in agent, there's no urgency. It remains available at no extra charge,. If your team needs stability, wait for the feature to reach a stable release. Preview features move, and the workflow you build today may change.
And if you're deciding between agents, don't decide on a first impression. Give each one the same real task, such as fixing a failing test or tracking down a leak, and compare the results. Differences in price, speed and style show up quickly on a real task and are hard to guess from the descriptions.
Running Canary next to stable without regret
A preview build is a good place to try an agent, but it needs a little discipline. Keep the Canary for experiments and keep your release work on stable. If you open the same project in both, make sure you don't let the preview upgrade project files in a way your stable install can't read; commit before you switch, and check the diff after the first sync. Gradle and plugin versions can move between channels, and a surprise there is more annoying than any agent mistake.
It also pays to use version control as the safety net for agent work. Start from a clean working tree, let the agent make its changes, and review them as you would a colleague's pull request. Because the agent can run terminal commands and build tasks through Studio, a clean starting point makes it trivial to throw the whole attempt away if it goes sideways.
Last, keep notes on what worked. Preview features change quickly, and a short record of which prompts produced good results with which agent will save you time when the next Canary shifts something. That record also gives your team something concrete to discuss when you decide whether BYOA should become part of your normal workflow once it reaches a stable release.
Troubleshooting
If you can't find the agent picker or the Agents settings page, check your build. BYOA is in Rabbit 2 Canary 2 and later, and it isn't in stable releases. Update to the latest Canary and check again.
If an agent won't sign in, confirm you've got an eligible plan with the provider, or try an API key instead. Google says plans are subject to the agent provider, so a plan limit or a billing problem on the provider's side can look like a Studio problem.
If you expect to see an agent from your terminal, remember Studio starts its own instance through ACP and doesn't attach to one that's already running. Close the terminal session and use the one in the Agent window.
If an agent doesn't appear in the picker, look in the registry under Settings, then Tools, then AI, then Agents, and add it there.
If the agent behaves as though it can't see your project, restart Studio, make sure the Gradle sync finished and then try again. That's general advice rather than something Google documents for this case, but a half-synced project can leave the project graph incomplete.
Frequently Asked Questions
Is Bring Your Own Agent available in stable Android Studio?
No. Google introduced it in Android Studio Rabbit 2 Canary 2, and the Agent window labels agents as a preview. You need a Canary build or later to see it.
Which agents can I connect?
Claude Agent, OpenAI Codex and Google Antigravity are listed by default. Google says any ACP-compliant agent works, and additional ones can be found in the registry under Settings, Tools, AI, Agents.
Do I have to pay extra for the built-in agent?
No. Google says the built-in agent remains available at no extra charge. For the other agents, you use your own plan or API key with the provider.
Can Studio connect to an agent already running in my terminal?
No. According to Google's quickstart, Android Studio starts its own instance of the agent through ACP, so it doesn't connect to one that's already running.
What does the agent see in my project?
Google says Studio passes the project graph, build diagnostics, Android SDK tools, terminal and shell execution and emulator management to the agent, which should speed up work and reduce token use.
What's the LeakCanary integration?
Starting in Rabbit 2, LeakCanary works with the AI agent to explain the cause of a memory leak and suggest code changes. You try it from the LeakCanary task in the Profiler.
Images: Google and Android Developers (official Android Studio documentation images).
Originally published on Mango Developer.

