Skip to content

Run weft in production

View as Markdown

In development weft needs no configuration. With no Studio running and no destination in the environment, otel.Install() writes the local sink ($WEFT_DB, else ./.weft/weft.db). With weft dev or weft studio running on loopback behind its dev token, the app exports to that Studio instead: weft dev passes its own app WEFT_STUDIO_URL and WEFT_STUDIO_TOKEN, and any other app finds a running Studio through its discovery file. In production you name each of those choices: which destinations receive records and with what content, a Studio behind tokens, how long runs are kept, which database holds them, where sessions live, and the order the service shuts down in.

In developmentIn production
otel.Install(): the local sink, or instead whatever the environment or a running Studio’s discovery file addsnamed destinations, content off for third parties, a Redact for the rest
weft studio on loopback, the dev tokenstudio.New behind studio.Token and studio.IngestToken (setup C)
runs kept foreverstudio.Retain(d) or weft vacuum --retain d
SQLite in ./.weftSQLite on a volume, or ClickHouse for a fleet
thread.Memory()thread/jsonl or thread/sqlite, one writer per session
WEFT_ENV=dev: lets otel.RawBodies, otel.DevDetail and otel.Blocking take effect and runtime.Install open its linkWEFT_ENV unset, and no otel.DevMode() in the binary
real model callsWEFT_MODEL_REQUESTS=deny in CI

Sessions have their own operations page: Operate sessions in production.