Run weft in production
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 development | In production |
|---|---|
otel.Install(): the local sink, or instead whatever the environment or a running Studio’s discovery file adds | named destinations, content off for third parties, a Redact for the rest |
weft studio on loopback, the dev token | studio.New behind studio.Token and studio.IngestToken (setup C) |
| runs kept forever | studio.Retain(d) or weft vacuum --retain d |
SQLite in ./.weft | SQLite 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 link | WEFT_ENV unset, and no otel.DevMode() in the binary |
| real model calls | WEFT_MODEL_REQUESTS=deny in CI |
Pages in this section
Section titled “Pages in this section”- Deploy an agent service with a hosted Studio: the pieces of a deployment, setup C, exporting with an ingest token, and an ordered shutdown.
- Secure Studio: tokens, loopback and origins: what guards the API in each setup, panel tokens, the live grant.
- Control what content leaves the process: content per destination, redaction, caps, the agent veto, raw bodies in development only.
- Keep and delete recorded runs:
Retain, deleting a run or a session,weft vacuum. - Choose the observability database: SQLite or ClickHouse: the two obsdb backends, migrations and TTLs.
- Limits and performance: the caps, budgets, queues and timeouts, and what happens when one is hit.
- Operate Studio: logs, restarts and the runtime link: what Studio logs and what survives a restart.
- Upgrade weft: breaking changes by version and the pre-1.0 stability policy.
Sessions have their own operations page: Operate sessions in production.