Skip to main content

Usage


Parameters

str | None
default:"None"
Supabase project URL. Falls back to SUPABASE_URL.
str | None
default:"None"
Supabase API key. Falls back to SUPABASE_KEY or SUPABASE_SERVICE_ROLE_KEY.

Environment variables

Use SUPABASE_SERVICE_ROLE_KEY for server deployments where you need to bypass Row Level Security. Use SUPABASE_KEY (anon key) for client-side or restricted access.

Tables created automatically

LangChat creates these tables on first run:

chat_history

request_metrics


Querying your data

You can use the Supabase dashboard or the Python client directly to query these tables:

Row Level Security (RLS)

If you enable RLS on Supabase tables, you must either:
  1. Use the service_role key (bypasses RLS entirely)
  2. Add appropriate RLS policies for the langchat operations
For most server-side deployments, using SUPABASE_SERVICE_ROLE_KEY is the simplest approach.