Skip to main content

Webhook Tools

Tools allow your AI agent to execute actions by calling your webhooks. The LLM decides when to use a tool based on the conversation context, executes the call, and uses the result in its response.

What are Agent Tools?

A Tool is a webhook endpoint that your agent can call to perform actions or retrieve data. When you define a tool, you specify:
  • Name: How the agent refers to the tool
  • Description: When the agent should use it
  • Parameters: What data to send (JSON Schema)
  • Webhook URL: Your endpoint that handles the request
The AI model uses the description to decide when to invoke the tool automatically.

Use Cases

Via Dashboard

1

Navigate to Tools

Go to Senders > select your sender > Agent tab > Tools section.
2

Create New Tool

Click Create Tool and fill in the form:
  • Name: A short identifier (e.g., check_order_status)
  • Description: When should the agent use this tool? Be specific.
  • Webhook URL: Your HTTPS endpoint
3

Define Parameters

Specify the parameters your webhook expects:
4

Configure Security (Optional)

Add a Webhook Secret to verify requests are from Zavu. We’ll sign each request with this secret.
5

Test the Tool

Use the Test button to send a sample request to your webhook and verify it responds correctly.
6

Enable the Tool

Toggle the tool to Enabled so the agent can use it.

Via API

Create Tool

List Tools

Update Tool

Delete Tool

Webhook Payload

When the agent invokes a tool, your webhook receives a POST request:

Headers

Webhook Response

Your webhook should return JSON with the result:
The agent will incorporate this data into its response to the user.

Error Responses

Return appropriate HTTP status codes for errors:
The agent will handle errors gracefully and inform the user appropriately.

Signature Verification

If you configured a webhook secret, verify the signature to ensure requests are from Zavu:

Tool Execution Flow

Best Practices

Write Clear Descriptions

The AI uses the description to decide when to use the tool. Be specific about when it should and shouldn’t be used.

Use HTTPS

Webhook URLs must use HTTPS for security. We reject HTTP endpoints.

Handle Errors Gracefully

Return meaningful error messages so the agent can inform the user appropriately.

Respond Quickly

Keep webhook response times under 10 seconds. The user is waiting for a response.

Example Tool Descriptions

Good description:
Poor description:
Poor descriptions lead to tools being used incorrectly or not at all. Invest time in writing clear, detailed descriptions.

Security Considerations

  1. Always use HTTPS for webhook endpoints
  2. Verify signatures using the webhook secret
  3. Validate parameters before processing
  4. Rate limit your webhook endpoints
  5. Log requests for debugging and auditing
  6. Never expose sensitive data in tool responses that shouldn’t be shared with customers

Next Steps

Add Knowledge Base

Let your agent answer questions from documents

Create Flows

Build structured conversation paths that use tools