window.argide('registerTools', {...}), and the agent calls them like any other tool — but the work happens client-side.
When to Use
Use client-side tools for browser-only actions:- CSV / file downloads
- Page navigation
- DOM manipulation
- Accessing client-side state (stores, localStorage)
Use server-side tools (OpenAPI / MCP) for API calls, database queries, and anything that requires backend access.
Setup
1. Register Handlers
In your app code, register functions the widget can call:2. Upload Tool Definitions
On the Actions page, upload a JSON definition so the agent knows the tool exists:Handler Contract
Each handler receives anargs object matching the tool’s parameters schema and must return an object.
The returned object is sent back to the agent so it can incorporate the result into its response.
Showing a Loading State
For tools that take a few seconds, callsetToolStatus to show a spinning indicator with a status message inside the widget. Clear it when done.
''.
How It Works
- User asks — The message is sent to the agent
- Agent picks the tool — Based on the tool definition
- Widget runs the handler — Executes your registered function client-side
- Result flows back — The agent sees the return value and responds
Tool Renderers
Render custom UI for tool results
Embed Widget
Full installation guide
