> ## Documentation Index
> Fetch the complete documentation index at: https://support.getskara.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Functions

**Functions** in AI Pilots allow developers to build reusable, custom logic that extends an agent’s capabilities. From simple data transformations to complex third-party API integrations, functions enable smarter, more dynamic agent behavior.

* [How to manage your Functions](https://support.salesmate.io/hc/en-us/articles/46626581723545-Functions#h_01JW8WD30Y2EA71CM853Y74WST)
* [To configure a new Function](https://support.salesmate.io/hc/en-us/articles/46626581723545-Functions#h_01JW8YF5MYF74Z436VXMH3CHRR)
* [To edit an existing Function](https://support.salesmate.io/hc/en-us/articles/46626581723545-Functions#h_01JW90002QYBYNJ0C0CTZYYX71)
* [Steps to Delete a Function](https://support.salesmate.io/hc/en-us/articles/46626581723545-Functions#h_01JW9023WV07P2EAFET82FZB1F)

**How to manage your Functions:**

* Navigate to the AI Pilots from the left menu bar
* Click on the **AI Pilots**

<img src="https://mintcdn.com/salesmate/NRWbw1GmcWeDRDJi/FUNC11.png?fit=max&auto=format&n=NRWbw1GmcWeDRDJi&q=85&s=b25751b989fa78c2692ffdffabe8793c" alt="Screen Shot 2025-06-09 at 4.45.08 PM.png" width="3360" height="2100" data-path="FUNC11.png" />

* Select the **AI Pilot** from the drop-down.
* Move to the **Functions.**

<img src="https://mintcdn.com/salesmate/sSrpeCJ99yMC8oOE/FUNC2.png?fit=max&auto=format&n=sSrpeCJ99yMC8oOE&q=85&s=e18aa6bc58ef96b16506e9d26d496522" alt="mceclip1.png" width="3360" height="2100" data-path="FUNC2.png" />

You’ll see a list of functions (if any exist) with the following columns:

* **Function Name :** Name of the function for the identification
* **Deployment Status** : Indicates if the function is **Ready to Use , Failed, or In Progress.**
  * Hover over the error icon to view error details if the status is Failed.
* **Description** : A summary of the function’s purpose.
* **Last Modified By** : The user who last updated the function.
* **Last Modified Date :** When the function was last modified.

**How to configure a new Function**

* Click the **New** button.

<img src="https://mintcdn.com/salesmate/sSrpeCJ99yMC8oOE/FUNC3.png?fit=max&auto=format&n=sSrpeCJ99yMC8oOE&q=85&s=441e590b100a73871853bb5827ce5958" alt="Screen Shot 2025-06-10 at 5.42.46 PM.png" width="3360" height="2100" data-path="FUNC3.png" />

* The **Function Editor** opens, divided into:
  * **Left Panel**: Code editor
  * **Right Panel**: Configuration panel.

**Configuration Panel Details**

**Function Details:**

* Function Name : Name of the function for identification.
* Description : A summary of what the function does.
* Thumbnail Image :
  * Supports .png, .jpeg, .jpg under 1 MB.
  * Appears in selection lists where this function is referenced.

**Input Variables:**

* Variable Name : Used within the function code.
* Description : Details about the expected input.
* Click + Add to add multiple inputs.

**Output Variables:**

* **Variable Name:** Identifier variable for the output.
* **Description**: Details about the expected output.
* Click **+ Add** to define more outputs.

<Note>
  **Note:** These variables are limited to that function only. The data type for these variables will be defined in the code snippet on the left side.
</Note>

**Paths:**

* **Path Name**: Logical route (e.g., *Success*, *Failure*).
* **Canvas Label**: Label displayed in the flow builder.
* Click +**Add**  to define additional paths.

**Writing Function Logic:**

* Use the **left-side code editor** to write your function using the supported language
* Choose from:
  * Primary runtime (first launch): **Node.js 22**
  * Supported by Monaco Editor (for syntax): JavaScript, Python, Go, PHP, HTML, CSS, Java, C++, etc.

<img src="https://mintcdn.com/salesmate/Oj9FWIuwnw0YQTAr/FUNC6.png?fit=max&auto=format&n=Oj9FWIuwnw0YQTAr&q=85&s=603f4ecfd668d0c844c670dbf0cba4e6" alt="mceclip4.png" width="3360" height="2100" data-path="FUNC6.png" />

**To edit an existing Function**

* Go to **AI Pilots**> Choose your Pilot >**Functions**.
* Click the function name or hover and select **Hit Action**.

<img src="https://mintcdn.com/salesmate/HNLBQgm0-8QHdmMv/FUNC7.png?fit=max&auto=format&n=HNLBQgm0-8QHdmMv&q=85&s=405e91357cf453714327ddd73f43e7df" alt="mceclip6.png" width="2640" height="1582" data-path="FUNC7.png" />

* Click on **Edit,** make your changes, then click **Update**.

**Steps to Delete a Function**

* Go to **AI Pilots**> Choose your Pilot >**Functions**.
* Find the function you wish to delete.

<img src="https://mintcdn.com/salesmate/HNLBQgm0-8QHdmMv/FUNC8.png?fit=max&auto=format&n=HNLBQgm0-8QHdmMv&q=85&s=4f3a3347cddf6ae36b6261f3daea4531" alt="mceclip7.png" width="2640" height="1592" data-path="FUNC8.png" />

* Hover and select **Delete** from the action menu.
