> For the complete documentation index, see [llms.txt](https://dreetje-1.gitbook.io/inbox-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dreetje-1.gitbook.io/inbox-ai/actions/custom-actions/ask-ai.md).

# Ask AI

{% hint style="warning" %}
The quality of the results of your AI depend greatly on the selected AI provider. Local on-device models are more often less powerful than the cutting edge online models.
{% endhint %}

The Ask AI action is the core of Inbox AI. Below is a substantial example.

<figure><img src="/files/AfGgj8dASxyL2guWSZEi" alt=""><figcaption><p>Example Ask AI Action</p></figcaption></figure>

Ask AI actions have the following fields:

* Provider / Model\
  \&#xNAN;*The selected AI provider for this AI action. See* [Quick Start](/inbox-ai/quick-start.md) *for how to setup providers.*
* Output\
  Specifies what to do with non-action messages of the AI model. Ignoring them will force the AI to run actions, but you can also choose to display them or speak them out loud.
* Next Action\
  \&#xNAN;*Normal actions each have a* [Next Action Field](/inbox-ai/actions/next-action-field.md)*, but the Ask AI action has a special option here: "Chosen by AI". Selecting this option, allows the AI to pick its follow-up action itself from the actions you provide. The blue bubbles represent actions your AI can choose to take.*
* Prompt\
  This is the core field that teaches the AI what you hope to achieve. You can prompt in any language and use both [Action Variables](/inbox-ai/actions/action-variables.md) and [Templating](/inbox-ai/templating.md) to achieve your goal. It is beyond the scope of this guide to teach prompting. Try looking online for resources on how to prompt well.

## Allowing Multiple Turns

Allowing multiple turns allows your API to execute actions, and act on their results in follow-up turns. This unlocks powerful agent chains. Some actions automatically return their results (i.e.[Take Screenshot](/inbox-ai/actions/built-in-actions/system-actions/take-screenshot.md), [Get Selected Text](/inbox-ai/actions/built-in-actions/system-actions/get-selected-text.md)), but you can also build custom actions that do so using the [Return Result to Previous AI](/inbox-ai/actions/built-in-actions/flow-control/return-result-to-previous-ai.md) action in the [Next Action Field](/inbox-ai/actions/next-action-field.md).

Multiple turns are only supported when the AI chooses its next action.

{% hint style="info" %}
It is often a good idea to add a [Do Nothing](/inbox-ai/actions/built-in-actions/do-nothing.md) action to your actions for multiple turn Ask AI actions, this allows the AI to choose to stop.
{% endhint %}
