# Knowns UI > Every screen an AI product needs as React components and blocks: agent views, chat, app screens and marketing sections. Install with the shadcn CLI or MCP. Components install as source with the knowns-ui CLI: `npx knowns-ui@latest add ` for Free and Pro items alike. Pro items need a license: run `npx knowns-ui@latest login` once per project (it saves the key to .env.local). Fallback (only if the knowns-ui CLI can't run): the shadcn CLI. Free items: `npx shadcn@latest add https://ui.knowns.dev/r/.json`. Pro items install as `@knowns-ui-pro/` through a licensed registry in components.json. MCP server: https://knowns-ui.com/mcp (get_component, search_components, search_docs, get_install_instructions, search_flows, get_flow). Flows are whole user journeys (several blocks wired together, every state, desktop and phone): `npx knowns-ui@latest add flow/` installs the blocks and one wiring file. Source: https://github.com/knowns-dev/knowns-ui (Free items, MIT). --- # Introduction Docs: https://knowns-ui.com/docs/introduction Knowns UI is the UI kit for AI products: React components and blocks for every screen your product needs, from live agent views and chat to app screens, marketing and content sections, illustrations, backgrounds and text effects. ## What is in it components and blocks today, of them Free. Components are the building pieces, from buttons and forms to overlays and data display. Blocks are larger: they show what agents are doing, or make up whole screens and sections. Free items are open source (MIT) on GitHub. pages in all. The counts come from the docs themselves, so they stay current. ## How it works Knowns UI is a shadcn registry, not a package you depend on. The shadcn CLI copies each item into your project as source, so you own the code and can change anything. Items bring what they need: adding agent-lanes also adds button, the core types and the icons. Everything is styled with Tailwind CSS v4 and the shadcn/ui theme tokens, so it follows your colours and dark mode. Live views read one small event store, the run store, so they stay in step with each other. ## Free and Pro Free covers all the base components, the core agent views, chat and a first set of blocks, illustrations, backgrounds and text effects. Pro adds the heavier views (such as boards and memory), most blocks, the 3D and voice illustrations, the SDK adapters, and Pro variants of some Free blocks. Pro is a one-time per developer ( during early access), or a month; a Team key covers up to developers. Pages and cards mark which is which. --- # Installation Docs: https://knowns-ui.com/docs/installation Add Knowns UI to a React project with one command. Every item lands in your repo as source code you can change. ## Requirements React 19 and Tailwind CSS v4. TypeScript is recommended. Next.js, Vite and React Router all work. Free items are open source (MIT) on GitHub. Connect the Knowns UI MCP server and let your coding agent run the install for you. See Using with AI. ## Quick start The knowns-ui command wraps the shadcn CLI. It sets up components.json when it is missing, sends each name to the Free or the Pro registry, and passes shadcn flags such as -y and --path through. Run this once. It runs shadcn init if you have no components.json, then adds the Knowns UI registries. Name as many as you like in one call. The items they build on come with them. knowns-ui list shows every item with its tier, knowns-ui search finds one, and --dry-run prints the shadcn command without running it. knowns-ui skill teaches your coding agent how to find, install and compose Knowns UI: it writes a skill to .claude/skills/knowns-ui and a section in AGENTS.md, and --client all adds Cursor, Copilot, Windsurf and Codex. Pass --yes (or -y) so the command never waits on a prompt. Without it, a shell that is not interactive stops with an error and a non-zero exit code instead of guessing. ## Already using shadcn? Run npx knowns-ui@latest init, then add. On a project with a components.json, init does not run shadcn again and does not touch your style, aliases or other registries. It only adds the two Knowns UI registries, and running it twice changes nothing. Files land in components/ui/knowns and lib/knowns, beside your own, so your components/ui/button.tsx is never replaced. Your theme stays as it is. Items read your tokens (--primary, --muted and the rest) and add only --kn-* variables and kn-* keyframes. A registry named @knowns-ui that already points elsewhere is kept with a warning. init --force replaces it. ## Framework guides Any React 19 and Tailwind v4 setup works, as long as components.json points at your stylesheet and your import alias. ## Monorepos and custom aliases The CLI follows your components.json, so nothing extra is needed. Run it against the package that renders the components, and let its aliases decide the import paths. Go to the app or package folder, or point the commands at it with --cwd. The flag goes to shadcn as it is. Imports inside the items are rewritten to your aliases. Use --path to put the files somewhere else. If the items live in a shared package, add its folder as a source in the stylesheet that each app imports. ## Monorepos and custom aliases npx knowns-ui@latest init --cwd apps/web npx knowns-ui@latest add button --cwd apps/web ## Monorepos and custom aliases { "aliases": { "components": "~/components", "ui": "~/components/ui", "utils": "~/lib/utils" } } ## Monorepos and custom aliases @import "tailwindcss"; @source "../../../packages/ui/src"; ## Add a component The command below is the same as the Quick start, in the package manager you pick. Manual lists the files to copy, and With AI gives your coding agent one prompt that does it all. The core item adds a few @keyframes and --kn-* variables to your stylesheet. Accept the change; nothing else in the file is touched. ## Add a component import { useAgentRun } from "@/lib/knowns/run"; import { AgentGraph } from "@/components/ui/knowns/agent-graph/agent-graph"; import { Button } from "@/components/ui/knowns/button"; export function AgentView() { const run = useAgentRun(); // Emit events wherever your agents report progress: run.emit({ type: "span.start", ... }) return ( <> ); } ## Fallback: the shadcn CLI alone Use this only if the knowns-ui CLI can’t run, for example with no network to npm or an older setup. The @knowns-ui namespace is built into the shadcn CLI, so you add Free items by name with nothing to set up in components.json. The files are the same. If the project has no components.json yet, run npx shadcn@latest init first. On an older shadcn CLI that does not know the namespace, add by URL instead: npx shadcn@latest add https://ui.knowns.dev/r/button.json. ## Fallback: the shadcn CLI alone npx shadcn@latest add @knowns-ui/button ## Pro Pro items install from a licensed registry. Add your key, then use the same command: npx knowns-ui@latest add agent-board. Setup, keys and CI are on Installing Pro. ## Dark mode and colours Dark mode follows a .dark class on <html>, as in any shadcn project, so no theme provider is needed. Use your own toggle, or add the Theme Toggle. Tokens, accents and status colours are on Theming and Variants & colours. ## Where files go: components/ui/knowns/ Installation Where files go components/ui/knowns/ (UI): Components and blocks, kept apart from your own shadcn components so nothing is overwritten. ## Where files go: lib/knowns/ Installation Where files go lib/knowns/ (Core): utils.ts, types.ts, run.ts (the run store), status.ts and json.tsx. ## Where files go: lib/knowns/icons/ Installation Where files go lib/knowns/icons/ (Icons): Model and tool logos, actorIcon() and the licence notes for the logos. --- # Installing Pro Docs: https://knowns-ui.com/docs/installing-pro Log in once with npx knowns-ui@latest login, then add Pro items by name with npx knowns-ui@latest add. The CLI sets up the licensed registry and keeps your key in .env.local. ## Set up with AI Paste this prompt into your coding agent and it does steps 2 to 4 for you: it checks shadcn, adds the Pro registry, asks you to put your key in .env.local, connects the MCP server and checks one Pro install. Signed in, your License page has the same prompt. ## Quick start Save your key once with login, then add Pro items by name. The knowns-ui CLI finds out whether each name is Free or Pro, and stops with a clear message if the key is missing. add sets up components.json and both registries when they are missing (it asks first; -y accepts). init does only that step. login asks for the key without echo, checks it with the server, then writes it to .env.local and makes sure .gitignore covers that file. It only prints the key masked. logout removes it. You can pass the key as an argument (login knp_...), but then it may stay in your shell history. whoami shows the plan, status and expiry of the saved key, still masked. Only if the CLI can’t run, the fallback below does the same by hand with the shadcn CLI. ## Quick start npx knowns-ui@latest login npx knowns-ui@latest add agent-board ## Fallback: set up by hand with the shadcn CLI Use these steps only if the knowns-ui CLI can’t run, for example with no network to npm or an older setup. Buy Pro on the pricing page. The key arrives by email and is on your account’s License page. One key covers every Pro item in every project you build. @knowns-ui-pro serves Pro items. The Free items they depend on come from @knowns-ui, which is built into the shadcn CLI and needs no entry. The CLI fills ${KNOWNS_LICENSE_KEY} from your environment and sends it with every Pro request. The CLI’s login does this step for you. By hand: Keep .env.local out of git. On CI, set KNOWNS_LICENSE_KEY as a secret. Free and Pro items can sit in one command. Pro dependencies come through the same registry. With shadcn: To look at an item before adding it: npx shadcn@latest view @knowns-ui-pro/agent-board. ## Fallback: set up by hand with the shadcn CLI { "registries": { "@knowns-ui-pro": { "url": "${SITE}/r/pro/{name}.json", "headers": { "Authorization": "Bearer \${KNOWNS_LICENSE_KEY}" } } } } ## Fallback: set up by hand with the shadcn CLI KNOWNS_LICENSE_KEY=your-license-key ## Fallback: set up by hand with the shadcn CLI npx shadcn@latest add @knowns-ui-pro/agent-board npx shadcn@latest add @knowns-ui-pro/dashboard-agent-ops @knowns-ui/button ## Pro variants Some Free blocks have Pro variants. The base block stays Free; each variant is its own Pro item that builds on it. The sidebar marks these pages with an outline star. ## Pro variants npx knowns-ui@latest add ${variants[0]?.[1][0] ?? "hero-split"} ## Seats, refunds and revoked keys A Pro key is for one developer. A Team key covers up to developers on one key. Monthly keys stay active while the subscription is paid. If an order is refunded or a key is revoked, Pro installs stop with invalid_license. Free items keep working. A key used from many places at once may be reviewed. ## Troubleshooting Each error the Pro registry returns, what it means, and the fix. Free items are never affected. ## Troubleshooting: requires the following environment variables Installing Pro Troubleshooting requires the following environment variables (No key in the environment, default: Before the request): Add KNOWNS_LICENSE_KEY to .env.local or export it in your shell. ## Troubleshooting: missing_license Installing Pro Troubleshooting missing_license (No key sent, default: 401): Check the headers block for @knowns-ui-pro in components.json. ## Troubleshooting: invalid_license Installing Pro Troubleshooting invalid_license (Wrong, revoked or expired key, default: 403): Copy the key again from your License page. ## Troubleshooting: rate_limited Installing Pro Troubleshooting rate_limited (Daily limit, default: 429): One key can fetch 300 Pro items a day. The count resets at 00:00 UTC. --- # Using with AI Docs: https://knowns-ui.com/docs/ai-and-mcp Let your coding agent find, read about and install Knowns UI. Connect the MCP server, point it at one item's JSON, or give it the docs as llms.txt. Free items need no key. ## The MCP server A remote MCP server at (Streamable HTTP). It answers from these docs: what each item is for, when to use it and when not, props, examples and the install command. Without a key, Free items come back in full and Pro items as a summary marked as needing a license. With a key you get Pro props, examples and source. Calls are limited to 300 an hour per IP address without a key, and 2,000 an hour per key. ## The MCP server: list_components Using with AI The MCP server list_components (kind?, category?, tier?, default: No): Every component and block with its tier and a one-line description. ## The MCP server: search_components Using with AI The MCP server search_components (query, limit?, default: No): Finds items by what you need, such as "approve a tool call" or "date picker". ## The MCP server: search_docs Using with AI The MCP server search_docs (query, limit?, kind?, default: For Pro detail): Search across all the docs: the passages that answer a question, with links. ## The MCP server: get_component Using with AI The MCP server get_component (name, include_source?, default: For Pro detail): Description, when to use, install command, dependencies, usage, props and, on request, the source. ## The MCP server: get_install_instructions Using with AI The MCP server get_install_instructions (names[], default: No): The npx knowns-ui@latest add command for several items, plus npx knowns-ui@latest login when one of them is Pro. The shadcn command comes last, labelled as a fallback. ## Docs search search_docs finds the passages that answer a question, such as “show approvals inside the chat thread”. Exact names work too: useAgentRun, onDecision. It only retrieves; your own model writes the answer. Narrow it with kind: component, guide, example or prop. Past the limit, searches fall back to keyword results and say so. Limits reset at 00:00 UTC. ## Docs search: No key Using with AI Docs search No key (${DOCS_SEARCH.freePerDay} a day per IP address, default: ): Free docs in full; Pro passages as a short summary. ## Docs search: Pro or Monthly key Using with AI Docs search Pro or Monthly key (${DOCS_SEARCH.proPerDay.toLocaleString("en-US")} a day, default: ): Everything in full. ## Docs search: Team key Using with AI Docs search Team key (${DOCS_SEARCH.proPerDay.toLocaleString("en-US")} a day per member, default: ): Everything in full. ## Connect your client npx knowns-ui@latest mcp --client cursor (or claude, vscode) prints the config for your client, with the key as an environment reference. Other clients that speak MCP over Streamable HTTP can use the same URL, with the key as a Bearer header. ## With the shadcn MCP server The shadcn CLI has its own MCP server that browses and installs from the registries in your components.json. Add the Knowns UI Pro registry (see Installing Pro), then set it up for your client: ## With the shadcn MCP server npx shadcn@latest mcp init --client claude ## One item by address Every Free item is a JSON file at https://ui.knowns.dev/r/<name>.json with its description, dependencies and source, the same file the CLI installs. Paste the address into any assistant, no MCP needed. Pro items need a key; ask through the MCP server instead. ## One item by address Read ${SITE}/r/approval-prompt.json and add an approval step before my agent runs a shell command. Install it with npx shadcn@latest add @knowns-ui/approval-prompt and wire onDecision to my tool runner. ## Install with AI Every Installation section has a With AI tab next to CLI and Manual. It holds one prompt for your coding agent, built from the registry item: check the project, add the registry, run the exact command, handle overwrite prompts, and verify. For Pro items the agent asks you to put your key in .env.local yourself; the key is never in the prompt. Free items also get a usage snippet. This is the prompt for Approval Prompt: ## On every page Copy page copies the page as Markdown. The Copy prompt button under the install command copies a prompt that installs the item and wires its props to your own data; the MCP server returns the same text from get_component. Copy page for AI copies a brief for your assistant: what the item is, when to use it, the install command, the import, the props and an example. Open in Claude, ChatGPT or Cursor starts a chat with a shorter brief. For assistants that read docs as text, /llms.txt indexes every page and /llms-full.txt holds the docs in one file, without component source. --- # Theming Docs: https://knowns-ui.com/docs/theming Knowns UI reads the shadcn/ui theme tokens, so your colours and dark mode carry over. A small palette covers agent and data colours. ## Theme tokens Every token with its Tailwind class and its light and dark value is on Color. The type scale is on Typography. ## Theme tokens: --background / --foreground Theming Theme tokens --background / --foreground (colour): Page and text colour. Most hairlines and quiet fills are mixed from --foreground, so they follow your theme. ## Theme tokens: --card / --popover Theming Theme tokens --card / --popover (colour): Surfaces: cards, panels, dialogs and popovers. ## Theme tokens: --muted / --muted-foreground Theming Theme tokens --muted / --muted-foreground (colour): Quiet fills and secondary text. ## Theme tokens: --primary / --primary-foreground Theming Theme tokens --primary / --primary-foreground (colour): Primary buttons and checked controls. ## Theme tokens: --kn-accent / --kn-accent-foreground Theming Theme tokens --kn-accent / --kn-accent-foreground (colour, default: --primary): The single highlight of Button, Progress, Switch, Checkbox, Segmented Control and the accent tone. Unset, components use --primary. Set it on any element to recolour that region. See Variants & colours. ## Theme tokens: --chart-1 … --chart-5 Theming Theme tokens --chart-1 … --chart-5 (colour): Chart series colours. One accent, quiet neutrals and two meaning colours by default; set them on :root or a container to restyle every chart inside. ## Theme tokens: --ring Theming Theme tokens --ring (colour): Focus rings. ## Dark mode Components use Tailwind’s dark: variant on a .dark class, as shadcn projects do. This site keeps the choice in a cookie, kn-theme (light or dark; no cookie means follow the system), and sets the class from a small inline script before the first paint, so pages stay static and never flash. The Theme Toggle follows the same contract. ## Dark mode @custom-variant dark (&:is(.dark *)); ## Accent and agent colours Agents and data series take their colours from one palette in lib/knowns/status.ts, the same in every view. The first colour doubles as the quiet accent some blocks use for a single highlight. Change the palette to restyle all of them. ## Radius and fonts Knowns UI uses one fixed radius family (8, 12 and 16 px) so its pieces look the same side by side; your --radius still applies to your own shadcn components. Text uses your page font, and code and numbers use Tailwind’s font-mono, so setting --font-sans and --font-mono in your theme is enough. ## Logos Agents show their provider’s logo, picked from model (“Opus 5.5” is Claude, “GPT-5” is OpenAI). Tools show a brand logo picked from their label, or a generic glyph. Pass icon to override either. See lib/knowns/icons/LICENSES.md for the logos’ sources and terms. ## Reduced motion Every animation respects prefers-reduced-motion: loops stop on a still frame and transitions become instant. Animations that run every frame use transforms only, and live views pause when they scroll out of sight. --- # Variants & colours Docs: https://knowns-ui.com/docs/variants Recolour a whole region with one CSS variable, pick a tone for a status, add a variant of your own with cva, or override a single class with className. ## Recolour a region Core components take their single highlight from --kn-accent and, on top of it, --kn-accent-foreground. Neither is set by default: the components fall back to --primary and --primary-foreground, so nothing changes until you set them. Set them on any element, a card, a section or :root, and everything inside follows. The Badge, Tag and Alert accent tone stay indigo until you do. ## Recolour a region
/* or for the whole app, in your CSS */ :root { --kn-accent: oklch(0.54 0.23 292); --kn-accent-foreground: oklch(0.985 0 0); } .dark { --kn-accent: oklch(0.72 0.17 292); } ## Tone Components that show a status take tone: neutral, accent, success, warning or danger. Badge, Tag and Progress also have info. Each tone is correct in light and dark. accent follows --kn-accent; the others are fixed signal colours. ## Tone: Badge, Tag Variants & colours Tone Badge, Tag (tone, default: neutral, accent, info, success, warning, danger): Existing prop. accent reads --kn-accent. ## Tone: Alert Variants & colours Tone Alert (tone, default: neutral, accent, info, success, warning, danger): The icon takes the tone; the surface stays a plain card. ## Tone: Progress Variants & colours Tone Progress (tone, default: neutral, accent, info, success, warning, danger): neutral and accent both follow --kn-accent. ## Tone: Status Dot Variants & colours Tone Status Dot (tone, default: neutral, accent, success, warning, danger): Wins over state for the colour; the pulse still follows state. ## Tone: Segmented Control Variants & colours Tone Segmented Control (tone, default: neutral, accent): accent fills the chosen segment. ## Tone: Button, Switch, Checkbox Variants & colours Tone Button, Switch, Checkbox ( - ): Follow --kn-accent with no prop. ## Add a variant of your own Each core component exports its look as a class-variance-authority map: buttonVariants, progressVariants, alertVariants, statusDotVariants, switchVariants, checkboxVariants and segmentedThumbVariants. The files are yours after install, so add an entry and use it. ## Add a variant of your own const VARIANT: Record = { primary: "...", // your own brand: "bg-fuchsia-600 text-white not-disabled:hover:bg-fuchsia-600/90", }; export type ButtonVariant = "primary" | "secondary" | "ghost" | "destructive" | "quiet" | "brand"; // on a link, without a Button Upgrade ## Override with className cn in lib/knowns/utils.ts is clsx plus tailwind-merge, so a class you pass always beats the component’s own bg-*, text-*, rounded-* and p-*. Variants such as dark: and hover: are kept apart. Rounded and green Custom badge ## Override with className ## Chart colours Chart series take --chart-1 to --chart-5 and fall back to the built-in palette, so setting them on :root or on a container restyles every chart inside. See Theming for the full token list. --- # Color Docs: https://knowns-ui.com/docs/color Every colour token by role, with its CSS variable, Tailwind class and light and dark value. Pick an accent to retint this page, then copy the CSS. ## How the tokens are layered Knowns UI adds no colour system of its own on top of your theme. Components read the shadcn-style tokens you already have, and only reach past them for status colours and chart series. Four layers, from the ones you own to the ones we default. knowns.css ships keyframes and motion tokens only and never touches colour, so installing it cannot change your theme. The tables below are generated from the real sources, and a test fails when they drift. ## Try an accent An accent re-points only --primary, --primary-foreground and --ring, so every block on this site recolours at once, light and dark. The choice is the same control as the one at the bottom of the page. Copy the CSS for the scope you want and paste it after your knowns.css import. ## Related Theming covers dark mode and installing the tokens. Variants & colours shows recolouring a single region. Typography documents the type scale. --- # Typography Docs: https://knowns-ui.com/docs/typography The type scale as the components use it: a live specimen for each size with its line height, weight and class, and where the scale is ad hoc. ## Fonts One system font stack for text and one for code. Knowns UI sets neither on its own: it inherits your page font, and font-mono is Tailwind’s, so setting --font-sans and --font-mono in your theme restyles everything. The stacks below are what this site uses. ## The scale Components set sizes with arbitrary values such as text-[13px], not a named scale. These are the sizes used 10 or more times across the component files, in order. The weight and line height shown are the ones each size is most often paired with, and the specimen renders at exactly those values. ## Rare sizes Sizes used fewer than 10 times. Most are a half pixel away from a step above. ## Tailwind steps A few components use Tailwind’s named sizes. Each one lands on a size the arbitrary values already cover. ## Line height and tracking Line height is set with Tailwind’s numeric and named classes, tracking mostly with tracking-tight and em values. These are the most used. ## Where it is ad hoc There is no named scale yet. The components use around thirty different arbitrary sizes, several of them at half pixels, and a long tail of line-height classes. Several steps sit half a pixel apart and do the same job (12 and 12.5, 13 and 13.5, 14 and 14.5), and Tailwind’s text-xs and text-sm repeat 12px and 14px. This page lists them rather than hiding them; a tidier scale is a separate change. Related: Color for the colour tokens and Theming for dark mode. --- # Run store Docs: https://knowns-ui.com/docs/run A tiny store that turns agent events into the snapshot every component reads. Create one per run and emit events into it from anywhere: a stream reader, a websocket handler, a trace exporter. ## Create a run import { useAgentRun, useAgentSnapshot } from "@/lib/knowns/run"; const run = useAgentRun({ maxSpans: 500 }); // or createAgentRun() outside React const snapshot = useAgentSnapshot(run); // { actors, spans, links, approvals } ## Events Pass an array to emit to apply several events with a single re-render. Events without at use the current time. ## Events: actor Run store Events actor ({ actor }): Add an actor, or merge fields into the one with the same id. ## Events: actor.remove Run store Events actor.remove ({ id }): Remove an actor with its spans, links and approvals. ## Events: span.start Run store Events span.start ({ id, from, to, summary?, input?, at? }): A call begins. Shows as a streak, a running bar and a running card. ## Events: span.end Run store Events span.end ({ id, outcome?, output?, error?, at? }): The call returns. outcome defaults to "success". ## Events: link Run store Events link ({ from, to }): Draw a permanent link before any call uses it. ## Events: approval.request Run store Events approval.request ({ id, actor, title, detail?, at? }): An actor needs a human decision. ## Events: approval.resolve Run store Events approval.resolve ({ id, decision }): "approved" or "denied". ApprovalPrompt emits this for you. ## Events: reset Run store Events reset ({}): Start over. ## Feeding it from a stream // Map whatever your agent framework sends to Knowns UI events. for await (const chunk of agentStream) { if (chunk.kind === "tool-call") { run.emit({ type: "span.start", id: chunk.callId, from: chunk.agent, to: chunk.tool, input: chunk.args }); } if (chunk.kind === "tool-result") { run.emit({ type: "span.end", id: chunk.callId, outcome: chunk.error ? "failure" : "success", output: chunk.result, error: chunk.error }); } } ## Without a store Every component also takes plain data props (actors, spans, links, approvals) if you already keep that state somewhere else. --- # Adapters Docs: https://knowns-ui.com/docs/adapters An adapter turns what your agent SDK streams into run events, so every Knowns UI view shows the live run. The event model and the run store are Free; the adapters are Pro. ## The event model Every view reads one run store. An adapter's only job is to turn what your agent SDK streams into run events: actor for each agent and tool, span.start / span.end for each call, task.start / task.end for larger steps, and approval.request when the agent asks before it acts. Decisions made in the browser come back as approval.resolve. ## What ships Wiring for each SDK: Claude Agent SDK, Vercel AI SDK, OpenAI Agents. ## What ships: adapter-stream Adapters What ships adapter-stream (Pro, default: ): Streams run events from a server route to the browser (NDJSON or SSE), reads them into a run, and sends Allow / Deny back. Shared tool labels and model pricing. ## What ships: adapter-claude-agent-sdk Adapters What ships adapter-claude-agent-sdk (Pro, default: ): The Claude Agent SDK's query() stream as run events: subagents, tool calls, permission requests and cost. ## What ships: adapter-ai-sdk Adapters What ships adapter-ai-sdk (Pro, default: ): An AI SDK stream (streamText or ToolLoopAgent parts, or UI message chunks) as run events: steps, tool calls, approvals, usage and sub-agents. ## What ships: adapter-openai-agents Adapters What ships adapter-openai-agents (Pro, default: ): An OpenAI Agents SDK stream as run events: agent updates, handoffs, tool calls, approvals and resumes, guardrail tripwires and usage. ## Stream to the browser Every adapter turns SDK messages into run events on the server. adapter-stream carries them to the browser: the server writes one event per line, the client reads them into a run, and decisions made in the browser go back with forwardDecisions. The adapters install from the Pro registry. Set it up once (see Installing Pro), then add the one you need. Each SDK adapter brings the stream adapter with it. ## Stream to the browser // Browser: read a stream of run events into a run, and send Allow / Deny back. import { useEffect } from "react"; import { useAgentRun } from "@/lib/knowns/run"; import { connectEventStream, forwardDecisions } from "@/lib/knowns/adapters/stream"; import { AgentGraph } from "@/components/ui/knowns/agent-graph/agent-graph"; export function LiveRun({ runId }: { runId: string }) { const run = useAgentRun(); useEffect(() => { const ctrl = new AbortController(); void connectEventStream(run, `/api/runs/${runId}/events`, { signal: ctrl.signal }); const stop = forwardDecisions(run, `/api/runs/${runId}/decisions`); return () => { ctrl.abort(); stop(); }; }, [run, runId]); return ; } ## Stream to the browser npx shadcn@latest add @knowns-ui-pro/adapter-stream --- # Accordion (accordion) Free · components / Data display · Docs: https://knowns-ui.com/docs/accordion A stack of collapsible sections. One open, or several, with a full keyboard path. ## When to use - Stacks of sections the user opens one or several at a time, such as FAQs or settings groups. ## When not to use - Switching between equal panels: use Tabs (https://knowns-ui.com/docs/tabs) instead ## Install ```bash npx knowns-ui@latest add accordion ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/accordion.json ``` ## Dependencies - Registry (installed with it): knowns-core ## Files - components/ui/knowns/accordion.tsx ## Usage ```tsx import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@/components/ui/knowns/accordion"; What is Knowns UI? Agent views you copy into your repo. ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | type | "single" \| "multiple" | "single" | One open, or several. | | collapsible | boolean | true | For type=single, whether the open item can be closed. | | defaultValue / value | string \| string[] | - | Which items start (or stay) open. A string for single, an array for multiple. | | onValueChange | (value) => void | - | Fires with a string (single) or string[] (multiple). | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Accordion to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A stack of collapsible sections. Open one at a time, or several. Full keyboard path. Docs: https://knowns-ui.com/docs/accordion 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add accordion ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Stacks of sections the user opens one or several at a time, such as FAQs or settings groups. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Handle these by calling my own mutations or setters: - `onValueChange` ((value) => void): Fires with a string (single) or string[] (multiple). Optional, leave the default unless I need otherwise: `type`, `collapsible`, `defaultValue / value`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Separator (https://knowns-ui.com/docs/separator): Pairs with it: a rule can set a group of items apart from the next. - Badge (https://knowns-ui.com/docs/badge): Pairs with it: a badge in a trigger shows a count or a status without opening it. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "accordion" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Action Button (action-button) Free · components / Actions · Docs: https://knowns-ui.com/docs/action-button One button that morphs through a run: Run, then working with a spinner, then a done check, then back. The width follows the label, the icon crossfades and the check pops; it never swaps for another element. ## When to use - A button that starts a run and should show how it went in place: Run evals, Sync now, Deploy. - A toolbar or card action where a toast for every run would be noise. ## When not to use - Actions that cannot be undone: make them hold to confirm: use Hold Button (https://knowns-ui.com/docs/hold-button) instead - Long runs with steps to watch: use Progress (https://knowns-ui.com/docs/progress) instead ## Install ```bash npx knowns-ui@latest add action-button ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/action-button.json ``` ## Dependencies - Registry (installed with it): knowns-core, button, motion, spinner ## Files - components/ui/knowns/action-button/action-button.tsx ## Usage ```tsx import { ActionButton } from "@/components/ui/knowns/action-button/action-button"; } workingLabel="Running 48 evals" doneLabel="48 passed" onAction={() => runEvals(suite.id)} // return false or throw: straight back to Run > Run evals ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | children / icon | ReactNode | - | The idle label and its icon, e.g. Run with a play glyph. | | workingLabel / doneLabel | ReactNode | "Working" / "Done" | The label while it runs (with a spinner) and once it is done (with a check). | | onAction | () => unknown | - | Runs on click. While it runs the button stays focusable, aria-busy, and ignores clicks. Return false or throw to go back to idle at once. | | state / onStateChange | "idle" \| "working" \| "done" | - | Control it yourself, for a run that lives elsewhere (a queue, a server push). | | doneFor | number | 1600 | How long Done shows before it eases back, ms; 0 keeps it. | | variant / size | Button's | "primary" / "md" | The same looks and sizes as Button. | | Motion | - | - | The label width eases to the next label (180ms, ease out), the icon crossfades (120ms), the label settles with a 4px rise, and the check pops on Done (the motion lib's confirm). Reduced motion: instant. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Action Button to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: One button that morphs through a run: Run, then working with a spinner, then a done check, then back. The width follows the label, the icon crossfades and the check pops; it never swaps for another element. Docs: https://knowns-ui.com/docs/action-button 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add action-button ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A button that starts a run and should show how it went in place: Run evals, Sync now, Deploy. - A toolbar or card action where a toast for every run would be noise. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `Motion` (-): The label width eases to the next label (180ms, ease out), the icon crossfades (120ms), the label settles with a 4px rise, and the check pops on Done (the motion lib's confirm). Reduced motion: instant. Handle these by calling my own mutations or setters: - `onAction` (() => unknown): Runs on click. While it runs the button stays focusable, aria-busy, and ignores clicks. Return false or throw to go back to idle at once. Optional, leave the default unless I need otherwise: `children / icon`, `workingLabel / doneLabel`, `state / onStateChange`, `doneFor`, `variant / size`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "action-button" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Activity Feed (activity-feed) Free · blocks / Workspace · Docs: https://knowns-ui.com/docs/activity-feed A timeline of what people and agents did: unread dots and Mark all read, type tabs with counts, expandable rows, day groups and a live N new update pill. ## When to use - A project or workspace timeline of what people and agents did. - An inbox-like feed that tracks unread, with type tabs and rows that open in place. ## When not to use - Things that need the reader to act or clear them: use Notification Center (https://knowns-ui.com/docs/notification-center) instead - A single run's steps with timing: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead ## Install ```bash npx knowns-ui@latest add activity-feed ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/activity-feed.json ``` ## Dependencies - Registry (installed with it): knowns-core, avatar, button, segmented-control ## Files - components/ui/knowns/blocks/application/activity-feed.tsx - components/ui/knowns/blocks/application/app-feed-utils.ts - components/ui/knowns/blocks/application/activity-utils.ts ## Usage ```tsx import { ActivityFeed } from "@/components/ui/knowns/blocks/application/activity-feed"; api.markRead(ids)} onMarkAllRead={(ids) => api.markRead(ids)} onOpen={(item) => router.push(`/runs/${item.id}`)} hasMore={cursor !== null} onLoadMore={loadOlder} className="h-[560px]" /> ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | items | ActivityItem[] | required | id, at (ms), type, actor { name, agent, src }, verb, object, plus unread, project, snippet and details (diff \| tool \| text). | | now / timeZone | number / string | first render / "UTC" | The clock and the zone that cuts days; fix both so server and client match. | | filters | boolean | true | Show the type tabs with counts and the Everyone / People / Agents control. | | who / onWhoChange | "all" \| "people" \| "agents" | uncontrolled | The who filter. | | types / onTypesChange | string[] | uncontrolled | The selected tab: empty is All, one entry is that type. | | typeMeta | Record | comment, change, deploy, file, invite | Tab label and avatar badge icon per type; merged over the defaults. | | onMarkRead | (ids: string[]) => void | - | A row was opened and became read. | | onMarkAllRead | (ids: string[]) => void | - | Mark all read was pressed; ids are the rows it cleared. Also shows the header when no item has unread. | | holdNew | boolean | false | Hold arriving items behind the pill even when the list is at the top. | | onOpen | (item) => void | - | "Open" in an expanded row was pressed. | | onLoadMore / hasMore / loadingMore | () => void / boolean / boolean | - | "Show older" at the end of the list. | | label | string | "Activity" | The name of the feed region. | | headingLevel | 2 \| 3 \| 4 | 3 | Level of the day headings; set it so heading levels do not skip on your page. | | emptyText | string | "No activity matches these filters." | Shown when the filters leave nothing. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Activity Feed to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A timeline of what people and agents did: who, what they did, to which thing, and when. Tabs with counts narrow it by type, unread rows carry a dot, and Mark all read clears them with a short sweep. A row opens in place to show its full snippet, a diff summary or a tool call. New events wait behind a pill instead of moving the list. The names, projects and runs shown are made up. Docs: https://knowns-ui.com/docs/activity-feed 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add activity-feed ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A project or workspace timeline of what people and agents did. - An inbox-like feed that tracks unread, with type tabs and rows that open in place. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `items` (ActivityItem[]): id, at (ms), type, actor { name, agent, src }, verb, object, plus unread, project, snippet and details (diff | tool | text). Handle these by calling my own mutations or setters: - `onMarkRead` ((ids: string[]) => void): A row was opened and became read. - `onMarkAllRead` ((ids: string[]) => void): Mark all read was pressed; ids are the rows it cleared. Also shows the header when no item has unread. - `onOpen` ((item) => void): "Open" in an expanded row was pressed. Optional, leave the default unless I need otherwise: `now / timeZone`, `filters`, `who / onWhoChange`, `types / onTypesChange`, `typeMeta`, `holdNew`, `onLoadMore / hasMore / loadingMore`, `label`, `headingLevel`, `emptyText`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Segmented control (https://knowns-ui.com/docs/segmented-control): Installed with it. It is the Everyone, People or Agents switch in the filter row. - Avatar (https://knowns-ui.com/docs/avatar): Installed with it. Each actor is an avatar, with a bot mark for agents and a type badge on its corner. - Notification center (https://knowns-ui.com/docs/notification-center): Pairs with it: the bell for what is new, this feed for the whole history. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "activity-feed" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Activity Stack (activity-stack) Pro · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/activity-stack Several live agent activities at once: newest on top, one open at a time, a +N chip past the first few, arrivals that rise in, and a finished one that dims and then leaves. Takes a list of items, each picking one of the agent activity capsules. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - The corner of your app showing every agent that is running right now, as capsules. - A glanceable list of background runs, approvals and handoffs that updates as they change. ## When not to use - Every agent with its detail and history: use Agent Fleet (https://knowns-ui.com/docs/agent-fleet) instead - A single capsule: use Agent Activities (https://knowns-ui.com/docs/agent-activities) instead ## Install ```bash npx knowns-ui@latest add activity-stack ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/activity-stack ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, agent-activities, animated-number, button, live-activity, motion, progress, spinner ## Files - components/ui/knowns/blocks/agents/activity-stack.tsx ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props items, max, expandedId / defaultExpandedId / onExpandedChange, tone, dismissAfterMs / onDismiss, label, pauseOnInteract, announce (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Activity Stack to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Several live agent activities in one place: a stack of capsules with the newest on top, one open at a time, a +N chip past the first few, and a finished capsule that dims and leaves. Docs: https://knowns-ui.com/docs/activity-stack 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add activity-stack ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - The corner of your app showing every agent that is running right now, as capsules. - A glanceable list of background runs, approvals and handoffs that updates as they change. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/activity-stack#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Agent Activities (https://knowns-ui.com/docs/agent-activities): The six capsules the items pick from. - Live Activity (https://knowns-ui.com/docs/live-activity): The shell they share. - Agent Fleet (https://knowns-ui.com/docs/agent-fleet): When you need every agent with detail, not a glance. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "activity-stack" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Activities (agent-activities) Pro · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-activities Glanceable capsules for a running agent, built on live-activity: run progress through Plan, Tools and Answer with Approve and Chat, an ETA with a mini agent graph, a budget as thin ticks, a budget-left ring, a voice agent's waveform with tokens per second, and a handoff countdown. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - A run in the corner of your app: its stage, its ETA or its budget, with Approve when it needs a person. - A voice agent on a call, or a handoff counting down to another agent. ## When not to use - Many agents at once with their detail: use Agent Fleet (https://knowns-ui.com/docs/agent-fleet) instead - Every step of a run with timings: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead - The bare capsule for your own content: use Live Activity (https://knowns-ui.com/docs/live-activity) instead ## Install ```bash npx knowns-ui@latest add agent-activities ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-activities ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, animated-number, avatar, button, live-activity, motion ## Files - components/ui/knowns/agent-activities/agent-activities.tsx - components/ui/knowns/agent-activities/activity-math.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props agent, RunProgressActivity, EtaActivity, BudgetTicksActivity, BudgetRingActivity, VoiceActivity, HandoffActivity, MiniGraph / Waveform / BudgetRing (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Activities to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Six capsules for agents that run while a person does something else: run progress with Approve and Chat, an ETA with a mini graph, a budget as thin ticks, a budget-left ring, a voice agent and a handoff. Each is the Live Activity shell with the right pieces inside. Docs: https://knowns-ui.com/docs/agent-activities 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-activities ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A run in the corner of your app: its stage, its ETA or its budget, with Approve when it needs a person. - A voice agent on a call, or a handoff counting down to another agent. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-activities#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Live Activity (https://knowns-ui.com/docs/live-activity): The shell every capsule here is built on. - Animated number (https://knowns-ui.com/docs/animated-number): Rolls the ETA, percent and tokens per second. - Share bar (https://knowns-ui.com/docs/share-bar): Source of the thin tick style. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-activities" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Avatar (agent-avatar) Pro · blocks / Illustrations · Docs: https://knowns-ui.com/docs/agent-avatar An expressive agent character with idle, listening, thinking and speaking states, as a pebble head or one of three clouds (puffs, soft, flat) with pill eyes: raymarched in WebGL2, amplitude-driven listening and speaking, blinks and pointer follow, with a 2D canvas fallback. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Voice or call screens where the agent needs a face: listening, thinking and speaking read at a glance. - A friendly presence in onboarding, empty states or an assistant panel. - Small avatars in chat headers and lists; below 72 px it switches to a simpler 2D face. ## When not to use - An abstract, faceless voice indicator: use Voice Orb (https://knowns-ui.com/docs/voice-orb) instead - Inline thinking in a text chat: use Thinking State (https://knowns-ui.com/docs/thinking-state) instead - As the only status. Keep the caption or live region so the state can be read ## Install ```bash npx knowns-ui@latest add agent-avatar ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-avatar ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, illustrations-core, voice-orb ## Files - components/ui/knowns/illustrations/agent-avatar.tsx - components/ui/knowns/illustrations/agent-avatar-2d.ts - components/ui/knowns/illustrations/agent-avatar-gl.ts - components/ui/knowns/illustrations/agent-avatar-math.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props state, shape, cloud, eyes, amplitude, size, hue / accent, followPointer, tone, renderer, label / caption, paused / onReady, placeholder, AvatarSilhouette, Motion (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Avatar to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A face for your agent: a soft glass head, or a cloud, with glowing eyes that blinks, follows the pointer, leans in while listening, swirls while thinking and speaks with the voice. WebGL2 with a 2D fallback, no libraries. Docs: https://knowns-ui.com/docs/agent-avatar 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-avatar ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Voice or call screens where the agent needs a face: listening, thinking and speaking read at a glance. - A friendly presence in onboarding, empty states or an assistant panel. - Small avatars in chat headers and lists; below 72 px it switches to a simpler 2D face. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-avatar#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-avatar" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Board (agent-board) Pro · blocks / Operations · Docs: https://knowns-ui.com/docs/agent-board A run as a kanban board: agent tasks move through Running, Needs review and Done, with approvals on the card. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Showing a run's tasks as columns (Running, Needs review, Done) with approvals on the card. - Teams that already think in boards and want agents' work in the same shape. ## When not to use - A general task board for people, with WIP limits and swimlanes: use Kanban Board (https://knowns-ui.com/docs/kanban-board) instead - Timing and nesting of calls: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead ## Install ```bash npx knowns-ui@latest add agent-board ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-board ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, badge, button, kanban-board, page-header, spinner, task-detail, tool-call-card ## Files - components/ui/knowns/kanban/agent-board.tsx - components/ui/knowns/kanban/agent-board-cards.tsx - components/ui/knowns/kanban/agent-board-map.ts - components/ui/knowns/kanban/agent-task-detail.tsx ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props run, cards / defaultCards / onCardsChange, people, columns, hideEmpty, failedColumn, expectedDuration, onApprove / onDeny, onCardOpen / detail, onRetry / onOpenInRun, summary / surface / columnMinWidth, onAddCard, groupBy / defaultGroupBy / onGroupByChange, maxDone, title / actions (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Board to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The run as a board. Agent tasks move themselves from Running to Needs review to Done; approve right on the card, and keep your own cards alongside them. Docs: https://knowns-ui.com/docs/agent-board 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-board ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Showing a run's tasks as columns (Running, Needs review, Done) with approvals on the card. - Teams that already think in boards and want agents' work in the same shape. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-board#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-board" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Builder (agent-builder) Pro · blocks / Operations · Docs: https://knowns-ui.com/docs/agent-builder Set up one agent on a card: inline name and version, model, instructions with a character count, switches for what it may use, each with a note on what it allows and an icon slot, knowledge files with upload progress, and a Configure / Test switch. Test is a simulated chat. Ahead of Publish: what changed since the live version, sample prompts with pass or fail, and pending, done and retry states. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Letting a person set up one agent: model, instructions, abilities and knowledge, then test it in a simulation first. - A review step ahead of Publish that shows what changed since the live version and runs a few sample prompts. ## When not to use - Wiring many steps, triggers and conditions: use Workflow Builder (https://knowns-ui.com/docs/workflow-builder) instead - Pass and fail results for a whole test suite: use Eval Suite (https://knowns-ui.com/docs/eval-suite) instead - Managing only the files an agent searches: use Knowledge Sources (https://knowns-ui.com/docs/knowledge-sources) instead ## Install ```bash npx knowns-ui@latest add agent-builder ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-builder ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, badge, button, model-picker, progress, segmented-control, switch, textarea ## Files - components/ui/knowns/blocks/agent-builder/agent-builder.tsx - components/ui/knowns/blocks/agent-builder/agent-builder-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props config / defaultConfig / onConfigChange, published / version, models, tools, limits, onUpload / accept, onTest / samplePrompts, checks / onCheck / evalHref, onPublish, Motion, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Builder to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: One card to configure, test and publish an agent. Name and version, model, instructions, tools with permission notes, knowledge files, a simulated test chat, what changed since the live version and a check before Publish. Docs: https://knowns-ui.com/docs/agent-builder 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-builder ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Letting a person set up one agent: model, instructions, abilities and knowledge, then test it in a simulation first. - A review step ahead of Publish that shows what changed since the live version and runs a few sample prompts. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-builder#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-builder" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Checkpoints (agent-checkpoints) Pro · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-checkpoints The restore points an agent saved during a run: the step that made each one, the files it changed with +/- counts, a short summary, and the cost and time so far. Pick two to compare them with the diff, restore to one after a question that shows what will be undone (and can be undone again), and watch the live run add new ones at the top without moving the reader. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Going back to a point in an agent run that was fine, after a later step went wrong, and being told what that will undo first. - Reviewing what each step of a long coding or ops run changed, and comparing the state at two points in it. ## When not to use - Versions of a document, written and published by people: use Revision History (https://knowns-ui.com/docs/revision-history) instead - The git branches an agent worked on and how they split and merge: use Branch Graph (https://knowns-ui.com/docs/branch-graph) instead - Where a run spent its time, step by step: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead ## Install ```bash npx knowns-ui@latest add agent-checkpoints ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-checkpoints ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, badge, button, change-summary, inline-diff, motion ## Files - components/ui/knowns/agent-checkpoints/agent-checkpoints.tsx - components/ui/knowns/agent-checkpoints/agent-checkpoints-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props checkpoints, current / onCurrentChange, onRestore, compared / defaultCompared / onComparedChange, open / defaultOpen / onOpenChange, formatCost, height, live, title / headingLevel, Restore, Compare, Live run, Keyboard, Motion, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Checkpoints to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The restore points an agent saved during a run. Each shows the step that made it, the files it changed, a short summary, and the cost and time so far. Pick two to compare them, restore to one after a question that shows what will be undone, and undo the restore. A live run adds checkpoints at the top without moving the reader. Docs: https://knowns-ui.com/docs/agent-checkpoints 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-checkpoints ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Going back to a point in an agent run that was fine, after a later step went wrong, and being told what that will undo first. - Reviewing what each step of a long coding or ops run changed, and comparing the state at two points in it. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-checkpoints#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-checkpoints" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Cursors (agent-cursors) Free · blocks / Agents · Docs: https://knowns-ui.com/docs/agent-cursors Agents editing a document like multiplayer teammates: coloured live pointers with name, action and spend, suggestions typed in as tracked changes with accept, reject and Accept all, image resize, code edits, margin comments with a typing indicator, and a Table tab. ## When to use - Agents that edit a document, spec or table while people watch, where it matters who changed what. - Keeping every agent edit as a suggestion until a person accepts it, one by one or all at once. - Showing several agents at work in one place, each with its own colour, task and spend. ## When not to use - A plain before and after of one file or a code change: use Inline Diff (https://knowns-ui.com/docs/diff) instead - Following when each call ran and how long it took: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead - Agents that never touch a shared document: show their progress instead: use Agent Lanes (https://knowns-ui.com/docs/agent-lanes) instead ## Install ```bash npx knowns-ui@latest add agent-cursors ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-cursors.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, button, segmented-control ## Files - components/ui/knowns/agent-cursors/agent-cursors.tsx - components/ui/knowns/agent-cursors/cursor-parts.tsx - components/ui/knowns/agent-cursors/cursors-model.ts ## Usage ```tsx import { AgentCursors } from "@/components/ui/knowns/agent-cursors/agent-cursors"; // Agents (label, model, spend, activity) come from the run; the document is yours. applyToDoc(s)} onReject={(s) => dismiss(s)} /> ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | run | AgentRun | - | Agents with label, model, spend, state and activity. Each gets a colour from the house palette, ordered so pointers next to each other differ. | | actors | Actor[] | [] | Plain data instead of a run. | | doc | CursorDoc | - | { path?, blocks }. Blocks: heading (level 1 or 2), paragraph, bullet, code, image { alt, width, height, src?, caption? }. | | table | CursorTable | - | { columns, rows: { id, cells }[] } adds a Table tab. Cell ids are row.id + ":" + column index. | | suggestions | Suggestion[] | [] | Text: { id, agentId, blockId, range: [start, end], insert } on the original text. Resize: { id, agentId, blockId, kind: "resize", width }. | | comments | CursorComment[] | [] | { id, agentId, blockId, text, at? }, shown in the rail beside their block. | | presence | Record | {} | { target?, action?, away? }. target is a block, cell, suggestion or comment id. While an agent types, its pointer follows the caret. | | onAccept / onReject | (s) => void | - | A suggestion was accepted or rejected. The view applies it with a short highlight; update your document to keep it. | | onAcceptAll | (accepted) => void | - | Accept all, with the suggestions it took. | | tab / defaultTab / onTabChange | "doc" \| "table" | "doc" | Controlled or uncontrolled tab. | | typing | boolean | true | Type changes in letter by letter. Off (or reduced motion) shows them whole. | | typeSpeed | number | 34 | ms per character. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Cursors to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Agents editing a document like teammates in a shared editor: live pointers with names, what they are doing and what they spent, suggestions typed in as tracked changes, images they resize, code they fix and comments beside the page. Docs: https://knowns-ui.com/docs/agent-cursors 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-cursors ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Agents that edit a document, spec or table while people watch, where it matters who changed what. - Keeping every agent edit as a suggestion until a person accepts it, one by one or all at once. - Showing several agents at work in one place, each with its own colour, task and spend. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `run` (AgentRun): Agents with label, model, spend, state and activity. Each gets a colour from the house palette, ordered so pointers next to each other differ. - `doc` (CursorDoc): { path?, blocks }. Blocks: heading (level 1 or 2), paragraph, bullet, code, image { alt, width, height, src?, caption? }. - `table` (CursorTable): { columns, rows: { id, cells }[] } adds a Table tab. Cell ids are row.id + ":" + column index. Handle these by calling my own mutations or setters: - `onAcceptAll` ((accepted) => void): Accept all, with the suggestions it took. Optional, leave the default unless I need otherwise: `actors`, `suggestions`, `comments`, `presence`, `onAccept / onReject`, `tab / defaultTab / onTabChange`, `typing`, `typeSpeed`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Segmented control (https://knowns-ui.com/docs/segmented-control): Installed with it. Switches between the Doc and Table tabs. - Button (https://knowns-ui.com/docs/button): Installed with it. Accept all is its button. - Agent plan (https://knowns-ui.com/docs/agent-plan): Pairs with it: the plan says what the agents mean to change, the cursors show the change. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-cursors" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Fleet (agent-fleet) Free · blocks / Operations · Docs: https://knowns-ui.com/docs/agent-fleet Many agents at a glance: a row (or card) per main agent with model, task, state, spend and clock, totals on top, and a sub-agent tree that unfolds under it with approve and retry right in it. ## When to use - An overview of many main agents: model, task, tools, state, spend and clock per card, with totals on top. - Approving or retrying sub-agents without leaving the overview. ## When not to use - Following one agent closely: use Agent Monitor (https://knowns-ui.com/docs/agent-monitor) instead - Agents passing one piece of work along in order: use Agent Handoff (https://knowns-ui.com/docs/agent-handoff) instead ## Install ```bash npx knowns-ui@latest add agent-fleet ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-fleet.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-floating, knowns-icons, button, dialog, motion, status-dot, toggle-group ## Files - components/ui/knowns/agent-fleet/agent-fleet.tsx - components/ui/knowns/agent-fleet/fleet-utils.ts ## Usage ```tsx import { AgentFleet } from "@/components/ui/knowns/agent-fleet/agent-fleet"; // One row per run: the root agent is the row, every other agent is in its tree (layout="grid" for cards) { // approve / reject already emitted approval.resolve on agent.source.run if (action === "retry") restart(agent.source!.actor); }} /> // Or plain data ``` ```tsx // Cards side by side; the open card's tree gets a row of its own under that card's row. ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | runs | AgentRun[] | - | One row (or card) per run. The root agent is the row; other agents nest under the agent that first called them. Tasks become steps, pending approvals make an agent Needs you. | | agents | FleetAgent[] | - | Or plain data: { id, name, model?, icon?, state, task?, tools?, spend?, startedAt?, endedAt?, request?, error?, steps?, children? }. Shown before run cards. | | state | "queued" \| "running" \| "waiting" \| "done" \| "failed" \| "stopped" | - | Spelled out as Queued, Running, Needs you, Done, Failed, Stopped (queued and stopped are muted). | | layout | "list" \| "grid" | "list" | List: one agent per row in a single column (mark, name and model, current task, status, needs you, spend, clock; the numbers line up). From 520 to 820px wide the clock is left out and needs you goes under the task; below 520px a row takes two lines. Grid: cards side by side, as many columns as there are agents up to the width. | | open / defaultOpen / onOpenChange | string \| null | null | Id of the main agent whose sub-agents are open, one at a time. List: the tree unfolds right under its row, hanging from the row's mark by guide lines drawn in each row's own box. Grid: its own row under that card's row (the other cards dim), with connectors that grow from the parent into each child. | | Depth | - | - | Children and grandchildren show inline; deeper agents collapse into a "N sub-agents ›" chip (amber / red when something below needs you or failed). The chip, Enter or → drills in, with a breadcrumb; ← or Backspace goes back up. "Expand all" shows up to 4 levels. | | Tasks | - | - | Click a sub-agent (or Space / Enter on it) for a Tasks popover under the card: tool, title, duration, live running and failed rows, Approve / Reject for a waiting one. A bottom sheet below 640px. | | onSelect | (agent) => void | - | A card was clicked. | | onResolve | (agent, action) => void | - | Shows Approve / Reject on waiting agents and Retry / Dismiss on failed ones. For run agents, approve / reject also emit approval.resolve. | | density | "compact" \| "comfortable" | "compact" | Compact: 14px titles, 14px padding, cards at least 248px wide, so 3-4 a row on a wide page, 2 at tablet width and 1 on a phone. Comfortable: 16px titles, 20px padding, cards from 320px. | | now | number | ticks | Clock time in ms. By default it ticks every second while anything is live. | | formatCost | (usd) => string | formatUsd | Card spend (agent + sub-agents) and the totals. | | title / className | ReactNode / string | "Fleet" / - | Heading above the totals bar. | | aria-label | string | the title | The region's name for screen readers. With two fleets on one page, give each its own. | | Summary | - | - | One quiet line: agents / sub-agents, running, needs you, cost (whole trees, any depth). Running and needs-you changes are announced politely. | | Keyboard | - | - | Main rows and cards are buttons (aria-expanded, aria-controls); in the list ↑ ↓ Home End move between rows. The tree (role=tree, real aria-level): ↑ ↓ Home End move, → drills into a collapsed agent, ← goes to the parent or back up, Enter / Space opens Tasks, Esc closes and returns to the card. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Fleet to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Every main agent at a glance: what it is working on, its tools, spend and clock, and how its sub-agents are doing. Open one to see its tree, and approve or retry right there. Docs: https://knowns-ui.com/docs/agent-fleet 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-fleet ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - An overview of many main agents: model, task, tools, state, spend and clock per card, with totals on top. - Approving or retrying sub-agents without leaving the overview. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `runs` (AgentRun[]): One row (or card) per run. The root agent is the row; other agents nest under the agent that first called them. Tasks become steps, pending approvals make an agent Needs you. - `agents` (FleetAgent[]): Or plain data: { id, name, model?, icon?, state, task?, tools?, spend?, startedAt?, endedAt?, request?, error?, steps?, children? }. Shown before run cards. - `state` ("queued" | "running" | "waiting" | "done" | "failed" | "stopped"): Spelled out as Queued, Running, Needs you, Done, Failed, Stopped (queued and stopped are muted). - `Depth` (-): Children and grandchildren show inline; deeper agents collapse into a "N sub-agents ›" chip (amber / red when something below needs you or failed). The chip, Enter or → drills in, with a breadcrumb; ← or Backspace goes back up. "Expand all" shows up to 4 levels. - `Tasks` (-): Click a sub-agent (or Space / Enter on it) for a Tasks popover under the card: tool, title, duration, live running and failed rows, Approve / Reject for a waiting one. A bottom sheet below 640px. - `Summary` (-): One quiet line: agents / sub-agents, running, needs you, cost (whole trees, any depth). Running and needs-you changes are announced politely. - `Keyboard` (-): Main rows and cards are buttons (aria-expanded, aria-controls); in the list ↑ ↓ Home End move between rows. The tree (role=tree, real aria-level): ↑ ↓ Home End move, → drills into a collapsed agent, ← goes to the parent or back up, Enter / Space opens Tasks, Esc closes and returns to the card. Handle these by calling my own mutations or setters: - `onSelect` ((agent) => void): A card was clicked. - `onResolve` ((agent, action) => void): Shows Approve / Reject on waiting agents and Retry / Dismiss on failed ones. For run agents, approve / reject also emit approval.resolve. Optional, leave the default unless I need otherwise: `layout`, `open / defaultOpen / onOpenChange`, `density`, `now`, `formatCost`, `title / className`, `aria-label`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Status dot (https://knowns-ui.com/docs/status-dot): Installed with it. Marks the state of each agent. - Dialog (https://knowns-ui.com/docs/dialog): Installed with it. Holds the approval answer and the tasks sheet on small screens. - Toggle group (https://knowns-ui.com/docs/toggle-group): Installed with it. Its Toggle sits on the expand control. - Agent monitor (https://knowns-ui.com/docs/agent-monitor): Pairs with it: pick an agent in the fleet, then follow its steps in the monitor. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-fleet" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Activity Globe (agent-globe) Pro · blocks / Analytics & Maps · Docs: https://knowns-ui.com/docs/agent-globe A dotted globe with arcs for agent runs, tool calls and hand-offs between regions, beside live runs, spend and tokens per region. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Showing where runs, tool calls and hand-offs happen across regions, beside live runs, spend and tokens per region. - Status or landing pages for products that run agents in several regions. ## When not to use - Single-region products: the globe adds motion without information - Exact numbers per region: a table is easier to compare: use Data Table (https://knowns-ui.com/docs/data-table) instead ## Install ```bash npx knowns-ui@latest add agent-globe ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-globe ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, illustrations-core, motion, number-ticker, toggle-group ## Files - components/ui/knowns/blocks/agent-globe/agent-globe.tsx - components/ui/knowns/blocks/agent-globe/agent-activity-globe.tsx - components/ui/knowns/blocks/agent-globe/globe-math.ts - components/ui/knowns/blocks/agent-globe/globe-land.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props regions, stats, events, ranges / range / onRangeChange, title / description, paused, AgentGlobe, Interaction, Motion, Data (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Activity Globe to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A dotted globe with an arc for every run, tool call and hand-off between regions, next to live runs, spend and tokens per region. Docs: https://knowns-ui.com/docs/agent-globe 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-globe ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Showing where runs, tool calls and hand-offs happen across regions, beside live runs, spend and tokens per region. - Status or landing pages for products that run agents in several regions. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-globe#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-globe" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Graph (agent-graph) Free · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-graph Live graph of agents and the tools they call: tree, horizontal and center layouts, light streaks per call, detail popover. ## When to use - Showing which agents and tools a run involves and how they connect, while calls are happening. - An overview panel where the shape of the work matters more than exact timings. - Runs with a handful to a few dozen nodes, where a click on a node should open its details. ## When not to use - You need to see when each call started and how long it took: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead - You want who spawned whom as an org chart, with the cost of each branch: use Agent Tree (https://knowns-ui.com/docs/agent-tree) instead - A decorative hero graph with no real run behind it: use Run Pulse (https://knowns-ui.com/docs/run-pulse) instead ## Install ```bash npx knowns-ui@latest add agent-graph ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-graph.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, badge, button, motion ## Files - components/ui/knowns/agent-graph/agent-graph.tsx - components/ui/knowns/agent-graph/detail-card.tsx - components/ui/knowns/agent-graph/frame.ts - components/ui/knowns/agent-graph/layout.ts - components/ui/knowns/agent-graph/pulse-layer.tsx - components/ui/knowns/agent-graph/radial.ts - components/ui/knowns/agent-graph/routing.ts - components/ui/knowns/agent-graph/tree.ts ## Usage ```tsx import { AgentGraph } from "@/components/ui/knowns/agent-graph/agent-graph"; console.log(a?.label)} /> // Reveal the graph from You outward on first layout (and after a reset); replay it with the ref. const graph = useRef(null); // A fixed frame (e.g. a dashboard card): fits the box, scales down if it must; ⌘/Ctrl + wheel or pinch to // zoom, drag to pan, double-click or "Fit" to reset. ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | run | AgentRun | - | Read actors, spans and links from a run. Takes precedence over the data props. | | actors / spans / links | Actor[] / Span[] / Link[] | [] | Plain data instead of a run. | | layout | "tree" \| "horizontal" \| "center" \| "radial" | "tree" | How the graph is arranged. Radial: lead in the middle, You just above it, agents on an inner ring, tools packed just outside it beside their agent (elliptical rings shaped like a fixed frame); newcomers take the closest free spot. | | intro / introSpeed | "grow" \| "fade" \| false / number | false / 180 | How the graph appears on first layout, after a reset or a new run. Grow reveals nodes from You outward: each link draws into its child, then the child pops in, siblings staggered, the whole reveal capped near 2.5s. Streaks wait for both ends. Off with reduced motion. | | ref | Ref | - | replayIntro() plays the intro again. | | selectedId | string \| null | - | Controlled selection. Leave undefined to let the graph manage it. | | onActorSelect | (actor \| null) => void | - | Fires when the detail popover opens or closes. | | renderDetail | (actor, spans) => ReactNode | - | Replace the body of the detail popover. | | header | ReactNode \| false | "Agent graph" | Title of the header bar, or false to hide it. | | activityWindow | number | 20000 | Window in ms of calls counted toward the calls/min readouts. | | height / width | number | fits / container | A fixed frame: the layout targets this box; if it still doesn't fit, the canvas scales down to fit (no scrollbars). | | fit | "contain" \| "none" | "contain" | With a fixed height: scale to fit, or the old sideways scroll. | | zoomControls | boolean \| "bottom-right" \| "top-right" \| "bottom-left" | true ("bottom-right") in a frame | Zoom out / in / Fit in a corner; fitting keeps the graph clear of them, and they fade back while the pointer is on the canvas. ⌘/Ctrl + wheel or pinch zooms around the cursor, drag pans, double-click fits. | | touch | "pan" \| "scroll" | "pan" | Touch in a frame. Pan: one finger pans, two pinch. Scroll: swipes scroll the page and the graph takes taps only. Use it in a long page, like a landing hero. | | clock | number | Date.now() | Clock for rates; without it the graph ticks every second. | | formatSpend | (n) => string | $0.00 | How spend is shown. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Graph to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Agents and the tools they call as a live network. Each call travels as a light streak along the link, and the target lights up when it lands. Links stay hairline-thin; only the streak shows traffic. Docs: https://knowns-ui.com/docs/agent-graph 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-graph ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Showing which agents and tools a run involves and how they connect, while calls are happening. - An overview panel where the shape of the work matters more than exact timings. - Runs with a handful to a few dozen nodes, where a click on a node should open its details. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `run` (AgentRun): Read actors, spans and links from a run. Takes precedence over the data props. - `selectedId` (string | null): Controlled selection. Leave undefined to let the graph manage it. Handle these by calling my own mutations or setters: - `onActorSelect` ((actor | null) => void): Fires when the detail popover opens or closes. Optional, leave the default unless I need otherwise: `actors / spans / links`, `layout`, `intro / introSpeed`, `ref`, `renderDetail`, `header`, `activityWindow`, `height / width`, `fit`, `zoomControls`, `touch`, `clock`, and 1 more (see the props table). If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Badge (https://knowns-ui.com/docs/badge): Installed with it. Shows counts and state chips inside the graph. - Button (https://knowns-ui.com/docs/button): Installed with it. The zoom and fit controls and the card's close button are its buttons. - Agent lanes (https://knowns-ui.com/docs/agent-lanes): Pairs with it: the graph shows who talks to whom, the lanes show when. - Trace waterfall (https://knowns-ui.com/docs/trace-waterfall): Pairs with it: click an agent here, then read its calls in time order there. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-graph" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Handoff (agent-handoff) Free · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-handoff A relay of agents: who handed what to whom, with the context passed along, lost items, a light along the rail on each new hand-off, and forward reassignment by drag or keyboard. ## When to use - Pipelines where work passes from agent to agent and you need to show what context went along and what was lost. - Letting a person reassign the next step by drag or keyboard. ## When not to use - Agents working in parallel rather than in sequence: use Agent Lanes (https://knowns-ui.com/docs/agent-lanes) instead - A generic multi-step form or wizard: use Stepper (https://knowns-ui.com/docs/stepper) instead ## Install ```bash npx knowns-ui@latest add agent-handoff ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-handoff.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, button, motion, spinner, tooltip ## Files - components/ui/knowns/agent-handoff/agent-handoff.tsx - components/ui/knowns/agent-handoff/handoff-map.ts ## Usage ```tsx import { AgentHandoff } from "@/components/ui/knowns/agent-handoff/agent-handoff"; // Describe your agents once run.emit({ type: "actor", actor: { id: "writer", type: "agent", label: "Writer", model: "GPT-5", description: "Turns the brief into a first draft in the team's voice." } }); // End a task with handoffTo and what goes along with it run.emit({ type: "task.end", id: "t2", handoffTo: "reviewer", handoffItems: [ { id: "draft", label: "Draft v2", kind: "file" }, { id: "thread", label: "#eng-internal thread", kind: "link", lost: { reason: "Private channel" } }, ], }); // "Add back" emits { type: "task.item.restore", id: "t2", item: "thread" } to the run ({ researcher: "Researching", writer: "Drafting" })[agent]} onAssign={(handoff, agent) => reassign(handoff.task, agent)} /> ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | run | AgentRun | - | Agents (with description, model, spend), tasks and tool calls; ended tasks with handoffTo become handoffs. | | actors / tasks / approvals / spans | arrays | [] | Plain data instead of a run. | | handoffs | Handoff[] | from tasks | { id, from, to, title, summary?, at, items, task? } - richer data; you then own reassigning and restoring. | | items | (task) => HandoffItem[] \| undefined | task.handoffItems | Context passed with a handoff, { id, label, kind?: file \| note \| data \| link, lost?: { reason } }. | | order | string[] | first appearance | Relay order of agent ids; the rest follow. | | verb | (agent, task) => string \| undefined | "Working" | Short word next to an agent's current task, e.g. “Drafting”. | | onAssign | (handoff, agent) => void | - | A handoff was moved onto a later agent (forward only). | | onRestore | (handoff, item) => void | emit task.item.restore | “Add back” on a lost item. With a run the event is emitted for you; this is called as well. | | onOpen | (handoff) => void | - | Enter on a handoff card. | | laneHeight | number | 300 | Max height of a lane before it scrolls; the bottom fades while there's more. | | title | ReactNode \| false | false | Optional header with a handoff count. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Handoff to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The run as a relay: which agent handed what to whom, the context that went along and what got lost on the way. Each new hand-off sends a light down the rail; drag a card forward to give it to someone later. Docs: https://knowns-ui.com/docs/agent-handoff 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-handoff ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Pipelines where work passes from agent to agent and you need to show what context went along and what was lost. - Letting a person reassign the next step by drag or keyboard. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `run` (AgentRun): Agents (with description, model, spend), tasks and tool calls; ended tasks with handoffTo become handoffs. Handle these by calling my own mutations or setters: - `onAssign` ((handoff, agent) => void): A handoff was moved onto a later agent (forward only). - `onRestore` ((handoff, item) => void): “Add back” on a lost item. With a run the event is emitted for you; this is called as well. - `onOpen` ((handoff) => void): Enter on a handoff card. Optional, leave the default unless I need otherwise: `actors / tasks / approvals / spans`, `handoffs`, `items`, `order`, `verb`, `laneHeight`, `title`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Spinner (https://knowns-ui.com/docs/spinner): Installed with it. Marks an agent that is still working on a handed task. - Tooltip (https://knowns-ui.com/docs/tooltip): Installed with it. Explains why a context item was lost. - Agent lanes (https://knowns-ui.com/docs/agent-lanes): Pairs with it: the lanes show hand-offs in time, this shows what each one carried. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-handoff" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Health (agent-health) Pro · blocks / Analytics & Maps · Docs: https://knowns-ui.com/docs/agent-health The health of one agent or deployment on a card: a 0-100 arc gauge with the change since the last period and a countdown to the next milestone, five signals with sparklines and a small status mark, an AI summary written from those signals (thinking, streaming, stop, retry through your own summarize callback) and one recommended action with pending, done and retry states. A period switch animates the gauge and every sparkline. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - A page for one agent or deployment where someone needs to know at a glance if it is fine and what to do about it. - A review of an agent after a change, with the signals that moved and one recommended step such as a rollback. ## When not to use - Many agents over time in one view: use Agent Fleet (https://knowns-ui.com/docs/agent-fleet) instead - Spend and quota against a plan: use Usage Meter (https://knowns-ui.com/docs/usage-meter) instead - Pass and fail results for an eval run: use Eval Suite (https://knowns-ui.com/docs/eval-suite) instead ## Install ```bash npx knowns-ui@latest add agent-health ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-health ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, badge, button, chart, motion, progress, segmented-control, thinking-state ## Files - components/ui/knowns/blocks/analytics/agent-health.tsx - components/ui/knowns/blocks/analytics/agent-health-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props agent, periods, signals, period / defaultPeriod / onPeriodChange, summarize, model, onAction / onSecondary, milestone, asOf, cuts, Motion, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Health to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: One card that answers whether an agent is OK and what to do next. A 0-100 gauge with its change since the last period and a countdown to the next milestone, five signals with sparklines, a summary written from them by your model, and a single recommended action. Docs: https://knowns-ui.com/docs/agent-health 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-health ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A page for one agent or deployment where someone needs to know at a glance if it is fine and what to do about it. - A review of an agent after a change, with the signals that moved and one recommended step such as a rollback. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-health#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-health" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Inbox (agent-inbox) Pro · blocks / Review · Docs: https://knowns-ui.com/docs/agent-inbox One queue of everything agents are waiting on a person for: approvals, questions, diffs to review and failed runs, plus any kind you render yourself. List and detail panes, filters and groups, J/K/Enter/A/D/E/X keys, bulk actions, optimistic resolves with undo and a restore when the call fails. Controlled: you pass the items and answer onResolve. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - One place for everything agents are waiting on a person for: approvals, questions, diffs to review and failed runs. - A review queue where the person works through items from the keyboard, in bulk, with an undo. ## When not to use - Glancing at what is running right now: use Activity Stack (https://knowns-ui.com/docs/activity-stack) instead - One request to approve inside a chat or a run: use Approval Prompt (https://knowns-ui.com/docs/approval-prompt) instead - Every agent with its detail and history: use Agent Fleet (https://knowns-ui.com/docs/agent-fleet) instead ## Install ```bash npx knowns-ui@latest add agent-inbox ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-inbox ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, approval-prompt, button, empty, inline-diff, kbd, motion, radio-group, select, sheet, textarea, tool-call-card ## Files - components/ui/knowns/blocks/agents/agent-inbox.tsx - components/ui/knowns/blocks/agents/agent-inbox-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props items, onResolve, onRead, renderItem, defaultGroupBy, undoMs, now, empty, Item kinds, inboxFromApprovals / decisionOf (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Inbox to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: One queue of everything agents are waiting on a person for. A list on the left, the open item on the right, keys for the common answers, bulk actions, and an undo before anything is sent. Controlled: you pass the items and answer onResolve. Docs: https://knowns-ui.com/docs/agent-inbox 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-inbox ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - One place for everything agents are waiting on a person for: approvals, questions, diffs to review and failed runs. - A review queue where the person works through items from the keyboard, in bulk, with an undo. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-inbox#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Approval Prompt (https://knowns-ui.com/docs/approval-prompt): Draws the approval items and their decision buttons. - Inline Diff (https://knowns-ui.com/docs/inline-diff): Draws the review items. - Tool Call Card (https://knowns-ui.com/docs/tool-call-card): Draws the failed runs. - Activity Stack (https://knowns-ui.com/docs/activity-stack): A glance at what runs; the inbox is what waits for you. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-inbox" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Lanes (agent-lanes) Free · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-lanes Where every agent is right now: a lane per agent, tasks growing into now, hand-offs and approvals on the block. ## When to use - Following several agents working in parallel, one lane each, as their tasks grow toward now. - Spotting where agents wait on each other: hand-offs and approvals show up as blocks in the lane. ## When not to use - Debugging one slow or failing call with its input and output: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead - Moving work between stages like a task board: use Agent Board (https://knowns-ui.com/docs/agent-board) instead - A single agent: a lane chart with one row says little: use Agent Monitor (https://knowns-ui.com/docs/agent-monitor) instead ## Install ```bash npx knowns-ui@latest add agent-lanes ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-lanes.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, button ## Files - components/ui/knowns/agent-lanes/agent-lanes.tsx ## Usage ```tsx import { AgentLanes } from "@/components/ui/knowns/agent-lanes/agent-lanes"; // In your agents: run.emit({ type: "task.start", id: "t1", actor: "researcher", title: "Collect competitor pricing" }); run.emit({ type: "task.end", id: "t1", summary: "3 tiers each", handoffTo: "writer" }); ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | run | AgentRun | - | Read actors, tasks, spans and approvals from a run; decisions are emitted back to it. | | actors / tasks / spans / approvals | arrays | [] | Plain data instead of a run. | | window | number | 600000 | Visible time range in ms, ending now (10 minutes). | | selectedTaskId | string \| null | - | Highlights a block. | | onTaskSelect | (task) => void | - | Called when a block is opened. | | onDecision | (approval, decision) => void | - | Called when a waiting task is approved or denied. | | header | string \| false | "Agents" | Header title, or false to hide it. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Lanes to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Where every agent is right now: a lane per agent, one block per task growing into “now”, dotted hand-offs between agents, and approvals right on the block. Open a block to see what it did, or to approve it. Docs: https://knowns-ui.com/docs/agent-lanes 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-lanes ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Following several agents working in parallel, one lane each, as their tasks grow toward now. - Spotting where agents wait on each other: hand-offs and approvals show up as blocks in the lane. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `run` (AgentRun): Read actors, tasks, spans and approvals from a run; decisions are emitted back to it. - `selectedTaskId` (string | null): Highlights a block. Handle these by calling my own mutations or setters: - `onTaskSelect` ((task) => void): Called when a block is opened. - `onDecision` ((approval, decision) => void): Called when a waiting task is approved or denied. Optional, leave the default unless I need otherwise: `actors / tasks / spans / approvals`, `window`, `header`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Button (https://knowns-ui.com/docs/button): Installed with it. Approve and Deny in the block popover are its buttons. - Approval prompt (https://knowns-ui.com/docs/approval-prompt): Pairs with it: the lanes mark the waiting block, the prompt lists the request in full. - Agent graph (https://knowns-ui.com/docs/agent-graph): Pairs with it: the graph shows the links, the lanes show the same agents over time. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-lanes" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Launcher (agent-launcher) Pro · blocks / Agents · Docs: https://knowns-ui.com/docs/agent-launcher A launcher for an on-call agent: a dark glass composer card, centred over an image background, bare attach and dictation icons above it, and skill chips underneath that put their command in the box. Built on chat-composer. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - The first screen of an agent product: one box, a few profiles and the skills people run most, over a picture. - A social or launch frame that shows the composer as the hero. ## When not to use - The composer inside a chat thread: use Chat Composer (https://knowns-ui.com/docs/chat-composer) instead - A list of everything running: use Activity Stack (https://knowns-ui.com/docs/activity-stack) instead ## Install ```bash npx knowns-ui@latest add agent-launcher ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-launcher ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, chat-composer ## Files - components/ui/knowns/blocks/agents/agent-launcher.tsx ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props background, controls, bleed, identity, agents / defaultAgent, models / defaultModel / effort, skills, onSubmit / onAttach / onDictate (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Launcher to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A launcher for one agent: a dark glass composer centred over a picture, with profile and model menus, and skill chips underneath that put their command in the box. Docs: https://knowns-ui.com/docs/agent-launcher 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-launcher ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - The first screen of an agent product: one box, a few profiles and the skills people run most, over a picture. - A social or launch frame that shows the composer as the hero. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-launcher#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Chat Composer (https://knowns-ui.com/docs/chat-composer): The card is one, with agents, effort and skills turned on. - Dither Field (https://knowns-ui.com/docs/dither-field): A background for the picture. - Activity Stack (https://knowns-ui.com/docs/activity-stack): What is running once the first message is sent. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-launcher" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Loader (agent-loader) Free · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-loader A small inline loader for an agent run: one glyph per phase (thinking, searching, reading, writing, running a tool, waiting for you, done, failed), an optional label and an optional elapsed time. ## When to use - A one-line loader for an agent run in a chat bubble, a button, a table row, a toast or a footer. - Telling someone the agent is waiting on them, not working. ## When not to use - Showing the steps behind the work: use Thinking State (https://knowns-ui.com/docs/thinking-state) instead - A plain spinner with no phase: use Spinner (https://knowns-ui.com/docs/spinner) instead - Progress with a known end: use Progress (https://knowns-ui.com/docs/progress) instead ## Install ```bash npx knowns-ui@latest add agent-loader ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-loader.json ``` ## Dependencies - Registry (installed with it): knowns-core, motion, shimmer-text ## Files - components/ui/knowns/agent-loader/agent-loader.tsx - components/ui/knowns/agent-loader/agent-loader-utils.ts ## Usage ```tsx import { AgentLoader } from "@/components/ui/knowns/agent-loader/agent-loader"; ``` ```tsx {AGENT_PHASES.map((p) => )} ``` ```tsx const [phase, setPhase] = useState("tool"); ``` ```tsx
``` ```tsx ``` ```tsx ``` ```tsx ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | phase | "think" \| "search" \| "read" \| "write" \| "tool" \| "wait" \| "done" \| "error" | - | The step the run is in. Picks the glyph, its loop and its colour. | | label | string | a word for the phase | Text next to the glyph, e.g. "Searching the docs". Changing it settles the new text in. | | showLabel | boolean | true | false leaves just the glyph. A screen reader still hears the label. | | startedAt | number \| Date | - | When the run started. Shows the elapsed time and ticks it while the agent is busy. | | endedAt | number \| Date | - | When it ended. The time stops there; without it the time holds at the moment the run finished. | | elapsed | number | - | Seconds, if you track them yourself. Wins over startedAt. | | size | "sm" \| "md" \| "xl" | "sm" | 16px, 20px, or a 112px mark for a hero or a status panel. | | layout | "inline" \| "stack" | "inline" ("stack" for xl) | Label beside the glyph, or centred under it, the time beside the label. | | morph | boolean | true for xl | On a phase change, the old glyph twists out and the new one twists in (280ms, ease in-out) instead of the 120ms crossfade. | | tone | "accent" \| "neutral" | "accent" | Tint of a working glyph. Waiting (amber), done (green) and failed (red) always keep their status colour. | | shimmer | boolean | true | Sweep a light band through the label while the agent is busy. | | AgentLoaderMark | { phase, size?, tone?, morph? } | - | Just the glyph, for a button icon or a row. Decorative: pair it with text. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Loader to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A small inline loader for an agent run. One glyph for each phase (thinking, searching, reading, writing, running a tool, waiting for you, done, failed), a short label and an optional timer, small enough for a chat bubble, a button, a table row or a toast. Docs: https://knowns-ui.com/docs/agent-loader 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-loader ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A one-line loader for an agent run in a chat bubble, a button, a table row, a toast or a footer. - Telling someone the agent is waiting on them, not working. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `phase` ("think" | "search" | "read" | "write" | "tool" | "wait" | "done" | "error"): The step the run is in. Picks the glyph, its loop and its colour. - `startedAt` (number | Date): When the run started. Shows the elapsed time and ticks it while the agent is busy. - `endedAt` (number | Date): When it ended. The time stops there; without it the time holds at the moment the run finished. - `elapsed` (number): Seconds, if you track them yourself. Wins over startedAt. - `AgentLoaderMark` ({ phase, size?, tone?, morph? }): Just the glyph, for a button icon or a row. Decorative: pair it with text. Optional, leave the default unless I need otherwise: `label`, `showLabel`, `size`, `layout`, `morph`, `tone`, `shimmer`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Thinking State (https://knowns-ui.com/docs/thinking-state): The full panel of steps. Use the loader for the one-line version. - Shimmer Text (https://knowns-ui.com/docs/shimmer-text): The label's sweep while the agent is busy. - Tool Call Card (https://knowns-ui.com/docs/tool-call-card): The loader can head a card while its call runs. - Approval Prompt (https://knowns-ui.com/docs/approval-prompt): Pair the waiting phase with the prompt that asks. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-loader" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Memory (agent-memory) Pro · blocks / Agents · Docs: https://knowns-ui.com/docs/agent-memory What an agent remembers: search, scope filter, inline edit, pin, forget with undo, forget everything from one source, and why a memory was used. Full and compact variants. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Letting users see, correct and forget what an agent remembers about them or a project. - A side panel next to chat that shows the memories in play, with where they came from. ## When not to use - The context of a single conversation and how full it is: use Context Window (https://knowns-ui.com/docs/context-window) instead - A general searchable table of records: use Data Table (https://knowns-ui.com/docs/data-table) instead ## Install ```bash npx knowns-ui@latest add agent-memory ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-memory ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, badge, button, input, menu, popover, segmented-control ## Files - components/ui/knowns/agent-memory/agent-memory.tsx - components/ui/knowns/agent-memory/memory-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props items, onEdit, onPin, onForget, uses / useCount, variant, query / scope (+ on…Change), forgetDelayMs / now, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Memory to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: What an agent remembers about the user and the project, where each memory came from and which runs used it. Search, filter by scope, edit in place, pin, and forget one or a whole source with undo. A compact variant fits a side panel. Docs: https://knowns-ui.com/docs/agent-memory 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-memory ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Letting users see, correct and forget what an agent remembers about them or a project. - A side panel next to chat that shows the memories in play, with where they came from. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-memory#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-memory" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Monitor (agent-monitor) Free · blocks / Operations · Docs: https://knowns-ui.com/docs/agent-monitor One agent at work as a card: current step with a clock and cost, a time strip, finished steps with tool logos, the exact command when it needs your OK, and a folded bar. ## When to use - Watching one agent at work: current step with a clock and cost, recent steps, and the exact command when it needs your OK. - A side panel or card that folds into a small bar when the user looks elsewhere. ## When not to use - Many agents at a glance: use Agent Fleet (https://knowns-ui.com/docs/agent-fleet) instead - Detailed timing of every call: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead ## Install ```bash npx knowns-ui@latest add agent-monitor ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-monitor.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, button, kbd, motion, popover ## Files - components/ui/knowns/agent-monitor/agent-monitor.tsx - components/ui/knowns/agent-monitor/monitor-utils.ts ## Usage ```tsx import { AgentMonitor } from "@/components/ui/knowns/agent-monitor/agent-monitor"; // Your own data: steps with durations, the question, the outcome // Live: one actor of a Knowns run - tasks, tool calls, spend and approvals ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | state | "running" \| "paused" \| "waiting" \| "finished" \| "failed" \| "idle" | from run, else idle | Tag colour and what the well shows. waiting turns the well amber and the footer into Decline / Allow. | | agent | { name, role?, model?, icon? } | - | Header. model picks the provider logo (modelIcon); icon overrides it. | | steps | { id, label, kind?, tool?, icon?, state, since?, took?, detail?, output? }[] | [] | state: queued \| running \| done \| failed. Finished steps list newest first (3 rows, then scroll); every started step gets a bar in the time strip, width ∝ took. tool picks the brand logo, kind a glyph. | | current | { label, tool?, icon?, since? } | the running step | The live line in the well, with a ticking clock from since. | | since / until / pausedFor | epoch ms / epoch ms / ms | - | Run clock: (until ?? now) − since − pausedFor, shown as "Finished in 19s". While paused the clock and bars hold. | | cost | number \| string | - | Numbers go through formatUsd. Shimmers while running. | | ask | { title, command?, tool?, since? } | - | While waiting: the title and the exact command as inline code. since grows the amber wait bar. | | outcome / error | { added?, removed?, files?, note? } / ReactNode | - | Finished: "+1284 −316 · 42 files · Tagged v3.2.0". Failed: the error line. | | run / actor | AgentRun / string | - | Live from a run: the actor's tasks become steps (the tool it called most gives the logo), its open tool call is the current line, spend is the cost, a pending approval is the ask. Allow / Decline emit approval.resolve. Explicit props still win. | | onAllow / onDecline | () => void | - | Allow (⏎) and Decline (Esc) while the card has focus and is waiting - never global. Enter on another control in the card does that control's job. | | onPause / onResume / onCancel / onLog | () => void | - | Each button shows only when its handler is given. | | collapsed / defaultCollapsed / onCollapsedChange | boolean | false | Folds into a 40px bar: logo, name, state dot, the tools used, cost. Height animates by grid rows. | | a11y | role=group | - | Labelled by the agent's name; state changes and the ask are announced politely. Rows are buttons that open the step's info card; bars do the same with the mouse. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Monitor to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: One agent at work, as a card: its current step with a clock and the bill so far, a time strip and the finished steps with each tool's logo, the exact command when it needs your OK, and a small bar when folded. Docs: https://knowns-ui.com/docs/agent-monitor 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-monitor ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Watching one agent at work: current step with a clock and cost, recent steps, and the exact command when it needs your OK. - A side panel or card that folds into a small bar when the user looks elsewhere. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `agent` ({ name, role?, model?, icon? }): Header. model picks the provider logo (modelIcon); icon overrides it. - `cost` (number | string): Numbers go through formatUsd. Shimmers while running. - `ask` ({ title, command?, tool?, since? }): While waiting: the title and the exact command as inline code. since grows the amber wait bar. - `a11y` (role=group): Labelled by the agent's name; state changes and the ask are announced politely. Rows are buttons that open the step's info card; bars do the same with the mouse. Optional, leave the default unless I need otherwise: `state`, `steps`, `current`, `since / until / pausedFor`, `outcome / error`, `run / actor`, `onAllow / onDecline`, `onPause / onResume / onCancel / onLog`, `collapsed / defaultCollapsed / onCollapsedChange`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Button (https://knowns-ui.com/docs/button): Installed with it. Allow, Decline, Pause and Cancel are its buttons. - Kbd (https://knowns-ui.com/docs/kbd): Installed with it. Shows the Enter and Esc keys on Allow and Decline. - Popover (https://knowns-ui.com/docs/popover): Installed with it. Each step opens an info card with its detail and output. - Approval prompt (https://knowns-ui.com/docs/approval-prompt): Pairs with it: the monitor holds one agent's ask, the prompt lists every ask in the run. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-monitor" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Plan (agent-plan) Free · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-plan The steps an agent intends to take, checked off live: step states, sub-steps, elapsed times, a progress bar, animated plan changes, Approve plan / Edit plan and a one-line collapsed view. Reads the run store or plain props. ## When to use - Showing the steps an agent intends to take before it runs, with Approve plan and Edit plan. - Checking those steps off live, with elapsed times, sub-steps and a progress bar, as the plan changes. ## When not to use - The thinking before a chat answer: use Thinking State (https://knowns-ui.com/docs/thinking-state) instead - Timing every call in a run: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead - A fixed multi-step form: use Stepper (https://knowns-ui.com/docs/stepper) instead ## Install ```bash npx knowns-ui@latest add agent-plan ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/agent-plan.json ``` ## Dependencies - Registry (installed with it): knowns-core, button, motion, spinner ## Files - components/ui/knowns/agent-plan/agent-plan.tsx - components/ui/knowns/agent-plan/plan-utils.ts ## Usage ```tsx import { AgentPlan } from "@/components/ui/knowns/agent-plan/agent-plan"; // Controlled: pass the steps and update them as your agent reports progress. // From a run: tasks with the same ids drive the steps; the agent's extra tasks are added. ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | steps | PlanStep[] | [] | The plan, in order: { id, title, detail?, status?, startedAt?, endedAt?, steps?, replacedBy? }. Status is pending, active, done, skipped or failed. | | run | AgentRun | - | Read live state from a run: a step whose id matches a task takes its status, times and summary. | | actor | string | - | With run: this agent's tasks that are not in steps are added at the end. | | title / goal | ReactNode | "Plan" / - | The header and one or two lines on what the plan is for. | | onApprove / onEdit | () => void | - | Show Approve plan and Edit plan while nothing has started. | | approval | string | - | With run: an approval request id. While it is pending, the buttons resolve it as approved or denied. | | approveLabel / editLabel | string | "Approve plan" / "Edit plan" | Button text. | | collapsed / defaultCollapsed / onCollapsedChange | boolean / boolean / (collapsed) => void | false | One summary line instead of the list, e.g. “Step 3 of 7: Run the full test suite”. The header toggles it. | | collapsible | boolean | true | Let the header toggle the collapsed view. | | announce | boolean | true | Announce step changes in a polite live region. | | onStepToggle | (id, done) => void | - | Opt-in: each step marker becomes a checkbox the reader can tick (a demo, a manual checklist). You update steps. Without it the markers are read-only. | | PlanStepMarker | component | - | The step marker on its own (status, n, small), for step lists outside a plan. Takes the step statuses plus waiting, an amber clock for a step that needs a person. | | now | () => number | Date.now | Clock for elapsed times. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Plan to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The steps an agent intends to take, checked off live: numbered steps with sub-steps, elapsed times and a progress bar. When the plan changes, new steps fade in, removed ones fade out, moved ones slide and replaced ones are struck through. It can ask for approval before it runs, and collapses to one line. Docs: https://knowns-ui.com/docs/agent-plan 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-plan ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Showing the steps an agent intends to take before it runs, with Approve plan and Edit plan. - Checking those steps off live, with elapsed times, sub-steps and a progress bar, as the plan changes. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `run` (AgentRun): Read live state from a run: a step whose id matches a task takes its status, times and summary. - `actor` (string): With run: this agent's tasks that are not in steps are added at the end. - `approval` (string): With run: an approval request id. While it is pending, the buttons resolve it as approved or denied. - `PlanStepMarker` (component): The step marker on its own (status, n, small), for step lists outside a plan. Takes the step statuses plus waiting, an amber clock for a step that needs a person. Handle these by calling my own mutations or setters: - `onStepToggle` ((id, done) => void): Opt-in: each step marker becomes a checkbox the reader can tick (a demo, a manual checklist). You update steps. Without it the markers are read-only. Optional, leave the default unless I need otherwise: `steps`, `title / goal`, `onApprove / onEdit`, `approveLabel / editLabel`, `collapsed / defaultCollapsed / onCollapsedChange`, `collapsible`, `announce`, `now`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Button (https://knowns-ui.com/docs/button): Installed with it. Approve plan and Edit plan are its buttons. - Spinner (https://knowns-ui.com/docs/spinner): Installed with it. Marks the active step. - Approval prompt (https://knowns-ui.com/docs/approval-prompt): Pairs with it: the plan can resolve an approval id that the prompt lists. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-plan" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Policy (agent-policy) Pro · blocks / Agents · Docs: https://knowns-ui.com/docs/agent-policy The permission rules of an agent: allow, ask or deny per tool, file and network scopes as patterns, spend and step caps, and a panel to try a call and see which rule decides it. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - The settings page of an agent: which tools run on their own, which ask first and which never run, with the folders and hosts it may touch. - Explaining a blocked call: type it in Try a case and show the rule that decided it. ## When not to use - One overall boldness setting: use Autonomy & Permissions (https://knowns-ui.com/docs/autonomy) instead - Asking about one call that is waiting now: use Approval Prompt (https://knowns-ui.com/docs/approval-prompt) instead ## Install ```bash npx knowns-ui@latest add agent-policy ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-policy ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, badge, button, input, segmented-control, tag ## Files - components/ui/knowns/agent-policy/agent-policy.tsx - components/ui/knowns/agent-policy/agent-policy-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props value, onChange, title, description, showTester, testCase, defaultTestCase, onTestCaseChange, usage, onDecision, className, evaluatePolicy, caseTargets, textGlob, pathGlob, hostGlob, OUTCOME_COPY (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Policy to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The permission rules for an agent: Allow, Ask or Deny per tool and arguments, file and network scopes as patterns, a spend and a step cap, and a panel that tries a tool call and shows which rule decides it. Docs: https://knowns-ui.com/docs/agent-policy 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-policy ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - The settings page of an agent: which tools run on their own, which ask first and which never run, with the folders and hosts it may touch. - Explaining a blocked call: type it in Try a case and show the rule that decided it. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-policy#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Autonomy & Permissions (https://knowns-ui.com/docs/autonomy): The dial sets how bold the agent is overall; the policy says exactly which calls ask. - Approval Prompt (https://knowns-ui.com/docs/approval-prompt): Where an Ask outcome ends up: the person approves or denies the call. - Tool call card (https://knowns-ui.com/docs/tool-call-card): Show the call that was blocked, with the reason from the policy. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-policy" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Run Pivot (agent-run-pivot) Pro · blocks / Analytics & Maps · Docs: https://knowns-ui.com/docs/agent-run-pivot A pivot explorer over agent runs: drag fields into Filters, Columns, Rows and Values (or use the keyboard), see the table change live while you drag, with aggregations, subtotals, grand totals, heat shading, collapsible groups, Swap, Clear, CSV export, and an Ask to pivot input that your own model can answer. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Letting people slice a table of agent runs themselves: cost by model, p95 latency by tool, error rate by week. - A report page where the question changes every time, so a fixed chart would not do. Totals, subtotals and hot cells show where to look. ## When not to use - Spend and quota against a plan: use Usage Meter (https://knowns-ui.com/docs/usage-meter) instead - Following when each step of one run happened: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead - A plain sortable list with no grouping: use Data Table (https://knowns-ui.com/docs/data-table) instead ## Install ```bash npx knowns-ui@latest add agent-run-pivot ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-run-pivot ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, button, checkbox, input, menu, motion, popover, thinking-state ## Files - components/ui/knowns/blocks/analytics/agent-run-pivot.tsx - components/ui/knowns/blocks/analytics/agent-run-pivot-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props records, fields, layout, defaultLayout, onLayoutChange, interpret, interpretKeywords, suggestions, onCellAction, fileName, title / description, heat, maxHeight, Wide layout, Wells, Table, Keyboard, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Run Pivot to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A pivot explorer for agent runs. Drag fields into Filters, Columns, Rows and Values, watch the table change while you drag, and read subtotals, totals and hot cells. Everything works from the keyboard, and you can ask for a pivot in words. Docs: https://knowns-ui.com/docs/agent-run-pivot 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-run-pivot ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Letting people slice a table of agent runs themselves: cost by model, p95 latency by tool, error rate by week. - A report page where the question changes every time, so a fixed chart would not do. Totals, subtotals and hot cells show where to look. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-run-pivot#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-run-pivot" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Terminal (agent-terminal) Pro · blocks / Review · Docs: https://knowns-ui.com/docs/agent-terminal An agent running shell commands: streaming output, commands waiting for approval, exit codes, collapsible long output and re-run. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - An agent that runs shell commands, where a person follows the output and approves the risky ones. - A session log of commands with their exit codes, where a failed one can be run again. ## When not to use - One tool call with its arguments and result: use Tool Call Card (https://knowns-ui.com/docs/tool-call-card) instead - A single request to approve, not tied to a shell: use Approval Prompt (https://knowns-ui.com/docs/approval-prompt) instead - Code or a command to copy, not run: use Code Block (https://knowns-ui.com/docs/code-block) instead ## Install ```bash npx knowns-ui@latest add agent-terminal ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-terminal ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, button, code-block, motion, spinner ## Files - components/ui/knowns/agent-terminal/agent-terminal.tsx - components/ui/knowns/agent-terminal/agent-terminal-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props commands, status, output, exitCode / startedAt / endedAt, reason, onApprove / onDeny, onStop / onRerun, collapseAfter, streamHeight, title / host / empty, Screen readers (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Terminal to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Shell commands an agent runs, in one list: streaming output, commands waiting for your approval, exit codes, long output folded, and Re-run. Docs: https://knowns-ui.com/docs/agent-terminal 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-terminal ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - An agent that runs shell commands, where a person follows the output and approves the risky ones. - A session log of commands with their exit codes, where a failed one can be run again. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-terminal#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-terminal" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Agent Tree (agent-tree) Pro · blocks / Runs & traces · Docs: https://knowns-ui.com/docs/agent-tree Who started whom as a tree: state, live clock, tasks and subtree cost per agent, approve and retry inline. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Runs where an orchestrator starts sub-agents and you want the hierarchy at a glance: state, tools, task, clock and what each branch costs. - Acting on a branch in place: approve or retry on the card, jump to failures from the header, fold finished branches away. - Narrow panels: the same component becomes an indented list below 640px. ## When not to use - Seeing calls against time: use Trace Waterfall (https://knowns-ui.com/docs/trace-waterfall) instead - Several independent main agents side by side, each as a card: use Agent Fleet (https://knowns-ui.com/docs/agent-fleet) instead - Who talks to whom, including tools and people, rather than who started whom: use Agent Graph (https://knowns-ui.com/docs/agent-graph) instead ## Install ```bash npx knowns-ui@latest add agent-tree ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/agent-tree ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, button, menu, motion, status-dot, tooltip ## Files - components/ui/knowns/agent-tree/agent-tree.tsx - components/ui/knowns/agent-tree/tree-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props run, nodes, layout, density, title, onResolve, onSelect / selectedId, defaultCollapsed / foldFinished, formatSpend, now, Cards, Motion, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Agent Tree to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Who started whom, as a tree you can approve and retry in: each agent's state, live clock, tasks and the cost of everything under it. Docs: https://knowns-ui.com/docs/agent-tree 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add agent-tree ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Runs where an orchestrator starts sub-agents and you want the hierarchy at a glance: state, tools, task, clock and what each branch costs. - Acting on a branch in place: approve or retry on the card, jump to failures from the header, fold finished branches away. - Narrow panels: the same component becomes an indented list below 640px. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/agent-tree#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "agent-tree" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # AI Answer (ai-answer) Free · blocks / Chat · Docs: https://knowns-ui.com/docs/ai-answer Streamed answer with steps, sources, numbered citations that preview their source, copy, regenerate, feedback and follow-ups. ## When to use - Rendering a model's reply with sources, numbered citations that preview their source, and copy, regenerate and feedback actions. - Search-style answers where users need to check where a claim came from. ## When not to use - The agent's steps before it answers: use Thinking State (https://knowns-ui.com/docs/thinking-state) instead - A whole chat screen with sidebar and composer: use Chat App (https://knowns-ui.com/docs/screen-chat) instead - Short system messages or errors: a plain message or a toast reads better: use Toast (https://knowns-ui.com/docs/toast) instead ## Install ```bash npx knowns-ui@latest add ai-answer ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/ai-answer.json ``` ## Dependencies - Registry (installed with it): knowns-core, button, spinner, tooltip ## Files - components/ui/knowns/ai-answer/ai-answer.tsx - components/ui/knowns/ai-answer/ai-answer-utils.ts ## Usage ```tsx import { AiAnswer } from "@/components/ui/knowns/ai-answer/ai-answer"; log(rating, reason)} /> ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | Paragraphs | blank line | | A blank line starts a new paragraph. | | Lists | "- " at line start | | Consecutive lines become one list. | | Bold, code | **bold** · `code` | | Unclosed markers while streaming are fine - they run to the end. | | Citations | [1] · [1, 3] | | 1-based indexes into sources. A citation still being typed is hidden until it closes. | | text | string | - | The answer. May grow while streaming; a text that no longer continues the old one starts over. | | status | "thinking" \| "streaming" \| "done" \| "stopped" \| "error" | "done" | Thinking shows placeholders and “Reading N sources”; streaming keeps the caret going. | | sources | AnswerSource[] | [] | { title, site, url?, icon?, excerpt? }. Three fit the row, the rest fold into “+N more”. | | steps | AnswerStep[] | - | { label, state } - what the assistant did. Collapsed to one line, expandable. | | question | string | - | Title above everything. | | suggestions / onSuggestion | string[] / (q) => void | - | Follow-up questions shown once the answer is complete. | | onRegenerate / onStop / onCopy | callbacks | - | Regenerate and copy after the answer; Stop while it is thinking or streaming. | | onFeedback | (rating, reason?) => void | - | Good, or bad with one of feedbackReasons. | | reveal / wordsPerSecond | boolean / number | true / 42 | Smooth word-by-word reveal; off under reduced motion. | | card | boolean | true | On its own card, or blended into the surrounding thread. | | meta | ReactNode | - | Small text at the end of the action row, e.g. “Answered in 3.4s”. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI AI Answer to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A streamed answer that shows its work: what the assistant searched, the sources it read, numbered citations that preview their source, and copy, regenerate, feedback and follow-ups. Docs: https://knowns-ui.com/docs/ai-answer 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add ai-answer ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Rendering a model's reply with sources, numbered citations that preview their source, and copy, regenerate and feedback actions. - Search-style answers where users need to check where a claim came from. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `Paragraphs` (blank line): A blank line starts a new paragraph. - `Lists` ("- " at line start): Consecutive lines become one list. - `Citations` ([1] · [1, 3]): 1-based indexes into sources. A citation still being typed is hidden until it closes. - `text` (string): The answer. May grow while streaming; a text that no longer continues the old one starts over. - `steps` (AnswerStep[]): { label, state } - what the assistant did. Collapsed to one line, expandable. - `question` (string): Title above everything. Handle these by calling my own mutations or setters: - `onFeedback` ((rating, reason?) => void): Good, or bad with one of feedbackReasons. Optional, leave the default unless I need otherwise: `Bold, code`, `status`, `sources`, `suggestions / onSuggestion`, `onRegenerate / onStop / onCopy`, `reveal / wordsPerSecond`, `card`, `meta`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Spinner (https://knowns-ui.com/docs/spinner): Installed with it. Shows while a Regenerate or thinking step is pending. - Tooltip (https://knowns-ui.com/docs/tooltip): Installed with it. Labels the Copy, Regenerate and thumbs buttons. - Thinking state (https://knowns-ui.com/docs/thinking-state): Pairs with it: show the thinking steps above, then stream the answer here. - Message actions (https://knowns-ui.com/docs/message-actions): Pairs with it: use it when the action row lives outside the answer card. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "ai-answer" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # AI Email Draft (ai-email-draft) Pro · blocks / CRM · Docs: https://knowns-ui.com/docs/ai-email-draft An agent drafts a reply from the record: pick a tone and a length, read which facts it used, edit the text, and send only after an approval. Callbacks get an AbortSignal and the block never fetches or sends by itself. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Answering an email from a lead or customer with a draft an agent wrote from the record, which a person edits and approves. - Showing which facts a reply relied on, so the sender can check them before it goes. ## When not to use - Sending anything without a person reading it first: use Approval Prompt (https://knowns-ui.com/docs/approval-prompt) instead - A chat with a model: use Chat Composer (https://knowns-ui.com/docs/chat-composer) instead - The history of emails on a record: use Record Timeline (https://knowns-ui.com/docs/record-timeline) instead ## Install ```bash npx knowns-ui@latest add ai-email-draft ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/ai-email-draft ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, agent-loader, approval-prompt, avatar, badge, button, input, motion, segmented-control, skeleton, textarea ## Files - components/ui/knowns/blocks/crm/ai-email-draft.tsx - components/ui/knowns/blocks/crm/ai-email-draft-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props to, subject, thread, facts, onDraft, onSend, agentName, defaultTone / defaultLength (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI AI Email Draft to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: An agent writes the reply, you stay in charge of it. Pick a tone and a length, see which facts from the record the draft used, edit the text, and send only after an approval. The draft and the send are callbacks you supply, and nothing leaves until you approve. Docs: https://knowns-ui.com/docs/ai-email-draft 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add ai-email-draft ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Answering an email from a lead or customer with a draft an agent wrote from the record, which a person edits and approves. - Showing which facts a reply relied on, so the sender can check them before it goes. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/ai-email-draft#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Record Header (https://knowns-ui.com/docs/record-header): The lead the reply goes to. - Record Timeline (https://knowns-ui.com/docs/record-timeline): The thread and the facts come from here. - Lead Score (https://knowns-ui.com/docs/lead-score): The reasons behind the score are good facts to cite. - Approval Prompt (https://knowns-ui.com/docs/approval-prompt): The card that guards Send. - Agent Loader (https://knowns-ui.com/docs/agent-loader): The waiting lines. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "ai-email-draft" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # AI Service Status (ai-service-status) Pro · blocks / Operations · Docs: https://knowns-ui.com/docs/ai-service-status A status page for an AI product's own services: an overall state, one uptime bar per service (model endpoints, tool gateway, vector store, agent runs), the selected service's p50, p95 and target response time over 24 hours with a smooth transition duration-(--kn-dur-fast) ease-(--kn-ease-out) between services, and a timeline of incidents with their updates, including fallbacks such as traffic failing over to a second model. Pro. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - A public or internal status page for an AI product: is it up, which service is slow, what happened and when. - Showing that traffic failed over from one model to another, with the updates in order. ## When not to use - How one agent is doing, with a score and a next step: use Agent Health (https://knowns-ui.com/docs/agent-health) instead - Many agents over time in one view: use Agent Fleet (https://knowns-ui.com/docs/agent-fleet) instead - Day by day status for a single service, no page around it: use Uptime Bar (https://knowns-ui.com/docs/uptime-bar) instead ## Install ```bash npx knowns-ui@latest add ai-service-status ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/ai-service-status ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, motion, uptime-bar ## Files - components/ui/knowns/blocks/operations/ai-service-status.tsx - components/ui/knowns/blocks/operations/ai-service-status-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props title, services, incidents, selected / defaultSelected / onSelect, now, action, incidentLimit, Overall state, daysFromIncidents, Motion, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI AI Service Status to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A status page for an AI product's own services. An overall state, one uptime bar per service, the response time of the one you select, and a timeline of incidents, including traffic failing over to a second model. Docs: https://knowns-ui.com/docs/ai-service-status 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add ai-service-status ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A public or internal status page for an AI product: is it up, which service is slow, what happened and when. - Showing that traffic failed over from one model to another, with the updates in order. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/ai-service-status#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "ai-service-status" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # AI Whiteboard (ai-whiteboard) Pro · blocks / Agents · Docs: https://knowns-ui.com/docs/ai-whiteboard A whiteboard for people and an AI to work on together: sticky notes, shapes, text, frames, connectors that stay stuck and re-route, pen, images and formulas. Select, move, resize, undo in groups, zoom to fit. One typed JSON document and one applyOps function carry every change, with an author on each object, so an AI's edits are marked, grouped and undone as one step. Installs the whiteboard, the AI collaborator, ask on the board and math in one go; each is its own item too. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - A shared board where a person and an AI work on the same notes, shapes and diagrams. - Brainstorming, planning and flow charts where an agent adds to the board and the person can undo the whole run. ## When not to use - A graph of typed nodes that runs a pipeline: use Node Graph Editor (https://knowns-ui.com/docs/node-graph-editor) instead - A workflow with steps and branches: use Workflow Builder (https://knowns-ui.com/docs/workflow-builder) instead ## Install ```bash npx knowns-ui@latest add ai-whiteboard ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/ai-whiteboard ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): board-ask, whiteboard, whiteboard-ai, whiteboard-core, whiteboard-math ## Files - components/ui/knowns/blocks/whiteboard/ai-whiteboard.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props useAiCollaborator({ board, planners }), board, planners, AiStep, choreography, AiCursor, AiPromptBar, AiRunBar, boardToContext(doc, opts), math object, AskBar, askPlanners(content), question object, actions, doc, onChange, viewport / onViewportChange, onSelectionChange, renderOverlay, kinds, toolbar, onImageFile, readOnly, ref, Objects, Ops (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI AI Whiteboard to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A whiteboard that a person and an AI draw on together. Notes, shapes, text, frames, pen and connectors on a pan and zoom canvas, with one typed document and one function, applyOps, behind every change, so an AI's edits are marked, grouped and undone as one step. Docs: https://knowns-ui.com/docs/ai-whiteboard 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add ai-whiteboard ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A shared board where a person and an AI work on the same notes, shapes and diagrams. - Brainstorming, planning and flow charts where an agent adds to the board and the person can undo the whole run. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/ai-whiteboard#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Agent Cursors (https://knowns-ui.com/docs/agent-cursors): Shares the cursor and name tag. - AI Whiteboard (https://knowns-ui.com/docs/ai-whiteboard): The board the AI works on, installed with it. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "ai-whiteboard" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Alert (alert) Free · components / Feedback · Docs: https://knowns-ui.com/docs/alert An inline callout with info, success, warning and error tones, an optional title, one action and a dismiss button. ## When to use - A message about the page or form it sits in: a limit reached, a step that needs approval, a failure with a retry. ## When not to use - A result that appears from an event and fades: use Toast (https://knowns-ui.com/docs/toast) instead - A decision the user must make before going on: use Dialog (https://knowns-ui.com/docs/dialog) instead - An error on one field: show it by the field: use Input (https://knowns-ui.com/docs/input) instead ## Install ```bash npx knowns-ui@latest add alert ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/alert.json ``` ## Dependencies - Registry (installed with it): knowns-core, button - npm: class-variance-authority@^0.7.1 ## Files - components/ui/knowns/alert.tsx ## Usage ```tsx import { Alert } from "@/components/ui/knowns/alert"; setError(null)}> The search API returned 429 Too Many Requests. ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | tone | "info" \| "success" \| "warning" \| "danger" | "info" | The icon carries the tone: its colour and its shape. The card stays neutral. Warning and danger use role=alert, the others role=status. | | title | ReactNode | - | Bold first line; names the alert. | | children | ReactNode | - | The message. Muted under a title. | | action | { label, onClick } | - | One secondary button under the message. It does not dismiss. | | onDismiss | () => void | - | Shows a dismiss button; the alert hides itself and calls this. | | icon | ReactNode | - | Replaces the tone's icon. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Alert to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: An inline callout for a message about the page or form it sits in. Four tones, each with one signal, an optional title, one action and a dismiss button. Docs: https://knowns-ui.com/docs/alert 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add alert ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A message about the page or form it sits in: a limit reached, a step that needs approval, a failure with a retry. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `action` ({ label, onClick }): One secondary button under the message. It does not dismiss. Handle these by calling my own mutations or setters: - `onDismiss` (() => void): Shows a dismiss button; the alert hides itself and calls this. Optional, leave the default unless I need otherwise: `tone`, `title`, `children`, `icon`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Button (https://knowns-ui.com/docs/button): Installed with it. The action prop renders a small secondary Button. - Toast (https://knowns-ui.com/docs/toast): Pairs with it: Toast carries a message that comes from an event and fades; Alert stays until the cause is fixed. - Dialog (https://knowns-ui.com/docs/dialog): Pairs with it: escalate an Alert to a Dialog when the user must make a choice. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "alert" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Animated Number (animated-number) Free · components / Data display · Docs: https://knowns-ui.com/docs/animated-number A number whose changed digits roll like an odometer to the new value, the carry travelling from the right: Intl formatting for currency, percent and decimals, tabular widths, instant with reduced motion. ## When to use - A live metric that updates in place: runs, cost, a rate, where the eye should catch the change without the figure jumping. ## When not to use - A cost or token count that counts up from a start value as text: use Number Ticker (https://knowns-ui.com/docs/number-ticker) instead - A trend of the number over time: use Chart (https://knowns-ui.com/docs/chart) instead ## Install ```bash npx knowns-ui@latest add animated-number ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/animated-number.json ``` ## Dependencies - Registry (installed with it): knowns-core, motion ## Files - components/ui/knowns/animated-number.tsx ## Usage ```tsx import { AnimatedNumber } from "@/components/ui/knowns/animated-number"; ``` ```tsx ``` ```tsx import { Chart } from "@/components/ui/knowns/chart/chart"; import { AnimatedNumber } from "@/components/ui/knowns/animated-number"; ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | value | number | required | The number to show. A change rolls the digits that differ. | | format | Intl.NumberFormatOptions \| (n) => string | grouped integer | Currency, percent, decimals, compact or signDisplay through Intl, or your own formatter. Only ASCII digits roll; separators, signs and symbols stay put. | | locale | string | the runtime locale | Passed to Intl.NumberFormat. | | prefix / suffix | string | - | Text before or after the number, not animated. | | Direction | - | - | Digits roll up when the value rose and down when it fell. A new leading digit appears without a roll. | | Motion | 280 ms ease-out | - | Transform only, and only when the value changes: nothing on first render or on an identical value. With reduced motion the new digits just appear. | | a11y | text | - | Screen readers get the final text, never the roll. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Animated Number to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A number whose changed digits roll like an odometer to the new value. Only the digits that change turn, up or down through the digits between, and a carry travels from the right one place at a time, so a live metric reads as a figure that ticks, not text that swaps. Docs: https://knowns-ui.com/docs/animated-number 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add animated-number ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A live metric that updates in place: runs, cost, a rate, where the eye should catch the change without the figure jumping. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `value` (number): The number to show. A change rolls the digits that differ. - `Direction` (-): Digits roll up when the value rose and down when it fell. A new leading digit appears without a roll. - `Motion` (280 ms ease-out): Transform only, and only when the value changes: nothing on first render or on an identical value. With reduced motion the new digits just appear. - `a11y` (text): Screen readers get the final text, never the roll. Optional, leave the default unless I need otherwise: `format`, `locale`, `prefix / suffix`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Chart (https://knowns-ui.com/docs/chart): Pairs with it: roll a headline total above a chart of the same series. - Usage meter (https://knowns-ui.com/docs/usage-meter): Pairs with it: roll the spent amount next to the meter that shows the budget. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "animated-number" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Announcement Bar (announcement-bar) Free · blocks / Layout · Docs: https://knowns-ui.com/docs/announcement-bar Dismissible announcement bar above the header: a link or CTA, an optional countdown, tone variants, dismissal remembered per id in localStorage, and a smooth height collapse with no layout jump. ## When to use - A launch, a sale with a deadline or a maintenance notice above the header, dismissed once per visitor. ## When not to use - Messages about a single action, like Saved: use Toast (https://knowns-ui.com/docs/toast) instead - Anything the user must act on before going on: use Dialog (https://knowns-ui.com/docs/dialog) instead ## Install ```bash npx knowns-ui@latest add announcement-bar ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/announcement-bar.json ``` ## Dependencies - Registry (installed with it): knowns-core ## Files - components/ui/knowns/blocks/site/announcement-bar.tsx - components/ui/knowns/blocks/site/site-utils.ts ## Usage ```tsx import { AnnouncementBar } from "@/components/ui/knowns/blocks/site/announcement-bar"; Run replays are here. Black Friday: every plan 30% off. ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | id | string | - | The dismissal is stored as kn-announcement:. Use a new id for a new announcement. | | action | { label, href?, onClick? } | - | A link (with an arrow) or a button after the message. | | countdown | { end, label?, onEnd?, hideWhenDone? } | - | Ticks every second; screen readers get the time left in minutes. hideWhenDone collapses the bar at zero. | | tone | "inverted" \| "neutral" \| "accent" \| "warning" \| "success" | "inverted" | Colours; text keeps 4.5:1 contrast in both themes. | | dismissible / persist / onDismiss | boolean / boolean / () => void | true / true | The close button, and whether the dismissal is remembered in localStorage. | | icon | ReactNode | - | A 16px mark before the message. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Announcement Bar to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: One line above the header for a launch, a sale or a notice: a link or CTA, an optional countdown, tones, and a dismissal remembered per id. Docs: https://knowns-ui.com/docs/announcement-bar 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add announcement-bar ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A launch, a sale with a deadline or a maintenance notice above the header, dismissed once per visitor. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `id` (string): The dismissal is stored as kn-announcement:. Use a new id for a new announcement. - `action` ({ label, href?, onClick? }): A link (with an arrow) or a button after the message. - `countdown` ({ end, label?, onEnd?, hideWhenDone? }): Ticks every second; screen readers get the time left in minutes. hideWhenDone collapses the bar at zero. Optional, leave the default unless I need otherwise: `tone`, `dismissible / persist / onDismiss`, `icon`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Site header (https://knowns-ui.com/docs/site-header): Pairs with it: stack the bar above a sticky header and the header slides up when it collapses. - Hero (https://knowns-ui.com/docs/hero): Pairs with it: a launch notice over the hero repeats the same news with a countdown. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "announcement-bar" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Announcement Pill (announcement-pill) Free · blocks / Marketing · Docs: https://knowns-ui.com/docs/announcement-pill A New pill above a hero headline that grows in place into a small changelog card: title, two lines, an image or a short list and a link. Hover or focus previews it, click or Enter keeps it open, Esc closes it, and the page below never moves. ## When to use - A launch or a new feature above a hero headline, with a short card that explains it without leaving the page. - A teaser that links a landing page to the matching changelog entry. ## When not to use - A notice for every page, above the header: use Announcement Bar (https://knowns-ui.com/docs/announcement-bar) instead - The full list of releases: use Changelog Feed (https://knowns-ui.com/docs/changelog-feed) instead - A message about one action, like Saved: use Toast (https://knowns-ui.com/docs/toast) instead ## Install ```bash npx knowns-ui@latest add announcement-pill ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/announcement-pill.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-floating, changelog-feed, content-core, motion ## Files - components/ui/knowns/blocks/site/announcement-pill.tsx ## Usage ```tsx import { AnnouncementPill } from "@/components/ui/knowns/blocks/site/announcement-pill"; import { HeroCentered } from "@/components/ui/knowns/blocks/marketing/hero"; } title="Every agent run, on the record" lead="Trace, replay and share what your agents did, step by step." primary={{ label: "Start free", href: "/sign-up" }} /> ``` ```tsx import { AnnouncementPill, fromChangelogEntry } from "@/components/ui/knowns/blocks/site/announcement-pill"; // entries are the same objects ChangelogFeed renders ``` ```tsx // No hover or focus preview: the card opens on click or Enter only. ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | text | ReactNode | - | The pill's line, e.g. Run replays are here. Keep it under about 40 characters. | | label | string | "New" | The word in the accent at the start of the pill, such as New, Beta or a version. | | card | { title?, date?, description?, media?, items?, link? } | - | What the card shows. description is cut at two lines, items at three. fromChangelogEntry(entry) builds it. | | align | "center" \| "start" | "center" | Where the card grows from: the pill's centre (a centred hero) or its left edge. | | open / defaultOpen / onOpenChange | boolean / (open) => void | false | The card kept open. A hover or focus preview is not reported. | | preview | boolean | true | Show the card on hover and keyboard focus. Off: click or Enter only. | | hoverDelay | number | 200 | Pause before a hover preview, in ms, so a pointer passing over does not open it. | | width | number | 360 | Card width in px. It never gets wider than the screen less 48px. | | fromChangelogEntry | (entry, linkLabel?) => card | - | Title, summary, date, media and the first link (or the entry's own page) of a changelog-feed entry. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Announcement Pill to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The New line above a hero headline, with the story one hover away. The pill grows in place into a small changelog card with a title, two lines, an image or a short list and a link, and shrinks back when you leave. Click or Enter keeps it open, Esc closes it, and nothing on the page moves. Docs: https://knowns-ui.com/docs/announcement-pill 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add announcement-pill ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A launch or a new feature above a hero headline, with a short card that explains it without leaving the page. - A teaser that links a landing page to the matching changelog entry. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `card` ({ title?, date?, description?, media?, items?, link? }): What the card shows. description is cut at two lines, items at three. fromChangelogEntry(entry) builds it. Optional, leave the default unless I need otherwise: `text`, `label`, `align`, `open / defaultOpen / onOpenChange`, `preview`, `hoverDelay`, `width`, `fromChangelogEntry`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Hero (https://knowns-ui.com/docs/hero): Pass the pill as the hero's eyebrow. - Changelog Feed (https://knowns-ui.com/docs/changelog-feed): The entry the card links to, with fromChangelogEntry. - Announcement Bar (https://knowns-ui.com/docs/announcement-bar): A notice for the whole site, above the header. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "announcement-pill" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Answer Pad (answer-pad) Free · blocks / Education · Docs: https://knowns-ui.com/docs/answer-pad The student's phone view of a live question: big tap targets for the choices, locked after one answer, with waiting, right and wrong states. The answer shows at once and is sent in the background; if sending fails it stays saved and goes again when the phone is back online. ## When to use - A student's phone during a live quiz: tap once, see it lock, wait for the reveal. - A quick class poll where an answer must not be lost on a weak connection. ## When not to use - A graded test with many questions on one screen: use the quiz player - The teacher's or the audience's view: use Live Results (https://knowns-ui.com/docs/live-results) instead ## Install ```bash npx knowns-ui@latest add answer-pad ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/answer-pad.json ``` ## Dependencies - Registry (installed with it): knowns-core, quiz ## Files - components/ui/knowns/answer-pad/answer-pad.tsx ## Usage ```tsx import { AnswerPad } from "@/components/ui/knowns/answer-pad/answer-pad"; api.send(question.id, value)} // may reject: the pad keeps the answer and sends again /> ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | question | QuizQuestion | - | single, multi, truefalse or short. | | onSubmit | (value: string[]) => void \| Promise | - | Called once. The pad locks at once; a rejection keeps the answer queued and retries when the phone is back online. | | revealed | boolean | false | Show right or wrong and mark the right choices. | | closed | boolean | false | Time is up and no answer was sent. | | secondsLeft | number | - | The clock, top right. | | sent | string[] | - | An answer already sent: the pad opens locked. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Answer Pad to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The student's phone view: big tap targets, one answer, locked after it is sent, with waiting, right and wrong states. Docs: https://knowns-ui.com/docs/answer-pad 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add answer-pad ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A student's phone during a live quiz: tap once, see it lock, wait for the reveal. - A quick class poll where an answer must not be lost on a weak connection. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `question` (QuizQuestion): single, multi, truefalse or short. - `secondsLeft` (number): The clock, top right. - `sent` (string[]): An answer already sent: the pad opens locked. Handle these by calling my own mutations or setters: - `onSubmit` ((value: string[]) => void | Promise): Called once. The pad locks at once; a rejection keeps the answer queued and retries when the phone is back online. Optional, leave the default unless I need otherwise: `revealed`, `closed`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "answer-pad" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # App Shell (app-shell) Free · blocks / Layout · Docs: https://knowns-ui.com/docs/app-shell The frame of a signed-in app: a sidebar with a workspace switcher, nav, pinned groups and a footer slot that folds to an icon rail (Cmd or Ctrl+B), and a sticky topbar with breadcrumb, search, notifications and the account menu. A modal sheet on mobile. ## When to use - The frame of a signed-in app: sidebar with a workspace switcher and nav, topbar with breadcrumb, search, notifications and the account menu. - Dashboards and admin tools where the navigation stays put and only the page changes. ## When not to use - Only the navigation column, inside your own layout: use Sidebar (https://knowns-ui.com/docs/sidebar) instead - Marketing pages and docs with a top bar: use Site Header (https://knowns-ui.com/docs/site-header) instead ## Install ```bash npx knowns-ui@latest add app-shell ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/app-shell.json ``` ## Dependencies - Registry (installed with it): knowns-core, breadcrumb, home-link, kbd, sidebar ## Files - components/ui/knowns/blocks/app-shell/app-shell.tsx ## Usage ```tsx import { AppShell, type SidebarNode } from "@/components/ui/knowns/blocks/app-shell/app-shell"; const nav: SidebarNode[] = [ { id: "home", label: "Home", href: "/", icon: }, { id: "approvals", label: "Approvals", href: "/approvals", icon: , count: 1 }, { id: "agents", label: "Agents", icon: , children: [ { id: "a-writer", label: "Writer", href: "/agents/writer" }, ] }, ]; } // or an upgrade card; hidden in the rail breadcrumb={[{ label: "Agents", href: "/agents" }, { label: "Writer" }]} search={{ onOpen: () => setPaletteOpen(true) }} // your CommandMenu notifications={} user={} > {children} ``` ```tsx ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | nav / active / onSelect / linkAs | SidebarNode[] / string / (node) => void / Component | - | The main tree (see Sidebar): icons, counts, badges, nested branches. The active row is marked and its branch opens. | | workspaces / workspace / onWorkspaceChange / onCreateWorkspace | SidebarWorkspace[] / string / … | - | The switcher at the top; leave out for one workspace. | | groups | { id, label, items, collapsible? }[] | [] | Pinned items, favourites: labelled, foldable groups under the nav. | | sidebarFooter | ReactNode | - | The bottom of the sidebar: a usage meter or an upgrade card. Hidden in the rail. | | sidebarWidth | number | 256 | Expanded sidebar width in px. | | sidebarClassName | string | - | Extra classes on the sidebar panel, e.g. [&_.h-8]:h-7 to make the nav rows 28px. | | breadcrumb | BreadcrumbItem[] | - | Where you are. Long trails fold their middle into a menu. | | onHome | () => void | - | Go to the app's home view: the first crumb (the workspace) becomes the home control, then the page scrolls to the top. | | search | { onOpen, label? } | - | A search field with a ⌘K hint from 768px, an icon below. Open your Command Menu here. | | notifications / actions / user | ReactNode | - | Topbar slots, right to left: your UserMenu last. | | storageKey / defaultCollapsed / hotkey / mobileBelow | string / boolean / boolean / number | - / false / true / 768 | State: the remembered rail, ⌘B or Ctrl+B, and the width below which the sidebar is a sheet. | | layout | "page" \| "fill" | "page" | page: the window scrolls, the sidebar and topbar stick. fill: the shell fills its parent and the main column scrolls. | | embedded | boolean | false | Render the main column as a div and the sidebar without an aside landmark, for a shell shown inside another page (one main per page). | | labelPrefix | string | - | Prefixes the shell's navigation and breadcrumb labels so two shells on one page have unique names. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI App Shell to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The frame of a signed-in app: a sidebar with a workspace switcher, nav, pinned items and a usage slot that folds to an icon rail, and a topbar with a breadcrumb, search, notifications and the account menu. On phones the sidebar is a sheet. Docs: https://knowns-ui.com/docs/app-shell 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add app-shell ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - The frame of a signed-in app: sidebar with a workspace switcher and nav, topbar with breadcrumb, search, notifications and the account menu. - Dashboards and admin tools where the navigation stays put and only the page changes. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `sidebarClassName` (string): Extra classes on the sidebar panel, e.g. [&_.h-8]:h-7 to make the nav rows 28px. - `breadcrumb` (BreadcrumbItem[]): Where you are. Long trails fold their middle into a menu. - `search` ({ onOpen, label? }): A search field with a ⌘K hint from 768px, an icon below. Open your Command Menu here. - `labelPrefix` (string): Prefixes the shell's navigation and breadcrumb labels so two shells on one page have unique names. Handle these by calling my own mutations or setters: - `onHome` (() => void): Go to the app's home view: the first crumb (the workspace) becomes the home control, then the page scrolls to the top. Optional, leave the default unless I need otherwise: `nav / active / onSelect / linkAs`, `workspaces / workspace / onWorkspaceChange / onCreateWorkspace`, `groups`, `sidebarFooter`, `sidebarWidth`, `notifications / actions / user`, `storageKey / defaultCollapsed / hotkey / mobileBelow`, `layout`, `embedded`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Sidebar (https://knowns-ui.com/docs/sidebar): Installed with it. All the nav, rail, switcher and mobile sheet behaviour is its. - Breadcrumb (https://knowns-ui.com/docs/breadcrumb): Installed with it. The topbar shows it on one line and only the current page below 640px. - User menu (https://knowns-ui.com/docs/user-menu): Pairs with it: pass one in `user` for the account menu at the right of the topbar. - Notification center (https://knowns-ui.com/docs/notification-center): Pairs with it: pass its bell in `notifications` to sit before the user. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "app-shell" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Approval Prompt (approval-prompt) Free · blocks / Review · Docs: https://knowns-ui.com/docs/approval-prompt Requests waiting for a human decision with a preview and Approve / Deny. ## When to use - Approving a tool call before it runs: several requests wait for a human decision, each with a preview and Approve or Deny. - Review queues across runs, where people work through approvals one by one. ## When not to use - One request inline in a chat thread, with risk and scope: use Autonomy & Permissions (https://knowns-ui.com/docs/autonomy) instead - Confirming a destructive action of your own app: use Dialog (https://knowns-ui.com/docs/dialog) instead ## Install ```bash npx knowns-ui@latest add approval-prompt ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/approval-prompt.json ``` ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, button, code-block, motion ## Files - components/ui/knowns/approval-prompt/approval-prompt.tsx ## Usage ```tsx import { ApprovalPrompt } from "@/components/ui/knowns/approval-prompt/approval-prompt"; // In your agent: run.emit({ type: "approval.request", id: "ap1", actor: "writer", title: "Post the report to #pricing", detail: message }); // In your UI - the decision is emitted back as approval.resolve: agent.resume(a.id, d)} /> ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | run | AgentRun | - | Read approvals from a run and emit decisions to it. | | approvals / actors | Approval[] / Actor[] | [] | Plain data instead of a run. | | onDecision | (approval, decision) => void | - | Called on every Approve or Deny. | | history | number | 3 | Resolved requests kept under the pending ones. | | empty | ReactNode | nothing | Shown when nothing is waiting and there is no history. | | live | boolean | true | Announce new requests to screen readers. Turn it off for demos that ask on a timer. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Approval Prompt to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Requests an agent cannot carry out without you: who asks, what it wants to do, a preview of the action, and Approve / Deny. Decisions go straight back into the run. Docs: https://knowns-ui.com/docs/approval-prompt 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add approval-prompt ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Approving a tool call before it runs: several requests wait for a human decision, each with a preview and Approve or Deny. - Review queues across runs, where people work through approvals one by one. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `run` (AgentRun): Read approvals from a run and emit decisions to it. Handle these by calling my own mutations or setters: - `onDecision` ((approval, decision) => void): Called on every Approve or Deny. Optional, leave the default unless I need otherwise: `approvals / actors`, `history`, `empty`, `live`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Button (https://knowns-ui.com/docs/button): Installed with it. Approve and Deny are its buttons. - Code block (https://knowns-ui.com/docs/code-block): Installed with it. Shows the command or diff under the title. - Agent monitor (https://knowns-ui.com/docs/agent-monitor): Pairs with it: the monitor shows the run, this lists what waits on you. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "approval-prompt" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Area Trend Card (area-trend-card) Free · blocks / Analytics & Maps · Docs: https://knowns-ui.com/docs/area-trend-card A card for a total that is made of parts over time: a label, a headline total with a change badge, a period dropdown, a soft-gradient area chart (stacked, overlaid or 100% share) and a legend with each series' total. Pointing at a band, a line or a legend entry swaps the headline to that series' total, which rolls with the number; leaving restores the grand total. ## When to use - A dashboard card for a total made of parts over time: runs by agent, spend by model, tokens by team. - The share each part holds over a week, a month or a year, with the headline following the part you point at. ## When not to use - A bare chart with no headline or period menu: use Chart (https://knowns-ui.com/docs/chart) instead - Status day by day for one service: use Uptime Bar (https://knowns-ui.com/docs/uptime-bar) instead - A total and where it happens on two axes: use Heatmap Card (https://knowns-ui.com/docs/heatmap-card) instead ## Install ```bash npx knowns-ui@latest add area-trend-card ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/area-trend-card.json ``` ## Dependencies - Registry (installed with it): knowns-core, animated-number, chart, dropdown ## Files - components/ui/knowns/blocks/analytics/area-trend-card.tsx ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | title / icon | string / ReactNode | required / - | The label above the headline and an optional 16px mark before it. | | data / x / series | ChartDatum[] / string / ChartSeries[] | required | One row per point on the x axis, the key of its label, and the parts. | | mode | "stacked" \| "overlap" \| "percent" | "stacked" | Add the parts up, draw each from the baseline, or show each one's share of the whole. | | curve | "smooth" \| "linear" | "smooth" | A monotone curve that never dips below the baseline, or straight segments. | | periods / period / defaultPeriod / onPeriodChange | AreaTrendPeriod[] / string | - | The dropdown. The card does not own the data: swap `data` when a period is picked. | | delta / goodWhen | number / "up" \| "down" | - / "up" | The change as a fraction (0.082 is +8.2%) and which way is good news. | | unit / format / headlineFormat / formatX | string / functions | compact | The thing counted, and how values and categories read. | | height / chartLabel | number / string | 200 / title | Plot height and the chart's name for assistive tech. | | Motion | 280 ms in-out | - | A period change tweens the areas and rolls the headline. Hover dims by opacity in 120 ms. Nothing plays on first render or with reduced motion. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Area Trend Card to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: A card for a total made of parts over time: a headline with its change, a period menu, a soft-gradient area chart and a legend with each part's total. Point at a part and the headline becomes its total. Docs: https://knowns-ui.com/docs/area-trend-card 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add area-trend-card ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A dashboard card for a total made of parts over time: runs by agent, spend by model, tokens by team. - The share each part holds over a week, a month or a year, with the headline following the part you point at. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `Motion` (280 ms in-out): A period change tweens the areas and rolls the headline. Hover dims by opacity in 120 ms. Nothing plays on first render or with reduced motion. Optional, leave the default unless I need otherwise: `title / icon`, `data / x / series`, `mode`, `curve`, `periods / period / defaultPeriod / onPeriodChange`, `delta / goodWhen`, `unit / format / headlineFormat / formatX`, `height / chartLabel`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "area-trend-card" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Artifact Canvas (artifact-canvas) Pro · blocks / Chat · Docs: https://knowns-ui.com/docs/artifact-canvas The panel beside a chat that shows the document or code an agent made: version list, a diff against the previous version, copy and Apply. ArtifactSplit puts it next to the chat with resizable panels, and in a bottom sheet on phones. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Showing the document or code an agent wrote beside the chat, so it stays out of the message stream. - Letting people compare versions, copy one, or apply it to their file or page. ## When not to use - Many files changed at once, or AI edits to accept one by one: use Inline Diff (https://knowns-ui.com/docs/diff) instead - A code snippet inside a message: use Code Block (https://knowns-ui.com/docs/code-block) instead ## Install ```bash npx knowns-ui@latest add artifact-canvas ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/artifact-canvas ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, button, code-block, content-core, inline-diff, popover, resizable, segmented-control, sheet ## Files - components/ui/knowns/blocks/artifact/artifact-canvas.tsx - components/ui/knowns/blocks/artifact/artifact-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props ArtifactCanvas: artifact, version / defaultVersion / onVersionChange, tab / defaultTab / onTabChange, applied / onApply, onClose, ArtifactCard, ArtifactSplit: chat / canvas / open / onOpenChange, ArtifactSplit: onModeChange, ArtifactSplit: mobileBelow / storageKey, a11y (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Artifact Canvas to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The panel beside a chat for what the agent made: a document or a piece of code with its versions, a diff against the one before, copy and Apply. On a phone it opens in a bottom sheet. Docs: https://knowns-ui.com/docs/artifact-canvas 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add artifact-canvas ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Showing the document or code an agent wrote beside the chat, so it stays out of the message stream. - Letting people compare versions, copy one, or apply it to their file or page. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/artifact-canvas#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "artifact-canvas" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Assignment rules (assignment-rules) Pro · components / Other · Docs: https://knowns-ui.com/docs/installation Who owns each new record: an owner column resolved by id, email, then name (a name two members share is not a match), one person, round robin with weights that is stable across reruns, rules by a field, aliases, a fallback, and inactive members who never receive anything. Returns the split and every unresolved value with a count. Pure, no React. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## Install ```bash npx knowns-ui@latest add assignment-rules ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/assignment-rules ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): dedupe-merge ## Files - components/ui/knowns/blocks/crm/assignment-rules.ts ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Assignment rules to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Who owns each new record: an owner column resolved by id, email, then name (a name two members share is not a match), one person, round robin with weights that is stable across reruns, rules by a field, aliases, a fallback, and inactive members who never receive anything. Returns the split and every unresolved value with a count. Pure, no React. Docs: https://knowns-ui.com/docs/assignment-rules 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add assignment-rules ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/assignment-rules#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "assignment-rules" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Aurora (aurora) Free · blocks / Backgrounds · Docs: https://knowns-ui.com/docs/aurora Up to three soft colour fields drifting slowly behind your content. Transform-only CSS, no blur filter. ## When to use - Soft colour fields behind a hero or a pricing section, drifting slowly. - Brand moments where a little colour helps and performance matters (transform only, no blur filter). ## When not to use - Data-heavy screens: colour behind numbers competes with them - A neutral, structured backdrop: use Perspective Grid (https://knowns-ui.com/docs/perspective-grid) instead ## Install ```bash npx knowns-ui@latest add aurora ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/aurora.json ``` ## Dependencies - Registry (installed with it): illustrations-core, backgrounds-core ## Files - components/ui/knowns/blocks/backgrounds/aurora.tsx ## Usage ```tsx import { Aurora } from "@/components/ui/knowns/blocks/backgrounds/aurora"; // Your own colours, one per field (tokens work too). ``` ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Aurora to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Up to three soft colour fields drifting slowly behind your content, in your theme tokens or your brand colours. Docs: https://knowns-ui.com/docs/aurora 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add aurora ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Soft colour fields behind a hero or a pricing section, drifting slowly. - Brand moments where a little colour helps and performance matters (transform only, no blur filter). 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props on https://knowns-ui.com/docs/aurora#props and connect each one to my data. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "aurora" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Auth (auth-card) Free · blocks / Account & Settings · Docs: https://knowns-ui.com/docs/auth-card Sign in or sign up by email code, magic link or both, with OAuth buttons (GitHub, Google, Microsoft, Apple or your own), resend and rate-limit countdowns. Callbacks only, any auth backend. ## When to use - A sign-in form (and sign-up) for email codes, magic links or both, with optional OAuth buttons. - Passwordless flows where the server decides: the card only shows its answers (errors, rate limits, countdowns). ## When not to use - Entering a one-time code on its own, e.g. two-factor after a password: use OTP Input (https://knowns-ui.com/docs/otp-input) instead - Password sign-in with strength rules: use Password Field (https://knowns-ui.com/docs/password-field) instead ## Install ```bash npx knowns-ui@latest add auth-card ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/auth-card.json ``` ## Dependencies - Registry (installed with it): knowns-core, button, input, otp-input, social-button ## Files - components/ui/knowns/blocks/auth/auth-card.tsx - components/ui/knowns/blocks/auth/auth-utils.ts - components/ui/knowns/blocks/auth/social-buttons.tsx ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | mode / onModeChange | "sign-in" \| "sign-up" / (mode) => void | "sign-in" | Sign-up adds an optional Name field, the Create account button and `terms`. onModeChange shows the switch link under the card. | | delivery | "code" \| "link" \| "both" | "code" | code: a 6-digit OtpInput step. link: a Check your inbox step with an Open Gmail/Outlook shortcut for known domains. both: the code step says a link was sent too. linkSent still works as both. | | onSendCode | (email, { mode, name? }) => Promise | - | Send the code or link. Resolve { ok: false, kind: "rate-limit", retryAfterS } to lock the form with a countdown. | | onVerify | (email, code) => Promise | - | Check the code. On { ok: true } navigate away; the card keeps its loading state meanwhile. A wrong code clears the input and shows the error. | | providers | ("github" \| "google" \| "microsoft" \| "apple" \| { id, label, icon? })[] | [] | OAuth buttons above the email form, with brand marks for the built-ins. Built-ins call onSocial, objects call onProvider. | | onSocial / onProvider | (provider) => Promise | - | Start the redirect. Resolve an error to show it on the card; the button spins until then. | | codeLength / codeTtlMinutes / resendAfterS | number | 6 / 10 / 30 | The code size, the expiry in the copy, and the resend cooldown. | | initialError / onSent / terms / footer | string / (email) => void / ReactNode / ReactNode | - | An error from a failed link that sent the user back; a hook after sending (e.g. a dev mail panel); the sign-up terms line; small print. | | a11y | labels, live region, focus | - | Every field is labelled; step changes are announced; the code step focuses the first digit and the link step focuses its heading. | | variant | "centered" \| "split" | "centered" | split puts a brand panel on the left from lg up; below that it falls back to the centered page. | | logo / topRight / footer | ReactNode | - | Your wordmark; a link to the other mode; Terms, Privacy and Help links under the form. | | aside | { eyebrow?, headline, description?, points?, background?, bottom? } | - | The split panel. background takes any Backgrounds block. Keep points factual; this is not the place for quotes you can't back up. | | fill | "screen" \| "parent" | "screen" | screen is a full-height page with a
landmark; parent fits a container (previews, modals) without adding one. | | children | ReactNode | - | The AuthCard, or any form. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Auth to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Sign-in and sign-up pages: an email card that sends a code, a magic link or both, with OAuth buttons, resend and rate-limit countdowns, and a page layout around it (centered, or split with a brand panel). No auth library inside: wire it to Better Auth, Auth.js, Supabase or your own API. Docs: https://knowns-ui.com/docs/auth-card 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add auth-card ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - A sign-in form (and sign-up) for email codes, magic links or both, with optional OAuth buttons. - Passwordless flows where the server decides: the card only shows its answers (errors, rate limits, countdowns). 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `a11y` (labels, live region, focus): Every field is labelled; step changes are announced; the code step focuses the first digit and the link step focuses its heading. - `aside` ({ eyebrow?, headline, description?, points?, background?, bottom? }): The split panel. background takes any Backgrounds block. Keep points factual; this is not the place for quotes you can't back up. Handle these by calling my own mutations or setters: - `onSendCode` ((email, { mode, name? }) => Promise): Send the code or link. Resolve { ok: false, kind: "rate-limit", retryAfterS } to lock the form with a countdown. - `onVerify` ((email, code) => Promise): Check the code. On { ok: true } navigate away; the card keeps its loading state meanwhile. A wrong code clears the input and shows the error. Optional, leave the default unless I need otherwise: `mode / onModeChange`, `delivery`, `providers`, `onSocial / onProvider`, `codeLength / codeTtlMinutes / resendAfterS`, `initialError / onSent / terms / footer`, `variant`, `logo / topRight / footer`, `fill`, `children`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - OTP input (https://knowns-ui.com/docs/otp-input): Installed with it. The code step is an OtpInput that calls verify when the last digit lands. - Button (https://knowns-ui.com/docs/button): Installed with it. Continue, Create account and Verify use its loading state while a callback is pending. - Input (https://knowns-ui.com/docs/input): Installed with it. The Name and Email address fields are Field and Input with the invalid style on error. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "auth-card" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Auth page (auth-page) Free · components / Other · Docs: https://knowns-ui.com/docs/installation The page around the auth card: centered, or split with a brand panel that takes any background. ## Install ```bash npx knowns-ui@latest add auth-page ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/auth-page.json ``` ## Dependencies - Registry (installed with it): knowns-core, auth-card ## Files - components/ui/knowns/blocks/auth/auth-page.tsx ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | mode / onModeChange | "sign-in" \| "sign-up" / (mode) => void | "sign-in" | Sign-up adds an optional Name field, the Create account button and `terms`. onModeChange shows the switch link under the card. | | delivery | "code" \| "link" \| "both" | "code" | code: a 6-digit OtpInput step. link: a Check your inbox step with an Open Gmail/Outlook shortcut for known domains. both: the code step says a link was sent too. linkSent still works as both. | | onSendCode | (email, { mode, name? }) => Promise | - | Send the code or link. Resolve { ok: false, kind: "rate-limit", retryAfterS } to lock the form with a countdown. | | onVerify | (email, code) => Promise | - | Check the code. On { ok: true } navigate away; the card keeps its loading state meanwhile. A wrong code clears the input and shows the error. | | providers | ("github" \| "google" \| "microsoft" \| "apple" \| { id, label, icon? })[] | [] | OAuth buttons above the email form, with brand marks for the built-ins. Built-ins call onSocial, objects call onProvider. | | onSocial / onProvider | (provider) => Promise | - | Start the redirect. Resolve an error to show it on the card; the button spins until then. | | codeLength / codeTtlMinutes / resendAfterS | number | 6 / 10 / 30 | The code size, the expiry in the copy, and the resend cooldown. | | initialError / onSent / terms / footer | string / (email) => void / ReactNode / ReactNode | - | An error from a failed link that sent the user back; a hook after sending (e.g. a dev mail panel); the sign-up terms line; small print. | | a11y | labels, live region, focus | - | Every field is labelled; step changes are announced; the code step focuses the first digit and the link step focuses its heading. | | variant | "centered" \| "split" | "centered" | split puts a brand panel on the left from lg up; below that it falls back to the centered page. | | logo / topRight / footer | ReactNode | - | Your wordmark; a link to the other mode; Terms, Privacy and Help links under the form. | | aside | { eyebrow?, headline, description?, points?, background?, bottom? } | - | The split panel. background takes any Backgrounds block. Keep points factual; this is not the place for quotes you can't back up. | | fill | "screen" \| "parent" | "screen" | screen is a full-height page with a
landmark; parent fits a container (previews, modals) without adding one. | | children | ReactNode | - | The AuthCard, or any form. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Auth page to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: The page around the auth card: centered, or split with a brand panel that takes any background. Docs: https://knowns-ui.com/docs/auth-page 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add auth-page ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `a11y` (labels, live region, focus): Every field is labelled; step changes are announced; the code step focuses the first digit and the link step focuses its heading. - `aside` ({ eyebrow?, headline, description?, points?, background?, bottom? }): The split panel. background takes any Backgrounds block. Keep points factual; this is not the place for quotes you can't back up. Handle these by calling my own mutations or setters: - `onSendCode` ((email, { mode, name? }) => Promise): Send the code or link. Resolve { ok: false, kind: "rate-limit", retryAfterS } to lock the form with a countdown. - `onVerify` ((email, code) => Promise): Check the code. On { ok: true } navigate away; the card keeps its loading state meanwhile. A wrong code clears the input and shows the error. Optional, leave the default unless I need otherwise: `mode / onModeChange`, `delivery`, `providers`, `onSocial / onProvider`, `codeLength / codeTtlMinutes / resendAfterS`, `initialError / onSent / terms / footer`, `variant`, `logo / topRight / footer`, `fill`, `children`. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "auth-page" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Autonomy dial (autonomy-dial) Pro · blocks / Review · Docs: https://knowns-ui.com/docs/autonomy How much an agent may do on its own - ask every time, ask for risky, or auto - globally and per tool. > Pro component: needs a license. Install steps: https://knowns-ui.com/docs/installing-pro. Pricing: https://knowns-ui.com/pricing. ## When to use - Letting users set how much an agent may do alone, per tool, from always ask to fully automatic. - Answering an agent's permission request with the exact command, its risk and how long the answer holds. - An agent that stops mid run to ask the user a question, and carries on with the answer. ## When not to use - A queue of pending decisions across many runs: use Approval Prompt (https://knowns-ui.com/docs/approval-prompt) instead - A simple on/off setting with no risk levels: use Switch (https://knowns-ui.com/docs/switch) instead ## Install ```bash npx knowns-ui@latest add autonomy-dial ``` Pro: run `npx knowns-ui@latest login` once per project first (it saves your key to .env.local and keeps it out of git). Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add @knowns-ui-pro/autonomy-dial ``` The manual Pro setup (components.json registry and .env.local) is in get_install_instructions. ## Dependencies - Registry (installed with it): knowns-core, knowns-icons, segmented-control ## Files - components/ui/knowns/autonomy/autonomy-dial.tsx - components/ui/knowns/autonomy/autonomy-utils.ts ## Usage Usage examples for Pro items come with a license key. The live preview is on the docs page. ## Props AutonomyDial · value / defaultValue / onValueChange, AutonomyDial · tools / onToolChange, AutonomyDial · copy, PermissionRequest · agent / tool, PermissionRequest · command / cwd / reason, PermissionRequest · risk / riskNote, PermissionRequest · scopes / defaultScope, PermissionRequest · onDecide / decision, PermissionRequest · hotkeys / autoFocus (types and descriptions with a Pro license) ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Autonomy & Permissions to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: Decide how much an agent may do on its own, per tool, and answer its requests with the exact command, the risk and how long your answer holds. Docs: https://knowns-ui.com/docs/autonomy 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add autonomy-dial ``` This is a Pro item. If KNOWNS_LICENSE_KEY is not set and .env.local has no such line, ask me to run `npx knowns-ui@latest login` in my own terminal (I get the key at https://knowns-ui.com/account/license), and wait until I say it is done. Do not ask me to paste the key into this chat, do not print it, never commit it. If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - Letting users set how much an agent may do alone, per tool, from always ask to fully automatic. - Answering an agent's permission request with the exact command, its risk and how long the answer holds. - An agent that stops mid run to ask the user a question, and carries on with the answer. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Read the props table at https://knowns-ui.com/docs/autonomy#props, then connect each prop to the state, queries and handlers my app already has. If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. A 401 or 403 from the install means the key is missing or revoked, and a 429 means the daily limit is reached: see https://knowns-ui.com/docs/installing-pro#troubleshooting. Do not retry in a loop. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "autonomy-dial" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Avatar (avatar) Free · components / Data display · Docs: https://knowns-ui.com/docs/avatar Image, logo or initials with status dot, badge and verified mark; AvatarGroup with +N and invite; AvatarLabel with name and supporting text. ## When to use - People, agents and organisations as an image, logo or initials, with status and groups. ## When not to use - Just a state with no identity: use Status Dot (https://knowns-ui.com/docs/status-dot) instead ## Install ```bash npx knowns-ui@latest add avatar ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/avatar.json ``` ## Dependencies - Registry (installed with it): knowns-core, tooltip ## Files - components/ui/knowns/avatar.tsx ## Usage ```tsx import { Avatar, AvatarGroup, AvatarLabel } from "@/components/ui/knowns/avatar"; {people.map((p) => )} // On a card, match the ring to the surface: … ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | label | string | - | Name for initials and the accessible name. Status and verified are appended ("Noor Haddad, online"). | | src | string | - | Photo. Fades in over the fallback; if it fails to load, falls back to icon, then initials, then a person glyph. | | icon | ReactNode | - | Logo or glyph shown instead of initials. | | size | "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl" | "md" | 20, 24, 32, 44, 56 or 72px, with matching type and corner radius. | | shape | "square" \| "circle" | "square" | Rounded square for agents and tools, circle for people. | | hue | string | - | Tint for glyphs and initials, e.g. an agent colour. | | status | "online" \| "busy" \| "away" \| "offline" | - | Presence dot on the bottom-right (top-right when there is a badge). | | badge | ReactNode | - | Small mark on the bottom-right, e.g. a company or model logo. | | verified | boolean | false | Check mark on the corner when there is no badge. | | ring | boolean | false | Ring in the surface colour; AvatarGroup sets it. Dot, badge and ring use --avatar-ring (default var(--background)). | | decorative | boolean | false | Hide from assistive tech when the name is already next to it. | | AvatarGroup.max | number | - | Show at most this many; the rest fold into "+N" with a tooltip listing them. | | AvatarGroup.size / shape | AvatarSize / shape | "md" / "circle" | Applied to every avatar in the group. | | AvatarGroup.label | string | "N people" | Accessible name of the group. | | AvatarGroup.onAdd | () => void | - | Shows a dashed + button at the end; addLabel (default "Add people") names it. | | AvatarGroup.stack | "end" \| "start" | "end" | Which end sits on top. "start" puts the first avatar on top, so the first person (an owner, the assignee) reads in full. | | AvatarGroup.decorative | boolean | false | Pure decoration, e.g. faces beside a count: hidden from assistive tech, no group name, no hover lift, no +N and no add button. | | AvatarLabel.description | ReactNode | - | Supporting line under the name. AvatarLabel takes size sm \| md \| lg plus every Avatar prop. | ## Prompt Paste this into a coding agent to install it and wire it to your own data: ```text Add the Knowns UI Avatar to this project and wire it to my own data. Work step by step, show me each change, and ask before you edit files outside this project. What it is: People, agents and tools: a photo, a logo or initials, with presence, a badge and a verified mark. Group them with +N, or pair one with a name. Docs: https://knowns-ui.com/docs/avatar 1. Install it with the Knowns UI CLI: ```bash npx knowns-ui@latest add avatar ``` If the project has no components.json, or it fails on a missing registry, run `npx knowns-ui@latest init --no-key` first and ask me before you answer any overwrite prompt. 2. Find where this belongs in my app. Read my code first. Use the item where the person would otherwise build this by hand, and tell me where you put it. It fits when: - People, agents and organisations as an image, logo or initials, with status and groups. 3. Wire it to my data. The item holds no data of its own: props go in, callbacks come out. Never fetch inside it. Give it these, taken from my own state or queries (they have no default): - `label` (string): Name for initials and the accessible name. Status and verified are appended ("Noor Haddad, online"). - `src` (string): Photo. Fades in over the fallback; if it fails to load, falls back to icon, then initials, then a person glyph. - `hue` (string): Tint for glyphs and initials, e.g. an agent colour. - `status` ("online" | "busy" | "away" | "offline"): Presence dot on the bottom-right (top-right when there is a badge). Optional, leave the default unless I need otherwise: `icon`, `size`, `shape`, `badge`, `verified`, `ring`, `decorative`, `AvatarGroup.max`, `AvatarGroup.size / shape`, `AvatarGroup.label`, `AvatarGroup.onAdd`, `AvatarGroup.stack`, and 2 more (see the props table). If a prop needs data I do not have yet, say so and stop there, instead of inventing sample data in my app. 4. It pairs with these items. Only add one when my screen needs it: - Tooltip (https://knowns-ui.com/docs/tooltip): Installed with it. The "+N" chip and the add button of AvatarGroup open a tooltip. - Badge (https://knowns-ui.com/docs/badge): Pairs with it: a Badge takes a tiny decorative avatar as its leading icon. - Tag (https://knowns-ui.com/docs/tag): Pairs with it: a Tag shows an avatar before the label for an owner filter. 5. Verify: the project type-checks (for example `npx tsc --noEmit`), the page renders in light and dark, and it works at 390 px wide. If the Knowns UI MCP server is connected (https://knowns-ui.com/docs/ai-and-mcp), call get_component({ name: "avatar" }) for the full details. Finish with a short summary: the files you added or changed, what each prop is wired to, and anything I still need to do. ``` --- # Badge (badge) Free · components / Data display · Docs: https://knowns-ui.com/docs/badge Status labels in six tones: sizes, pill shape, icons, clickable and removable badges, and BadgeGroup with +N overflow. ## When to use - Short status labels in a tone, such as Active, Failed or Beta. ## When not to use - Selectable or removable filters: use Tag (https://knowns-ui.com/docs/tag) instead ## Install ```bash npx knowns-ui@latest add badge ``` Fallback (only if the knowns-ui CLI can't run, e.g. no network to npm or an older setup): ```bash npx shadcn@latest add https://knowns-ui.com/r/badge.json ``` ## Dependencies - Registry (installed with it): knowns-core, tooltip ## Files - components/ui/knowns/badge.tsx ## Usage ```tsx import { Badge, BadgeGroup } from "@/components/ui/knowns/badge"; Needs you Sonnet 5.5 setFilter("running")}>Running drop("beta")}>Beta {labels.map((l) => {l})} ``` ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | tone | "neutral" \| "accent" \| "info" \| "success" \| "warning" \| "danger" | "neutral" | Colour of the badge. | | variant | "soft" \| "outline" \| "solid" | "soft" | Tinted fill, hairline outline, or solid fill for counts and highlights. | | size | "sm" \| "md" \| "lg" | "md" | 20, 22 or 26px high. | | shape | "rounded" \| "pill" | "rounded" | Softly rounded corners, or fully round ends. | | dot | boolean | false | Leading dot in the tone colour. | | icon | ReactNode | - | Leading glyph, logo (modelIcon) or tiny avatar, sized to the badge and hidden from screen readers. | | onClick | (e) => void | - | Renders the badge as a button with a focus ring. Add aria-pressed for toggles. | | onRemove | () => void | - | Adds a × button (its own tab stop). Never triggers onClick. | | removeLabel | string | "Remove