# AgentHandoff

Hand work from one agent or person to another, with accept and decline.

- **Use it for**: Transferring ownership of work between agents or people.
- **Not for**: Approving a single action. Try [ApprovalCard](https://unseenui.com/components/approval-card/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { AgentHandoff } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';

<AgentHandoff variant="card" value={handoff} commandId={commandId} submission={submission} onDecision={sendDecision} onReconcile={lookupOriginal} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` | Added to the root element, after the component's own classes. |
| `commandId` | `string` |  |
| `onDecision` (required) | `(request: HandoffRequest, decision: "accept" \| "decline") => void \| (command: HandoffDecisionCommand) => void` |  |
| `onReconcile` | `((original: HandoffDecisionCommand) => void)` | Exact historical lookup, even when current context/access/ownership changed. |
| `reconciling` | `boolean` |  |
| `submission` | `HandoffSubmission` |  |
| `value` (required) | `HandoffRequest \| { target: { scope: { workspaceId: string; threadId: string; runId: string; attemptId: string; streamId: string; schemaVersion: 2 \| 1; branchId?: string \| undefined; }; runVersion: nu…` |  |
| `variant` | `"compact" \| "card" \| "banner"` |  |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[AuditTrail](https://unseenui.com/components/audit-trail/), [PolicyStatus](https://unseenui.com/components/policy-status/), [AgentCard](https://unseenui.com/components/agent-card/)

Page: https://unseenui.com/components/agent-handoff/
