NPM Library: Interactive Chat UI + LLM Compiler for Quick Actions
What it is
A frontend library that upgrades normal AI chat into interactive conversations where the AI can output UI components (buttons, forms, selections, cards) and users can take actions instantly - without re-prompting.
This is a "chat-to-app" interface layer.
What it solves
Text-only chat has major friction:
- Users waste time writing prompts that should be clicks
- Repeated "clarify" loops waste tokens and attention
- Complex flows become messy and inconsistent
- Developers struggle to maintain structured UX in a chat window
This library solves: prompt fatigue + slow UX + lack of structured actions.
How it works
1. AI outputs a structured UI instruction
Instead of only returning text, the AI can output:
- A button group
- A dropdown
- A form
- An action card
- A progress state
2. The library renders it into UI
The library converts that instruction into real UI in the chat.
3. Two-way binding / quick actions
When the user clicks a UI element, the library sends a structured event back:
- "user selected option X"
- "user approved action"
- "form submitted with fields"
4. Developer hooks
Developers can attach handlers to actions by ID:
- AI generates a button with
id #dtol - Developer maps it to "switch to dark theme"
So the AI can propose actions; the app executes them safely.
Key features
Interactive components
- Buttons, quick replies, option chips
- Forms (multi-field inputs)
- Cards (structured content blocks)
- Confirm dialogs for approvals
- Progress + status elements for long workflows
Token-efficient "compiler format"
- Supports compact markup that is cheaper than verbose JSON/HTML
- Frontend compiler converts it into UI elements
- Makes "UI generation" cheaper in tokens and easier to control
Safe action execution
- Allowlist which actions the AI can trigger
- Approval gates for sensitive actions
- Prevents arbitrary script/HTML injection
Portable integration
- Works with any LLM backend (because it's just a rendering + event contract)
- Lets developers keep their own agent stack while upgrading UI
White-label compatibility
- The UI library can match themes for any product
- Works as a core layer inside other platforms
Primary audiences
- Any AI product team building chat experiences
- SaaS products adding assistants with real UI actions
- Developers who want "minimal prompting, maximum actions"
Differentiator
Most chat UIs are message lists.
This is an interaction contract that makes chat behave like a real product UI.
