ResoneraDocs

Custom tools and skills

Connect agents to your own API during calls, and give them procedures for specific situations.

Custom tools and skills extend an agent beyond its built-in tools:

ExtensionDescription
Custom toolThe agent calls your HTTPS endpoint during a call, for example to check an order or look up a customer, and answers from your response.
SkillA named procedure, such as handling a refund request, that the agent loads when the conversation requires it.

Create custom tools and skills in the dashboard under Agent Studio → Tools and Agent Studio → Skills, or with the API. Attach them to an agent on its Configure tab, or with the agent's custom_tool_ids and skill_ids.

Before you begin

  • An API key with the agents:read scope to list and retrieve, and agents:write to create, update, delete, and test.

Create a custom tool

curl -X POST https://api.resonera.ai/v1/custom-tools \
  -H "X-API-Key: $RESONERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "check_order_status",
    "description": "Look up the delivery status of an order. Use when the caller asks where their order is and provides an order number.",
    "parameters": [
      {"name": "order_id", "type": "string", "description": "The order number the caller provides", "required": true}
    ],
    "url": "https://api.example.com/resonera/order-status",
    "headers": [{"name": "Authorization", "value": "Bearer sk_live_..."}]
  }'
ParameterTypeRequiredDescription
namestringYesThe function name the agent uses, such as check_order_status. Lowercase letters, digits, and underscores, up to 48 characters.
descriptionstringYesWhen the agent should use the tool, up to 1,000 characters. The agent decides whether to call the tool based on this text.
parametersarrayNoUp to 8 inputs the agent collects from the caller. Each has name, type (string, number, integer, or boolean), description, required, and optional enum values.
urlstringYesA public HTTPS URL.
methodstringNoPOST (default; inputs in a JSON body) or GET (inputs as query parameters).
headersarrayNoHeaders sent with each request, such as an authorization token. Values are encrypted and never returned by the API.
timeout_msintegerNo1,000 to 10,000. Default 5,000.
enabledbooleanNoDefault true. A disabled tool is unavailable to every agent.

The response includes the tool's signing secret (tlsec_...). It is shown only once.

Handle tool requests

Request format

{
  "tool": "check_order_status",
  "arguments": { "order_id": "A1234" },
  "call": {
    "id": "88433d99-ead1-4ee2-86c1-7a2cbfd6d064",
    "agent_id": "8b8e3307-2c1a-4f6e-9a51-0d7c2b9e4f10",
    "campaign_id": null,
    "direction": "inbound",
    "caller_number": "+919876543210"
  }
}
HeaderDescription
Your configured headersAs set on the tool.
Resonera-ToolThe tool's name.
Resonera-Call-IdThe call's ID.
Resonera-SignatureThe request signature.

For GET tools, the arguments are sent as query parameters and the request has no body. Only declared parameters are sent. Text values are trimmed, and numbers and booleans are converted to their declared types. If a required input is missing, the agent asks the caller for it before calling your endpoint.

Verify the signature

Requests are signed in the same way as webhook events, using the tool's secret: v1 = hex(HMAC_SHA256(secret, t + "." + raw_body)). For GET requests, the body is empty. Reject timestamps older than five minutes.

Respond

Return a 2xx status with a JSON or plain-text body. The agent uses the first 1,500 characters and relays the answer in its own words. Return only the information the caller needs:

{ "status": "out for delivery", "expected": "today by 6 pm" }

Any other status, a timeout, or a connection error is treated as a failed lookup. The agent tells the caller it could not retrieve the information.

The caller waits on the line while your endpoint responds. Respond within two seconds. Redirects are not followed.

Behavior during calls

SituationBehavior
The caller speaks while the request is in progressThe request completes. The agent may continue the conversation before using the response.
The tool is called more than once on a callThis can happen, for example, when the caller corrects a detail. Make tools that create records idempotent, for example by using call.id as an idempotency key.
The tool is disabled (enabled: false)The tool is unavailable to every agent.

Test a tool

POST /custom-tools/{tool_id}/test with {"arguments": {...}} sends the same request a call sends and returns your response and the text passed to the agent. The Test button in the dashboard does the same. Each tool's last_called_at, last_status, and last_error fields show the result of its most recent call.

Create a skill

curl -X POST https://api.resonera.ai/v1/skills \
  -H "X-API-Key: $RESONERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "refund_requests",
    "description": "When the caller asks for a refund or to return an order.",
    "instructions": "1. Ask for the order number and the reason.\n2. Within 7 days of delivery, offer a full refund to the original payment method.\n3. After 7 days, offer store credit.\n4. Do not promise a date. The team confirms by SMS within 2 working days."
  }'
ParameterTypeRequiredDescription
namestringYesThe skill's name, up to 48 characters.
descriptionstringYesWhen to use the skill, up to 300 characters.
instructionsstringYesThe procedure, up to 6,000 characters.

During a call, the agent sees only each skill's name and description. When the conversation matches a skill, the agent loads its instructions and follows them for the rest of the call. Skills do not override the agent's safety rules or facts. Changes to a skill apply to every attached agent from its next call.

Attach tools and skills to an agent

curl -X PATCH https://api.resonera.ai/v1/agents/$AGENT_ID \
  -H "X-API-Key: $RESONERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"custom_tool_ids": ["TOOL_ID"], "skill_ids": ["SKILL_ID"]}'

Both lists replace the existing values. IDs must belong to your account. Deleting a tool or skill removes it from every agent.

Limits

ResourcePer accountPer agent
Custom tools5010
Skills5010

On this page