# Using AI Agents in Trackers

### Overview

To get started using **AI Agents**, set up a workflow in a tracker.

{% hint style="warning" %}
To enable users to use Agents, AI Studio administrators **must** activate this feature through the Admin Portal by navigating to **Admin Portal > Modules > AI Studio>** [**Settings**](https://guides.mangoapps.com/ai-guide/admin-portal/ai-studio-module/ai-settings)**.**
{% endhint %}

For this guide, we will create a chained-agent workflow designed to evaluate candidate resumes for initial approval. This example will demonstrate the **Data Analysis** and **Content Evaluation Agents**.

<figure><img src="/files/FL2nXrKz6iOZZOCGf3xQ" alt="" width="375"><figcaption></figcaption></figure>

***

### **Create a Workflow**

As with standard tracker workflows, click the **Workflows** button in the top right corner of the tracker and click the **+ Create Workflow** button within the pop-up menu. Choose your preferred workflow type; for this example, we will be starting with the Blank Workflow.

Fill in the workflow information by first assigning a [Title, Trigger, and, if desired, an optional Condition](https://guides.mangoapps.com/user-guide/trackers/tracker-workflows/creating-a-tracker-workflow).

In the Action section, select **Send to an AI Agent**. In the additional field **Send To**, select the [Agent](https://guides.mangoapps.com/ai-guide/user-portal/ai-agents/out-of-the-box-ai-agents) you would like to utilize. For our example, we will select the Data Analysis Agent since we are looking to identify trends and analyze submissions.

<figure><img src="/files/F1ugH8J1ePDVKkr7Wi2X" alt="" width="563"><figcaption></figcaption></figure>

Next, click the **Select & Customize** button. This step is **mandatory** as we will need to assign a temporary variable to hold the information pulled by the Agent.

***

#### Agent Prompts

From the **Select & Customize Prompt** pop-up menu, select the **Agent Prompt** for the agent to follow.

<figure><img src="/files/Uv65i10GYy0vOckCyRSm" alt="" width="479"><figcaption></figcaption></figure>

**Agent Prompts** are predefined instruction templates or guidelines that tell the AI Agent what specific task to perform and how to handle the data provided to it. When a prompt is selected, the instructions template will automatically populate with pre-configured details in the **Prompt Instructions** text box. Customize the agent for your specific needs by editing the instructions.

If your workflow needs to evaluate on an entry by entry basis, make sure to include substitution tags in your instructions. These substitution tags represent tracker columns or other data inputs, allowing the AI Agent to dynamically process and act on the provided information.

For our example, we will use the **Substitution Tags** dropdown menu to create a tag for the "candidate resume" column within our instructions. Substitution tags can be created for any system or user created column within the tracker, even those hidden.

***

#### Assigning a Response to a Temporary Variable

Lastly, designate a **temporary variable** for the agent to assign the response. This temporary variable is a placeholder used in tracker workflows to store the output or results produced by an AI agent after executing a task. It acts as a bridge between different steps in a workflow, ensuring data flows seamlessly and can be reused for subsequent actions.

{% hint style="danger" %}
Response variables **must be unique** within the tracker.&#x20;
{% endhint %}

<figure><img src="/files/sXhCYlu4x0FnMJjIjsZd" alt="" width="477"><figcaption></figcaption></figure>

For our example, after extracting resume data, the temporary variable stores the details (e.g., job titles, skills) for use in the next step of our workflow.

{% hint style="info" %}
This value can be accessed using substitution tags and will be available as an option in the Substitution Tags menu within the tracker.
{% endhint %}

***

### **Action Chaining with AI Agents**

Tracker workflows often involve multiple chained actions, and the response variable ensures that each action has access to the necessary data. AI agents can chain up to **10** actions.

<figure><img src="/files/L34ukwwGsakzuGaRxnkG" alt="" width="563"><figcaption></figcaption></figure>

Following along with our example, once our **Data Analysis Agent** has extracted the resume information, we will send it to the **Content Evaluation Agent** within the same workflow.

{% hint style="info" %}
Agents can be chained directly to one another without the need for additional actions in between.
{% endhint %}

Similar to the previous Agent, we select the **Send to an AI Agent** action, but this time select the **Content Evaluation Agent**.

<figure><img src="/files/MyBKGgJ88yCFR9KRhevS" alt="" width="478"><figcaption></figcaption></figure>

Clicking the **Select & Customize** button, we choose the **Auto-Approve Prompt** and edit the **Prompt Instructions** to better tailor to our use case.

For the **Content to be Reviewed** section within our Instructions, we select our response variable created by the first agent from the **Substitution Tags** dropdown menu for easy insert. Since it is a variable and not a column, the substitution tag will include "var:".

Also as before, we will then assign a unique response variable.&#x20;

***

### Chaining AI Agents to Other Actions&#x20;

To complete our example, we will chain the **Content Evaluation Agent** to an **Update Column** action. This action will populate another column in the row with the results of the evaluation.

<figure><img src="/files/8lhG6M78NHpNnEuOLvqw" alt="" width="563"><figcaption></figcaption></figure>

We configure this action to add the value saved within the response variable "candidateApproval" to the corresponding entries within our user created "Approved for review?" column.

<figure><img src="/files/i4fypQ0qTIdDTYKG0BoV" alt="" width="563"><figcaption></figcaption></figure>

After saving, our workflow is complete. The agents will automatically execute upon the trigger, evaluating the submitted resumes and outputting the requested results in the designated column.

<br>


---

# 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://guides.mangoapps.com/ai-guide/user-portal/ai-agents/using-ai-agents-in-trackers.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.
