Changes to the Rasen Developer API, newest first.
The API version moves from 1.14.0 to 1.15.0. The API adds no operation. The run-time rules for tool runs and the request headers to your tool servers change at once, with no notice period. The sections below list each change.
Version 1.15.0: read why a tool run failed
listAgentToolRuns (GET /agents/{agent_id}/tools/{tool_id}/runs) adds three fields to each run:
source:livefor a call,test_callfor a test call,testfor a stored test run.diagnosis:error_class,last_step,request_sent,attemptsandlimit_ms. It isnullwhile the run is pending. An older run that did not succeed has onlyerror_class.steps: the time of each network step in milliseconds, ornullwhen the run did not reach the network.
error_class is one of timeout, dns, connection, tls, destination_refused,
http_status, response_too_large, invalid_response, secret_unavailable,
invalid_arguments, call_ended, platform and unclassified.
The new query parameter include adds request (the request as sent, with each secret value as
[secret]) and response (the status, the allow-listed headers, the bytes received and
complete). The new query parameter include_test=true adds the stored test runs of the tool.
A test run has the test ID in call_id. A cursor is bound to include_test.
listCallToolOutcomes (GET /calls/{call_id}/tool-outcomes) adds error_class and
request_sent to each item. It has no payloads.
For runs recorded from this version, result and the response header values keep the non-secret
data of the call. This data is the URL path and query, variable values, constants, other header
values and the call and agent IDs. Secret values stay masked. Older runs keep their stored values.
What to do: Nothing for existing integrations. Keep unknown source, error_class and step
values, and read an unknown error_class as unclassified. To read a diagnosis, follow
Read tool call logs.
Version 1.15.0: the tool.failed webhook event
An endpoint can subscribe to the new event type tool.failed. Rasen sends it once for each tool
run of a call that ended as failed or indeterminate, after the call ends. Test calls and test
runs send no event. data has call_id, agent_id and run, with the IDs and the diagnosis of
the run only: never arguments, a result, the request or the response.
createWebhookEndpoint (POST /webhook-endpoints) and replaceWebhookEndpoint
(PUT /webhook-endpoints/{endpoint_id}) accept tool.failed in events, with at most 4 values.
listWebhookDeliveries (GET /webhook-endpoints/{endpoint_id}/deliveries) accepts tool.failed
in event_type.
Every event now carries api_version 1.15.0. The data of call.completed, call.failed,
call.analyzed and webhook.test does not change; they carried 1.12.0 before.
What to do: Nothing for existing endpoints. Answer 2xx to an event type that you do not know.
To get the event, add tool.failed to the events of an endpoint. See
Webhook events.
Version 1.15.0: new request headers to your tool servers
Every request from a webhook tool to your server carries Rasen-Run-Id, Rasen-Call-Id,
Rasen-Agent-Id and User-Agent: Rasen-Tools/1.0. This applies to in-call, before-call and test
requests. Rasen-Run-Id is the run id of listAgentToolRuns and of the tool.failed event.
The previous call and agent ID headers are not sent.
What to do: If your server reads the previous call and agent ID headers, read Rasen-Call-Id
and Rasen-Agent-Id instead. To find a run in your server logs, search for its Rasen-Run-Id.
Version 1.15.0: stricter rules for each tool run
Each run of a webhook tool now checks its filled request before it sends it. When a check fails, the run fails and sends nothing:
- A destination that a tool write refuses fails with
outbound_destination_refused. This includes a filled URL longer than 2,048 characters and a denied host name, for examplelocalhost,*.internal,*.localor a metadata name. It also includes port 0, a host name that breaks the host-name grammar, and a multicast or reserved address. - A
.or..path segment that a filled value adds, also in a%2eform, fails withinvalid_requestanderror_classinvalid_arguments. - A header value with a character that is not ASCII fails.
A response larger than the size limit of the tool ends the run as failed with
tool_response_too_large. Before this version, such a run was indeterminate.
What to do: Check that each tool uses a public HTTPS URL. Check that no variable value adds a
. or .. path segment, and that each header value is ASCII. Read tool_response_too_large runs as
failed. See Read tool call logs.