Agentic control
Handoff
Use when the agent reaches the edge of what it is allowed to do and a person has to take the work or widen the limit.
The agent escalates to a human with prepared context. Calm, not a failure.
Part of Agentic control. The stage where the agent stops answering and starts doing. It covers the whole handover: agreeing what the agent may do, watching it work, stepping in, and checking what changed afterwards. Reach for these as soon as an action touches a customer, money or a record.
Do
- Say why the agent stopped in one line, naming the limit it reached.
- Hand over the context a person needs to act: customer, amount, what is at risk.
- Offer two ways forward: take over, or raise the limit and let the agent finish.
Don't
- Don't use error colours or alarm icons. This is an escalation, not a failure.
- Don't make the person rebuild the context from the transcript.
- Don't raise a cap without saying what the new cap is.
States
- Working: A thinking indicator with what the agent is reviewing.
- Handoff: A Your turn badge, the headline and reason on an accent panel, the context rows, and two actions.
- Taken over: The actions are replaced by a tick and a line saying the person has control and notes are in the thread.
- Resuming: After the cap is raised, a thinking indicator says the agent is resuming.
- Resumed: A tick and the outcome, such as the refund amount and customer.
Usage
import { HandoffPattern } from "./halaska-kit";
<HandoffPattern
headline="Alpha is handing this to you"
reason="Refund exceeds your $2,500 approval cap"
context={[
{ label: "Customer", value: "Acme · Enterprise" },
{ label: "Requested refund", value: "$3,900" },
]}
onTakeOver={() => assignToMe()}
onResume={() => raiseCap(5000)}
/>
HandoffPattern props
workingLabelstring(default "Reviewing Acme's refund request…"): ThinkingIndicator label while the agent is still working (default: "Reviewing Acme's refund request…")workingMsnumber(default 2000): How long the working beat lasts before the handoff card appears (default: 2000)headlinestring(default "Alpha is handing this to you"): Handoff headline on the accent rail (default: "Alpha is handing this to you")reasonstring(default "Refund exceeds your $2,500 approval cap"): Because-line under the headline (default: "Refund exceeds your $2,500 approval cap")context{ label: string, value: string }[](default HANDOFF_CONTEXT_ROWS): Prepared context rows the human inherits (value renders mono)takeOverLabelstring(default "Take over"): Primary action label (default: "Take over")resumeLabelstring(default "Raise cap to $5,000 & let Alpha finish"): Secondary action label that raises the cap and lets the agent finish (default: "Raise cap to $5,000 & let Alpha finish")takenOverTextstring(default "You have control. Alpha left notes in the thread."): Confirmation line after Take over (default: "You have control. Alpha left notes in the thread.")resumingLabelstring(default "Resuming with new cap…"): ThinkingIndicator label while the agent resumes (default: "Resuming with new cap…")resumedTextReactNode(default HANDOFF_RESUMED_TEXT): Resolved line after the agent finishes (default: "Done · refunded $3,900 to Acme", amount in mono)resumeMsnumber(default 1500): How long the resuming beat lasts before it resolves (default: 1500)autoplayboolean(default true): Play the working beat on mount; false shows the handoff card immediately (default: true)onTakeOver() => void: Fires when the user clicks Take overonResume() => void: Fires when the user clicks the raise-cap actiononResumed() => void: Fires when the resumed run resolves (after resumeMs)
Built from
Agent Glyph, Badge, Button, Card, Stack, Thinking Indicator, Typography
Related patterns
Halaska UI · Components · Patterns · Screens · Install