HITL Kit
Human-in-the-loop AI, measured properly.
Deployed at hitlkit.dev · every primitive installs individually via the shadcn CLI · copy, paste, own.GitHub
Install
- Add a primitive via the shadcn CLI
$ npx shadcn@latest add https://www.hitlkit.dev/r/hitl-card.json - Install the packages
$ pnpm add @hitl-kit/core @hitl-kit/react
Why it exists
HITL Kit is the argument that we should measure AI differently, and the components that make the alternative buildable.
20 React primitives for human-in-the-loop agentic UIs. Each primitive is the physical embodiment of a specific claim from the paper.
Together: the paper is the argument, the components are the proof the argument is implementable, the registry is how you adopt it.
In depth
01
The measurement problem
95% of enterprise AI pilots fail, not because the models are bad, but because we measure the wrong thing. Despite $30–40 billion in investment, 95% of organizations achieve zero measurable return from generative AI initiatives (Challapally et al., 2025). The paper argues this failure crisis is at root a measurement crisis.
Current benchmarks ask one question: can the model complete this task autonomously? Deployment asks another: does it respect the user's authority, preserve their agency, and make them better over time? The benchmark-to-deployment gap is the distance between those two questions, and every component in this kit exists because something falls into that gap.
The alternative is Assist-Not-Complete: evaluate AI on whether it assists humans without displacing them, not on whether it can finish the task alone. The paper synthesizes benchmark-saturation research (Ott et al., 2022, a large fraction of 3,765 mapped benchmarks quickly trending toward near-saturation), cognitive-debt findings from AI-assisted learning (Kosmyna et al., 2025), scaffolding theory (Dhillon et al., 2024), and uncertainty quantification (Liu et al., 2025) into that single reframing.
02
Every primitive embodies a claim
The component library is not a grab-bag of agent UI widgets. Each primitive is the physical embodiment of a specific claim from the paper. The MiniTrace instantiates the supporting-facts requirement from HotpotQA (Yang et al., 2018): an answer without its evidence trail is unverifiable, so the trace rides along. The AI Generation Scale operationalises Dhillon et al.'s scaffolding principle, their CHI study found sentence-level suggestions reduced writing quality while paragraph-level scaffolds improved it, so the scale makes the level of AI involvement a first-class, visible control. The Interrupt Card is the agency-preservation boundary: the moment the system pauses and the human decides.
That traceability is the design discipline for the whole kit: if a primitive can't be tied to a claim the paper defends, it doesn't ship. The paper is the spec.
03
How it's built
The architecture is a protocol with adapters. @hitl-kit/core defines Zod event schemas, a framework-agnostic wire format for human-in-the-loop moments (approvals, interrupts, traces, generation-scale changes). @hitl-kit/react ships HitlEventRenderer, a typed dispatcher that maps validated events to UI primitives. @hitl-kit/gates adds composable decision gates: confidence, cost, scope, approval-chain, rate-limit, pure functions that wrap any adapter's emit point and decide allow, deny, or escalate.
Three adapters carry the protocol into real agent stacks: LangGraph (emit events from interrupt() nodes, resume with typed Commands), the Vercel AI SDK (typed tool() wrappers), and MCP (an MCP server exposing the primitive event kinds as tools, so any MCP-aware client can emit schema-validated HITL events). The paper becomes the protocol; the protocol becomes the platform.
The UI primitives live in one package, @hitl-kit/ui, and distribute two ways from that one source: as the package, or the shadcn way, copy, paste, own. The registry JSON the CLI resolves into your codebase is generated from the package source and drift-checked, so the copy you install and the copy the site demonstrates cannot disagree. Every primitive takes its core event as props and reports the human's decision through one typed onAction, whose vocabulary is shared: approve, reject, can't tell, undo. The kit was originally extracted from Agatha, a research-agent workspace. The primitives earned their shapes in a real product before they were generalized.
Signature features
20 React primitives, one API
20 React primitives for human-in-the-loop agentic UIs, from one package, @hitl-kit/ui. Props are the event; every decision comes back through one typed onAction, and every surface offers approve, reject, can't tell, and undo.
Copy, paste, own
No fork, no vendor lock-in, no wrapper SDK. Copy, paste, own.
Three artifacts
The paper is the argument, the components are the proof the argument is implementable, the registry is how you adopt it.
The component library
see them liveEvery primitive is the physical embodiment of a claim from the paper, and each installs on its own through the shadcn CLI: copy, paste, own. The quiet line under each is its registry identifier.
Interrupt Card
In-thread approval boundary for agent actions. Three semantic variants (search, review, write). Idle, expanded, confirmed and dismissed, and every resolution can be undone.
hitl-cardSubagent Status Card
Single-row agent status with icon, label, detail, and state in words. Use to wrap any in-progress agentic task.
subagent-status-cardMiniTrace
Collapsible step-by-step renderer for agent reasoning. Thought, action, result. Makes supporting facts visible per §3.3 of the paper.
mini-traceAI Generation Scale
Five-segment ordinal scale indicating AI involvement in a piece of work. Embodies the scaffolding and expertise-matching principle from Dhillon et al. (2024).
ai-generation-scaleAI Generation Slider
The compact drag form of the AI generation scale. One header row and one track, no wrapping at 320px. Pointer drag snaps to five stops; arrow keys step and Home/End jump. Full slider ARIA.
ai-generation-sliderAI Generation Meter
At-a-glance, read-only provenance for a list row or a header. Five thin segments filled to the current level plus the level name, as a single role=img element with no focusable children.
ai-generation-meterAI Generation Badge
The densest form of the AI generation scale: one pill with a five-dot micro-indicator and the level name. Static by default; given onAction it grows stepper buttons with 24px hit areas.
ai-generation-badgeContext Chips
Pill chips representing context attached to an agent run. Notes, files, URLs. Removable with overflow truncation.
context-chipsQA Flow
Multi-question approval card. Single-choice, multi-select, and freeform text. Submits to a resolved line that keeps the answers visible and can be reopened.
qa-flowWriting Agent
Compound widget for a draft-in-progress document. Title, target section, word range, evidence notes, and six status states.
writing-agentResearch Agent
Three-mode config surface for a long-running research task. Create, follow-up, read URL.
research-agentBatch Approval Queue
Sequential approve and reject flow across mixed agent items. Auto-advances, can step back one item, and resolves to a summary state.
batch-queueSearch Result Card
Ranked search result card with rank badge, metadata, snippet, and relevance bar.
search-result-cardApprove / Reject Row
The canonical decision row. Approve, reject, or can't tell; pending, approved, rejected, abstained; undo back to pending.
approve-reject-rowShared Primitives
The atomic palette. Accent swatches, the four approval badges, and the decision row that sets them.
shared-primitivesDiff Result
Before/after diff card for proposed text or code edits. Per-hunk red/green strips; apply, keep original, or can't tell; undo. The primitive for any in-place edit the human should approve before it lands.
diff-resultCitation Result
Single source-backed citation card. Claim on top, source attribution below, optional supporting quote and confidence. Verify, reject, or can't tell; undo.
citation-resultEditable Plan
Multi-step plan the human can reorder, rename, add to, or delete from before the agent executes. Locked steps cannot be removed. Submit or cancel; undo.
editable-planTool Call Preview
Preview a tool call (name, args, optional rationale and signals) so the human can approve, reject, or say they can't tell before execution. External scopes are flagged. Pairs with the gates layer.
tool-call-previewEvidence Pointer
Where a claim is grounded, not merely that it is. One row per pointer with source, locator in human units, and excerpt; sources consulted but not drawn from are listed so silence never reads as safety. Grounded, not supported, or can't tell; undo.
evidence-pointer
Packages
Explore further
The source lives on GitHub. Copy, paste, own. No fork, no vendor lock-in.
The other projects
all projectseval-kit
Scores whether your agent respects human authority: stops when it must, asks when it should, never averaged into one number.
MeasurementThe gates release · mandated compliance and discretionary precision/recall scored from the trace, never averaged · three reference suites · four adapters (anthropic, openai, http, mock) · file-based, single-user, not a hosted service.
tag-kit
Structured tagging primitives for human-in-the-loop annotation: scoped tags you can aggregate and score, not free-text labels.
Measurement@tag-kit/core (zero runtime deps) · @tag-kit/ui (headless React) · extracted from a real moderation app (inertial).
Collapse
A Claude Code skill-building framework: lessons, notebooks and docs compile into skills and MCP tools, linted and written atomically.
ToolingActive development. Shipped: MDX ingestor with 21 cross-stack reference lessons, notebook ingestor with admonition auto-prefill, template engine with cross-language equivalents + trigger-phrase derivation, atomic persistence, three-tier skill quality linter, and MCP server scaffold generation. One annotation can now become a skill or a working MCP tool.
Hologram
Live observability for Blender → glTF pipelines: an append-only log, a dashboard beside the assets, and an MCP surface for the agent.
ToolingOn PyPI as hologram-gltf · Python 3.10+ · MIT.