DRYL COMPONENTS
Color mode: System — switch to light
2.20.1
Agents

Human-in-the-Loop

AI-aware

Ready-made dialog AIFunctions that let the agent ask the user and wait for a real answer — the run pauses until you respond.

How it works

DrylUiTools gives the agent tools backed by DRYL dialogs — ask for text, a single choice, multiple choices, or a confirmation. The Agent Framework invokes them for real, so the dialog pops up live and the tool call awaits the user's answer, then returns a model-friendly string the agent continues from.

Where the innovation lies: human-in-the-loop as a first-class tool. No custom pause/resume protocol, no side channel — the model asks with the same mechanism it uses for any other tool, and the UI supplies the answer.

csharp
// The dialog-backed tools await the user and return a string the agent continues from.
var tools = DrylUiTools.Create(Dialogs);
var agent = new ChatClientAgent(chatClient, tools: tools.All);
var run = Runner.Start(agent, session, "Deploy my app.", aiKey: "tools");
Requires a dialog provider
The tool dialogs need <DrylDialogProvider /> mounted once in your root layout — the same one AddDrylAgents() asks for.

Human-in-the-loop tools

Ready-made AIFunction tools backed by DRYL dialogs. Hand them to the agent; each awaits the user's answer and returns a model-friendly string. Press the button and the agent will ask you — for real.

An unhandled error has occurred. Reload x

Reconnecting to the server…

Attempt /

Next try in s