Agent handoff
A marker that work passed from one agent, or person, to another: "Research agent handed off to Writer". A row with both avatars, or a centred rule like a date divider.

No script. The server renders who, why and when; a re-render changes the status. The summary of what was handed over is a native disclosure.
Use it
In a chat or a run, as a row:
<x-ds::agent-handoff
:from="['name' => 'Research agent']"
:to="['name' => 'Maya Patel', 'kind' => 'human', 'src' => $maya->avatar_url]"
reason="A refund over £500 needs a person"
:summary="$handoff->notes"
:time="$handoff->created_at"
timeFormat="relative"
status="waiting"
>
<x-slot:actions>
<x-ds::button size="sm" wire:click="takeOver">Take over</x-ds::button>
</x-slot:actions>
</x-ds::agent-handoff>
Between two stretches of a conversation, as a divider:
<x-ds::agent-handoff variant="divider" from="Research agent" to="Writer" time="10:02" />
Inside an agent timeline, as the body of a handoff row:
<x-ds::agent-timeline-item type="handoff" title="Handed over" :time="$step->at">
<x-ds::agent-handoff from="Support agent" to="Billing agent" :reason="$step->reason" />
</x-ds::agent-timeline-item>
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
from, to | string or array | — | A name, or ['name', 'src', 'initials', 'kind' => 'agent' | 'human']. An agent is drawn square, a person round. |
reason | string | — | Why, in a line. |
summary | string | — | What was passed along, folded under "What was handed over". A summary slot takes markup. The row only. |
time | date, ISO 8601 string or words | — | As timeline item's. |
datetime | string | — | For a time in words, the machine-readable moment. |
timeFormat | relative or a PHP format | the locale's | |
status | the agent status set | — | waiting: for a person to take over. Left out, none is shown. |
variant | row divider | row | |
text | string | :from handed off to :to | The sentence. |
summaryLabel | string | What was handed over | |
statusText | array | — | [status => words], replacing any of the English. |
| Slot | What it does |
|---|---|
actions | Accept, Take over: your buttons, wired by you. |
summary | The summary as markup. |
Accessibility
- The sentence carries everything; the avatars and the arrow are a picture of it and are hidden from assistive technology.
- The status is a mark and its word, never colour alone.
- The divider is text between two lines, not a
separator, so it is read.
Don't
- Don't use a divider for a handoff someone must act on. A row has room for the reason and the actions.
From the package repo: edit this page on GitHub.