Skip to main content
Tools extend your agent’s capabilities by letting it call external services and APIs. Within Agent Builder you can create reusable tools, connect them to multiple agents, and reference them directly inside instructions with the @ menu.

Custom API tools

Custom API tools connect your agent to any REST endpoint so it can fetch data, trigger workflows, or hand off complex tasks.

General configuration

  1. Name – A descriptive label the agent can reference.
  2. Icon URL – An image that appears alongside the tool in the dashboard.
  3. Slug – A URL-friendly identifier (for example example-api-tool).
  4. Description – Explain what the tool does and when to use it.
  5. Method – Pick the HTTP verb (GET, POST, PUT, DELETE, etc.).
  6. Endpoint URL – Provide the full URL to your API.

Headers

Add headers in JSON format to send with every request:
{
  "Content-Type": "application/json"
}

Body template

For POST or PUT requests, define a body template. Templates support Handlebars so you can inject data from the CometChat context:
  • {{uid}} – Sender’s user ID.
  • {{role}} – Sender’s role.
  • Custom fields from messageMetadata (for example {{customMetadataField}}).
JSON example:
{
  "userId": "{{uid}}",
  "userRole": "{{role}}",
  "customField": "{{customMetadataField}}"
}
String example:
User {{uid}} with role {{role}} sent a message

Authentication (Basic Auth)

  1. Toggle Enable under Basic Authentication.
  2. Enter the User Name.
  3. Enter the Password or token.

Parameters

Define each parameter so the agent understands what to supply at run-time:
  • Key – Parameter name passed to your API.
  • Type – Data type (string, number, boolean, etc.).
  • Description – Plain-language guidance for the agent.
  • Required – Mark mandatory fields to prevent incomplete requests.
Use + Add Parameter to create as many inputs as you need.

Reference in instructions

Once saved, the custom API tool appears in the @ tool list. Embed it within instructions to explain when and how the agent should call it. Example: “When users ask for weather information, use @weather-api-tool with the city parameter.”
Send sample conversations through the Test console to confirm your tool receives well-formed payloads and responses. Update instructions if the agent needs extra context.

Google Suite tools

Coming soon!