Skip to main content

Minimal example

Wrap your app in MossFoundingAgentProvider and place MossFoundingAgentBubble anywhere inside it. Both are exported from the /react subpath. Point tokenEndpoint at your server token route; it defaults to /api/moss-token.

MossFoundingAgentProvider

publishableKey
string
required
Your pk_... key. Safe to expose in the browser.
tokenEndpoint
string
default:"/api/moss-token"
Your server route that mints the session (see the server token route page).
serviceUrl
string
Optional override of the Moss service base. Leave unset in production.

MossFoundingAgentBubble

position
"inline" | "fixed"
Inline renders the bubble in the page flow; fixed pins it to a corner of the viewport.
color
string
default:"violet"
Orb color preset. One of violet, cobalt, teal, emerald, coral, or amber.
themeMode
"light" | "dark" | "system"
Color scheme for the widget.
hideOnSelector
string
Optional CSS selector. The bubble hides while a matching element is visible on the page.

Live transcript

Add <MossLiveTranscript /> as a child of the provider to render the running transcript.

Custom UI

If you want to build your own controls, useVoiceAgentStore from @moss-tools/founding-agent/react exposes read-only state including connectionState, voiceState, and transcript. Import the hook inside a component that is already wrapped by the provider.

Advanced experiences

Guided, conversation-driven site control (scrolling and navigating your site from within the call) is possible with Moss. Contact the Moss team to enable it.

Next steps

Demo booking

Let visitors book a demo by voice, backed by your Cal.com calendar.