.Riyaan Docs
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

  1. The agent decides to call a tool based on the conversation context.
  2. Riyaan validates parameters against the JSON Schema you provided.
  3. The tool endpoint is called with the parameters.
  4. The response is fed back to the agent to continue the conversation.

Options

OptionDescription
requiresConfirmationAsk the user before executing
requiresAuthTool needs authentication
httpMethodHTTP method for the endpoint (default: POST)
headersCustom 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

On this page