# AI agents

{% hint style="success" icon="list-check" %}
**IN BRIEF**

Fullwhere AI agents allow you to set up automatic response generation.

They can be customized through different instructions.

An agent can be linked to a knowledge base to use specific context to generate responses.
{% endhint %}

{% hint style="info" icon="lightbulb" %}
You can configure different AI agents depending on the context in which you want to use them.\
For example, you can choose to specialize your AI agents by interaction family, by brand, or by location.

Once your AI agents are configured, use the [Workflow](/documentation/documentation-en/automations/workflows.md#generer-une-reponse) to define their scope and use.
{% endhint %}

{% hint style="info" icon="lightbulb" %}
If your AI agent requires the use of in-depth knowledge to respond relevantly to your customers, it may be necessary to configure a [knowledge base](/documentation/documentation-en/automations/knowledge-bases.md) and link it to your AI agent.
{% endhint %}

{% hint style="info" icon="shield-check" %}
**ACCESS RIGHTS**

To modify the AI Agents in your Fullwhere space, you must be a supervisor member with Administrator rights.
{% endhint %}

{% hint style="warning" %}
You will not be able to delete an AI agent as long as it is used in at least one of your workflows.
{% endhint %}

## Access your agents <a href="#h_d7b3dc58a2" id="h_d7b3dc58a2"></a>

Go to the Automation menu → [Agents](https://app.fullwhere.com/automation/agents).\
There you will find the list of all your existing agents, with several key pieces of information:

* Agent name
* Description (optional)
* Created by: user who originally created it
* Creation date and last modified date
* Workflows: number of workflows in which the agent is used

To create a new agent, click + Create an agent.

***

## Create an agent <a href="#h_cdb8854904" id="h_cdb8854904"></a>

To create a new agent, click + Create an agent from the main agents page.\
Enter your agent’s name in the window provided.

## Agent configuration <a href="#h_05580acb61" id="h_05580acb61"></a>

Your AI agent is configured through 2 tabs:

* Writing and Knowledge
* Custom responses

### 1. Tab *Writing & Knowledge* <a href="#h_d4bb965222" id="h_d4bb965222"></a>

This tab defines your AI agent’s writing behavior.

* Agent objective: this field is intended to specify the role your AI agent should fulfill (*e.g.: You must generate a response to answer my customers who contact me on ...*).
* Writing instructions: these let you indicate your brand’s tone of voice and how it should address your customers.\
  ​*Examples:*
  * The way to say "hello"
  * Phrasings to use or not use
  * The level of language to use (informal, polite, fun)
  * The way to address customers (using tu, using vous)\
    define the tone, the phrasing to use or avoid.
  * The signatures or polite closings to use
  * The use of emojis
  * etc.
* Customer context: allows you to provide your AI agents with information about the current context when it must generate a response for a customer interaction, such as the customer’s first name, the relevant location, the communication channel, the customer status, etc.
* Additional instructions: allow you to specify any other relevant information for you.

In these different configuration fields, it is possible to use dynamic variables. These variables will be replaced by the data from each customer interaction when generating a response.\
​\
​[See variables](https://help.fullwhere.com/fr/articles/12788791-les-agents-ia#h_3198d4840a).

Beyond the tone of voice, it is also possible to link a [knowledge base](/documentation/documentation-en/automations/knowledge-bases.md) to your AI agent.\
This will allow your AI agent to use information from a knowledge base when relevant.

***

### 2. Tab *Custom responses* <a href="#h_d0f171a565" id="h_d0f171a565"></a>

The Custom responses tab allows you to create response templates that the AI agent can rely on to generate messages that are more precise and consistent with your brand tone.

These templates serve two main purposes:

1. Provide a smart generation base:\
   when the AI detects a customer interaction (review, message, complaint…) matching one of your templates, it draws inspiration from it to formulate a response with the same meaning, while being able to adapt the wording or sentence structure.
2. Train the brand tone:\
   custom responses also serve as a style guide. They help the agent better understand how your brand expresses itself, the wording used, the level of formality, and even the use of emojis.

Custom responses are organized into Groups, each corresponding to a theme (for example: “Positive reviews”, “Complaint”, “Cleanliness issue”, etc.).

Each group contains several response examples with:

* a label (detection criterion, e.g.: “5-star rating — no text”)
* a sample response text, which you can freely structure with [dynamic variables](/documentation/documentation-en/automations/ai-agents.md#h_3198d4840a).

### Create a custom response group <a href="#h_c3b4f2dad0" id="h_c3b4f2dad0"></a>

From the Custom responses tab, click + Create a group to open the configuration panel and enter:

* Application criteria: the context in which the AI should use these responses (e.g. positive reviews, delivery complaints).
* Examples of custom responses: add one or more sample responses depending on the situation, indicating for each response its Label and its Text.

The text of custom responses can be built with dynamic variables. These variables will be replaced by the data from each customer interaction when generating a response.\
​\
​[See variables](https://help.fullwhere.com/fr/articles/12788791-les-agents-ia#h_3198d4840a).

Click Create group to confirm.

### Manage your custom responses <a href="#h_65b32cb7a6" id="h_65b32cb7a6"></a>

Once your custom response groups and responses are created, you can manage them from the custom responses table in the Custom responses tab.

From this table, several actions are possible:

* Edit a custom response directly:\
  The label and text of each response can be modified directly on the table rows.
* Open the full edit page:\
  By clicking the Open button on a custom response row, you access the detailed edit page for that response.
* Rename a response group:\
  The names of groups can also be modified directly from the table.

***

## Use dynamic variables <a href="#h_3198d4840a" id="h_3198d4840a"></a>

Writing instructions and custom responses can be built using dynamic variables.\
These variables are replaced with the data from the customer interaction concerned by response generation.

Some variables will not have a replacement value depending on the type of customer interaction handled: for example, an email will not have a replacement value for the variable `{{rating}}`. In this case, the variable will be replaced by an empty text.

### General variables <a href="#h_a055fec090" id="h_a055fec090"></a>

| Variable                        | Description                                                                                                                                                                                               |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{{tags}}`                      | List of feedback tags, displayed in brackets and separated by commas.                                                                                                                                     |
| `{{content}}`                   | Text content of the customer feedback.                                                                                                                                                                    |
| `{{rating}}`                    | Rating given by the customer in the feedback.                                                                                                                                                             |
| `{{language}}`                  | Target language of the feedback.                                                                                                                                                                          |
| `{{source}}`                    | Feedback source (e.g.: Google, Email, Instagram, etc.).                                                                                                                                                   |
| `{{class}}`                     | Class or category of the feedback (Review, Contact, Survey, Message)                                                                                                                                      |
| `{{store}}`                     | Name of the relevant location (e.g.: store, restaurant, branch…).                                                                                                                                         |
| `{{store_signature}}`           | Signature associated with the location.                                                                                                                                                                   |
| `{{store_contact}}`             | Location contact email address.                                                                                                                                                                           |
| `{{brand}}`                     | Name of the brand associated with the response.                                                                                                                                                           |
| `{{brand_signature}}`           | Brand signature.                                                                                                                                                                                          |
| `{{brand_contact}}`             | Brand contact email address.                                                                                                                                                                              |
| `{{contact}}`                   | Contact email used for the response: that of the location if available, otherwise that of the brand.                                                                                                      |
| `{{signature}}`                 | Signature used for the response: that of the location if it exists, otherwise that of the brand.                                                                                                          |
| `{{customer_first_name}}`       | Customer’s first name (if available).                                                                                                                                                                     |
| `{{customer_last_name}}`        | Customer’s last name.                                                                                                                                                                                     |
| `{{customer_full_name}}`        | Customer’s full name (first name + last name).                                                                                                                                                            |
| `{{customer_civility}}`         | Customer’s title (e.g.: Mr., Ms., Dr., etc.).                                                                                                                                                             |
| `{{customer_feedback_count}}`   | Total number of feedback items left by the customer.                                                                                                                                                      |
| `{{customer_purchase_count}}`   | Total number of orders placed by the customer.                                                                                                                                                            |
| `{{customer_purchase_count_1}}` | Number of customer orders + 1 (useful for anticipatory wording).                                                                                                                                          |
| `{{customer_purchase_amount}}`  | Total cumulative amount of the customer’s orders.                                                                                                                                                         |
| `{{customer_average_rating}}`   | Average of the ratings given by the customer.                                                                                                                                                             |
| `{{purchase_amount}}`           | Amount of the relevant order.                                                                                                                                                                             |
| `{{purchase_external_id}}`      | External order identifier.                                                                                                                                                                                |
| `{{now}}`                       | Allows you to indicate to your AI agent the current date and time when generating a response. This can be useful if your AI agent needs to respond in certain logical ways depending on the current date. |

### Specific variables for satisfaction surveys <a href="#h_25b8fbde08" id="h_25b8fbde08"></a>

Use these variables to provide context to your agent responsible for generating responses for your satisfaction surveys.

| Variable                  | Description                                       |
| ------------------------- | ------------------------------------------------- |
| `{{survey_fields}}`       | List of all survey fields.                        |
| `{{survey_csat_smileys}}` | Results of question types *CSAT Smileys*.         |
| `{{survey_nps}}`          | Results of question types *NPS*.                  |
| `{{survey_csat_stars}}`   | Results of question types *CSAT Stars*.           |
| `{{survey_notations}}`    | Set of rating-type fields (CSATs & NPS).          |
| `{{survey_choices}}`      | Set of choice fields (dropdown, checkbox, radio). |

### Specific variables for contact forms <a href="#h_d4588e34f9" id="h_d4588e34f9"></a>

Use these variables to provide context to your agent responsible for generating responses for your contact forms.

| Variable           | Description                                     |
| ------------------ | ----------------------------------------------- |
| `{{site_choices}}` | Set of choice-type fields (dropdown).           |
| `{{site_texts}}`   | Set of text-type fields (text & purchase).      |
| `{{site_fields}}`  | Full set of fields (dropdown, text & purchase). |

### Custom variables <a href="#h_d4588e34f9" id="h_d4588e34f9"></a>

To customize your AI agents even further, you can define [custom variables](/documentation/documentation-en/automations/variables.md) whose value will be replaced depending on the relevant brand or location.


---

# 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.fullwhere.com/documentation/documentation-en/automations/ai-agents.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.
