Tools through your backend
The agent calls your webhook; your service checks permissions and acts.
A tool is a contract (name, description, input and output schema) and a webhook on your backend. During a run the agent decides to call the tool, and Aimount sends one POST to your webhook.
What your webhook receives
The request identifies the call and the person it is for: project_id, application_id, user_id, your exact external_user_id, the selected agent_id, session_id, tool_call_id and the validated input.
Authenticate the request with the configured bearer token. Each webhook has a timeout of up to 30 seconds.
Example handler
An illustrative domain handler, not an SDK registration API. context.orders and context.delivery are your own services.
// Your backend: illustrative domain handler.
async function update_delivery_window(input, context) {
const order = await context.orders.requireOwned({
orderId: input.order_id,
userId: context.authenticatedUser.id,
});
return context.delivery.reschedule({
orderId: order.id,
window: input.window,
});
}Your service owns permissions and data changes. Check that the user may perform the action before changing anything.