Experimental Lit-based toolchain for agent tool UI
Tool UI primitives, runtimes, and workflows
for agents.
mini-tool is an experimental repository for a Lit-based toolchain for agent tool UI, focused on reusable components, action/runtime integration, and validation workflows for agent-facing tool surfaces.
This repository publishes an experimental, consumer-usable surface for:
- shared mini-tool styles
- component registration via subpath exports
- action/runtime helpers for host integration
For host apps, import the official shared stylesheet entry once at app startup:
import "mini-toolui/styles";This entry provides base/theme tokens (including shared --mt-layer-* stacking tokens) required for predictable cross-component layering and theming.
Component modules are also available through stable subpath exports:
import "mini-toolui/components/image-gallery";
import "mini-toolui/components/geo-map";For host action handling, use the runtime helpers export (full guide: docs/actions-runtime.md):
import { bindMiniToolActions, createDecisionReceiptFromAction } from "mini-toolui/actions";
const unbind = bindMiniToolActions(document, {
onLocalAction: async (action) => {
// local side effects only
},
onDecisionAction: async (action) => {
// convert consequential action into a durable receipt envelope
return createDecisionReceiptFromAction(action, {
summary: `${action.component}:${action.actionId}`,
});
},
commitDecision: async (receipt) => {
// commit to your runtime/addResult/event store
},
});Public package surface is intentionally limited to these exports. Paths under src/* are internal implementation details and are not supported for consumer imports. Package exports resolve to built dist/* artifacts only.
This library explicitly credits assistant-ui/tool-ui as the upstream design and component inspiration. mini-toolui is the rewritten Lit-based library form maintained in this repository.
The repository still includes internal engineering documentation for maintainers.
- Actions runtime API:
docs/actions-runtime.md - Testing and benchmarks:
docs/testing-and-benchmarks.md - Folder ownership and architecture boundaries:
docs/architecture/folder-ownership.md - Foundation v0 architecture entry point:
docs/architecture/foundation-v0.md - Foundation v0 normative spec for new protocol-first components:
docs/architecture/foundation-v0-spec.md - Foundation v0 current repo status/evidence matrix:
docs/architecture/foundation-v0-repo-status.md - Decision commit adapter matrix:
docs/actions-decision-commit-adapters.md - Icon policy and Lucide audit scope:
docs/architecture/icon-policy.md
npm run lint— repo-wide Oxlint validationnpm run lint:fix— format the repo, then apply safe Oxlint fixesnpm run format— format the repository with Oxfmtnpm run format:check— verify repository formatting with Oxfmt
npm run check— repository validation only (lint, typecheck, architecture/import/tracking checks; no tests)
npm run test— unit/contract tests (Vitest)npm run test:e2e— browser/e2e tests (Playwright)npm run test:e2e:ui— open Playwright UI mode
npm run build— build published dist artifactsnpm run package— build then validate package artifacts (including npm pack surface)
npm run dev— run the example app onhttp://127.0.0.1:4173npm run dev:build— build the example app for static hostingnpm run dev:preview— preview the built example app onhttp://127.0.0.1:4173
npm run benchmark— mini benchmark suitenpm run benchmark:source -- --component <name> --sha <tool-ui-commit-sha>— source baseline benchmarknpm run benchmark:compare -- --component <name>— low-noise hyperfine profile (--profile quiet)npm run benchmark:report— build the latency overview and render the HTML reportnpm run quality:gate -- --component <name> --skip-contract— component quality gatenpm run tracking:check -- --component <name>— verify readiness evidence for a componentnpm run visual:bisect -- --component <name> --source-url <source-url> --source-selector <selector> --mini-url <mini-url> --mini-selector <selector>— layer bisect utility for visual regression debuggingnpm run verify— full validation (check+test+test:e2e)
Script conventions:
lint*= formatting/style validationcheck*= static/repository validation onlytest*= executable test suitespackage*= dist/packaging workflowsdev*= local development entrypointsbenchmark*= high-level performance workflows only; use direct CLI flags/scripts for specialized benchmark diagnosticsvisual*/*gate= operational workflows that are still intentionally exposedverify= all-up validation before release
For benchmark internals and schema adapter details (including native source Zod adapter behavior), see docs/testing-and-benchmarks.md.
Jheng-Hong (Matt) YANG: jhyang@stencilzeit.com
MIT