# AI Command Behaviors

You can choose what to do with the text content from AI when using an AI Command. This is the first step to build an AI-automated workflow.

### Open in a new window

When you trigger an AI Command, BoltAI will start a new chat with the predefined configuration. This is useful when you want to ask follow up questions, or when you're not working with a textfield (not possible to edit the text)

Best tasks with this behavior:

* Text summarization
* List key takeaways
* Explain content

### Insert answer before/after selection

Instead of opening the asnwer in a new window, BoltAI will attempt to insert the answer before or after the selection.&#x20;

Note that you **must not change the selection**, or to switch to a different window while BoltAI is processing your request. The reason is because BoltAI will attempt to send keystroke to the current app (`Command + V`)

You can choose to insert a newline between the selection and the AI answer for better readability.

<figure><img src="/files/a5lTO7AfGTECY43tx5gJ" alt=""><figcaption><p>Insert new line between selection &#x26; AI answer</p></figcaption></figure>

### Replace current selection

This is useful when you don't need the content in the selection. For example: grammar fix, content rewrite etc.

### Copy to clipboard

This behavior gives you the flexibility to choose where to paste the AI answer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.boltai.com/docs/ai-command/ai-command-behaviors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
