Firstflow constructor plus a couple of environment values. There is no FirstFlow service, so there are no service URLs or API keys to point at.
Constructing Firstflow
Where rows are written. Pass
createSupabaseLLMPersistence(supabase) from
@firstflow/runtime-server/supabase, or implement the interface for another
store.Store prompt and completion text in
firstflow_conversation_messages. Off by
default only metadata (tokens, cost, latency, status) is recorded. Enable it
deliberately and match your RLS and retention to your privacy posture.Tags merged into every recorded call’s
metadata. Per-call firstflow.metadata
is merged on top.Environment
The SDK itself needs only your Supabase project URL and service-role key (for the adapter):ff.wrap(...) / createAIClient(...). Provide it however you like the provider SDK’s default variable (ANTHROPIC_API_KEY, OPENAI_API_KEY), your own env name passed explicitly, or createAIClient({ baseURL, apiKey }) for an OpenAI-compatible endpoint. See the provider tabs in self-hosting Configuration and Wrap your LLM client.
Custom persistence
Target a non-Supabase store by implementingFirstflowLLMPersistence:
recordCall is required; optional methods unlock messages, traces, signals, and the classifier’s read path.
Signed identity tokens
When you proxy SDK writes through your own API,signUserToken mints a tamper-proof identity payload your backend can verify: