Skip to content
signoff-uiv0.14.1

v0.14.1MITReact 18 & 19

Review what your agent changed. Approve what it may do.

React components for teams putting a coding agent in their own app. Review changes across files, hunk by hunk, and hand the agent what to apply. Approve tool calls with rules your route checks again.

npm i signoff-ui
Get started
Watch a full run

For coding agents: add these docs over MCP

Try a review and an approval

Review the agent’s edit

2 files · 2 hunks · +14 −1

Added:lib/ratelimit.ts+12 −0
Modified:app/api/chat/route.ts+2 −1
@@ -1,2 +1,3 @@
import { chat } from '@/lib/chat';
Removed: export const POST = chat;
Added: import { withRateLimit } from '@/lib/ratelimit';
Added: export const POST = withRateLimit(chat);

1/2 reviewed · 1 of 2 files viewed · unreviewed hunks are skipped

Keyboard: J or K to move between hunks, Shift J or Shift K between files, A to accept, R to reject, U to reset, Alt A or Alt R for the whole file, Shift A or Shift R for every hunk, Shift with the up or down arrow to select lines, C to comment on them or on the hunk, E to show more unchanged lines, V to mark the file viewed, Ctrl Enter to apply.

Approval required

Medium risk

Run command

~/acme/chat-app
pnpm test

What the agent receives

Accept or reject the route’s hunk, apply the review, or answer the approval: what goes back to the agent prints here, as the page sends it.

Works withAI SDK 6 & 7assistant-uiAG-UIACPyour own chat

  • 0.4 kB to 91.8 kB gzip per import, checked in CI
  • A 5,000-line rewrite ready in 265 ms, diffed in a worker (M1 Max)
  • React 18 and 19, AI SDK 6 and 7, tested in CI
  • Released from CI with npm provenance

Live demo · no API key

Watch a full run

A scripted coding agent adds rate limiting to a Next.js route: it asks before it installs a package, then hands you its edit to review. Every panel is a kit component.

You

Add rate limiting to our /api/chat route. Keep streaming intact and don’t break existing clients.

Components

Review and approval, and the run around them

DiffReview and ApprovalCard are the sign-off: useDiffReview is the same review in your own markup, and useApprovalPolicy keeps the rules behind the approvals. The others render the rest of the run, or hand AgentMessage a whole assistant message and get them all, in order. Keyboard-first, announced to screen readers, and in both the npm package and the shadcn registry.

Works with

Fits the stack and the chat you already have

It renders what your agent already streams, so there’s no runtime or state model to adopt, and it calls no model itself: bring OpenAI, Anthropic, Google, xAI, Mistral or a local model, with your own keys. Typed against AI SDK 6 and 7, tested on React 18 and 19 in CI, and prerenders under Next.js 16 with cacheComponents.

  • AI SDK 6 & 7

    Hand it the last assistant message from useChat. Approvals from toolApproval show inline, and a review answers a tool with no execute through addToolOutput.

    TSX
    <AgentMessage
      message={last}
      onToolApproval={addToolApprovalResponse}
      renderTool={review}
    />
  • AG-UI

    LangGraph, CrewAI, Mastra, Pydantic AI and the rest of the protocol’s integrations, through one hook. Interrupts become approval cards, and sub-agents nest under the call that started them.

    TypeScript
    import { useAgUiAgent } from 'signoff-ui/ag-ui';
  • Agent Client Protocol

    The protocol editors use to run coding agents. A prompt turn becomes a message, each permission request an approval card that maps the agent’s options to Approve, Always and Deny, and each edit a diff. Pure functions, nothing else to install.

    TypeScript
    import { reduceAcpTurn, toAcpMessage } from 'signoff-ui/acp';
  • assistant-ui

    signoffTools puts a review on the tools that propose edits and the approval card on calls at an approval gate, answered through assistant-ui’s runtime.

    TypeScript
    import { signoffTools } from 'signoff-ui/assistant-ui';
  • npm or shadcn

    Install the package, or copy a component’s source into your app with the shadcn CLI and make it yours.

    Shell
    npx shadcn@latest add https://signoff-ui.vercel.app/r/diff-review.json
  • Your chat UI

    Inside AI Elements or your own components. A Tailwind v4 entry, or a stylesheet for Tailwind v3 or none that styles only the components’ own elements.

    TypeScript
    import 'signoff-ui/styles.css';

Comparison

How it compares

assistant-ui and AI Elements cover the whole chat, and you may well want one of them for it. assistant-ui’s Elements collection (since August 2026) is the closest to this kit, and far wider: an approval card, a reviewable diff, a trace waterfall, a tool timeline, a cost meter, agent status and more. Here’s where signoff-ui differs on the parts they share.

Diff review
signoff-ui: The old and new text of several files, or a patch, with the hunks computed and word-level highlights. Hunks or whole files accepted or rejected, comments on lines, files marked viewed. Returns each file with only the accepted hunks applied, the rejected hunks and the comments, ready to send back as a tool result, or as a unified patch.
assistant-ui Elements: One file's hunks, already split; keep or discard per hunk, and apply returns nothing.
Approvals
signoff-ui: What will run, a risk level when you give one, deny with a reason, a second press for critical, and automatic decisions from toolApproval shown as such. Once, for the session or always, by tool and argument pattern, with rules that also run as AI SDK 7's toolApproval, sent with each request (getRules) and checked in the route (parseApprovalRules); arguments editable before approving; approve all pending; an audit trail. A key for each choice, scoped to focus.
assistant-ui Elements: Allow once, allow always or deny.
Data in
signoff-ui: A UIMessage from useChat as it is, an AG-UI agent through useAgUiAgent, an ACP prompt turn through signoff-ui/acp, or assistant-ui's tool calls through signoff-ui/assistant-ui. No runtime to adopt.
assistant-ui Elements: Props (agent status also has a runtime-bound variant). With the assistant-ui runtime, its docs show how to map approvals, message timing and step usage into them.
Tool timeline
signoff-ui: Every state, with durations measured on the client that leave out time spent waiting for an approval. Sub-agents nest under the call that started them.
assistant-ui Elements: A summary of what was done, without durations or states.
Cost
signoff-ui: Prices tokens from your rates and shows the prompt-cache hit rate.
assistant-ui Elements: Displays cost strings you format.
Styling
signoff-ui: Tailwind v4, v3 or none: the npm package ships a precompiled stylesheet scoped to its own elements.
assistant-ui Elements: Tailwind v4.
React
signoff-ui: 18 or 19.
assistant-ui Elements: 18 or 19.

AI Elements is Vercel’s shadcn registry for AI SDK apps, with the widest coverage of the message surface: conversation, prompt input, reasoning, sources, a per-call Tool card, a Confirmation for approvals, a Context usage indicator and more. It targets React 19 and Tailwind v4, and is written against AI SDK 6.

They compose. Render the thread with either library and use these components for the review and the approvals. The full comparison also lists what they do better, such as assistant-ui’s chat runtime and its much wider set of components.

Get started

Start with the sign-off

Put a DiffReview on the tool that proposes edits and a ToolApprovalCard on the ones that need a person, and add the rest when you want them. Install from npm, or copy the source in with the shadcn CLI. MIT licensed.

npm i signoff-ui