Documentation Index
Fetch the complete documentation index at: https://docs.firstflow.app/llms.txt
Use this file to discover all available pages before exploring further.
FirstflowProvider props
Agent ID from the Dashboard.
Public API key from the Dashboard (agent settings → API Keys).
Current user. Pass Traits are used for audience targeting. Example:
null when logged out.Pre-fetched config from
getFirstflowConfig() (Next.js only). Bypasses the client-side fetch.Rendered while config loads. Defaults to rendering children immediately.
Called if the config fetch fails. The SDK silently continues without experiences if not provided.
Called when an experience flow node fires a user-facing prompt (e.g., a button with a configured
ctaPrompt). Wire this to your chat input to inject the message:FirstflowWidget props
overlay— centered modal over the chatinlineStack— inline, above the composer
Show a minimize button. Users can collapse the experience and restore it later.
Color scheme.
auto follows the OS preference.Fires when an experience becomes visible.
Fires when an experience is dismissed.
Experience settings
All experience settings are configured in the Dashboard. The following documents every field.Triggers
When an experience shows. Multiple triggers can be configured — an experience fires when any one of them matches.show_on value | When it fires |
|---|---|
chat_opens | When the user’s chat session starts |
after_user_message | After the user sends their first message |
after_idle | After the user has been idle for delay_seconds |
custom_event | When your code calls firstflow.analytics.track("your-event-name") |
Audience
Who sees the experience.| Type | Behavior |
|---|---|
all | Show to every user |
segment | Show only to members of a named segment |
rules | Show when user traits match a set of rules (AND or OR) |
user.traits.
Audience rule operators
| Operator | Description |
|---|---|
equals | Exact match |
not_equals | Not equal |
contains | String contains substring |
not_contains | String does not contain |
in | Value is in list |
not_in | Value is not in list |
gt / gte | Greater than / greater than or equal (numeric) |
lt / lte | Less than / less than or equal (numeric) |
exists | Field is not null |
not_exists | Field is null |
traits.plan, traits.company.size. Direct user fields (id, email) are also resolvable.
Device
| Value | Matches |
|---|---|
all | Any device |
desktop | Non-mobile user agents |
mobile | Mobile user agents (Android, iPhone, iPad) |
navigator.userAgent.
Schedule
| Setting | Options |
|---|---|
| Start | now or a specific date/time with timezone |
| Expiration | none or a specific date/time with timezone |
Frequency
How many times an experience can show to the same user.| Type | Behavior |
|---|---|
once | One time, forever |
limited | Up to N times per session, day, week, or lifetime |
always | No limit |
localStorage (or sessionStorage for session-scoped limits) using keys prefixed with ff_exp_. Clear these keys to reset frequency during testing:
Priority
Integer. Higher values are shown first when multiple experiences are eligible simultaneously. Default is0.
Placement
Per-experience override forFirstflowWidget’s default placement. Can be set on individual nodes too.
Theming
Widget colors and radii are configured in the Dashboard (agent → Settings → Widget UI). The SDK injects CSS custom properties automatically.CSS custom properties
Theme object (dashboard config)
SDK settings
Agent-level settings returned with config:| Setting | Default | Description |
|---|---|---|
poweredByFirstflow | true | Show “Powered by Firstflow” branding in the widget chrome |
Config refresh
refreshConfig() bypasses the cache.