Install
The Founding Agent SDK moved from
@moss-tools/founding-agent to @moss-js/founding-agent with 2.2.0. Existing @moss-tools/founding-agent installs keep working but stay on 2.1.0; switch the dependency name to receive updates.Styling
The React widget is styled with Tailwind CSS v4 classes and ships no stylesheet of its own. Your app needs Tailwind v4, with a@source line so Tailwind generates the classes the widget uses. Without it, the bubble renders as an unstyled button.
@source path is relative to the CSS file, so adjust it if your stylesheet lives elsewhere.
Keys
Publishable key
Starts with
pk_. Safe to expose in the browser. Used by the React provider to identify your agent.API key
Starts with
sk_. A server secret used to mint sessions. Shown once, so store it safely and never ship it to the browser.Environment variables
Keep the API key in a server-side environment variable so it never reaches the browser. The token route reads it asMOSS_FA_API_KEY.
NEXT_PUBLIC_ variable if you prefer. See React components.
Next steps
Server token route
Create the server route that mints a short-lived session for the browser.