Browse In-App Agent

React SDK — Release Notes

@revrag-ai/embed-react · release history, newest first. Install the latest with npm install @revrag-ai/embed-react@latest; confirm the current version on npm.


2.0.0

Released: 23 October 2026

The widget now reads your dashboard's widget configuration the same way the Android and React Native SDKs do, plus fixes for React StrictMode, TypeScript and Content Security Policy. No code changes are needed: nothing was removed or renamed. It is a major version because the widget can look and behave differently after the upgrade, depending on what your widget configuration sets — check Behaviour changes before you ship.

npm install @revrag-ai/embed-react@2.0.0

The widget's defaults changed. If your widget configuration leaves out the nudge, the agent's name or the auto-collapse time, your users will see a different widget after upgrading — most visibly, the inactivity nudge stops unless inactivityBehavior and nudgeDelay are both set. Set those fields on the dashboard first if you want to keep the 1.5.0 behaviour.

Breaking changes

None in the API. Every export, prop, hook and type from 1.5.0 is unchanged.

Behaviour changes to check

Fields your widget configuration leaves out now use the Android SDK's defaults:

Field left out1.5.02.0.0To keep 1.5.0 behaviour
Agent name / typeblank"Revrag AI" / "Onboarding Agent"Set agentTextContent.agentName / agentType
Call button text"Connect""Start Call"Set agentTextContent.buttonText
Nudgeafter 1.5 s, with a default messagenoneSet collapsedView.inactivityBehavior, nudgeDelay (seconds, above 0) and tooltipMessage
After a call connectsthe card stays openfolds back to the button after 15 s (the call keeps running)Set collapsedView.collapsedTime
Agent output panelstays opencloses 15 s after its text finishesSet collapsedView.viewCloseDelay (ms)
Tooltip colourpurple80% blackSet colorPalette.tooltipBackgroundColor
Corners of the open widgetround pill20pxSet colorPalette.borderRadius

Fields your widget configuration sets now take effect:

Field1.5.02.0.0
fillTypeany value except solid drew a left-to-right gradientthe gradient's direction: horizontal, vertical, otherwise diagonal (including gradient). solid, flat and color draw backgroundColor
textColorno effect; name and status always whiteagent name, status line and the captions (CC) badge
borderRadiusno effectthe open widget and the collapsed button, which becomes a rounded square filled with your gradient; the avatar stays round
tooltipBackgroundColor, tooltipTextColortooltip onlytooltip and the live caption bubble
only grad1 setno gradienta gradient from grad1 into a 35% darker shade
pulseColor not setdefault purpleyour widget's main colour

If a colour on your dashboard was wrong but had no visible effect in 1.5.0, it will show now.

New

  • More widget configuration fields, all set on the dashboard:
    • colorPalette.gradientColors — a gradient with any number of colours.
    • colorPalette.gradientPreset — a named gradient (ocean, sunset, aurora, midnight, …).
    • position.leftPadding and position.topPadding, and the bottom-center and top-center positions.
    • collapsedView.viewCloseDelay — how long the agent's output panel stays after its text finishes.
  • Bad colours are ignored. A colour the browser cannot draw falls back to its default instead of breaking the gradient. Negative paddings count as 0.

Fixed

  • Calls
    • startCall(), endCall() and isCallActive() now work under React StrictMode (on by default in Next.js development); before, they could report that no widget was mounted.
    • With two widgets on a page, unmounting one no longer stops the other from taking calls.
    • Unmounting the widget while it was still initializing no longer starts click tracking afterwards.
  • Content Security Policy
    • The in-call icons are bundled with the SDK; no image host needs to be allowed for them.
    • An avatar animation that cannot be loaded now shows the SDK's own animation. The SDK no longer retries through the third-party corsproxy.io, so you can remove corsproxy.io from your CSP.
  • TypeScript
    • Full types with moduleResolution set to nodenext / node16 (ES modules). In 1.5.0 they failed to resolve, or silently became any with skipLibCheck.
  • Install size
    • Six unused dependencies are no longer installed: zustand, zod, zod-to-json-schema, tailwind-merge, tailwindcss-animate and tiny-invariant.
  • Agent context — the snapshot of your page sent to the agent no longer includes subtree_text, as in the React Native SDK.

Upgrade steps: 1.5.0 → 2.0.0

  1. Install @revrag-ai/embed-react@2.0.0. A package.json range of ^1.5.0 will not pick it up on its own.
  2. Check your widget configuration against Behaviour changes. Set any field whose 1.5.0 behaviour you want to keep — at least the nudge fields, if you rely on the nudge.
  3. If your app imports zustand, zod, zod-to-json-schema, tailwind-merge, tailwindcss-animate or tiny-invariant without listing it in its own package.json, add it there.
  4. Optional: remove corsproxy.io from your Content Security Policy.

No code changes are needed.


1.5.0

Released: 5 October 2026

The Action Intelligence release — the voice agent can now see and act on the host page — plus a React 17 build and many widget stability fixes. Several of the fixes stop crashes and freezes the host app could hit in 1.4.4, so upgrading is recommended. Upgrading from 1.4.4 needs a few code changes; work through the upgrade steps below.

npm install @revrag-ai/embed-react@1.5.0

Breaking changes

ChangeWhat to do
appVersion is required in useInitializePass it in the options: useInitialize(apiKey, { appVersion }). Without it, initialization fails and the widget never appears.
useEmbed() removedUse startCall, endCall, isCallActive and the widget functions in New exports.
EmbedContextType type removedNot needed once useEmbed is gone.
EventPayload type removedUse CustomEventPayload.
embedEvent is narrowerreset() and getSessionId() are gone. event, customEvent, addCallback, removeCallback and getStoredAppUserId remain.

Behaviour changes to check

ChangeWhat to check
The agent can act on your pages during a callAdd data-revrag-mask to fields it must never read, and put screens it must never see in excludeScreens.
Higher default z-indexThe widget now sits above the host page's own modals and overlays. If you placed your own UI above the widget with a fixed z-index, check it is still on top.
The button is draggable by defaultKnown issue: EmbedButton does not pass draggable or autoCollapseMs through in 1.5.0, so draggable={false} has no effect yet.

New

  • Action Intelligence. During a call, the agent can read the current screen and act on it — tap, type, select, scroll and read fields — and highlights each element it acts on.
    • Starts automatically inside EmbedProvider; no setup needed.
    • Masked fields (data-revrag-mask, exported as MASK_ATTR) are never sent.
    • If the user clicks or types during an action, the agent stops instead of overwriting them.
    • New EmbedProvider props: actionRootRef, excludeScreens, showOnAllScreens and getScreenName.
  • Widget.
    • A draggable button, on by default, that works with touch.
    • Live captions (CC) and an in-call status line ("Speaking", "Listening").
    • During a call, the expanded card collapses back to the button after collapsedView.collapsedTime; the call keeps running.

New exports

ExportWhat it does
startCall, endCall, isCallActiveStart or end a call from your own code
expandWidget, collapseWidget, isWidgetExpanded, subscribeWidgetExpandedOpen, close or watch the widget
EmbedLogoutClear the SDK session when your user signs out
AgentEvent, embedOnAgent, embedOffAgentSubscribe to agent lifecycle events
MASK_ATTRThe attribute name that masks a field
@revrag-ai/embed-react/react17Build for React 17 apps on webpack
@revrag-ai/embed-react/diagnosticsverifyIntegration() and integrationSnapshot() to check a setup

Fixed

  • Host app safety
    • A crash inside the widget now hides only the widget, instead of unmounting the whole app.
    • Bad values in the dashboard's widget config no longer crash rendering; each field falls back to its default.
    • The SDK loads when browser storage is blocked ("Block all cookies", sandboxed iframes).
    • No more tab freeze when another script also keeps its element pinned to the end of <body>.
    • Ending a call no longer removes the host page's own <audio> elements.
    • "use client" is back in the bundles, so the Next.js App Router works without a wrapper.
  • Calls
    • Closing the widget or ending a call while it was still connecting could leave the microphone on — fixed.
    • Mute state no longer carries over into the next call.
  • Widget display
    • The widget no longer sits behind the host page's own modals and overlays, and stays usable while a host dialog is open.

Upgrade steps: 1.4.4 → 1.5.0

  1. Install @revrag-ai/embed-react@1.5.0, and check your stack against the Dependency & Compatibility Guide.
  2. Pass appVersion to useInitialize, matching a version your Revrag dashboard has a config for.
  3. Search your code for useEmbed, EmbedContextType and EventPayload, and replace them as above.
  4. React 17 on webpack: import from @revrag-ai/embed-react/react17.
  5. Import the stylesheet as @revrag-ai/embed-react/style.css, not …/dist/style.css.
  6. Call EmbedLogout() when your user signs out.
  7. Mask sensitive fields and set excludeScreens where needed.
  8. Optional: run verifyIntegration() from @revrag-ai/embed-react/diagnostics to check the setup.

The React integration guide covers each step in detail.


1.4.4 and earlier

1.4.4 was published on 8 June 2026. It predates most of 1.5.0: no /react17 or /diagnostics entry, no appVersion option, no Action Intelligence, no call controls, no agent events and no EmbedLogout(). If you are still on it, upgrade with the steps above.