Skip to content
Docs
GitHub

Environment Variables

Every Everruns environment variable: database connections, authentication, encryption, and development mode.

40 min readEdit on GitHub

A production control plane (any DEPLOYMENT_GRADE other than dev, DEV_MODE unset) refuses to start without the first three variables. Everything else has a working default; each row links to the section that documents it.

VariableProcessRequiredWithout it
DATABASE_URLAPIYes, unless DEV_MODE=trueStartup fails. Dev mode ignores it and starts its own temporary PostgreSQL.
AUTH_MODEAPIYes, unless the grade is devStartup fails: unset means none, which is allowed only at dev grade.
WORKER_GRPC_AUTH_TOKENAPI and workers (same value)Yes, unless DEV_MODE=trueThe API fails to start its gRPC server; workers cannot authenticate.
SECRETS_ENCRYPTION_KEYAPIRecommendedThe API starts, but cannot store provider keys or other encrypted values. Turns still run, in-process and on remote workers, without durable compaction checkpoints or native async tool journals.
DEV_MODE, DEPLOYMENT_GRADEAPI and workersNoProduction behavior (prod grade).
PUBLIC_APP_URL, AUTH_LOGIN_ORIGIN, API_PREFIX, CORS_ALLOWED_ORIGINS, HTTP_ADDRAPINohttp://localhost:9300, same-origin login, /api, CORS off, 0.0.0.0:9000.
DATABASE_UNPOOLED_URL, DATABASE_POOL_MAX, DATABASE_POOL_MINAPINoListeners reuse DATABASE_URL; pool of 5 to 50 connections.
VALKEY_URLAPINoRate limits are per instance.
NATS_URLAPI and workersWith more than one control-plane instancePostgreSQL NOTIFY and in-memory broadcast (one instance only).
STORAGE_*APINoFile and image bytes stay in PostgreSQL.
SERVER_GRPC_ADDRESS, SERVER_GRPC_BIND_ADDR, WORKER_GRPC_CONNECT_TIMEOUT, WORKER_GRPC_REQUEST_TIMEOUT_SECS, WORKER_ACTOR_STALL_TIMEOUT_SECS, WORKER_TOOL_DETACH_AFTER_SECS, WORKER_MAX_RUNNING_TURNS, WORKER_MEMORY_LIMIT_MIB, WORKER_MAX_RUNTIME_LAG_MS, MAX_DETACHED_TOOL_CALLS, WORKER_GRPC_TLS_*API or workersNoPlain gRPC on 127.0.0.1:9001 / 0.0.0.0:9001; 120 s per worker call; a stalled session is let go after 5 minutes; turns admitted by memory and runtime lag; a tool call running past 5 minutes parks its turn.
DEFAULT_*_API_KEYAPINoProviders need keys configured in Models > Providers.
UTILITY_*API and workersNoAnalyze, Health, and model-backed guardrail checks are unavailable or skipped.
SLACK_MANAGER_APP_CLIENT_ID, SLACK_MANAGER_APP_CLIENT_SECRETAPINoOrganizations connect Slack workspaces by pasting a configuration token.
EVERRUNS_EGRESS_*API and workersNoTenant traffic may reach any public host, directly from the deployment’s address.
EGRESS_PROXY_*everruns-egress-proxyOnly when running the proxyNo proxy.
EMAIL_PROVIDER, RESEND_*APIWhen sending emailEmail delivery is disabled.
RATE_LIMIT_API_REQUESTS_PER_MINUTE, TRUSTED_PROXY_HOPS, EXPECTED_INSTANCES, EVENT_RETENTION_DAYS, SSE_*, SERVER_SHUTDOWN_*APINo1200 requests per minute, one trusted proxy, one instance, no event archiving, default SSE limits, a 5 s linger and 20 s drain on shutdown.
EVENT_GROUP_COMMIT, SESSION_ACTOR_STICKY_GRACE_MS, REPORTING_BACKGROUND_ENABLEDAPINoEvent writes share commits over 4 lanes, a session waits 300 ms for the worker that ran its last turn, reports are built.
OTEL_*, EVERRUNS_TRACE_CONVENTIONS, BRAINTRUST_*API and workersNoTracing and Braintrust export are off.

Enable development mode. No PostgreSQL to install or run: the server starts a temporary PostgreSQL of its own and deletes it on exit.

PropertyValue
RequiredNo
Defaultfalse

Example:

Terminal window
# Start in dev mode (no database to set up)
DEV_MODE=true ./target/debug/everruns-server
# Or with 1
DEV_MODE=1 ./target/debug/everruns-server

Notes:

  • When enabled, the server downloads PostgreSQL 17 binaries on first use (cached under ~/.cache/everruns/postgres, or EVERRUNS_PG_CACHE), starts a cluster on a free loopback port, and runs migrations into a fresh database. DATABASE_URL is ignored.
  • Data does not survive a restart. Use just start-all for a persistent local database.
  • Run dev mode as a non-root user. Root callers receive a startup error; use a non-root account or external PostgreSQL with DEV_MODE=false.
  • All data is lost when the server stops
  • gRPC server and worker communication are disabled
  • Stale task reclamation is disabled
  • Useful for quick local development and testing
  • Not suitable for production or multi-instance deployments

Limitations in dev mode:

  • No persistence (data is lost on restart)
  • No worker support (all execution happens in-process)
  • No distributed tracing of worker activities
  • Single-instance only

Deployment environment grade. Controls which features and capabilities are available.

PropertyValue
RequiredNo
Defaultprod (or dev if DEV_MODE=true)

Valid values:

GradeDescription
devDevelopment - all experimental features enabled
pocProof of concept / demo environment
previewPreview/staging environment
prodProduction - only stable features

Example:

Terminal window
# Run in development mode with experimental features
DEPLOYMENT_GRADE=dev ./target/debug/everruns-server
# Production mode (default)
DEPLOYMENT_GRADE=prod ./target/debug/everruns-server

Notes:

  • If not set, falls back to DEV_MODE: if DEV_MODE=true, uses dev; otherwise uses prod
  • Experimental capabilities (e.g., Docker Container) are only available in dev grade
  • Experimental seed agents (e.g., Python Coder) are only created in dev grade
  • Use dev for local development and testing experimental features
  • Use prod for production deployments

Each FEATURE_<NAME> variable overrides that feature’s rollout grade. Feature grades are separate from DEPLOYMENT_GRADE, which describes the running deployment.

ValueBehaviour
devAvailable only on a local dev deployment; enabled there by default
internalDisabled until a platform operator enables it for a specific organisation
adoptionDisabled by default; an organisation owner/admin may enable it
prodEnabled by default; an organisation owner/admin may disable it
offUnavailable; neither organisation nor platform settings can enable it

For example, FEATURE_EVALS=adoption exposes an org opt-in, while FEATURE_EVALS=off disables Evals for every organisation. Overrides take effect after restarting the affected processes. Boolean values such as true and false and the former feature grade preview are no longer supported; invalid values disable the feature. When migrating a deployment that offered org opt-in with true, use adoption to preserve that behavior; use off for former false values. prod intentionally enables the feature by default for every organisation. Configure the same grades on the API, workers, and UI where they perform registration or ingress gating.

Path prefix for REST API routes.

PropertyValue
RequiredNo
Default/api

Example:

Terminal window
# Routes at /api/v1/agents
API_PREFIX=/api

Notes:

  • /health, /api-doc/openapi.json, /mcp, /.well-known/*, /oauth/*, and /cli/login-success stay at the server root
  • /mcp is always mounted and authenticated; there is no FEATURE_MCP_ENDPOINT deployment variable or organization feature toggle
  • REST API routes including auth (/v1/auth/*) are mounted under this prefix
  • OAuth callback URLs use AUTH_BASE_URL, which defaults to PUBLIC_APP_URL plus API_PREFIX when unset
  • Override only if you need a non-/api REST prefix behind a reverse proxy or gateway

Public browser origin for the Everruns app. In single-origin deployments, set this once and the server derives FRONTEND_URL and AUTH_BASE_URL from it.

PropertyValue
RequiredNo
Defaulthttp://localhost:9300

Example:

Terminal window
PUBLIC_APP_URL=https://everruns.example.com

Notes:

  • FRONTEND_URL defaults to PUBLIC_APP_URL
  • AUTH_BASE_URL defaults to PUBLIC_APP_URL plus API_PREFIX (for example, https://everruns.example.com/api)
  • Set FRONTEND_URL only when browser redirects must land on a different origin
  • Set AUTH_BASE_URL only when OAuth callbacks use a different public API base
  • In the UI runtime, it is the fallback API base for server-rendered pages; see UI_SERVER_API_URL

Trusted browser origin that hosts the login page. Set this when an OSS-UI-based app delegates /login to a central identity origin.

PropertyValue
RequiredNo
DefaultNot set (same-origin relative /login)

Example:

Terminal window
AUTH_LOGIN_ORIGIN=https://id.example.com

Notes:

  • Supply only an HTTP(S) origin, with no credentials, path, query, or fragment
  • Set the same value in the server and UI runtime environments
  • The value is trusted deployment configuration; request/query input cannot override it
  • return_to remains a relative path and is still sanitized against open redirects
  • Configured absolute login redirects use full-page navigation

API base URL the UI server calls when it pre-renders a page (for example the agent, harness, session, and skill lists). Set it on the UI service. It may be an internal address that only the UI can reach.

PropertyValue
RequiredNo
DefaultPUBLIC_APP_URL (as set in the UI runtime) plus /api; unset when neither is set

Example:

Terminal window
UI_SERVER_API_URL=http://server:9000/api

Notes:

  • Include the API prefix (/api by default); supply an HTTP(S) URL with no credentials, query, or fragment
  • The UI forwards the signed-in user’s cookies on these requests, so the destination comes only from deployment configuration; the request’s Host header is never used
  • Redirects are not followed; a redirect response counts as a failed prefetch
  • If neither this nor PUBLIC_APP_URL is set in the UI runtime, or the value is invalid, the UI skips server prefetch and the browser loads the data after the page renders

Comma-separated list of allowed origins for cross-origin requests. Only needed when the UI is served from a different domain than the API.

PropertyValue
RequiredNo
DefaultNot set (CORS disabled)

Example:

Terminal window
# Allow requests from a different frontend origin
CORS_ALLOWED_ORIGINS=https://app.example.com
# Multiple origins
CORS_ALLOWED_ORIGINS=https://app.example.com,https://admin.example.com

Notes:

  • Not needed for local development (Caddy reverse proxy keeps UI and backend on one origin)
  • Not needed in production if using a reverse proxy on the same domain
  • If set, credentials are allowed (Access-Control-Allow-Credentials: true)
  • Wildcard (*) is not supported when using credentials
  • Browsers may send X-Org-Id, Idempotency-Key, Everruns-Change-Reason and Everruns-Context-Revision in addition to the standard headers, and can read the Idempotent-Replayed response header

Bind address for the server HTTP API.

PropertyValue
RequiredNo
Default0.0.0.0:9000

Example:

Terminal window
HTTP_ADDR=0.0.0.0:9000

Notes:

  • ADDR is supported as a legacy alias
  • Container images already default to 0.0.0.0:9000; most deployments do not need to set this

How a stopping server drains, so a rolling restart does not cut running work. On SIGTERM it keeps serving for SERVER_SHUTDOWN_DELAY_SECS while load balancers stop routing to it, then stops accepting, ends event streams with a disconnecting event (reason shutdown) so clients reconnect to another replica, and lets in-flight requests finish for up to SERVER_SHUTDOWN_GRACE_SECS. The worker connection closes last, after at most 5 more seconds.

VariableDefaultDescription
SERVER_SHUTDOWN_DELAY_SECS5Seconds to keep serving after SIGTERM before draining starts
SERVER_SHUTDOWN_GRACE_SECS20Seconds in-flight requests get to finish once draining

Notes:

  • Keep delay + grace + 5 seconds under the orchestrator’s kill timeout (Kubernetes terminationGracePeriodSeconds, default 30; Compose stop_grace_period)
  • Workers drain separately: WORKER_SHUTDOWN_GRACE_SECS bounds how long a stopping worker waits, and running turns are handed to another worker at their next step

Connection URL for Valkey (Redis-compatible) used for distributed rate limiting across control-plane instances.

PropertyValue
RequiredNo
DefaultNot set (uses per-instance in-memory rate limiting)

Example:

Terminal window
# Local Valkey
VALKEY_URL=redis://localhost:6379
# With authentication
VALKEY_URL=redis://user:password@valkey.example.com:6379
# TLS (managed cloud service)
VALKEY_URL=rediss://user:password@valkey.example.com:6380

Notes:

  • When not set, rate limiting falls back to in-memory governor (per-instance, no coordination)
  • With N instances behind a load balancer, per-instance rate limiting allows N× the intended budget per IP, set VALKEY_URL for coordinated limits
  • Accepts redis://, rediss:// (TLS), valkey://, valkeys:// (TLS) schemes
  • Fail-open: if Valkey is unreachable, requests are allowed (availability over strictness)
  • Only used by control-plane (server); workers don’t need this variable
  • Uses sliding-window counters via Lua scripts for atomic rate limit checks

PostgreSQL connection URL for the control plane. Workers do not connect to the database; they reach it through the API over gRPC.

PropertyValue
RequiredYes, unless DEV_MODE=true
DefaultNot set (startup fails with DATABASE_URL environment variable required)

Example:

Terminal window
DATABASE_URL=postgres://everruns:secret@db.example.com:5432/everruns?sslmode=require

Notes:

  • Startup warns when the URL has no sslmode or uses sslmode=disable.
  • When this points at a pooler, set DATABASE_UNPOOLED_URL for listeners.

Direct PostgreSQL connection URL used only for session-scoped LISTEN/NOTIFY listeners.

PropertyValue
RequiredNo
DefaultNot set (listeners reuse DATABASE_URL if it is a direct connection)

Example:

Terminal window
# Query traffic through a pooler, listeners through a direct endpoint
DATABASE_URL=postgres://app:secret@ep-foo-pooler.us-east-1.aws.neon.tech/everruns?sslmode=require
DATABASE_UNPOOLED_URL=postgres://app:secret@ep-foo.us-east-1.aws.neon.tech/everruns?sslmode=require

Notes:

  • Use this when DATABASE_URL points at Neon -pooler, PgBouncer, or another proxy that does not preserve session-scoped LISTEN/NOTIFY semantics.
  • Listener paths include PostgreSQL-backed event wakeups, notification SSE, and PG task notification fallback when NATS is unavailable.
  • If DATABASE_URL or DATABASE_UNPOOLED_URL appears to point at a pooled/proxied endpoint, startup now fails fast with guidance to set a direct listener URL.
  • Ordinary query traffic still uses DATABASE_URL.

Object Storage (S3-compatible blob backend)

Section titled “Object Storage (S3-compatible blob backend)”

Optional backend that offloads workspace-file and image content bytes to an S3-compatible object store while keeping all metadata in PostgreSQL. Everruns remains the proxy for every read/write, no S3 presigned URLs are handed to clients or workers.

VariableRequiredDefaultDescription
STORAGE_BLOB_BACKENDNodbdb keeps bytes inline in PostgreSQL (current behavior); s3 offloads to object storage.
STORAGE_S3_BUCKETWhen s3,Target bucket name.
STORAGE_S3_REGIONNo,Bucket region / region label.
STORAGE_S3_ENDPOINTNo,Custom endpoint for S3-compatible stores (SeaweedFS, R2). Unset for AWS S3.
STORAGE_S3_ACCESS_KEY_IDNo,Static access key. Omit to use the AWS credential chain (IAM role/instance).
STORAGE_S3_SECRET_ACCESS_KEYNo,Static secret key.
STORAGE_S3_PREFIXNo(empty)Key prefix isolating multiple deployments within one bucket.
STORAGE_S3_ALLOW_HTTPNofalseAllow plaintext HTTP (local/dev only, e.g. SeaweedFS over HTTP).
STORAGE_S3_FORCE_PATH_STYLENotrueUse path-style requests (required by SeaweedFS; harmless on AWS S3).
STORAGE_BLOB_GC_INTERVAL_SECONDSNo21600 (6h)Interval between blob GC sweeps that reclaim orphaned objects. 0 disables GC. Only effective with the s3 backend (inline db storage has no orphans).
STORAGE_BLOB_GC_GRACE_SECONDSNo86400 (24h)Safety grace period; orphaned objects younger than this are never deleted (avoids racing in-flight creates).
STORAGE_BLOB_GC_MAX_DELETES_PER_RUNNo10000Per-sweep deletion cap to bound work; remaining orphans are reclaimed next sweep.
STORAGE_BLOB_GC_MAX_LIST_PER_RUNNo100000Per-sweep cap on objects listed per prefix, bounding GC memory; larger buckets are reconciled across sweeps in key-order windows.
SESSION_FILE_SINGLE_MAX_BYTESNo100 MiB (db), 2 GiB (s3)Largest single file a session or workspace may hold.
SESSION_FILE_MAX_BYTESNo500 MiB (db), 10 GiB (s3)Total file bytes per session or workspace.

Example (local SeaweedFS via just seaweedfs):

Terminal window
STORAGE_BLOB_BACKEND=s3
STORAGE_S3_BUCKET=everruns-dev
STORAGE_S3_ENDPOINT=http://127.0.0.1:8333
STORAGE_S3_REGION=us-east-1
STORAGE_S3_ACCESS_KEY_ID=everruns
STORAGE_S3_SECRET_ACCESS_KEY=everruns-secret
STORAGE_S3_ALLOW_HTTP=true

Any S3-compatible store works (AWS S3, SeaweedFS, R2); only the endpoint and credentials differ.

Notes:

  • The backend is selected per process at startup; a deployment runs entirely on db or s3. Enabling s3 offloads newly written content; pre-existing inline content is still served transparently.
  • Tenant isolation is by object key (workspaces/{workspace_id}/…, images/org-{org_id}/…) plus the existing org/workspace authorization layer.

Connection URL for NATS with JetStream, used for push-based event delivery and task notifications.

PropertyValue
RequiredWith more than one control-plane instance
DefaultNot set (uses PG NOTIFY for task notifications, in-memory broadcast for SSE event delivery)

Example:

Terminal window
# Local NATS
NATS_URL=nats://localhost:4222
# Cluster
NATS_URL=nats://nats1:4222,nats://nats2:4222,nats://nats3:4222
# Server with `authorization { users: [...] }`
NATS_URL=nats://control:s3cret@nats:4222

Notes:

  • When not set, all events persist to PG, task notifications use PG NOTIFY, and live session events are pushed inside the one process. That covers a single control-plane instance only: with EXPECTED_INSTANCES above 1 and no NATS_URL, each instance polls PostgreSQL for live events instead and reports degraded in /health.
  • When set, enables two features:
    • Ephemeral event delivery: delta events (output.message.delta, reason.thinking.delta, tool.output.delta, llm.generation) skip PostgreSQL and flow only through NATS JetStream. SSE streams subscribe to NATS instead of polling PG.
    • Task notifications: task.available.{activity_type} subjects replace PG NOTIFY for push-based worker notification. Lower latency (~1ms vs ~30ms), supports multi-instance deployments.
  • NATS JetStream must be enabled on the server (--jetstream flag)
  • Credentials embedded in the URL (nats://user:password@host) are sent as user/password auth. Reserved characters in the password (/, @, :, %) are accepted as-is, so a generated secret can be pasted unmodified; percent-encoded passwords are decoded and also work
  • If the NATS connection fails at startup, the server logs the connection error, uses PG NOTIFY for task notifications, and polls PostgreSQL for live session events so other instances’ events still reach its clients. /health reports status: degraded with event_delivery: polling, and the system doctor warns.
  • Only used by control-plane (server); workers communicate via gRPC and don’t need NATS access
  • Default port: 4222 (or <PORT_PREFIX>22 with PORT_PREFIX, for example 27122 for prefix 271)
  • just start-all automatically starts NATS and exports NATS_URL if nats-server is installed

LLM provider API keys (OpenAI, Anthropic, Gemini) are primarily stored encrypted in the database and managed via the Models > Providers UI.

PropertyValue
StorageDatabase (encrypted with AES-256-GCM)
ConfigurationModels > Providers UI or /v1/providers API
Supported ProvidersOpenAI, Anthropic, Google Gemini

Required for encryption:

The SECRETS_ENCRYPTION_KEY environment variable must be set for the control-plane API to encrypt/decrypt API keys. Workers receive decrypted API keys via gRPC and do not need this variable.

Terminal window
# Generate a new key
python3 -c "import os, base64; print('kek-v1:' + base64.b64encode(os.urandom(32)).decode())"
# Set in environment (control-plane only)
SECRETS_ENCRYPTION_KEY=kek-v1:your-generated-key-here

Default API Keys (Development Convenience)

Section titled “Default API Keys (Development Convenience)”

For development, you can set default API keys via environment variables on the control-plane only. These are used as fallbacks when providers don’t have keys configured in the database.

VariableDescription
DEFAULT_OPENAI_API_KEYFallback API key for OpenAI providers
DEFAULT_ANTHROPIC_API_KEYFallback API key for Anthropic providers
DEFAULT_GEMINI_API_KEYFallback API key for Google Gemini providers
DEFAULT_META_API_KEYFallback API key for Meta Model API providers

Example:

Terminal window
# Set in .env or environment (control-plane only)
DEFAULT_OPENAI_API_KEY=sk-...
DEFAULT_ANTHROPIC_API_KEY=sk-ant-...
DEFAULT_GEMINI_API_KEY=AIza...
DEFAULT_META_API_KEY=...

Notes:

  • These variables are only used by the control-plane, not workers
  • Workers receive API keys via gRPC from the control-plane
  • Database-stored keys always take priority over environment variables
  • These are intended for development convenience, not production use
  • The just start-all command automatically sets these from OPENAI_API_KEY, ANTHROPIC_API_KEY, and GEMINI_API_KEY if present
  • If no API key is configured for a provider, LLM calls will fail and users will see an error message in the chat: “I encountered an error while processing your request. Please try again later.”

Two deployment-owned models sit outside the provider system above. Neither is selectable by an agent, neither is stored in the database, and neither is reachable from session or agent configuration — they are host services the platform uses for its own internal work.

VariablePowersUnset means
UTILITY_OPENAI_API_KEYAgent Analyze/Health checks, and guardrail checks with engine: "utility_llm" (the default), called directly against OpenAIThose checks are skipped; Analyze and Health are unavailable
UTILITY_OPENROUTER_API_KEYThe same work, routed through OpenRouter instead. Setting it selects OpenRouter; it wins when both keys are set, and the startup log says soThe utility LLM falls back to UTILITY_OPENAI_API_KEY
UTILITY_LLM_MODELThe model the utility LLM calls on whichever backend was selectedDefaults to gpt-6-luna on OpenAI, openai/gpt-6-luna on OpenRouter
UTILITY_TYPESAFE_API_KEYGuardrail checks with engine: "jev", answered by TypeSafeThose checks are skipped with a warning and the turn proceeds, unless UTILITY_DECISION_DRIVER picks another driver
UTILITY_AZURE_AI_API_KEY, UTILITY_AZURE_AI_ENDPOINTMicrosoft-Decision-1 on Microsoft Foundry for jev checks: the resource key and its resource or project endpoint (https://<resource>.services.ai.azure.com). Used only when UTILITY_DECISION_DRIVER=maiThe mai driver is unavailable. Setting only one of the two stops startup
UTILITY_GEMINI_API_KEYGemini Decision 1 on Google’s Decisions API for jev checks. Used only when UTILITY_DECISION_DRIVER=geminiThe gemini driver is unavailable
UTILITY_DECISION_DRIVERWhich decision driver answers jev checks and the Slack respond-or-not check: typesafe, openai (OpenAI’s Decisions API, using UTILITY_OPENAI_API_KEY), openrouter (Jev through UTILITY_OPENROUTER_API_KEY), mai (Microsoft-Decision-1 on Foundry, using UTILITY_AZURE_AI_*), gemini (Gemini Decision 1, using UTILITY_GEMINI_API_KEY), or llm to answer them with the utility LLM when you have no TypeSafe key. llm answers are labels, not calibrated probabilitiestypesafe when its key is set, otherwise disabled. A driver that is not configured stops startup. Replaces DECISIONS_DRIVER, which now stops startup
UTILITY_DECISION_MODELThe model the chosen decision driver is asked for. For mai it is the Foundry deployment nameThe driver’s own default (Microsoft-Decision-1 for mai, gemini-decision-1 for gemini). Not allowed with UTILITY_DECISION_DRIVER=llm, which uses UTILITY_LLM_MODEL. Replaces DECISIONS_MODEL

The keys are read from the process environment at startup. Missing keys fail open: a guardrail whose engine is not configured never blocks, so a missing key weakens policy rather than wedging traffic. Check the startup logs if a configured guardrail appears to do nothing.

There is no separate provider variable: the utility LLM’s backend is whichever key you supply. An OpenRouter model id is namespaced by its upstream provider, so override UTILITY_LLM_MODEL with an id that backend accepts (anthropic/claude-sonnet-5.5, not claude-sonnet-5.5).

Terminal window
# Control-plane and workers both read these.
UTILITY_OPENAI_API_KEY=sk-...
# ...or route the utility LLM through OpenRouter instead:
UTILITY_OPENROUTER_API_KEY=sk-or-...
UTILITY_LLM_MODEL=openai/gpt-6-luna
UTILITY_TYPESAFE_API_KEY=ts-...
# ...or answer jev checks with OpenAI's Decisions API:
UTILITY_DECISION_DRIVER=openai

Agents can also be given the TypeSafe capability directly, which is a separate credential: a per-user connection configured in Settings > Connections, never this deployment key. See TypeSafe and Guardrails.

With a Slack manager app configured, an organization administrator connects a Slack workspace by approving it once in Slack, instead of pasting an app configuration token. Everruns then creates each Agent’s Slack app in that workspace through the approval.

VariableDescription
SLACK_MANAGER_APP_CLIENT_IDClient ID of your Slack manager app.
SLACK_MANAGER_APP_CLIENT_SECRETClient secret of the same app.

Set both, or neither; one alone is ignored with a warning. The feature also needs SECRETS_ENCRYPTION_KEY. Configure the Slack app as follows:

  • User token scopes app_configurations:read and app_configurations:write; no bot scopes.
  • Redirect URL <API base URL>/v1/slack/workspaces/oauth/callback, for example https://app.example.com/api/v1/slack/workspaces/oauth/callback.
  • Token rotation turned on. Everruns refuses a grant that does not expire.

Slack only lets an app request the app_configurations scopes once it has enabled manager app support for that app. Until then, leave these unset: the configuration token path works without them and stays available beside the approval.

System email delivery is an internal service used by product and operational flows. It is not an agent capability, public API, or UI setting.

VariableRequiredDefaultDescription
EMAIL_PROVIDERYes, when sending email in productionunset / disabledEmail provider. Supported values: disabled, resend
RESEND_API_KEYYes, when EMAIL_PROVIDER=resendunsetResend API key
RESEND_API_BASE_URLNohttps://api.resend.comResend API base URL override for tests or controlled deployments

Example:

Terminal window
EMAIL_PROVIDER=resend
RESEND_API_KEY=re_...

Notes:

  • Set these on the control-plane process that performs system email sends.
  • The sender is fixed in code as Everruns <no-reply@everruns.com>.
  • The Resend account must have everruns.com verified and enabled for sending.

EVERRUNS_MCP_MAX_RESPONSE_BYTES caps each successful MCP HTTP response at 16 MiB (16777216 bytes) by default. Set a positive byte count on the API, workers, and embedded host process when tools or resources legitimately return larger payloads. Invalid or zero values fail ordinary MCP requests with a configuration error.

Terminal window
EVERRUNS_MCP_MAX_RESPONSE_BYTES=33554432

The limit applies while reading JSON and SSE bodies, including initialization, resource operations, task polling, and continuation responses, even without Content-Length. Exceeding it aborts the response instead of parsing partial content. HTTP errors retain at most the first 8 KiB of body bytes; their status and headers survive truncation, invalid UTF-8, and body failures. Existing request timeouts still bound stalled responses. Tool discovery retains its separate catalog budgets.

These apply to tenant traffic: requests an agent, capability, MCP server or integration chooses. Platform traffic (LLM providers, system email) is not affected. Set the same values on the control plane and workers. See Outbound traffic.

VariableDefaultDescription
EVERRUNS_EGRESS_POLICYopenopen, curated-writes or curated-all. An unrecognized value enforces curated-all.
EVERRUNS_EGRESS_OPEN_READS_PER_MINUTE120Per-org, per-process limit on reads to hosts outside the allowlist in curated-writes. 0 turns those reads off.
EVERRUNS_EGRESS_REPUTATIONoffcloudflare-security checks hosts against Cloudflare’s security resolver before connecting; lookups that fail let the request through.
EVERRUNS_EGRESS_DENY_FEEDSunsetComma-separated threat-intelligence domain lists to refuse: hagezi-tif-mini (HaGeZi Threat Intelligence Feeds, mini) or your own https:// URLs of plain, hosts-file or adblock-style domain lists. A listed domain and its subdomains are refused in every mode and for every org, open egress included, unless the curated allowlist names the host. Fetched at start and every 6 hours; a failed fetch keeps the last list.
EVERRUNS_EGRESS_PROXY_URLunsetSend tenant traffic through a tenant egress proxy, for example http://egress-proxy:4750.
EVERRUNS_EGRESS_PROXY_SECRETunsetShared with the proxy, at least 32 bytes. With a proxy URL and no usable secret, tenant requests fail rather than leave directly.
EVERRUNS_EGRESS_PROXY_SOCKS_ADDRESSunsetPublic host:port of the proxy’s SOCKS5 listener. When set, E2B sandboxes send their own outbound TCP through the proxy (E2B’s bring-your-own-proxy), under the same checks, caps and per-org counts as tenant traffic. Needs EVERRUNS_EGRESS_PROXY_SECRET; if it is missing or short, E2B sandboxes fail to start rather than leave directly.
EVERRUNS_EGRESS_PROXY_SOCKS_TLStrueE2B connects to the SOCKS5 address over TLS, so put a TLS terminator with a publicly trusted certificate in front of the listener. Set false only when E2B reaches the proxy over a private network: the sandbox credential would otherwise cross the internet in the clear.

Read by the everruns-egress-proxy binary. Every cap is off unless set.

VariableDefaultDescription
EVERRUNS_EGRESS_PROXY_SECRETrequiredSame value as on the control plane and workers, at least 32 bytes. The proxy refuses to start without it.
EGRESS_PROXY_ADDR0.0.0.0:4750Proxy listener. Keep it on the private network.
EGRESS_PROXY_HEALTH_ADDR0.0.0.0:4751Health listener, GET /healthz.
EGRESS_PROXY_SOCKS_ADDRunsetSOCKS5 listener for sandbox providers, for example 0.0.0.0:1080. Off unless set. It accepts only sandbox credentials and CONNECT. Expose it to E2B through a TLS terminator, and pass the public address to the control plane and workers as EVERRUNS_EGRESS_PROXY_SOCKS_ADDRESS.
EGRESS_PROXY_ORG_RPMno capRequests per minute per org.
EGRESS_PROXY_ORG_HOST_RPMno capRequests per minute per org to one host.
EGRESS_PROXY_ORG_CONCURRENCYno capOpen connections per org.
EGRESS_PROXY_ORG_BYTES_PER_DAYno capBytes per org per UTC day. Counted per replica unless a control endpoint reports what was already used.
EGRESS_PROXY_GLOBAL_PER_HOST_RPMno capRequests per minute to one host across all orgs.
EGRESS_PROXY_REPLICAS1Replicas sharing the caps; each enforces its share.
EGRESS_PROXY_BIND_ADDRunsetSource IP for outbound connections, when the host has a dedicated tenant address.
EGRESS_PROXY_INSTANCEhostnameLabel on usage batches.
EGRESS_PROXY_CONTROL_URLunsetControl endpoint. The proxy asks GET /internal/egress-proxy/orgs/{org}/limits (cached 60 s) and posts usage to POST /internal/egress-proxy/usage, both with Authorization: Bearer <secret>. The EGRESS_PROXY_ORG_* caps then apply only while it cannot be reached.

Usage without a control endpoint is logged once per org, session and minute on the everruns::egress::usage target.

The proxy also counts abuse signals per org and minute: attempts on blocked (SMTP) ports, destinations that resolve to private addresses, requests refused by a cap, and how many distinct hosts the org reached. They go to the control endpoint in the same usage batches (signals), or are logged on the everruns::egress::signals target. The proxy only counts them; acting on them, such as suspending an org, is up to the control plane.

The UI makes all REST API requests (including SSE) to /api/* paths. The backend serves those routes under /api directly. Root-level backend routes like /oauth/*, /mcp, and /.well-known/* bypass the UI and are proxied straight to the backend.

Local Development:

  • Caddy on :9300 routes /api/*, /oauth/*, /mcp, and /.well-known/* to backend at :9301
  • Example: /api/v1/agents → http://localhost:9301/api/v1/agents
  • Example: /oauth/authorize?... → http://localhost:9301/oauth/authorize?...
  • Example: /mcp → http://localhost:9301/mcp
  • Example: /.well-known/oauth-authorization-server → http://localhost:9301/.well-known/oauth-authorization-server
  • SSE streaming works via flush_interval -1 in Caddy config
  • No CORS needed (same-origin through Caddy)

Production:

  • Configure your reverse proxy (nginx, Caddy, etc.) to route /api/*, /oauth/*, /mcp, and /.well-known/* to the API server
  • Disable response buffering for SSE endpoints
  • Example Caddy configuration
VariableDefaultDescription
AUTH_MODE and AUTH_*Depends on DEPLOYMENT_GRADEAuthentication mode and its settings (AUTH_BASE_URL, AUTH_JWT_SECRET, AUTH_LOGIN_ORIGIN, and others). See Authentication.
RATE_LIMIT_API_REQUESTS_PER_MINUTE1200API request rate limit per minute. Uses Valkey when VALKEY_URL is set, otherwise a per-instance in-memory limiter.
TRUSTED_PROXY_HOPS1Number of trusted reverse proxies in front of the server. The client IP is taken from X-Forwarded-For counting this many entries from the right. Raise it if a CDN or load balancer sits in front of your reverse proxy.
EVENT_RETENTION_DAYS0 (disabled)Archive session events older than this many days. A background task runs hourly.
DATABASE_POOL_MAX50Maximum PostgreSQL connections in the request pool.
DATABASE_POOL_MIN5Minimum PostgreSQL connections kept open.
SECRETS_ENCRYPTION_KEY_PREVIOUSUnsetPrevious encryption key, kept during key rotation so existing values still decrypt. See Encryption key rotation.
EXPECTED_INSTANCES1Number of control-plane instances behind the load balancer. Divides the global and per-org SSE connection limits across instances. Per-session limits are not divided. Above 1 without NATS_URL, live session events are polled from PostgreSQL (degraded).

These change how much database work each agent turn costs. The defaults suit most deployments; the switches exist for comparisons and for the rare deployment that needs another trade.

VariableDefaultDescription
EVENT_GROUP_COMMITonEvents that arrive while a commit is in flight are stored together in the next transaction, so many turns share one WAL flush. Each write is answered after its commit, so it is as durable as a lone write. off, 0 or false stores each append in its own transaction.
EVENT_GROUP_COMMIT_LANES4Parallel commit lanes per API instance. A session always uses the same lane, so its events keep their order.
SESSION_ACTOR_STICKY_GRACE_MS300How long a session’s next turn waits for the worker that ran its last turn, which still holds its history in memory, before any worker may take it. 0 turns this off.
REPORTING_BACKGROUND_ENABLEDtrueBuilds the Reports pages from session events. false stops the projector and the repair job and the event writes that feed them; nothing is deleted, and recent missed events are picked up when it is turned back on.
VariableDefaultDescription
SSE_REALTIME_CYCLE_SECS300Connection cycle interval for session event streams (seconds)
SSE_MONITORING_CYCLE_SECS600Connection cycle interval for durable monitoring streams (seconds)
SSE_HEARTBEAT_INTERVAL_SECS30Interval between heartbeat comments on all SSE streams (seconds)
SSE_GLOBAL_MAX10000Maximum total SSE connections across all users
SSE_PER_SESSION_MAX12Maximum SSE connections per session
SSE_PER_ORG_MAX1000Maximum SSE connections per organization

Notes:

  • Heartbeat comments (: heartbeat\n\n) are sent on all SSE streams to detect stale connections
  • The heartbeat interval must be less than the SDK read timeout (default: 45s) with safety margin
  • Connection cycling prevents stale connections through proxies and load balancers
  • When running behind HTTP/1.1 proxies, increase SSE_REALTIME_CYCLE_SECS to reduce reconnection frequency

Address of the server gRPC endpoint for worker communication.

PropertyValue
RequiredNo (worker only)
Default127.0.0.1:9001

Example:

Terminal window
SERVER_GRPC_ADDRESS=127.0.0.1:9001

Notes:

  • Workers communicate with the server via gRPC for all database operations
  • WORKER_GRPC_ADDRESS is supported as a legacy alias
  • The server exposes both HTTP (default 9000) and gRPC (default 9001) interfaces
  • Workers are stateless and do not connect directly to the database

Bearer token for authenticating worker gRPC connections to the control-plane.

PropertyValue
RequiredYes (production); No (dev mode)
DefaultUnset (auth disabled)

Example:

Terminal window
WORKER_GRPC_AUTH_TOKEN=your-secret-token

Notes:

  • Must be set on both the server and all workers (same value)
  • When unset, gRPC auth is disabled (acceptable for local development only)
  • Server panics on startup if unset when not in dev mode

Bind address for the server-side gRPC listener.

PropertyValue
RequiredNo (server only)
Default0.0.0.0:9001

Example:

Terminal window
SERVER_GRPC_BIND_ADDR=0.0.0.0:9001

Notes:

  • WORKER_GRPC_ADDR is supported as a legacy alias

Timeout in seconds for worker initial connection to control-plane gRPC.

PropertyValue
RequiredNo (worker only)
Default30

Example:

Terminal window
WORKER_GRPC_CONNECT_TIMEOUT=60

Deadline in seconds for each worker call to the control-plane gRPC service. A call that gets no answer by then fails as a retryable error, and the turn resumes from the session log instead of hanging.

PropertyValue
RequiredNo (worker only)
Default120

Example:

Terminal window
WORKER_GRPC_REQUEST_TIMEOUT_SECS=120

How long, in seconds, a worker may hold a session while making no progress before its turn starts or after it ends. Past it the worker lets the session go, and another worker runs the turn; a session that keeps stalling is stopped with a processing error.

PropertyValue
RequiredNo (worker only)
Default300

Example:

Terminal window
WORKER_ACTOR_STALL_TIMEOUT_SECS=300

How long, in seconds, a server-side tool call may run inside its turn. A call still running after that keeps running on the worker, and its turn gives back its memory and session lease until the call finishes. 0 keeps every call inside its turn.

PropertyValue
RequiredNo (worker only)
Default300

Example:

Terminal window
WORKER_TOOL_DETACH_AFTER_SECS=300

Most session turns one worker runs at once. Turns spend most of their time waiting on the model and on tools, so they do not use the worker’s task slots (MAX_CONCURRENT_TASKS). Unset or 0 derives it from the memory limit: 85% of it over about 2 MiB per turn, between 100 and 10000, or 2000 when the limit is unknown. A 6 GiB worker runs up to about 2600 turns.

Before that ceiling, a worker running at least 32 turns stops taking new ones while its resident memory is over 85% of its limit, or while its async runtime lags (see WORKER_MAX_RUNTIME_LAG_MS). Running turns are never stopped.

PropertyValue
RequiredNo (worker only)
DefaultFrom the memory limit

Example:

Terminal window
WORKER_MAX_RUNNING_TURNS=2000

The memory, in MiB, that WORKER_MAX_RUNNING_TURNS and the memory brake are measured against. Unset, the worker reads its cgroup limit (Kubernetes and Docker memory limits); without one there is no memory brake.

PropertyValue
RequiredNo (worker only)
DefaultThe cgroup memory limit

Example:

Terminal window
WORKER_MEMORY_LIMIT_MIB=6144

How late, in milliseconds, the worker’s async runtime may run a timer (a moving average) before the worker stops taking new turns. CPU-heavy turns, such as in-process interpreters and large prompts, show up here first. 0 turns the brake off.

PropertyValue
RequiredNo (worker only)
Default25

Example:

Terminal window
WORKER_MAX_RUNTIME_LAG_MS=25

Most tool calls one worker keeps running after their turns parked. Past it a long call stays inside its turn.

PropertyValue
RequiredNo (worker only)
Default1000

Example:

Terminal window
MAX_DETACHED_TOOL_CALLS=1000

Path to PEM-encoded certificate file. On the server, this is the gRPC server certificate. On the worker, this is the client certificate presented during mTLS handshake.

PropertyValue
RequiredNo
DefaultNot set (TLS disabled)

Example:

Terminal window
WORKER_GRPC_TLS_CERT=/etc/everruns/grpc-cert.pem

Notes:

  • Must be set together with WORKER_GRPC_TLS_KEY
  • Server: enables TLS on the gRPC listener when both cert and key are set
  • Worker: presents client certificate to the server when both cert and key are set (requires WORKER_GRPC_TLS_CA_CERT)

Path to PEM-encoded private key file corresponding to WORKER_GRPC_TLS_CERT.

PropertyValue
RequiredNo
DefaultNot set

Example:

Terminal window
WORKER_GRPC_TLS_KEY=/etc/everruns/grpc-key.pem

Path to PEM-encoded CA certificate bundle for verifying the remote peer.

PropertyValue
RequiredNo
DefaultNot set

Example:

Terminal window
WORKER_GRPC_TLS_CA_CERT=/etc/everruns/grpc-ca.pem

Notes:

  • Server: when set, requires workers to present valid client certificates signed by this CA (mutual TLS)
  • Worker: when nonempty, both the durable/task client and the turn client (including raw blob fetches) verify the server’s certificate against this CA and use https://. TLS keeps the original hostname instead of the plaintext replica balancer. Verification failures do not fall back to plaintext.
  • For full mTLS, set on both server and worker alongside their respective cert/key pairs
  • The turn client’s connection and TLS handshake are bounded by WORKER_GRPC_REQUEST_TIMEOUT_SECS. Unreadable TLS files fail startup; invalid certificates or mismatched identities refuse the connection.
  • On upgrade, check that the configured CA, expected server name and optional client identity work for turn RPCs as well as task RPCs: older workers applied these settings only to the durable/task client. Unset or empty worker CA configuration retains plaintext transport.

Override the expected server domain name for TLS certificate verification (worker only).

PropertyValue
RequiredNo
DefaultDerived from SERVER_GRPC_ADDRESS hostname

Example:

Terminal window
WORKER_GRPC_TLS_DOMAIN=control-plane.internal

Notes:

  • Useful when the server certificate CN/SAN differs from the connection hostname (e.g., connecting via IP but cert has a DNS name)

Everruns supports distributed tracing via OpenTelemetry with OTLP export. Agent traces follow the OpenTelemetry Gen-AI agent and inference conventions and, on the same spans, the OpenInference conventions read by Arize Phoenix, so one OTLP endpoint serves both families of backends.

OTLP endpoint for trace export (e.g., Grafana Tempo, Arize Phoenix, Datadog, or any OTLP-compatible backend).

PropertyValue
RequiredNo
DefaultNot set (tracing disabled)

Example:

Terminal window
# For a local OTLP collector or Phoenix
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# For production Tempo
OTEL_EXPORTER_OTLP_ENDPOINT=http://tempo.monitoring:4318

Notes:

  • When set, traces are exported via OTLP over HTTP/protobuf (use the backend’s HTTP port, typically 4318, not the gRPC port 4317)
  • Point this at the base endpoint; the /v1/traces path is appended for you, and a full signal URL is used as given
  • Connect to any OTLP-compatible backend for trace visualization
  • See OpenTelemetry for the span model and attributes
  • Without this variable, only console logging is enabled

Service name for traces.

PropertyValue
RequiredNo
Defaulteverruns-server (API), everruns-worker (Worker)

Example:

Terminal window
OTEL_SERVICE_NAME=everruns-prod-api

Service version for traces.

PropertyValue
RequiredNo
DefaultCargo package version

Deployment environment label.

PropertyValue
RequiredNo
DefaultNot set

Example:

Terminal window
OTEL_ENVIRONMENT=production

Enable recording of LLM input/output content in traces. Warning: May contain sensitive data.

PropertyValue
RequiredNo
Defaultfalse

Example:

Terminal window
# Standard OTel env var (preferred)
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
# Legacy alias (also works)
OTEL_RECORD_CONTENT=true

Notes:

  • When enabled, the chat span records gen_ai.system_instructions, gen_ai.input.messages, gen_ai.output.messages, and gen_ai.tool.definitions (plus the OpenInference input.value, output.value, and flattened llm.input_messages.*); tool spans record gen_ai.tool.call.arguments and gen_ai.tool.call.result (plus everruns.tool.executed_arguments when a pre-tool hook rewrote the call); the turn root records the input message and final answer; the thinking span records the reasoning text
  • Disabled by default for privacy and data size concerns
  • Only enable in development or when debugging specific issues

Which attribute vocabularies agent spans carry.

PropertyValue
RequiredNo
Defaultgen_ai,openinference

Example:

Terminal window
# Only the OpenTelemetry Gen-AI attributes (Tempo, Jaeger, Datadog, Langfuse)
EVERRUNS_TRACE_CONVENTIONS=gen_ai
# Only the OpenInference attributes (Arize Phoenix)
EVERRUNS_TRACE_CONVENTIONS=openinference

Notes:

  • Span names, kinds, and hierarchy are the same under either vocabulary; only attributes differ
  • Unknown values are ignored, and an empty selection falls back to both

To visualize traces locally, point OTEL_EXPORTER_OTLP_ENDPOINT at any OTLP-compatible collector:

Terminal window
# Set OTLP endpoint for API and Worker
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# Start services
just start-all

To see traces in Arize Phoenix, run Phoenix locally and point the same variable at its OTLP/HTTP port (http://localhost:6006); spans render as AGENT, LLM, and TOOL spans with token counts and, when content capture is on, the messages.

Traces follow the agentic execution lifecycle with 13 event types; every span starts and ends at the timestamp of the event it records:

invoke_agent {agent name} (root span, INTERNAL)
├── reason (LLM reasoning phase)
│ └── chat {model} (LLM API call, CLIENT)
│ └── thinking (extended thinking, if enabled)
├── act (tool execution phase)
│ ├── execute_tool {name}
│ └── execute_tool {name}
├── reason (iteration 2)
│ └── chat {model}
└── ...

Spans carry the OpenTelemetry Gen-AI attributes and the OpenInference attributes side by side (see EVERRUNS_TRACE_CONVENTIONS). The most useful ones:

AttributeSpan TypesDescription
gen_ai.operation.nameinvoke_agent, chat, execute_toolinvoke_agent, chat, or execute_tool
gen_ai.agent.id, gen_ai.agent.name, gen_ai.agent.descriptioninvoke_agentAgent the turn runs as
gen_ai.conversation.id / session.idAllSession identifier
gen_ai.provider.name / llm.providerchatProvider (openai, anthropic, gcp.gemini, aws.bedrock, …)
gen_ai.request.model, gen_ai.response.model / llm.model_namechatModel name
gen_ai.response.idchatProvider response identifier
gen_ai.response.finish_reasonschatWhy generation stopped (string array)
gen_ai.usage.input_tokens, gen_ai.usage.output_tokens / llm.token_count.*chat, invoke_agentToken usage (turn root carries the cumulative total)
gen_ai.usage.cache_read.input_tokens, gen_ai.usage.cache_write.input_tokenschat, invoke_agentPrompt-cache tokens
gen_ai.request.temperature, gen_ai.request.max_tokens, gen_ai.request.reasoning.level, gen_ai.request.stream / llm.invocation_parameterschatRequest parameters
gen_ai.response.time_to_first_chunkchatStreaming latency in seconds
gen_ai.conversation.compactedchatContext was compacted before the call
llm.cost.total / everruns.usage.cost_usdchat, invoke_agentCost in USD when known
gen_ai.tool.name, gen_ai.tool.call.id, gen_ai.tool.type, gen_ai.tool.description / tool.name, tool.descriptionexecute_toolTool identity
openinference.span.kindAllAGENT, LLM, TOOL, or CHAIN
error.typeAllLow-cardinality error class on failure (error code, HTTP status, timeout, or _OTHER); the span status carries the message
everruns.phasereason, act, thinkingPhase span marker
everruns.turn.id, everruns.exec.idAllEverruns correlation ids
everruns.turn.iterations, everruns.turn.tool_call_count, everruns.turn.llm_call_countinvoke_agentTurn counters
everruns.tool.statusexecute_toolsuccess, error, timeout, or cancelled

Everruns supports sending turn, reasoning, tool, and session lifecycle events to Braintrust for observability, evaluation, and logging.

For setup instructions and configuration details, see the Braintrust Integration Guide.

VariableRequiredDefaultDescription
BRAINTRUST_ENABLEDNoenabled when API key is presentExplicit Braintrust on/off switch
BRAINTRUST_API_KEYYes-API key from Braintrust settings
BRAINTRUST_PROJECT_NAMENoMy ProjectProject name for organizing traces
BRAINTRUST_PROJECT_IDNo-Direct project UUID (skips name lookup)
BRAINTRUST_API_URLNohttps://api.braintrust.devAPI base URL
BRAINTRUST_QUEUE_CAPACITYNo1024Buffered event capacity before new exports are dropped
BRAINTRUST_MAX_BATCH_SIZENo50Max events per Braintrust insert call
BRAINTRUST_FLUSH_INTERVAL_MSNo500Max delay before flushing a partial batch
BRAINTRUST_REQUEST_TIMEOUT_MSNo10000Per-request timeout for Braintrust insert calls
BRAINTRUST_MAX_RETRIESNo3Retries for 429, 5xx, and timeout/connect failures
BRAINTRUST_RETRY_BASE_DELAY_MSNo250Initial retry backoff
BRAINTRUST_RETRY_MAX_DELAY_MSNo5000Retry backoff cap
BRAINTRUST_RECORD_CONTENTNofalseExport raw turn and LLM text content
BRAINTRUST_RECORD_THINKINGNononeExtended thinking export mode: none, summary, full
BRAINTRUST_TOOL_ARGS_MODENoredactedTool argument export mode: full, redacted, none
BRAINTRUST_TOOL_RESULTS_MODENosummaryTool result export mode: full, summary, redacted, none
BRAINTRUST_DEBUG_PAYLOADSNofalsePrint full outbound Braintrust payload JSON to local debug logs

Set to true to enable self-service customer-hosted HTTPS Agent registration and request-driven execution. Default: disabled. Requires configured encryption and outbound HTTPS through the host egress service. The Agent’s dangerous-settings permission gates registration, rotation and disable. Customer endpoints receive no CP user or fleet credentials. See Cloudflare agents for the deployment, protocol, limits and smoke test.

Component: Control plane. Default: unset (listener disabled).

Enables the restricted customer-worker gRPC listener, separate from the trusted fleet service. Loopback development example: 127.0.0.1:28704. Non-loopback binds require server TLS; see Custom agent workers for provisioning, process-specific TLS settings, ingress and revocation.

Customer binaries receive their own deployment token, never the internal fleet token. The reference data-agent worker uses CUSTOM_WORKER_URL, CUSTOM_WORKER_TOKEN, DATA_AGENT_DATABASE and OPENAI_API_KEY; HTTPS additionally uses CUSTOM_WORKER_CA_CERT. These are application settings, not CP secrets.