Concepts
Tools & Integrations
Tools extend your agent's capabilities by letting it call external APIs, query databases, or trigger actions during a conversation.
Registering a tool
Use POST /api/tools to register a tool:
curl -X POST https://your-deployment.convex.site/api/tools \
-H 'Authorization: Bearer SESSION_TOKEN' \
-d '{
"name": "check_order_status",
"description": "Look up the status of a customer order",
"parametersSchema": "{\"type\":\"object\",\"properties\":{\"orderId\":{\"type\":\"string\"}},\"required\":[\"orderId\"]}",
"endpoint": "https://api.yourapp.com/orders/status"
}'How tools are called
- The agent decides to call a tool based on the conversation context.
- Riyaan validates parameters against the JSON Schema you provided.
- The tool endpoint is called with the parameters.
- The response is fed back to the agent to continue the conversation.
Options
| Option | Description |
|---|---|
requiresConfirmation | Ask the user before executing |
requiresAuth | Tool needs authentication |
httpMethod | HTTP method for the endpoint (default: POST) |
headers | Custom headers sent with tool calls |
Rate limiting
Rate limits
Tool executions are rate-limited by maxActionsPerTurn to prevent runaway loops. Monitor execution history via GET /api/tools/executions.
Edit on GitHub
Last updated on