Frontend & UI
Reactive Agents ships frontend building blocks in four packages. The headless core, @reactive-agents/ui-core, owns the wire protocol, the resumable stream client and the run state machine. The bindings for React, Vue and Svelte are thin glue on top of it. Drop-in components (composer, cards, toasts and more) come from the same bindings.
All four packages are labelled unstable in the stability reference: they can change in any release. Pin versions.
Pick your path
Section titled “Pick your path”| I want | Go to |
|---|---|
| A chat input (send, queue, stop, file drop, slash commands) | Composer and Slash Menu |
| To stream an agent into React, Vue or Svelte | Web Integration |
| Ready-made approval and question cards, a settings form shell | Cards and Config Shell |
| Toasts, tooltips, long windowed lists | Lists, Tooltips and Toasts |
| A context-window gauge, chart, findings, or markdown rendering | Context Window Views and Markdown |
| Headless state only, my own components | Agentic UI Core |
| The React or Vue component set | React Drop-in Blocks, Vue Drop-in Blocks |
| An end-to-end Next.js example | Add an AI Agent to a Next.js App |
| To see a finished app that uses all of this | Cortex Studio, the reference app (its chat UI is described in Chat and composer) |
Two server-side topics sit outside this group because they are not frontend code. Streaming covers agent.runStream() and the SSE adapter your route handler calls. Chat & Sessions covers agent.chat() and agent.session() for multi-turn memory.
Three steps, any framework
Section titled “Three steps, any framework”The shape is the same everywhere. Each step links to the page that holds the full code.
-
Server. A route handler builds an agent and returns
AgentStream.toSSE(agent.runStream(prompt)). See the server setup in Web Integration. -
Client state. Install your binding and read agent state from one call:
- React:
useAgentStreamoruseAgentfrom@reactive-agents/react - Vue:
useAgentStreamoruseAgentfrom@reactive-agents/vue - Svelte:
createAgentStreamorcreateAgentfrom@reactive-agents/svelte
Each exposes the streamed text, a status and a
runfunction. For a run that pauses on an approval or survives a reload, useuseRun(React, and Vue from 0.20.1) orcreateRun(Svelte). Examples per framework are in Web Integration. - React:
-
Components. Import the stylesheet once (
@reactive-agents/<framework>/styles.css), map the--ra-*variables to your theme, and import blocks from@reactive-agents/<framework>/components. The components own no store and make no request: you pass state down and handle events. Start with the Composer.
Package map
Section titled “Package map”All names below were checked against each package’s src/index.ts and subpath exports on 2026-12-02.
| Package | Role | Main exports |
|---|---|---|
@reactive-agents/ui-core |
Headless, Effect-free, browser-safe core | Wire protocol types, connectRunStream, initialRunState and reduceRunState, turn-trace and status helpers, cost and time formatters, uiTreeSchema, fetchInbox, a ./testing subpath |
@reactive-agents/react |
React 18+ binding | Hooks useAgentStream, useAgent, useRun, useResumableRun, useInteractions, useTaskInbox, useRunCost, useRunSteps; blocks AgentPrompt, ChoiceCard, ApprovalGate, TaskInbox, CostMeter, StepTimeline, AgentSurface, AgentDevtools; subpaths ./components, ./markdown, ./styles.css, ./testing |
@reactive-agents/vue |
Vue 3.2+ binding | Composables useAgentStream, useAgent, useStructuredObject; from 0.20.1 useRun, useResumableRun, useInteractions, useTaskInbox, useRunCost, useRunSteps; subpaths ./components, ./markdown, ./styles.css |
@reactive-agents/svelte |
Svelte binding (stores work on Svelte 4+; the components are Svelte 5) | Stores createAgentStream, createAgent, createStructuredStream, createRun, createResumableRun, createInteractions, runCost, runSteps; subpaths ./components, ./markdown, ./styles.css, ./testing |
All three binding roots export the run, resumable-run and interaction rails (durable human-in-the-loop). The Vue root has them from 0.20.1, which also raised its peer floor to Vue 3.2; the reference and an approval example are in Durable-run composables. The Svelte root has no inbox store; call fetchInbox from ui-core there.
Markdown rendering lives on its own ./markdown subpath because it needs optional peer dependencies.
Status: shipped and planned
Section titled “Status: shipped and planned”| Piece | Status |
|---|---|
| Token streaming hooks, composables and stores (React, Vue, Svelte) | Shipped, unstable |
ui-core protocol, resumable streams, run state machine, fixture testing |
Shipped, unstable |
| Drop-in blocks: Composer, SlashMenu, approval and question cards, config shell, toasts, tooltips, virtual list, context views, run controls | Shipped, unstable. Svelte, React and Vue sets share props, labels and data-ra-* hooks |
| Chat bundle: a ready-made thread view, session list and endpoint adapter | Planned, not shipped. Today you compose a chat UI from the Composer, the run state and your own message list, as Cortex does |
The direction is that an app with its own chat can adopt the ui-core state and the drop-in blocks it wants without rebuilding them. Treat that as direction, not a guarantee: only the shipped rows above are supported today.
Where each topic lives
Section titled “Where each topic lives”- Bindings: Web Integration for the three frameworks side by side.
- Components: the five
agentic-ui-*block pages, plus the overview and the React and Vue notes. - Core: Agentic UI Core.
- Recipes: Next.js agent.
- Reference app: Cortex Studio, with Connect your app for streaming your own agents into it.
- Consumer skill: the
ui-integrationagent skill teaches the same API to coding assistants.
What’s Next
Section titled “What’s Next”- Web Integration: wire a stream into your framework
- Composer and Slash Menu: the first block most chat UIs need
Install
Bun (recommended)bun add reactive-agentsNode 22.5+npm install reactive-agentsGet notified on new releases
Release notes, about once a month.