# Function Calling

The Function Calling AI Agent is a tool designed to interact with external APIs based on defined criteria. It offers flexibility in configuring API requests, including HTTP methods, request bodies, and headers.

### **How To Use It**

1. **Access AI Agents:** Navigate to the AI Agents section within the platform.

   <figure><img src="/files/Lso324ofrNkKuuW52i9l" alt=""><figcaption></figcaption></figure>
2. **Select Agent:** Choose the "Function Calling" agent from the available options.

   <figure><img src="/files/cAoNHjkUpwX1733w5gH7" alt=""><figcaption></figcaption></figure>
3. **Deploy Agent:** Click the "Deploy" button to initiate the agent creation process.
4. **Agent Configuration:**

   * **Agent Name:** Assign a unique identifier or descriptive name (e.g., "API Connector").
   * **Prompt Description:** Briefly outline the agent's purpose (e.g., "Connects to external APIs when user asks to book a meeting").
   * **AI Criteria:** Define conditions or events that trigger the agent's activation.

   <figure><img src="/files/wOESFDt6ePHLKqXsX15R" alt=""><figcaption></figcaption></figure>
5. **API Configuration**
   1. **API Endpoint:** Specify the target API's URL.
   2. **HTTP Method:** Select the appropriate HTTP method (GET, POST, PUT, PATCH, DELETE).
   3. **Request Body:** Construct the request body using the provided format options (JSON, XML, etc.).
   4. **Headers:** Define custom headers for the request.
   5. **Query Parameters:** Add query parameters to the URL.
   6. **Test Request:** Validate the API configuration by sending a test request.

      <figure><img src="/files/vlPsvo7vVr3tLe2b4BGg" alt=""><figcaption></figcaption></figure>
6. **Execution**
   1. **Trigger Activation:** When the defined AI criteria are met, the agent is activated.
   2. **API Call:** The agent sends the configured API request to the specified endpoint.
   3. **Response Handling:** The agent processes the API response based on predefined rules or user-defined actions.


---

# 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://docs.makerobos.com/frontman-enterprise-chatbot-platform/instinct-ai/ai-agents/function-calling.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.
