A custom tool lets an agent call any API in the middle of a conversation, for example to check availability, look up a membership, get prices or stock, submit a booking or add a contact to your CRM.

Create a custom tool

  1. Press ⌘K, open Tools, then Explore → Custom Tool.
  2. Set the endpoint URL and method (GET, POST, PATCH…).
  3. Add any headers, including authentication.
  4. Write the request body. Define the inputs the agent should fill in from the conversation, such as the chosen service or date.
  5. Describe what the tool does and how the agent should use the response. The agent reads this description to decide when to call it.
  6. Save, then add the tool to an agent under Custom Tools and test it in the Playground.

Using values in a tool

Wrap values in double curly braces:

{
  "service": "{{agent_input.selected_service}}",
  "email": "{{contact.email}}",
  "api_key": "{{secret.booking_system_key}}"
}

See Sharing secrets and API keys to set up the values your tools need.

<aside> 🔒

Always keep API keys and passwords in a sensitive variable and reference them with {{secret.…}}. Never paste them into the tool itself.

</aside>

Need help building a custom tool? Contact us and we’ll set it up with you.