our most capable local model for agentic coding







Posted by Matthew Warner, Google Product Manager


Every developer’s AI workflow and needs are unique, and it’s important to be able to choose how AI helps your development. In January, we introduced the ability to choose any local or remote AI model to power AI functionality in Android Studio, and today, we’re announcing the availability of Gemma 4 for AI coding assistance in Android Studio. This new local model trained on Android development provides the best of both worlds: the privacy and cost-efficiency of on-device processing alongside state-of-the-art reasoning and tool-calling capabilities.

AI assistance, locally delivered

By running locally on your machine, Gemma 4 gives you AI code assistance that doesn’t require an internet connection or an API key for its core operations. Key benefits include:

  • Privacy and security: Your code stays on your machine. Gemma 4 processes all Agent Mode requests locally, making it an ideal choice for developers working with data privacy requirements or in secure corporate environments.
  • Cost efficiency: Run complex agentic workflows without worrying about hitting quotas. Gemma 4 is optimized to run efficiently on modern development hardware, utilizing local GPU and RAM to provide snappy, responsive assistance.
  • Offline availability: Use the agent to write code even when you don’t have an internet connection.
  • State-of-the-art reasoning: Gemma 4 delivers best-in-class reasoning, capable of complex multi-step coding tasks in Agent Mode.

Powerful agentic coding

Gemma 4 was trained for Android development with agentic tool calling capabilities. When you select Gemma 4 as your local model, you can leverage Agent Mode for a variety of development use cases, such as:

  • Designing new features: Developers can ask the agent to build a new feature or an entire app with commands like “build a calculator app” and the agent will not only generate the UI code but will use Android best practices like writing in Kotlin and using Jetpack Compose.
  • Refactoring: You can give high-level commands such as “Extract all hardcoded strings and migrate them to strings.xml.” The agent will scan your codebase, identify instances requiring changes, and apply the edits across multiple files simultaneously.
  • Bug fixing and build resolution: If a project fails to build or has persistent lint errors, you can prompt the agent to “Build my project and fix any errors.” The agent will navigate to the offending code and iteratively apply fixes until the build is successful.

Recommended hardware requirements

The 26B MoE is recommended for Android app developers using a machine with the minimum hardware requirements. Total RAM needed includes both Android Studio and Gemma.

ModelTotal RAM neededStorage needed
Gemma E2B8GB2 GB
Gemma E4B12 GB4 GB
Gemma 26B MoE24 GB17 GB

Get started

To get started, ensure you have the latest version of Android Studio installed.

  1. Install an LLM provider, such as LM Studio or Ollama, on your local computer.
  2. In Settings > Tools > AI > Model Providers add your LM Studio or Ollama instance.


  1. Download the Gemma 4 model from Ollama or LM Studio. Refer to hardware requirements for model size selection.
  2. In Agent Mode, select Gemma 4 as your active model.


For a detailed walkthrough on configuration, check out the official documentation on how to use a local model.

We are excited to see how Gemma 4 enables more private, secure, and powerful development workflows. As always, your feedback is essential as we continue to refine the AI experience in Android Studio. If you find a bug or issue, please file an issue. Also you can be part of our vibrant Android developer community on LinkedIn, YouTube, or X. Happy coding!




Source link

  • Related Posts

    Announcing Gemma 4 in the AICore Developer Preview

    Posted by David Chou, Product Manager and Caren Chang, Developer Relations Engineer At Google, we’re committed to bringing the most capable AI models directly to the Android devices in your…

    The new standard for local agentic intelligence on Android

    Today, we are enhancing Android development with Gemma 4, our latest state-of-the-art open model designed with complex reasoning and autonomous tool-calling capabilities. Our vision is to enable local agentic AI…

    Leave a Reply

    Your email address will not be published. Required fields are marked *