| **Tip:** Starting with Android Studio Narwhal Feature Drop, Gemini in Android Studio has [Agent Mode](https://developer.android.com/studio/gemini/agent-mode). Agent Mode can handle complex tasks that span multiple steps and files, going beyond what you can do with chat alone.

The main interface for interacting with Gemini is the chat window. You can
use it to ask questions ranging from very open-ended ones to specific problems
that you need help with.

Here are some examples of things you might ask; however, we encourage you 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?

Gemini 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?

Gemini in Android Studio is uniquely equipped to answers questions about a
specific capability or workflow in the Studio IDE, for example:

- How do I analyze UI performance issues in my app?
- Where do I find the CPU profiler?

## Show query history

Your queries to Gemini in Android Studio are saved for every coding session in
Android Studio. To see your previous queries, click **Show Query History**
![Show Query History icon](https://developer.android.com/static/studio/gemini/images/gemini-show-query-history.png)
in the Gemini chat box. A menu appears with all the queries you've submitted in
this coding session.
![The Gemini query history menu showing previous queries.](https://developer.android.com/static/studio/gemini/images/query-history.png) **Figure 1:** The Gemini query history menu showing previous queries.

To re-submit a previous query, click the query to paste it in the chat box and
click **Submit**.

When you quit Android Studio, the query history is cleared. To save and manage
commonly used prompts across coding sessions, use the
[Prompt Library](https://developer.android.com/studio/gemini/prompt-library).

## Clear conversation history

Gemini remembers your previous chats and is able to use them as context for your
conversation. If your chat history is no longer relevant to what you're trying
to achieve, reset the chat history by clicking
**Clear Conversation History** ![Clear Conversation History icon](https://developer.android.com/static/studio/images/gemini-reset-chat.png)
in the Gemini pane.

## Manage multiple conversation threads

You can organize your conversation with Gemini in Android Studio into
multiple threads. This lets you switch between multiple ongoing tasks and search
through your conversation history. Using separate threads for each task also
improves response quality by limiting the scope of the AI's context to only the
topic at hand.

To start a new thread, click **New Chat** ![The New Chat plus sign.](https://developer.android.com/static/studio/gemini/images/new-chat.png). To see your
conversation history, click **Recent Chats** ![The Recent Chats word
bubble.](https://developer.android.com/static/studio/gemini/images/recent-chats.png).
![A list of recent chat topics.](https://developer.android.com/static/studio/gemini/images/recent-chat-list.png) See all the topics you've previously chatted about.

Your conversation history is saved to your account, so if you have to sign out
or switch accounts you can resume right where you left off when you come back.

## Next steps

To continue learning about Gemini in Android Studio, consider the following:

- For tips on how to get the most out of chats with Gemini in Android Studio, see [Best practices](https://developer.android.com/studio/gemini/best-practices).
- Browse the [Prompt Gallery](https://developer.android.com/studio/gemini/prompt-gallery) for inspiration on how to use Gemini.
- Help Gemini understand the context for your query by skillfully [attaching files](https://developer.android.com/studio/gemini/attach-file) and [attaching images](https://developer.android.com/studio/gemini/attach-image).