Overview

Extend an agent with custom actions it can call mid-conversation

What are Tools

Tools let an agent take action during a conversation. The LLM decides when a tool is needed, calls it with arguments it generates from the user's intent, and uses the result to continue the conversation. Use tools to fetch live data, trigger workflows in your systems, or run logic in the user's browser.

Tool Types

Server Tools

The agent calls an HTTP endpoint you control. Use for backend data, business logic, and third-party APIs.

Client Tools

The agent invokes a function in the visitor's browser over the live session. Use for browser state, device APIs, and actions that shouldn't leave the user's device.

How It Works


---
config:
  theme: redux
  look: neo
---
flowchart LR
    LLM(["fa:fa-brain LLM"]) -- "Tool call" --> Server(["fa:fa-server Server tool"])
    LLM -- "Tool call" --> Client(["fa:fa-window-maximize Client tool"])

The LLM chooses when to call a tool based on the tool's description and the conversation. Server tools reach an HTTP endpoint you control; client tools run a function in the visitor's browser. The result is returned to the LLM, which uses it to compose the next reply.

Use Cases

  • Look up an order, account, or inventory record by ID and surface it in the reply.
  • Trigger a backend workflow — file a ticket, send an email, start a checkout.
  • Read or change state in the visitor's browser — open a page, prefill a form, read geolocation.

Next Steps

Follow the Quickstart to create a server tool and attach it to an agent.


What’s Next

Did this page help you?