New to Telerik UI for Blazor? Download Free 30-day trial

LLM Kit - Tool Call Awaiting Approval

Parameters
{
  "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
Loading the demo source code...please wait.
Style in ThemeBuilder
  • Custom SASS variables
  • Atomic customizations
  • Sharing projects
Start Theming

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.

This Blazor LLM Kit Tool Call Awaiting Approval example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.

Support & Learning Resources

An error has occurred. This application may no longer respond until reloaded.