# AGI Script

The **AGI Script** type runs an AGI script and compares the AGIRESULT variable with TRUE.

Open **Configuration &gt; Conditions**, select **New Condition**, enter a name, choose **AGI Script** in the Type field, complete the type-specific fields, and select **Save**.

<figure id="bkmrk-agi-script-condition">![AGI Script condition edit form in the Canistracci OIL tenant.](https://manual.mirtapbx.com/uploads/images/gallery/2026-06/wv6agi-script.png)<figcaption>AGI Script condition edit form in the Canistracci OIL tenant.</figcaption></figure>## Fields

<table id="bkmrk-field-or-optiondescr"><thead><tr><th>Field or option</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Display name used in condition lists and selectors.</td></tr><tr><td>Type</td><td>Select AGI Script.</td></tr><tr><td>AGI Script</td><td>Script to execute.</td></tr><tr><td>Parameter 1-5</td><td>Optional script parameters, depending on the selected script definition.</td></tr><tr><td>AGIRESULT</td><td>The script result variable must evaluate to TRUE for the condition to match.</td></tr></tbody></table>

## Example

<table id="bkmrk-fieldexample-value-n"><thead><tr><th>Field</th><th>Example value</th></tr></thead><tbody><tr><td>Name</td><td>Docs Condition - AGI Script</td></tr><tr><td>AGI Script</td><td>Docs Demo AGI 1</td></tr></tbody></table>

## Destinations

For tenant conditions, select the destinations that should run when the condition matches and when it does not match. Global conditions are referenced by tenant-level Use a Global Condition records.

## Editing and deleting

To edit this condition, open **Docs Condition - AGI Script** from the Conditions list, adjust the fields, and select **Save**. Before deleting it, check IVRs, schedules, routes, feature codes, and other call-flow objects that may reference it.