Approvals¶
The agent can look things up on its own. But anything that changes something waits for a person to say yes. That includes drafting an email, sending one, or creating a task in your agency system. The person decides, not your app and not the agent. Making a download inside the chat (an Excel or CSV of the answer's tables) needs no yes: it stays in Klaris, for that person only.
Each workspace can change these rules: always allow an action, always ask, or never allow. Rules can be set for the whole workspace, for a role, or for one person (when the person you send is a Klaris user, matched by user_email); when several apply, the strictest wins. By default, reads run, and writes and sends ask.
1. The response pauses¶
When the agent wants to do something that needs a yes, the response ends with status: "requires_approval". Its output holds an approval_request:
{
"id": "apr_51d0…",
"type": "approval_request",
"call_id": "call_2",
"name": "gmail_send",
"risk": "send",
"summary": "Send an email to pat@client.com: \"Renewal call moved to Friday\"",
"arguments": "{\"to\": \"pat@client.com\", \"subject\": \"Renewal call\", \"body\": \"…\"}",
"status": "waiting",
"expires_at": 1794504800
}
Show the person the summary, and the details from arguments if they want them, and ask yes or no. Secrets in arguments are masked. When streaming, the same object comes in a response.approval_requested event.
2. Send the answer¶
Send the person's answer as the next input in the same conversation, on its own, with no new question alongside it:
await fetch(`${API}/responses`, {
method: "POST",
headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
user: "nick@example.com",
conversation: conversationId,
input: [{ type: "approval_response", approval_request_id: approval.id, approve: true }],
}),
});
- Yes (
"approve": true): the action runs once, and the agent carries on and answers. - No (
"approve": false, with an optional"reason"): the action never runs. The agent is told it was declined, and why.
If several approvals are waiting, answer all of them in the one request. A response for the wrong conversation or the wrong approval id gets 409 approval_mismatch.
If nobody answers¶
- If the person asks something new instead of answering, the waiting actions are dropped and never run. The agent is told.
- An approval that waits 7 days expires and is dropped the same way.
Every request, decision and action is recorded on Klaris Agent → Activity, with who decided.