Instagram Agent — Functions & Tool Calling
Configure function calling tools for your Instagram Agent, including REST API integrations, CSV lookups, Shopify queries, human agent handover, and Google Calendar scheduling.
The Functions tab (located at /instagram/functions, powered by InstagramFunctions) enables tool calling capabilities for your Instagram Agent. By connecting external APIs and data sources, the agent can perform live actions during direct message conversations rather than just answering static questions.
Note: The Functions link is currently marked as Coming Soon in the left sidebar menu of the Instagram workspace as final UI testing completes, but the underlying function-calling engine is fully architected into the agent's inference pipeline.
1. How Function Calling Works
When a customer's inquiry requires external computation or dynamic data:
- Intent Detection: The customer asks a dynamic question over Instagram DM (e.g., "Do you have any availability for a demo tomorrow afternoon?").
- Tool Invocation: Rather than guessing or hallucinating, the agent detects the need for live information and triggers a structured function call:
check_google_available_slots(date="tomorrow"). - Execution & Return: Kipps.AI queries the external integration (Google Calendar, Shopify, or REST API) and returns the real-time payload.
- Conversational Synthesis: The agent synthesizes the live data into an on-brand response: "We have open slots tomorrow at 2:00 PM, 3:30 PM, and 5:00 PM. Would any of those work for you?"
2. Supported Function Types
Kipps.AI supports the following channel-agnostic function types for the Instagram Agent:
1. API Function (api-function)
Connect any external REST API to empower your agent with live business data:
- HTTP Methods:
GET,POST,PUT,DELETE. - Custom Payloads: Define request bodies with dynamic parameters extracted from customer DMs.
- Headers & Authentication: Secure API calls with bearer tokens or custom API headers.
- Common Use Cases: Order status tracking, membership lookups, CRM contact creation, and custom quote calculation.
2. CSV Function (csv-function)
Query tabular data without needing a dedicated database server:
- Upload a
.csvspreadsheet containing structured data (e.g., zip codes served, branch locations, or static price sheets). - Map Input Columns (e.g.,
ZipCode) and Output Columns (e.g.,DeliveryFee,EstimatedDays). - When a user asks about their area, the agent retrieves the exact row and answers accordingly.
3. Shopify Function (shopify-function)
Direct integration with your connected Shopify store:
- Search product availability and inventory levels in real time.
- Retrieve product variants, pricing, and direct checkout links.
4. Assign to Human Agent (assign-to-human)
Automates conversation triage and escalation:
- When a customer expresses frustration or asks to speak with a human representative, the agent triggers an internal handover.
- Pauses automated AI responses on the conversation thread and alerts human support staff in the unified inbox.
5. Google Calendar Integrations
Comprehensive meeting scheduling directly over Instagram DMs:
- Check Calendar Availability (
check_google_available_slots): Evaluates real-time free/busy blocks on your synced Google Calendar. - Schedule Calendar Meeting (
schedule_google_meeting): Automatically books an appointment, creates a Google Meet link, and logs customer details. - Reschedule Calendar Booking (
reschedule_google_booking): Allows customers to modify an existing booking without leaving Instagram.
3. Configuring Functions
- From the Functions management screen, click Add Function.
- Select the desired function category from the dropdown menu.
- Configure the required parameters (API endpoint, payload schema, or calendar credentials).
- Save the function. The Instagram Agent automatically incorporates the function definitions into its LLM context.
Frequently Asked Questions
Why is Functions marked "Coming Soon" in the sidebar? The underlying function-calling engine is fully functional and architected into the agent's inference pipeline, but the dedicated UI configuration screen is undergoing final integration tests before being enabled by default in the sidebar.
How does the Instagram Agent know when to execute a function? The LLM automatically detects user intent from the conversation context. When a customer asks a question requiring external data (such as "Do you have appointments on Friday?" or "Where is order #12345?"), the model produces a tool call matching the schema of your configured function rather than guessing.
Can I connect custom internal APIs to the Instagram Agent? Yes. Using the API Function, you can configure any REST API endpoint with custom headers, query parameters, and JSON payloads to fetch or submit data to your internal systems or CRM.
How does the "Assign to Human Agent" function work? When triggered (either by customer request or sentiment detection), the agent initiates a handover, tagging the conversation in the Kipps.AI unified inbox and pausing automated AI responses so human support agents can take over smoothly.
Related Articles