# AI conversation history

## Introduction

The `AI conversation history` page shows the number of interactions remaining from your allowance, followed by a list of conversations completed by users associated with your company profile:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FYHCcxAH4NHBJeUumcuD5%2Fai%20history%201a.png?alt=media&#x26;token=3221c55f-39b6-4686-9f9f-ba500a08c867" alt=""><figcaption></figcaption></figure>

## Understanding your remaining interactions

An AI 'interaction' is decremented when either:

* You use the script editor's `generate` option to [generate a new script from an AI prompt](https://doc.wearepatchworks.com/product-documentation/developer-hub/custom-scripting/creating-and-testing-custom-scripts/creating-a-script-with-ai)
* You use the script editor's `send reply` option to [refine or clarify a script that's was just AI-generated](https://doc.wearepatchworks.com/product-documentation/developer-hub/custom-scripting/creating-and-testing-custom-scripts/creating-a-script-with-ai)

Up to 5 AI requests can be made per day for any company profile, free of charge. A [subscription tier bolt-on](https://doc.wearepatchworks.com/product-documentation/getting-started/core-subscription-tiers) can be purchased if you'd like to increase this allowance.

{% hint style="warning" %}
AI request allowances are linked to company profiles. If you are a Patchworks partner, ensure you are [switched to the relevant company profile](https://doc.wearepatchworks.com/product-documentation/company-management/multi-company-profiles/switching-in-and-out-of-a-linked-company) before generating scripts with AI!
{% endhint %}

## Understanding your conversation history

Your conversation history shows one entry for each conversation completed within the last 15 days. A *conversation* begins when you generate an AI request and ends when you close the AI window.&#x20;

Between starting and ending a *conversation,* you might have multiple *interactions* - perhaps refining your original query or responding to clarification requests from the AI agent.&#x20;

| Column          | Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Conversation Id | A unique, internal id that's generated by Patchworks for each AI request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Type            | Always set to `script_generation` (further types may be added in future).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Status          | <p>The following statuses may be present, depending on where you are in the request:<br></p><ul><li><code>processing</code>. A request is currently being processed. </li><li><code>complete</code> . The <em>conversation</em> is completed - i.e. an initial request was generated and the AI window was subsequently closed (any number of <em>interactions</em> may have happened between these two actions).</li><li><code>completed\_error</code>. The <em>conversation</em> is still in progress, but the last interaction could not be completed successfully - for example, the request may have been interrupted.</li><li><code>needs\_clarification</code>. The <em>conversation</em> is still in progress - the AI agent has requested clarification of requirements. </li></ul> |
| User            | The Patchworks username of the person who made the request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Reported        | If a user clicks the `report` option for an AI-generated response, a marker is shown here.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Initial prompt  | <p>Hover your cursor over the first line of a prompt to view the first request made in a conversation:<br><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FSlnyTJUxzHloAcCqvzsA%2Finitial%20prompt.png?alt=media&#x26;token=635538ad-48e9-4bcd-b326-19c3aac65e65" alt=""></p>                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Requests used   | The number of [requests used](#understanding-your-remaining-interactions) in the completed conversation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Created at      | The date and time that the request was initiated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
