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’s initialSdkPayload prop. When provided, the client skips the initial config fetch and renders immediately — no loading flash.
Usage
CallgetFirstflowConfig() in your root layout (a Server Component):
Environment variables
getFirstflowConfig() reads the following variables automatically. No arguments required.
NEXT_PUBLIC_ prefix and are not exposed to the browser.
Return value
Returns aPromise<SdkPayload | null>. The returned value is opaque — pass it directly to initialSdkPayload without inspecting or modifying it.
If the fetch fails (network error, invalid credentials), getFirstflowConfig() returns null. The provider falls back to a client-side fetch automatically.
Notes
- Only works in Server Components (App Router). Not compatible with the Pages Router.
- The config is fetched fresh on every server render. For caching, wrap with Next.js’s
unstable_cacheor use route segment config (export const revalidate = 300). - If
FIRSTFLOW_AGENT_IDorFIRSTFLOW_API_KEYare missing, the function logs a warning and returnsnull.