New to Telerik UI for Blazor? Download Free 30-day trial
LLM Kit - Tool Call Awaiting Approval
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
meridian
{
"database": "analytics",
"query": "SELECT customer_name,\n SUM(revenue) AS total\n FROM orders\n WHERE quarter = \u0027Q1 2025\u0027\n GROUP BY customer_name\n ORDER BY total DESC\n LIMIT 5"
}This will run a SELECT query on the analytics database. No data will be modified.
- Tool-call-awaiting-approval.razor
Description
This demo demonstrates the human-in-the-loop approval flow of the TelerikToolCall component. When an AI agent needs to execute a sensitive operation — such as a database write or an external API call — it can pause and request explicit user consent before proceeding.
Set State to ToolCallState.AwaitingApproval and provide an ApprovalText to display the default approval card with Approve and Reject action buttons. The OnAction event callback fires when the user makes a decision, receiving a ToolCallAction value of Approve or Reject. Use ApprovalTemplate to replace the default card with a fully custom approval UI.