Agent Actions
Actions are custom tools that your AI can use to perform an action from a custom API endpoint. For example, you can use a tool to fetch the weather, request data from your servers, or query an external API.
Configuring an Action
Section titled “Configuring an Action”Each tool is configured with the following:
- Name: The identifier for your action
- Description: AI will use this to know when to call the tool
- Input Schema: Define the inputs your action requires
Executing the Action
Section titled “Executing the Action”To execute the action, configure the HTTP request:
- HTTP Method: GET, PUT, POST, PATCH, or DELETE
- URL: The endpoint to call
- Headers: Any required headers
- Body/Payload: The request body (for POST, PUT, PATCH requests)
Using Template Literals
Section titled “Using Template Literals”The URL, headers, and body can use template literals with {{ and }} syntax to insert variables from the inputs.
Example: Get Weather API
Section titled “Example: Get Weather API”To build a weather API action:
- URL:
https://api.open-meteo.com/v1/forecast?latitude={{lat}}&longitude={{long}}¤t=temperature - Method: GET
- Inputs:
latandlong
Extending Your AI Agent
Section titled “Extending Your AI Agent”Using custom tools allows you to extend the capabilities of your AI agent, enabling it to interact with external services and perform complex operations beyond simple conversation.