Custom API Calls in Super Agents
This article explains how to configure Custom API Calls as tools within Super Agents, enabling your AI assistants to interact with external systems and retrieve dynamic information during conversations.
You'll learn how to set up authentication, configure request parameters, and handle responses to create powerful integrations that extend your Super Agent's capabilities beyond standard features.
What are Custom API Calls in Super Agents?
Custom API Calls enable your Super Agents to interact with external services and data sources during conversations. When configured as a tool, your AI assistant can dynamically invoke third-party APIs to retrieve information, validate data, or trigger actions in external systems based on conversation context.
This feature extends Super Agent functionality beyond LeadConnector's native capabilities, allowing you to integrate with weather services, inventory systems, payment processors, or any REST API that your business requires. The AI determines when to use the API call based on your configuration and the conversation flow.
Custom API Calls support multiple authentication methods, dynamic parameter injection from conversation variables, and flexible response handling to ensure seamless integration with your existing technology stack.
Key Benefits
Custom API Calls transform your Super Agents into intelligent integrators that connect your AI workflows with external systems and data sources.
Configuration Components
Each Custom API Call tool consists of several components that work together to define how your Super Agent communicates with external services.
A descriptive identifier for the API call that helps you organize multiple tools. This name appears in your tool list and should clearly indicate the API's purpose.
An explanation that informs the AI when and how to use this tool. Write clear, specific descriptions that define the API's capabilities and when the Super Agent should invoke it during conversations.
The complete URL of the external API that your Super Agent will call. Include the protocol (https://) and the full path to the specific endpoint you want to access.
Select the request type (GET, POST, PUT, DELETE) based on your API's requirements. GET retrieves data, POST creates resources, PUT updates existing data, and DELETE removes resources.
Configure how your Super Agent authenticates with the external API. Options include API Key (added to headers), Bearer Token (for OAuth-style authentication), or Custom Headers (for unique authentication schemes). Enter your credentials securely in the provided fields.
Define the data your API call sends or receives. Add parameters by specifying their name, type (string, number, boolean), and source (conversation variable or custom value). Parameters can be required or optional based on your API's specifications.
Specify how the Super Agent should process the API response. Map response fields to conversation variables or configure how the AI should interpret and use the returned data in subsequent conversation turns.
How to Set Up a Custom API Call Tool
Follow these steps to add a Custom API Call to your Super Agent and configure it for use in conversations.
Navigate to AI > Conversational AI > Super Agents in your LeadConnector account. Select the Super Agent you want to enhance with an API call tool, or create a new agent if needed.
In the Super Agent configuration, locate the Tools section and click "Add Tool". Select "Custom API Call" from the available tool types.
Enter a Tool Name that identifies the API's purpose. In the Tool Description field, write a clear explanation of when the Super Agent should use this tool, what information it requires, and what data it returns. Be specific about trigger conditions and expected behavior.
Enter the complete API endpoint URL in the API Endpoint field. Select the appropriate HTTP method from the dropdown menu based on whether you need to retrieve data (GET), send data (POST), update data (PUT), or delete data (DELETE).
Choose your authentication method from the Authentication dropdown. For API Key authentication, enter your key and header name. For Bearer Token authentication, paste your token. For Custom Headers, add the required header name-value pairs as specified by your API documentation.
Click "Add Parameter" to define each piece of data your API needs. For each parameter, enter the parameter name, select its data type (string, number, or boolean), and choose whether to use a conversation variable or a custom value. Mark parameters as required if the API mandates them.
Use conversation variables to pass dynamic data from the ongoing conversation (like a user's name or appointment time) into your API calls. This creates personalized integrations that respond to user input.
In the Response Handling section, specify how the Super Agent should process the API response. Map response fields to conversation variables if you need to use the returned data in subsequent conversation turns or actions.
Click "Save" to add the Custom API Call tool to your Super Agent. Ensure the tool is enabled in your agent's tool list so it becomes available during conversations.
Testing and Validation
After configuring your Custom API Call tool, test it to ensure proper functionality before deploying your Super Agent in production conversations.
Use the Super Agent testing interface to initiate a conversation that should trigger your API call. Monitor the conversation flow to verify that the AI invokes the tool at the appropriate moment and processes the response correctly. Check your API logs to confirm that the request was received with the correct parameters and authentication.
API call failures can interrupt conversation flow. Ensure your external API has proper error handling and that your Super Agent's tool description accounts for potential failure scenarios. Test with both successful and failed API responses to validate behavior.
Review the API response data in the conversation logs to confirm that the Super Agent receives and interprets the information correctly. Adjust your response handling configuration if the AI misinterprets or misuses the returned data.
If you encounter issues configuring Custom API Calls or need guidance on integrating specific services:
- Navigate to AI > Conversational AI > Super Agents and review your tool configuration for accuracy
- Check your external API documentation to verify endpoint URLs, authentication requirements, and parameter formats
- Use the Super Agent testing interface to debug API call behavior in real-time
- Review conversation logs to identify where API calls fail or produce unexpected results
- Contact LeadConnector Support through the Help menu for assistance with complex integrations