Environment Variables
Every Everruns environment variable: database connections, authentication, encryption, and development mode.
Summary
Section titled “Summary”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.
| Variable | Process | Required | Without it |
|---|---|---|---|
DATABASE_URL | API | Yes, unless DEV_MODE=true | Startup fails. Dev mode ignores it and starts its own temporary PostgreSQL. |
AUTH_MODE | API | Yes, unless the grade is dev | Startup fails: unset means none, which is allowed only at dev grade. |
WORKER_GRPC_AUTH_TOKEN | API and workers (same value) | Yes, unless DEV_MODE=true | The API fails to start its gRPC server; workers cannot authenticate. |
SECRETS_ENCRYPTION_KEY | API | Recommended | The 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_GRADE | API and workers | No | Production behavior (prod grade). |
PUBLIC_APP_URL, AUTH_LOGIN_ORIGIN, API_PREFIX, CORS_ALLOWED_ORIGINS, HTTP_ADDR | API | No | http://localhost:9300, same-origin login, /api, CORS off, 0.0.0.0:9000. |
DATABASE_UNPOOLED_URL, DATABASE_POOL_MAX, DATABASE_POOL_MIN | API | No | Listeners reuse DATABASE_URL; pool of 5 to 50 connections. |
VALKEY_URL | API | No | Rate limits are per instance. |
NATS_URL | API and workers | With more than one control-plane instance | PostgreSQL NOTIFY and in-memory broadcast (one instance only). |
STORAGE_* | API | No | File 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 workers | No | Plain 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_KEY | API | No | Providers need keys configured in Models > Providers. |
UTILITY_* | API and workers | No | Analyze, Health, and model-backed guardrail checks are unavailable or skipped. |
SLACK_MANAGER_APP_CLIENT_ID, SLACK_MANAGER_APP_CLIENT_SECRET | API | No | Organizations connect Slack workspaces by pasting a configuration token. |
EVERRUNS_EGRESS_* | API and workers | No | Tenant traffic may reach any public host, directly from the deployment’s address. |
EGRESS_PROXY_* | everruns-egress-proxy | Only when running the proxy | No proxy. |
EMAIL_PROVIDER, RESEND_* | API | When sending email | Email delivery is disabled. |
RATE_LIMIT_API_REQUESTS_PER_MINUTE, TRUSTED_PROXY_HOPS, EXPECTED_INSTANCES, EVENT_RETENTION_DAYS, SSE_*, SERVER_SHUTDOWN_* | API | No | 1200 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_ENABLED | API | No | Event 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 workers | No | Tracing and Braintrust export are off. |
DEV_MODE
Section titled “DEV_MODE”Enable development mode. No PostgreSQL to install or run: the server starts a temporary PostgreSQL of its own and deletes it on exit.
| Property | Value |
|---|---|
| Required | No |
| Default | false |
Example:
# Start in dev mode (no database to set up)DEV_MODE=true ./target/debug/everruns-server
# Or with 1DEV_MODE=1 ./target/debug/everruns-serverNotes:
- When enabled, the server downloads PostgreSQL 17 binaries on first use (cached under
~/.cache/everruns/postgres, orEVERRUNS_PG_CACHE), starts a cluster on a free loopback port, and runs migrations into a fresh database.DATABASE_URLis ignored. - Data does not survive a restart. Use
just start-allfor 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_GRADE
Section titled “DEPLOYMENT_GRADE”Deployment environment grade. Controls which features and capabilities are available.
| Property | Value |
|---|---|
| Required | No |
| Default | prod (or dev if DEV_MODE=true) |
Valid values:
| Grade | Description |
|---|---|
dev | Development - all experimental features enabled |
poc | Proof of concept / demo environment |
preview | Preview/staging environment |
prod | Production - only stable features |
Example:
# Run in development mode with experimental featuresDEPLOYMENT_GRADE=dev ./target/debug/everruns-server
# Production mode (default)DEPLOYMENT_GRADE=prod ./target/debug/everruns-serverNotes:
- If not set, falls back to
DEV_MODE: ifDEV_MODE=true, usesdev; otherwise usesprod - Experimental capabilities (e.g., Docker Container) are only available in
devgrade - Experimental seed agents (e.g., Python Coder) are only created in
devgrade - Use
devfor local development and testing experimental features - Use
prodfor production deployments
Feature rollout grades
Section titled “Feature rollout grades”Each FEATURE_<NAME> variable overrides that feature’s rollout grade. Feature grades
are separate from DEPLOYMENT_GRADE, which describes the running deployment.
| Value | Behaviour |
|---|---|
dev | Available only on a local dev deployment; enabled there by default |
internal | Disabled until a platform operator enables it for a specific organisation |
adoption | Disabled by default; an organisation owner/admin may enable it |
prod | Enabled by default; an organisation owner/admin may disable it |
off | Unavailable; 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.
API_PREFIX
Section titled “API_PREFIX”Path prefix for REST API routes.
| Property | Value |
|---|---|
| Required | No |
| Default | /api |
Example:
# Routes at /api/v1/agentsAPI_PREFIX=/apiNotes:
/health,/api-doc/openapi.json,/mcp,/.well-known/*,/oauth/*, and/cli/login-successstay at the server root/mcpis always mounted and authenticated; there is noFEATURE_MCP_ENDPOINTdeployment 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 toPUBLIC_APP_URLplusAPI_PREFIXwhen unset - Override only if you need a non-
/apiREST prefix behind a reverse proxy or gateway
PUBLIC_APP_URL
Section titled “PUBLIC_APP_URL”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.
| Property | Value |
|---|---|
| Required | No |
| Default | http://localhost:9300 |
Example:
PUBLIC_APP_URL=https://everruns.example.comNotes:
FRONTEND_URLdefaults toPUBLIC_APP_URLAUTH_BASE_URLdefaults toPUBLIC_APP_URLplusAPI_PREFIX(for example,https://everruns.example.com/api)- Set
FRONTEND_URLonly when browser redirects must land on a different origin - Set
AUTH_BASE_URLonly 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
AUTH_LOGIN_ORIGIN
Section titled “AUTH_LOGIN_ORIGIN”Trusted browser origin that hosts the login page. Set this when an OSS-UI-based
app delegates /login to a central identity origin.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set (same-origin relative /login) |
Example:
AUTH_LOGIN_ORIGIN=https://id.example.comNotes:
- 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_toremains a relative path and is still sanitized against open redirects- Configured absolute login redirects use full-page navigation
UI_SERVER_API_URL
Section titled “UI_SERVER_API_URL”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.
| Property | Value |
|---|---|
| Required | No |
| Default | PUBLIC_APP_URL (as set in the UI runtime) plus /api; unset when neither is set |
Example:
UI_SERVER_API_URL=http://server:9000/apiNotes:
- Include the API prefix (
/apiby 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
Hostheader is never used - Redirects are not followed; a redirect response counts as a failed prefetch
- If neither this nor
PUBLIC_APP_URLis 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
CORS_ALLOWED_ORIGINS
Section titled “CORS_ALLOWED_ORIGINS”Comma-separated list of allowed origins for cross-origin requests. Only needed when the UI is served from a different domain than the API.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set (CORS disabled) |
Example:
# Allow requests from a different frontend originCORS_ALLOWED_ORIGINS=https://app.example.com
# Multiple originsCORS_ALLOWED_ORIGINS=https://app.example.com,https://admin.example.comNotes:
- 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-ReasonandEverruns-Context-Revisionin addition to the standard headers, and can read theIdempotent-Replayedresponse header
HTTP_ADDR
Section titled “HTTP_ADDR”Bind address for the server HTTP API.
| Property | Value |
|---|---|
| Required | No |
| Default | 0.0.0.0:9000 |
Example:
HTTP_ADDR=0.0.0.0:9000Notes:
ADDRis supported as a legacy alias- Container images already default to
0.0.0.0:9000; most deployments do not need to set this
Server shutdown
Section titled “Server shutdown”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.
| Variable | Default | Description |
|---|---|---|
SERVER_SHUTDOWN_DELAY_SECS | 5 | Seconds to keep serving after SIGTERM before draining starts |
SERVER_SHUTDOWN_GRACE_SECS | 20 | Seconds in-flight requests get to finish once draining |
Notes:
- Keep delay + grace + 5 seconds under the orchestrator’s kill timeout
(Kubernetes
terminationGracePeriodSeconds, default 30; Composestop_grace_period) - Workers drain separately:
WORKER_SHUTDOWN_GRACE_SECSbounds how long a stopping worker waits, and running turns are handed to another worker at their next step
VALKEY_URL
Section titled “VALKEY_URL”Connection URL for Valkey (Redis-compatible) used for distributed rate limiting across control-plane instances.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set (uses per-instance in-memory rate limiting) |
Example:
# Local ValkeyVALKEY_URL=redis://localhost:6379
# With authenticationVALKEY_URL=redis://user:password@valkey.example.com:6379
# TLS (managed cloud service)VALKEY_URL=rediss://user:password@valkey.example.com:6380Notes:
- 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_URLfor 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
DATABASE_URL
Section titled “DATABASE_URL”PostgreSQL connection URL for the control plane. Workers do not connect to the database; they reach it through the API over gRPC.
| Property | Value |
|---|---|
| Required | Yes, unless DEV_MODE=true |
| Default | Not set (startup fails with DATABASE_URL environment variable required) |
Example:
DATABASE_URL=postgres://everruns:secret@db.example.com:5432/everruns?sslmode=requireNotes:
- Startup warns when the URL has no
sslmodeor usessslmode=disable. - When this points at a pooler, set
DATABASE_UNPOOLED_URLfor listeners.
DATABASE_UNPOOLED_URL
Section titled “DATABASE_UNPOOLED_URL”Direct PostgreSQL connection URL used only for session-scoped LISTEN/NOTIFY listeners.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set (listeners reuse DATABASE_URL if it is a direct connection) |
Example:
# Query traffic through a pooler, listeners through a direct endpointDATABASE_URL=postgres://app:secret@ep-foo-pooler.us-east-1.aws.neon.tech/everruns?sslmode=requireDATABASE_UNPOOLED_URL=postgres://app:secret@ep-foo.us-east-1.aws.neon.tech/everruns?sslmode=requireNotes:
- Use this when
DATABASE_URLpoints at Neon-pooler, PgBouncer, or another proxy that does not preserve session-scopedLISTEN/NOTIFYsemantics. - Listener paths include PostgreSQL-backed event wakeups, notification SSE, and PG task notification fallback when NATS is unavailable.
- If
DATABASE_URLorDATABASE_UNPOOLED_URLappears 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.
| Variable | Required | Default | Description |
|---|---|---|---|
STORAGE_BLOB_BACKEND | No | db | db keeps bytes inline in PostgreSQL (current behavior); s3 offloads to object storage. |
STORAGE_S3_BUCKET | When s3 | , | Target bucket name. |
STORAGE_S3_REGION | No | , | Bucket region / region label. |
STORAGE_S3_ENDPOINT | No | , | Custom endpoint for S3-compatible stores (SeaweedFS, R2). Unset for AWS S3. |
STORAGE_S3_ACCESS_KEY_ID | No | , | Static access key. Omit to use the AWS credential chain (IAM role/instance). |
STORAGE_S3_SECRET_ACCESS_KEY | No | , | Static secret key. |
STORAGE_S3_PREFIX | No | (empty) | Key prefix isolating multiple deployments within one bucket. |
STORAGE_S3_ALLOW_HTTP | No | false | Allow plaintext HTTP (local/dev only, e.g. SeaweedFS over HTTP). |
STORAGE_S3_FORCE_PATH_STYLE | No | true | Use path-style requests (required by SeaweedFS; harmless on AWS S3). |
STORAGE_BLOB_GC_INTERVAL_SECONDS | No | 21600 (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_SECONDS | No | 86400 (24h) | Safety grace period; orphaned objects younger than this are never deleted (avoids racing in-flight creates). |
STORAGE_BLOB_GC_MAX_DELETES_PER_RUN | No | 10000 | Per-sweep deletion cap to bound work; remaining orphans are reclaimed next sweep. |
STORAGE_BLOB_GC_MAX_LIST_PER_RUN | No | 100000 | Per-sweep cap on objects listed per prefix, bounding GC memory; larger buckets are reconciled across sweeps in key-order windows. |
SESSION_FILE_SINGLE_MAX_BYTES | No | 100 MiB (db), 2 GiB (s3) | Largest single file a session or workspace may hold. |
SESSION_FILE_MAX_BYTES | No | 500 MiB (db), 10 GiB (s3) | Total file bytes per session or workspace. |
Example (local SeaweedFS via just seaweedfs):
STORAGE_BLOB_BACKEND=s3STORAGE_S3_BUCKET=everruns-devSTORAGE_S3_ENDPOINT=http://127.0.0.1:8333STORAGE_S3_REGION=us-east-1STORAGE_S3_ACCESS_KEY_ID=everrunsSTORAGE_S3_SECRET_ACCESS_KEY=everruns-secretSTORAGE_S3_ALLOW_HTTP=trueAny 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
dbors3. Enablings3offloads 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.
NATS_URL
Section titled “NATS_URL”Connection URL for NATS with JetStream, used for push-based event delivery and task notifications.
| Property | Value |
|---|---|
| Required | With more than one control-plane instance |
| Default | Not set (uses PG NOTIFY for task notifications, in-memory broadcast for SSE event delivery) |
Example:
# Local NATSNATS_URL=nats://localhost:4222
# ClusterNATS_URL=nats://nats1:4222,nats://nats2:4222,nats://nats3:4222
# Server with `authorization { users: [...] }`NATS_URL=nats://control:s3cret@nats:4222Notes:
- 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_INSTANCESabove 1 and noNATS_URL, each instance polls PostgreSQL for live events instead and reportsdegradedin/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.
- Ephemeral event delivery: delta events (
- NATS JetStream must be enabled on the server (
--jetstreamflag) - 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.
/healthreportsstatus: degradedwithevent_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>22withPORT_PREFIX, for example27122for prefix271) just start-allautomatically starts NATS and exportsNATS_URLifnats-serveris installed
LLM Provider API Keys
Section titled “LLM Provider API Keys”LLM provider API keys (OpenAI, Anthropic, Gemini) are primarily stored encrypted in the database and managed via the Models > Providers UI.
| Property | Value |
|---|---|
| Storage | Database (encrypted with AES-256-GCM) |
| Configuration | Models > Providers UI or /v1/providers API |
| Supported Providers | OpenAI, 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.
# Generate a new keypython3 -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-hereDefault 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.
| Variable | Description |
|---|---|
DEFAULT_OPENAI_API_KEY | Fallback API key for OpenAI providers |
DEFAULT_ANTHROPIC_API_KEY | Fallback API key for Anthropic providers |
DEFAULT_GEMINI_API_KEY | Fallback API key for Google Gemini providers |
DEFAULT_META_API_KEY | Fallback API key for Meta Model API providers |
Example:
# 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-allcommand automatically sets these fromOPENAI_API_KEY,ANTHROPIC_API_KEY, andGEMINI_API_KEYif 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.”
System Model Keys
Section titled “System Model Keys”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.
| Variable | Powers | Unset means |
|---|---|---|
UTILITY_OPENAI_API_KEY | Agent Analyze/Health checks, and guardrail checks with engine: "utility_llm" (the default), called directly against OpenAI | Those checks are skipped; Analyze and Health are unavailable |
UTILITY_OPENROUTER_API_KEY | The same work, routed through OpenRouter instead. Setting it selects OpenRouter; it wins when both keys are set, and the startup log says so | The utility LLM falls back to UTILITY_OPENAI_API_KEY |
UTILITY_LLM_MODEL | The model the utility LLM calls on whichever backend was selected | Defaults to gpt-6-luna on OpenAI, openai/gpt-6-luna on OpenRouter |
UTILITY_TYPESAFE_API_KEY | Guardrail checks with engine: "jev", answered by TypeSafe | Those 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_ENDPOINT | Microsoft-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=mai | The mai driver is unavailable. Setting only one of the two stops startup |
UTILITY_GEMINI_API_KEY | Gemini Decision 1 on Google’s Decisions API for jev checks. Used only when UTILITY_DECISION_DRIVER=gemini | The gemini driver is unavailable |
UTILITY_DECISION_DRIVER | Which 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 probabilities | typesafe when its key is set, otherwise disabled. A driver that is not configured stops startup. Replaces DECISIONS_DRIVER, which now stops startup |
UTILITY_DECISION_MODEL | The model the chosen decision driver is asked for. For mai it is the Foundry deployment name | The 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).
# 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-lunaUTILITY_TYPESAFE_API_KEY=ts-...# ...or answer jev checks with OpenAI's Decisions API:UTILITY_DECISION_DRIVER=openaiAgents 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.
Slack Manager App
Section titled “Slack Manager App”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.
| Variable | Description |
|---|---|
SLACK_MANAGER_APP_CLIENT_ID | Client ID of your Slack manager app. |
SLACK_MANAGER_APP_CLIENT_SECRET | Client 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:readandapp_configurations:write; no bot scopes. - Redirect URL
<API base URL>/v1/slack/workspaces/oauth/callback, for examplehttps://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
Section titled “System Email Delivery”System email delivery is an internal service used by product and operational flows. It is not an agent capability, public API, or UI setting.
| Variable | Required | Default | Description |
|---|---|---|---|
EMAIL_PROVIDER | Yes, when sending email in production | unset / disabled | Email provider. Supported values: disabled, resend |
RESEND_API_KEY | Yes, when EMAIL_PROVIDER=resend | unset | Resend API key |
RESEND_API_BASE_URL | No | https://api.resend.com | Resend API base URL override for tests or controlled deployments |
Example:
EMAIL_PROVIDER=resendRESEND_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.comverified and enabled for sending.
MCP HTTP response limits
Section titled “MCP HTTP response limits”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.
EVERRUNS_MCP_MAX_RESPONSE_BYTES=33554432The 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.
Outbound egress
Section titled “Outbound egress”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.
| Variable | Default | Description |
|---|---|---|
EVERRUNS_EGRESS_POLICY | open | open, curated-writes or curated-all. An unrecognized value enforces curated-all. |
EVERRUNS_EGRESS_OPEN_READS_PER_MINUTE | 120 | Per-org, per-process limit on reads to hosts outside the allowlist in curated-writes. 0 turns those reads off. |
EVERRUNS_EGRESS_REPUTATION | off | cloudflare-security checks hosts against Cloudflare’s security resolver before connecting; lookups that fail let the request through. |
EVERRUNS_EGRESS_DENY_FEEDS | unset | Comma-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_URL | unset | Send tenant traffic through a tenant egress proxy, for example http://egress-proxy:4750. |
EVERRUNS_EGRESS_PROXY_SECRET | unset | Shared 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_ADDRESS | unset | Public 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_TLS | true | E2B 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. |
Tenant egress proxy
Section titled “Tenant egress proxy”Read by the everruns-egress-proxy binary. Every cap is off unless set.
| Variable | Default | Description |
|---|---|---|
EVERRUNS_EGRESS_PROXY_SECRET | required | Same value as on the control plane and workers, at least 32 bytes. The proxy refuses to start without it. |
EGRESS_PROXY_ADDR | 0.0.0.0:4750 | Proxy listener. Keep it on the private network. |
EGRESS_PROXY_HEALTH_ADDR | 0.0.0.0:4751 | Health listener, GET /healthz. |
EGRESS_PROXY_SOCKS_ADDR | unset | SOCKS5 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_RPM | no cap | Requests per minute per org. |
EGRESS_PROXY_ORG_HOST_RPM | no cap | Requests per minute per org to one host. |
EGRESS_PROXY_ORG_CONCURRENCY | no cap | Open connections per org. |
EGRESS_PROXY_ORG_BYTES_PER_DAY | no cap | Bytes per org per UTC day. Counted per replica unless a control endpoint reports what was already used. |
EGRESS_PROXY_GLOBAL_PER_HOST_RPM | no cap | Requests per minute to one host across all orgs. |
EGRESS_PROXY_REPLICAS | 1 | Replicas sharing the caps; each enforces its share. |
EGRESS_PROXY_BIND_ADDR | unset | Source IP for outbound connections, when the host has a dedicated tenant address. |
EGRESS_PROXY_INSTANCE | hostname | Label on usage batches. |
EGRESS_PROXY_CONTROL_URL | unset | Control 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.
UI API Proxy Architecture
Section titled “UI API Proxy Architecture”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
:9300routes/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 -1in 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
Other Server Variables
Section titled “Other Server Variables”| Variable | Default | Description |
|---|---|---|
AUTH_MODE and AUTH_* | Depends on DEPLOYMENT_GRADE | Authentication mode and its settings (AUTH_BASE_URL, AUTH_JWT_SECRET, AUTH_LOGIN_ORIGIN, and others). See Authentication. |
RATE_LIMIT_API_REQUESTS_PER_MINUTE | 1200 | API request rate limit per minute. Uses Valkey when VALKEY_URL is set, otherwise a per-instance in-memory limiter. |
TRUSTED_PROXY_HOPS | 1 | Number 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_DAYS | 0 (disabled) | Archive session events older than this many days. A background task runs hourly. |
DATABASE_POOL_MAX | 50 | Maximum PostgreSQL connections in the request pool. |
DATABASE_POOL_MIN | 5 | Minimum PostgreSQL connections kept open. |
SECRETS_ENCRYPTION_KEY_PREVIOUS | Unset | Previous encryption key, kept during key rotation so existing values still decrypt. See Encryption key rotation. |
EXPECTED_INSTANCES | 1 | Number 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). |
Throughput tuning
Section titled “Throughput tuning”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.
| Variable | Default | Description |
|---|---|---|
EVENT_GROUP_COMMIT | on | Events 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_LANES | 4 | Parallel commit lanes per API instance. A session always uses the same lane, so its events keep their order. |
SESSION_ACTOR_STICKY_GRACE_MS | 300 | How 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_ENABLED | true | Builds 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. |
SSE Streaming Configuration
Section titled “SSE Streaming Configuration”| Variable | Default | Description |
|---|---|---|
SSE_REALTIME_CYCLE_SECS | 300 | Connection cycle interval for session event streams (seconds) |
SSE_MONITORING_CYCLE_SECS | 600 | Connection cycle interval for durable monitoring streams (seconds) |
SSE_HEARTBEAT_INTERVAL_SECS | 30 | Interval between heartbeat comments on all SSE streams (seconds) |
SSE_GLOBAL_MAX | 10000 | Maximum total SSE connections across all users |
SSE_PER_SESSION_MAX | 12 | Maximum SSE connections per session |
SSE_PER_ORG_MAX | 1000 | Maximum 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_SECSto reduce reconnection frequency
Worker gRPC Configuration
Section titled “Worker gRPC Configuration”SERVER_GRPC_ADDRESS
Section titled “SERVER_GRPC_ADDRESS”Address of the server gRPC endpoint for worker communication.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | 127.0.0.1:9001 |
Example:
SERVER_GRPC_ADDRESS=127.0.0.1:9001Notes:
- Workers communicate with the server via gRPC for all database operations
WORKER_GRPC_ADDRESSis supported as a legacy alias- The server exposes both HTTP (default
9000) and gRPC (default9001) interfaces - Workers are stateless and do not connect directly to the database
WORKER_GRPC_AUTH_TOKEN
Section titled “WORKER_GRPC_AUTH_TOKEN”Bearer token for authenticating worker gRPC connections to the control-plane.
| Property | Value |
|---|---|
| Required | Yes (production); No (dev mode) |
| Default | Unset (auth disabled) |
Example:
WORKER_GRPC_AUTH_TOKEN=your-secret-tokenNotes:
- 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
SERVER_GRPC_BIND_ADDR
Section titled “SERVER_GRPC_BIND_ADDR”Bind address for the server-side gRPC listener.
| Property | Value |
|---|---|
| Required | No (server only) |
| Default | 0.0.0.0:9001 |
Example:
SERVER_GRPC_BIND_ADDR=0.0.0.0:9001Notes:
WORKER_GRPC_ADDRis supported as a legacy alias
WORKER_GRPC_CONNECT_TIMEOUT
Section titled “WORKER_GRPC_CONNECT_TIMEOUT”Timeout in seconds for worker initial connection to control-plane gRPC.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | 30 |
Example:
WORKER_GRPC_CONNECT_TIMEOUT=60WORKER_GRPC_REQUEST_TIMEOUT_SECS
Section titled “WORKER_GRPC_REQUEST_TIMEOUT_SECS”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.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | 120 |
Example:
WORKER_GRPC_REQUEST_TIMEOUT_SECS=120WORKER_ACTOR_STALL_TIMEOUT_SECS
Section titled “WORKER_ACTOR_STALL_TIMEOUT_SECS”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.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | 300 |
Example:
WORKER_ACTOR_STALL_TIMEOUT_SECS=300WORKER_TOOL_DETACH_AFTER_SECS
Section titled “WORKER_TOOL_DETACH_AFTER_SECS”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.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | 300 |
Example:
WORKER_TOOL_DETACH_AFTER_SECS=300WORKER_MAX_RUNNING_TURNS
Section titled “WORKER_MAX_RUNNING_TURNS”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.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | From the memory limit |
Example:
WORKER_MAX_RUNNING_TURNS=2000WORKER_MEMORY_LIMIT_MIB
Section titled “WORKER_MEMORY_LIMIT_MIB”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.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | The cgroup memory limit |
Example:
WORKER_MEMORY_LIMIT_MIB=6144WORKER_MAX_RUNTIME_LAG_MS
Section titled “WORKER_MAX_RUNTIME_LAG_MS”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.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | 25 |
Example:
WORKER_MAX_RUNTIME_LAG_MS=25MAX_DETACHED_TOOL_CALLS
Section titled “MAX_DETACHED_TOOL_CALLS”Most tool calls one worker keeps running after their turns parked. Past it a long call stays inside its turn.
| Property | Value |
|---|---|
| Required | No (worker only) |
| Default | 1000 |
Example:
MAX_DETACHED_TOOL_CALLS=1000WORKER_GRPC_TLS_CERT
Section titled “WORKER_GRPC_TLS_CERT”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.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set (TLS disabled) |
Example:
WORKER_GRPC_TLS_CERT=/etc/everruns/grpc-cert.pemNotes:
- 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)
WORKER_GRPC_TLS_KEY
Section titled “WORKER_GRPC_TLS_KEY”Path to PEM-encoded private key file corresponding to WORKER_GRPC_TLS_CERT.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set |
Example:
WORKER_GRPC_TLS_KEY=/etc/everruns/grpc-key.pemWORKER_GRPC_TLS_CA_CERT
Section titled “WORKER_GRPC_TLS_CA_CERT”Path to PEM-encoded CA certificate bundle for verifying the remote peer.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set |
Example:
WORKER_GRPC_TLS_CA_CERT=/etc/everruns/grpc-ca.pemNotes:
- 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.
WORKER_GRPC_TLS_DOMAIN
Section titled “WORKER_GRPC_TLS_DOMAIN”Override the expected server domain name for TLS certificate verification (worker only).
| Property | Value |
|---|---|
| Required | No |
| Default | Derived from SERVER_GRPC_ADDRESS hostname |
Example:
WORKER_GRPC_TLS_DOMAIN=control-plane.internalNotes:
- Useful when the server certificate CN/SAN differs from the connection hostname (e.g., connecting via IP but cert has a DNS name)
OpenTelemetry Configuration
Section titled “OpenTelemetry Configuration”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.
OTEL_EXPORTER_OTLP_ENDPOINT
Section titled “OTEL_EXPORTER_OTLP_ENDPOINT”OTLP endpoint for trace export (e.g., Grafana Tempo, Arize Phoenix, Datadog, or any OTLP-compatible backend).
| Property | Value |
|---|---|
| Required | No |
| Default | Not set (tracing disabled) |
Example:
# For a local OTLP collector or PhoenixOTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# For production TempoOTEL_EXPORTER_OTLP_ENDPOINT=http://tempo.monitoring:4318Notes:
- 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/tracespath 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
OTEL_SERVICE_NAME
Section titled “OTEL_SERVICE_NAME”Service name for traces.
| Property | Value |
|---|---|
| Required | No |
| Default | everruns-server (API), everruns-worker (Worker) |
Example:
OTEL_SERVICE_NAME=everruns-prod-apiOTEL_SERVICE_VERSION
Section titled “OTEL_SERVICE_VERSION”Service version for traces.
| Property | Value |
|---|---|
| Required | No |
| Default | Cargo package version |
OTEL_ENVIRONMENT
Section titled “OTEL_ENVIRONMENT”Deployment environment label.
| Property | Value |
|---|---|
| Required | No |
| Default | Not set |
Example:
OTEL_ENVIRONMENT=productionOTEL_RECORD_CONTENT
Section titled “OTEL_RECORD_CONTENT”Enable recording of LLM input/output content in traces. Warning: May contain sensitive data.
| Property | Value |
|---|---|
| Required | No |
| Default | false |
Example:
# Standard OTel env var (preferred)OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
# Legacy alias (also works)OTEL_RECORD_CONTENT=trueNotes:
- When enabled, the chat span records
gen_ai.system_instructions,gen_ai.input.messages,gen_ai.output.messages, andgen_ai.tool.definitions(plus the OpenInferenceinput.value,output.value, and flattenedllm.input_messages.*); tool spans recordgen_ai.tool.call.argumentsandgen_ai.tool.call.result(pluseverruns.tool.executed_argumentswhen 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
EVERRUNS_TRACE_CONVENTIONS
Section titled “EVERRUNS_TRACE_CONVENTIONS”Which attribute vocabularies agent spans carry.
| Property | Value |
|---|---|
| Required | No |
| Default | gen_ai,openinference |
Example:
# Only the OpenTelemetry Gen-AI attributes (Tempo, Jaeger, Datadog, Langfuse)EVERRUNS_TRACE_CONVENTIONS=gen_ai
# Only the OpenInference attributes (Arize Phoenix)EVERRUNS_TRACE_CONVENTIONS=openinferenceNotes:
- 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
Local Development with OpenTelemetry
Section titled “Local Development with OpenTelemetry”To visualize traces locally, point OTEL_EXPORTER_OTLP_ENDPOINT at any OTLP-compatible collector:
# Set OTLP endpoint for API and Workerexport OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
# Start servicesjust start-allTo 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.
Gen-AI Trace Structure
Section titled “Gen-AI Trace Structure”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}└── ...Gen-AI Trace Attributes
Section titled “Gen-AI Trace Attributes”Spans carry the OpenTelemetry Gen-AI attributes and the OpenInference attributes side by side (see EVERRUNS_TRACE_CONVENTIONS). The most useful ones:
| Attribute | Span Types | Description |
|---|---|---|
gen_ai.operation.name | invoke_agent, chat, execute_tool | invoke_agent, chat, or execute_tool |
gen_ai.agent.id, gen_ai.agent.name, gen_ai.agent.description | invoke_agent | Agent the turn runs as |
gen_ai.conversation.id / session.id | All | Session identifier |
gen_ai.provider.name / llm.provider | chat | Provider (openai, anthropic, gcp.gemini, aws.bedrock, …) |
gen_ai.request.model, gen_ai.response.model / llm.model_name | chat | Model name |
gen_ai.response.id | chat | Provider response identifier |
gen_ai.response.finish_reasons | chat | Why generation stopped (string array) |
gen_ai.usage.input_tokens, gen_ai.usage.output_tokens / llm.token_count.* | chat, invoke_agent | Token usage (turn root carries the cumulative total) |
gen_ai.usage.cache_read.input_tokens, gen_ai.usage.cache_write.input_tokens | chat, invoke_agent | Prompt-cache tokens |
gen_ai.request.temperature, gen_ai.request.max_tokens, gen_ai.request.reasoning.level, gen_ai.request.stream / llm.invocation_parameters | chat | Request parameters |
gen_ai.response.time_to_first_chunk | chat | Streaming latency in seconds |
gen_ai.conversation.compacted | chat | Context was compacted before the call |
llm.cost.total / everruns.usage.cost_usd | chat, invoke_agent | Cost in USD when known |
gen_ai.tool.name, gen_ai.tool.call.id, gen_ai.tool.type, gen_ai.tool.description / tool.name, tool.description | execute_tool | Tool identity |
openinference.span.kind | All | AGENT, LLM, TOOL, or CHAIN |
error.type | All | Low-cardinality error class on failure (error code, HTTP status, timeout, or _OTHER); the span status carries the message |
everruns.phase | reason, act, thinking | Phase span marker |
everruns.turn.id, everruns.exec.id | All | Everruns correlation ids |
everruns.turn.iterations, everruns.turn.tool_call_count, everruns.turn.llm_call_count | invoke_agent | Turn counters |
everruns.tool.status | execute_tool | success, error, timeout, or cancelled |
Braintrust Integration
Section titled “Braintrust Integration”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.
| Variable | Required | Default | Description |
|---|---|---|---|
BRAINTRUST_ENABLED | No | enabled when API key is present | Explicit Braintrust on/off switch |
BRAINTRUST_API_KEY | Yes | - | API key from Braintrust settings |
BRAINTRUST_PROJECT_NAME | No | My Project | Project name for organizing traces |
BRAINTRUST_PROJECT_ID | No | - | Direct project UUID (skips name lookup) |
BRAINTRUST_API_URL | No | https://api.braintrust.dev | API base URL |
BRAINTRUST_QUEUE_CAPACITY | No | 1024 | Buffered event capacity before new exports are dropped |
BRAINTRUST_MAX_BATCH_SIZE | No | 50 | Max events per Braintrust insert call |
BRAINTRUST_FLUSH_INTERVAL_MS | No | 500 | Max delay before flushing a partial batch |
BRAINTRUST_REQUEST_TIMEOUT_MS | No | 10000 | Per-request timeout for Braintrust insert calls |
BRAINTRUST_MAX_RETRIES | No | 3 | Retries for 429, 5xx, and timeout/connect failures |
BRAINTRUST_RETRY_BASE_DELAY_MS | No | 250 | Initial retry backoff |
BRAINTRUST_RETRY_MAX_DELAY_MS | No | 5000 | Retry backoff cap |
BRAINTRUST_RECORD_CONTENT | No | false | Export raw turn and LLM text content |
BRAINTRUST_RECORD_THINKING | No | none | Extended thinking export mode: none, summary, full |
BRAINTRUST_TOOL_ARGS_MODE | No | redacted | Tool argument export mode: full, redacted, none |
BRAINTRUST_TOOL_RESULTS_MODE | No | summary | Tool result export mode: full, summary, redacted, none |
BRAINTRUST_DEBUG_PAYLOADS | No | false | Print full outbound Braintrust payload JSON to local debug logs |
EXTERNAL_AGENTS_ENABLED
Section titled “EXTERNAL_AGENTS_ENABLED”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.
CUSTOM_WORKER_GRPC_BIND_ADDR
Section titled “CUSTOM_WORKER_GRPC_BIND_ADDR”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.