> For the complete documentation index, see [llms.txt](https://cleyrop.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cleyrop.gitbook.io/docs/v4.7-en/data-and-ai-project/studio-ai/agents.md).

# Agents

Agents make it possible to create reusable and shareable artificial intelligence capabilities, made up of instructions, tools, and specific knowledge.

Agents are ready-to-use configurations that define the behavior of an artificial intelligence for a specific use case. Each Agent brings together a structured prompt and a selection of Apps from The Factory. This approach makes it possible to create specialized AI capabilities while facilitating their reuse and sharing within your organization.

Agents are used directly in Le Druide and can be shared with other users.

## Create an Agent

**Objective** : Define a reusable AI capability adapted to a specific business need.

**Creation steps**

1. Access your project's AI Studio
2. Click the tab **Agent**
3. Click on **Create an Agent**
4. Fill in the metadata:
   * **Name** : choose a clear name (required)
   * **Description** : describe the Agent's purpose (optional)
   * **Icon** : select an icon to make identification easier
5. Configure the **Instructions** :
   * Write the prompt that will define the AI's behavior
   * Use the pre-filled example as a starting point
6. Select the **Apps** :
   * Choose one or more tools from The Factory
   * Only deployed tools are available
   * Select the Tool **Cleyrop Dataset** to add one or more datasets to your knowledge scope
   * Select the Tool **Cleyrop Corpus** to add one or more document corpora to your knowledge scope
7. Add a knowledge scope:
   * If the Tool **Cleyrop Dataset** was selected in the previous step, choose one or more **datasets** from those available in the project.
   * If the Tool **Cleyrop Corpus** was selected, a step **Corpora** allows you to choose one or more **corpus** from the project. Without a selection, the Agent can query all project corpora.
   * Upload one or more files as knowledge sources
   * These files are stored in the Agent and accessible to all project members who have access to the Agent
   * Supported formats: `.txt`, `.pdf`, `.docx`, `.pptx`, `.csv`
8. Click on **Save** or **Publish** according to your needs

<figure><img src="https://4159280578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMHNFH6aA4j5ucH4XFBXy%2Fuploads%2Fgit-blob-22b147eb1609b95d6b371cf47a6daaecffe5c90e%2F4.7-agent-corpus-step.png?alt=media" alt="Étape Corpus du formulaire de création d&#x27;un Agent"><figcaption></figcaption></figure>

{% hint style="warning" %}
If an associated dataset becomes unavailable (deletion, loss of access), an explicit status is displayed and it is immediately removed from the active knowledge scope.
{% endhint %}

<figure><img src="https://4159280578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMHNFH6aA4j5ucH4XFBXy%2Fuploads%2Fgit-blob-ea01408061f1020d6133dc35797c35f6f47cda5b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4159280578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMHNFH6aA4j5ucH4XFBXy%2Fuploads%2FuxQH9JxyiAMtQ6nCPWm7%2Fimage.png?alt=media&amp;token=4ee403da-63af-4b0b-8ad3-4a6823e011fd" alt=""><figcaption></figcaption></figure>

**Good to know**

* An Agent saved without publication is created with the status **Test** and remains usable by all project members
* The Agent is automatically attached to the current project
* No dedicated assistant is created when an Agent is created
* The instructions being drafted are saved automatically: you won't lose your prompt when switching tabs or windows

## Use an Agent

<figure><img src="https://4159280578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMHNFH6aA4j5ucH4XFBXy%2Fuploads%2Fgit-blob-337a407223b5471d11668999dd35f659d1f1a96b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### **From the project**

All project members can use the available Agents, whether they are in Test or Published status.

1. Access Le Druide
2. Select the desired Agent from the list of available agents
3. Start your conversation

{% hint style="info" %}
Only one Agent can be active at a time. Activating it disables Le Druide's generic context. The associated Apps are enabled by default. To return to Le Druide's generic behavior, leave the active Agent.
{% endhint %}

### **From My Apps**

If an Agent has been shared with you from another project:

1. Go to **My Apps**
2. Find the Agent in the listing
3. Click on **Use** to open Le Druide with the agent activated

### **Add attachments**

During a conversation with an active Agent, you can occasionally enrich your exchange by adding files via the button **Attachments**.

* The files are used by the AI for the current conversation only
* They do not modify the Agent's configuration and are not visible to other users
* Supported formats: `.pdf`, `.docx`, `.pptx`, `.txt`, `.xlsx`, `.csv`, `.tsv`, `.json`
* Data files (`.csv`, `.tsv`, `.xlsx`) are limited to 50 MB; other documents are limited by their text volume, and an explicit message is displayed if this is exceeded

{% hint style="info" %}
Attachments differ from the knowledge scope: they are temporary and limited to the current conversation. To permanently enrich an Agent, add files via the knowledge scope during creation.
{% endhint %}

### **Conversation history**

Each Agent has its own conversation history, isolated from Le Druide's generic context and from other Agents.

* Conversations started in an Agent are only visible from that agent
* Changing Agents automatically creates a new conversation; it is not possible to resume an existing conversation when changing agents
* Deleting an Agent makes its conversations inaccessible
* Revoking a share prevents access to the conversations associated with the Agent

{% hint style="info" %}
Moving an Agent from Test to Published does not change existing conversations.
{% endhint %}

### **View an Agent's details**

To better understand an Agent's capabilities:

1. From the AI Studio or My Apps, click the **Information** button on the Agent card. From a conversation with an active Agent, click **Open the information panel** next to the Agent's name.
2. Check the available tabs:
   * **Information** : name, description, owner, instructions
   * **Tools** : list of associated tools and their status
   * **Corpora** : corpora associated with the knowledge scope (if the Agent uses any)
   * **Sharing** : users who have access to the Agent

{% hint style="info" %}
If an Agent uses Tools that require environment variables (API keys, tokens), you must configure them in The Factory before you can use these tools. For users who only have access to Le Druide, environment variable configuration is available directly from the interface via the list of Tools.
{% endhint %}

## Manage Agents

### Edit an Agent

Only the Agent owner can edit it.

1. From the AI Studio, open the Agent details
2. Click on **Edit**
3. Edit the desired elements (name, description, instructions, Tools)
4. Click on **Save** to apply the changes

{% hint style="info" %}
The changes do not affect ongoing conversations but apply to the **new messages** in resumed conversations.
{% endhint %}

## Publish an Agent

Publishing indicates that the Agent has been tested and validated, and can be used with confidence.

1. From the AI Studio, open the details of the Agent in Test status
2. Click on **Publish**
3. Confirm publication

The status changes to **Published** but the Agent's access rules and behavior remain unchanged.

## Delete an Agent

Only the owner can delete an Agent. This action is irreversible.

1. From the AI Studio, open the Agent details
2. Click on **Delete**
3. Confirm deletion

{% hint style="warning" %}
Deletion makes the Agent immediately inaccessible to all users and removes access to the associated conversations
{% endhint %}

## Share an Agent

#### Share with members outside the project

Project members can share an Agent with other Cleyrop users who are not part of the project.

1. From the AI Studio, click the **Share** action on the Agent card
2. Select one or more Cleyrop members
3. Confirm sharing

The selected users will be able to:

* See the Agent in **My Apps**
* Use it in their Le Druide
* View its information in read-only mode

They will not be able to edit it, republish it, or share it in turn.

#### Remove a share

1. Open the Agent details
2. In the **Sharing**, identify the user concerned
3. Click on **Remove access**
4. Confirm revocation

The Agent immediately disappears from the user's space **My Apps** and can no longer be used.

## Rights and responsibilities

#### Agent owner

The creator of an Agent automatically becomes its owner. They can:

* Edit the Agent
* Publish or unpublish the Agent
* Share the Agent with other users
* Delete the Agent

#### Project members

Project members (PM, Data Worker) can:

* View all project Agents
* Use all Agents (Test or Published)
* Share Agents with members outside the project

#### Users outside the project

Users with whom an Agent has been shared can:

* View the Agent's information in read-only mode
* Use the Agent in their Le Druide

#### Transfer of responsibility

The owner of an Agent or the project owner can change the Agent's owner.

1. Open the Agent details
2. Click on **Change owner** (next to the name of the current owner)
3. Select a new owner from the project members
4. Confirm transfer

The new owner immediately has all management rights. The former owner retains the rights associated with their project role.

**Good to know** : when a user responsible for Agents is deleted or deactivated, those Agents are automatically transferred to the project owner.

***

### Best practices

* **Name your Agents explicitly** : use names that clearly reflect the business use (e.g., "Support ticket analysis", "Financial report generation")
* **Document your instructions** : write precise, structured prompts to ensure consistent behavior
* **Test before publishing** : use Test status to validate the Agent's behavior before marking it as Published
* **Limit the number of Tools** : select only the necessary tools to avoid unnecessary complexity
* **Share selectively** : share agents only with users who genuinely need them
* **Check environment variables** : make sure users have the required API keys before sharing an Agent that uses external tools
