FabricFabric
ReferenceConfig

Environment Variables

Every FABRIC_* environment variable Fabric Agents reads — server, paths, runtimes, Web UI, automations, feature flags, and thin-client setup.

Fabric Agents is configurable through a small set of FABRIC_* environment variables. They're useful for running the headless server, thin-client setups, automations, CI pipelines, and debugging.

Most users don't need to set any of these — the desktop app works out of the box. The ones you're most likely to touch are in the Server & network and Thin-client tables.

Server & network

Used by the headless Fabric Agents server. See Workspaces → Remote workspaces for setup walkthrough.

VariableDefaultPurpose
FABRIC_SERVER_TOKENRequired for server mode. Bearer token clients must present. Generate with openssl rand -hex 32.
FABRIC_RPC_HOST127.0.0.1WebSocket bind address. Set to 0.0.0.0 to accept remote connections.
FABRIC_RPC_PORT9100WebSocket bind port.
FABRIC_RPC_TLS_CERTPath to a PEM certificate. Enables wss://. Required together with FABRIC_RPC_TLS_KEY.
FABRIC_RPC_TLS_KEYPath to the matching PEM private key.
FABRIC_RPC_TLS_CAPEM CA chain file for client-certificate verification. Optional.
FABRIC_HEALTH_PORT0HTTP port for a health endpoint. 0 disables it.

Thin-client (desktop connecting to a remote server)

VariableDefaultPurpose
FABRIC_SERVER_URLws:// or wss:// URL of the remote Fabric Agents server.
FABRIC_WORKSPACE_IDWorkspace ID on the remote server to connect to.
FABRIC_TLS_CAPEM CA bundle for self-signed server certificates (client-side).

Example:

FABRIC_SERVER_URL=wss://203.0.113.5:9100 \
FABRIC_SERVER_TOKEN=<token> \
FABRIC_WORKSPACE_ID=ws-my-project \
bun run electron:start

Paths & assets

Mostly set automatically by the app. You usually only touch these when running in development or from source.

VariableDefaultPurpose
FABRIC_APP_ROOTcwdRoot path for bundled assets and scripts.
FABRIC_RESOURCES_PATHcwd/resourcesResources directory path.
FABRIC_BUNDLED_ASSETS_ROOTRoot of bundled assets. Set to repo root in dev, packaged app dir in production.
FABRIC_CONFIG_DIR~/.fabric-agentUser config directory. Override for testing or multi-profile setups.
FABRIC_SCRIPTSScripts directory path. Set by the app at startup.

Runtimes

Paths to bundled language runtimes. Set automatically; override when debugging.

VariablePurpose
FABRIC_BUNBun binary path.
FABRIC_NODENode.js binary path.
FABRIC_UVPython uv binary path (for Python-based skills/tools).
FABRIC_DEV_RUNTIMESet to 1 to resolve the Claude SDK and interceptor from the monorepo during development.

App state

Set automatically by the app. Read by internal code.

VariablePurpose
FABRIC_IS_PACKAGED1 if running a packaged build, 0 in dev.
FABRIC_VERSIONApp version string.
FABRIC_DEBUG1 or true to enable debug logging.
FABRIC_HEADLESS1 to run Electron without opening a window.
FABRIC_INSTANCE_NUMBERFor multi-instance dock icons / badges.
FABRIC_DEEPLINK_SCHEMEOverride the fabricagents:// protocol name.
FABRIC_APP_NAMEOverride the window title.
FABRIC_AGENT_SAFE_MODE1 skips workspace config loading — recovery mode.

Web UI

When hosting the browser-based UI on the server.

VariablePurpose
FABRIC_WEBUI_DIRPath to the Web UI dist/ directory. Setting this enables the Web UI.
FABRIC_WEBUI_PASSWORDExtra password on the login page.
FABRIC_WEBUI_SECURE_COOKIESet Secure flag on the session cookie. Required when served over HTTPS.
FABRIC_WEBUI_WS_URLPublic wss:// URL when the server is behind a reverse proxy.

Automation event injection

Set by Fabric Agents when invoking an automation's prompt action. Read these inside a command's $ARGUMENTS template or a shell automation to know the trigger context.

VariablePurpose
FABRIC_EVENTEvent type: SchedulerTick, LabelAdd, LabelRemove, PreToolUse, PostToolUse, SessionStart, SessionEnd, SessionStatusChange, FlagChange, PermissionModeChange.
FABRIC_EVENT_DATAFull event payload as a JSON string.
FABRIC_SESSION_IDID of the session the event came from.
FABRIC_SESSION_NAMEName of the session.
FABRIC_WORKSPACE_IDWorkspace the session belongs to.
FABRIC_LABELLabel name for LabelAdd / LabelRemove events.
FABRIC_LOCAL_TIMEHH:MM for SchedulerTick.
FABRIC_LOCAL_DATEYYYY-MM-DD for SchedulerTick.

See Automations for how to wire these up.

Feature flags

VariablePurpose
FABRIC_FEATURE_FABRIC_AGENTS_CLIEnable/disable the fabric-cli feature exposure. 0 hides it in the UI.
FABRIC_FEATURE_DEVELOPER_FEEDBACKToggle developer-feedback-specific UI.
FABRIC_ENABLE_1M_CONTEXTfalse to disable the 1M context window.
FABRIC_EXTENDED_PROMPT_CACHEtrue to use the 1-hour prompt cache TTL.
FABRIC_RICH_TOOL_DESCRIPTIONSfalse to disable the _intent / action metadata on tool calls.
FABRIC_INTERCEPTOR_DISABLE_AUTO_INSTALL1 skips auto-installing the network interceptor.
FABRIC_LOCAL_MCP_ENABLEDEnables local MCP server support.

LLM routing (internal)

Set by the Pi interceptor when routing requests to provider-specific endpoints. Don't set these by hand.

VariablePurpose
FABRIC_PI_MODEL_APIAPI-type hint for a Pi model.
FABRIC_PI_MODEL_PROVIDERProvider hint for a Pi model.
FABRIC_PI_MODEL_BASE_URLBase-URL hint for a Pi model.

Browser tool

Tunables for the built-in Chromium browser tool.

VariablePurpose
FABRIC_BROWSER_OPEN_SETTLE_TIMEOUT_MSMax ms to wait for a browser launch to settle.
FABRIC_BROWSER_OPEN_SETTLE_POLL_MSPoll interval while waiting for settle.
  • fabric-cli — the CLI reads FABRIC_SERVER_URL and FABRIC_SERVER_TOKEN.
  • Workspaces — thin-client and remote server setup.
  • Automations — how automations inject FABRIC_EVENT* and FABRIC_SESSION* variables.
  • config.json — persistent settings that these env vars override at runtime.

On this page