Meet Studio Bot

Studio Bot is your coding companion for Android development. It's a conversational experience in Android Studio that helps you be more productive by answering Android development queries. It's powered by artificial intelligence and can understand natural language, so you can ask development questions in plain English. Studio Bot can help Android developers generate code, find relevant resources, learn best practices, and save time.

Studio Bot is still an early experiment, and might sometimes provide inaccurate, misleading or false information while presenting it confidently. Studio Bot might give you working code that doesn't produce the expected output, or provide you with code that is not optimal or incomplete. Always double-check Studio Bot's responses and carefully test and review code for errors, bugs, and vulnerabilities before relying on it. Studio Bot's new capabilities can help you by offering new ways to write code, create test cases, or update APIs.

Sign up for Studio Bot updates

Get started

Here's how to set up Studio Bot:

  1. Download the latest canary version of Android Studio Iguana.
  2. Recommended: Agree to send data to Google so we can better understand how effective Studio Bot is. Give permission to share data either when you first install Android Studio or later at File > Settings > Appearance & Behavior > System Settings > Data Sharing (Android Studio > Settings > Appearance & Behavior > System Settings > Data Sharing on macOS).
  3. To launch Studio Bot, open or start an Android Studio project and click View > Tool Windows > Studio Bot.
  4. Sign in to your Google account when asked, if you aren't already signed in. The chat box appears and you can start using Studio Bot's interactive, conversational interface.

Get answers from Studio Bot

The main interface for interacting with Studio Bot is the chat window. You can use it to ask questions ranging from very simple and open-ended ones to specific problems that you need help with. Here are some examples of things you might ask; however, feel free to experiment with any topics related to Android development:

  • How do I add camera support to my app?
  • I want to create a Room database.
  • Can you remind me of the format for javadocs?
  • What is dark theme?
  • What's the best way to get location on Android?

Studio Bot remembers the context of the conversation, so you can also ask it follow-up questions, such as:

  • Can you give me the code for this in Kotlin?
  • Can you show me how to do it in Compose?

You can also ask Studio Bot about Android Studio itself, for example:

  • How do I analyze jank in my app?
  • Where do I find the CPU profiler?

Tips for engaging with Studio Bot

Studio Bot's answers differ based on how you ask your question. Here are some tips on how to optimize the answers from Studio Bot:

  • Be specific. If there are certain libraries, APIs, or approaches that you'd like to use, include them in your question.
    How do I add camera support to my app using CameraX?
    How do I add camera support to my app?
  • Describe the structure of the desired answer. If you want to insert code generated by Studio Bot into your app and need it in a certain format, give it those instructions.
    Insert comments into this code. Use double slashes for the comments, and put each comment above the line of code it describes.
    Write code comments for this code.
  • Break up complex requests into a series of simpler questions. Especially when you're asking for code, asking a series of simpler questions yields a more comprehensive answer overall.
    1. Give me the `MainActivity.kt` file for an app with a login screen.
    2. Can you add a class that represents a user profile?
    3. Can you add code that supports multiple user profiles?
    How do I create an app with a login screen that supports multiple user profiles?

How Studio Bot can help

In addition to the chat interface, Studio Bot offers a number of entry points that integrate with your development flow:

  • Add generated code with a click: Studio Bot displays smart actions next to the code it generates, which lets you quickly insert the code into the open editor, insert it into the Android Manifest, or even add required dependencies for popular libraries that are used in the answer.
  • Receive helpful resources: for certain topics, Studio Bot offers to open the relevant documentation page with further information.
  • "Ask Studio Bot" directly from your codebase: when you select text in the code editor, right-click and select the Ask Studio Bot action to populate the chat prompt with the selected code. From there you can decide whether or not to send the code—Studio Bot doesn't send code without your explicit authorization. Ask Studio Bot is also available to help you troubleshoot warnings and errors in the code editor.

Frequently asked questions (FAQ)

Does Studio Bot send my code to Google's servers?

Anything you enter into the Studio Bot chat window is sent to Google servers to generate a response. However, you don't have to share your code to use Studio Bot. Your code stays private by default and never leaves your computer without your consent.

Is my code used to train Studio Bot?

No, your code is not used to train Studio Bot. Features like Ask Studio Bot only send the code that you explicitly authorize to Google servers, but this code isn't used for training purposes. If you agree to send usage statistics to Google in Android Studio, your feedback data—thumbs up and down signals—might be used to fine tune the models. These usage statistics don't contain code from your project.

Does Studio Bot give accurate and safe responses?

Accelerating people's ideas with generative AI is truly exciting, but it's still early days, and Studio Bot is an experiment. Some of the responses might be inaccurate, so double-check information in the responses. With your feedback, Studio Bot is improving. While Studio Bot has built-in safety controls and clear mechanisms for feedback in line with our AI Principles, be aware that it might display inaccurate information or offensive statements.

Can Studio Bot help with coding?

Yes, Studio Bot can help with coding and topics about coding. It is experimental and you are responsible for your use of code or coding explanations. Use discretion and carefully test all code for errors, bugs, and vulnerabilities before relying on it.

How and when does Studio Bot cite sources in its responses?

Studio Bot should generate original content and not replicate existing content at length. We've designed our systems to limit the chances of this occurring, and we will continue to improve how these systems function. If Studio Bot does directly quote at length from a code repository, it cites that source. The citation might also reference an applicable open source license. It is your responsibility to comply with any license requirements.

What terms of service apply to my Studio Bot usage?

Your use of Studio Bot is subject to the Google Terms of Service and the Generative AI Additional Terms of Service.

How can I report feedback about Studio Bot?

We're looking for your feedback to help us improve Studio Bot responses across all of the domains of Android development. To help, use Studio Bot in your development workflow and mark its responses as helpful or not helpful using the thumbs up and down options in the Studio Bot UI. This input helps us identify the areas that need more training.

How is Studio Bot different from other LLM-powered chatbots like Bard?

Studio Bot is based on an LLM (Codey, based on PaLM-2) very much like Bard. Codey was trained specifically for coding scenarios. Studio Bot seamlessly integrates this LLM inside the Android Studio IDE to provide you with a lot more functionality such as one-click actions and links to relevant documentation.

What are some tips for using Studio Bot?

  • Be clear and concise when you ask your question.
  • Use simple language that Studio Bot can understand.
  • If Studio Bot does not understand your question, try rephrasing it.
  • Review Studio Bot suggestions before using them.

For more details, see Tips for engaging with Studio Bot.