Skip to content

Web Search Confirmation

The Web Search Confirmation component pauses flow execution and asks the user, in the Karli Studio chat, whether the agent may perform a web search. Based on the user's response, the flow continues down either the on confirm or on deny branch.

This is the Agentlab building block for human-in-the-loop confirmation of potentially sensitive or costly actions — most commonly, calling out to the public web.

Inputs

Field Description
Message The text passed along to whichever branch the user selects. Typically the prompt or query the agent intends to search for.
Default on Timeout The decision used if the user doesn't respond in time. Defaults to deny (false).
TTL (seconds) How long to wait for a user response before falling back to Default on Timeout. Defaults to 60.
Skip Value Test override. When set, bypasses the chat prompt entirely and resolves to confirm or deny immediately. Useful for unit tests and scripted runs; leave empty in production.

Outputs

The component has two outputs, both of which carry the Message as a Data payload:

Output Fires when
on confirm The user confirms, or the timeout expires with Default on Timeout = true, or Skip Value resolves to confirm.
on deny The user denies, or the timeout expires with Default on Timeout = false, or Skip Value resolves to deny.

Exactly one of the two branches runs per invocation; the other is stopped.

How It Works

When the component runs:

  1. It emits a USER_INPUT_REQUIRED event over the flow's event stream so that the Karli Studio chat can surface a confirm/deny prompt to the user.
  2. It long-polls the Karli Studio middleware for the user's response.
  3. The first matching response (or a timeout) resolves the decision; both output branches share the same resolution, so the prompt is shown to the user only once per invocation.

Typical Use

Place a Web Search Confirmation component immediately upstream of any web-search or external-API tool, and route the tool only off the on confirm branch. The on deny branch can return a polite refusal to the user, surface an alternative, or end the turn.

web-search-confirm-modal.png