All posts
Developer Tools·5 min read·Updated 25 Nov 2026

Use Claude Agent or Codex in Android Studio: Bring Your Own Agent Setup (2026)

Quick answer
Android Studio's Bring Your Own Agent feature, stable in Rabbit 2 since 28 October 2026, connects Claude Agent, Codex, Google Antigravity or any Agent Client Protocol (ACP) agent. Open the agent window, pick an agent and sign in or add an API key; more agents are under Settings > Tools > AI > Agents.

Android Studio Rabbit 2 lets you plug Claude Agent, Codex, Antigravity or any ACP-compliant agent into the IDE. How to connect one, what the agent can see, and why it saves tokens.

Piyush

Founder of StackPicks, based in Mumbai, India. Every tool recommended here is checked on GitHub first; see how we pick.

5 min read
Use Claude Agent or Codex in Android Studio: Bring Your Own Agent Setup (2026)

**Short version:** you no longer have to choose between your favourite coding agent and Android Studio's tooling. Google introduced Bring Your Own Agent (BYOA) on 24 September 2026 and shipped it stable in Android Studio Rabbit 2 on 28 October. Details are from the Android Developers blog.

Agents you can use in Android Studio: Claude Agent, Codex, Google Antigravity and any ACP agent

Connect an agent

  1. Update to Android Studio Rabbit 2 or later.
  2. Open the agent window and pick Claude Agent, Codex or Antigravity.
  3. Sign in with your plan or paste an API key.
  4. Find more agents under Settings > Tools > AI > Agents.

Enterprise and consumer AI plans both work, subject to the agent provider.

What the agent gets from the IDE

What Android Studio gives a connected agent: project graph, build diagnostics, Compose Previews, SDK tools, emulator control

Android Studio passes the **project graph, build setup and platform details** over the Agent Client Protocol, so the agent can pick relevant files instead of reading everything; Google pitches this as better token efficiency. It also injects:

  • Build diagnostics
  • Jetpack Compose Previews
  • Android SDK tools
  • Emulator control

Agents can read and edit files, run shell commands and tests, spawn subagents, and keep project skills and memory. Granular permissions let routine work run on its own and pause for approval on riskier actions.

Tips

  • Switch agents mid-task if one hits its quota; another can take over.
  • Gemini users: Google recommends the Antigravity agent for the latest Gemini models.
  • Keep your Claude Code skills and subagents in the project; they load automatically.

Deciding between agents? Read Claude Code vs Codex and Claude Code vs Google Antigravity.

Frequently asked questions

Can I use Claude Code in Android Studio?+

Yes. Android Studio's Bring Your Own Agent feature lets you connect Anthropic's Claude Agent directly in the IDE. It is stable in Android Studio Rabbit 2, released on 28 October 2026. Open the agent window, select Claude Agent, and sign in with your plan or provide an API key. The agent then gets Android Studio's build diagnostics, Compose Previews, SDK tools and emulator control.

What is Agent Client Protocol in Android Studio?+

Agent Client Protocol, or ACP, is the open protocol Android Studio uses to connect third-party coding agents. Through ACP, the IDE passes the project graph, build setup and platform details to the agent, which can then filter to relevant files for efficient token use. Any ACP-compliant agent can be added from Settings, Tools, AI, Agents.

Which agents work with Android Studio?+

Google's launch named Anthropic's Claude Agent, OpenAI's Codex and Google's Antigravity agent, and said any agent that supports the Agent Client Protocol can be connected. The built-in Gemini agent remains available. For the latest Gemini models, Google recommends selecting the Antigravity agent and signing in with a Google AI Pro or Ultra plan or a Gemini API key.

Is Bring Your Own Agent free?+

The Android Studio feature itself is free. The agent you connect uses your own plan or API key with that provider, so usage is billed by Anthropic, OpenAI or Google according to your subscription or token rates. Android Studio says its project-graph context helps agents use fewer tokens. You can switch to a different agent if one runs out of quota.

More in Developer Tools