> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Agent Actions

> Explore the various actions you can perform with your AI agent in CometChat.

## Overview

Actions allow your AI agent to perform specific, predefined tasks during a conversation.\
Each action includes a **name**, **display name**, **execution text**, and optional **parameters** to make the execution dynamic.

You can create actions to:

* Trigger workflows or automations.
* Call external APIs.
* Send structured responses to users.
* Execute commands with dynamic inputs.

***

## Creating an Action

1. **Navigate to AI Agent → Actions** in the CometChat dashboard.
2. Click **Create Action**.

You will see the following fields:

### **Display Name**

A human-friendly name shown in the UI.\
*Example*: `Create Support Ticket`

### **Execution Text**

The text prompt shown to the AI when this action is triggered.\
*Example*: `Create a Zendesk ticket with the following details.`

### **Name**

A unique identifier for the action. This is used programmatically and should not contain spaces.\
*Example*: `create_support_ticket`

### **Description**

A short explanation of what the action does.\
*Example*: `Creates a support ticket in Zendesk based on user query details.`

### **Parameters**

A JSON schema that defines what input values the action requires.

**Important:** The `"<parameterName>"` must exactly match the **Tool Name** you created in **AI Agent → Tools**.\
This ensures that the Action can send correctly formatted data to the intended Tool.

Example:

```json theme={null}
{
  "type": "object",
  "properties": {
    "<toolName>": {
      "type": "string",
      "description": "Description of the parameter, defining the input the tool expects."
    }
  }
}
```

**Parameter Types:** Use standard JSON Schema types like `string`, `number`, `boolean`, `object`, or `array`.

**Parameter Descriptions:** Clearly explain the purpose and expected format of each parameter.

***

## Example Action: Create Zendesk Ticket

| Field          | Value                                                |
| -------------- | ---------------------------------------------------- |
| Display Name   | Create Support Ticket                                |
| Execution Text | Create a Zendesk ticket with the provided details.   |
| Name           | create\_support\_ticket                              |
| Description    | Creates a support ticket in Zendesk for user issues. |
| Parameters     | See JSON example above                               |

***

## Best Practices

* **Keep display names short and clear** – instantly understandable to end users.
* **Use consistent naming** – for the `Name` field, use lowercase with underscores.
* **Match parameter names to tool names** – ensures correct tool invocation.
* **Validate parameters** – always define parameter types and descriptions to prevent AI misinterpretation.
* **Document purpose** – add clear descriptions for developers integrating the action.
