Complete Guide to Strix Environment Variables: Configuration Reference

Strix is configured entirely through environment variables that control LLM providers, sandbox execution, telemetry, and feature toggles, with the Config class in strix/config/config.py serving as the central registry for all settings.

The open-source Strix repository (usestrix/strix) uses environment variables as its primary configuration mechanism. While the system can load values from a JSON configuration file at ~/.strix/cli-config.json, these settings are ultimately injected into the environment at runtime. The Config class provides structured access to these variables, reading via os.getenv(name.upper(), default) and falling back to sensible defaults when variables are absent.

Core LLM Configuration Variables

Strix requires at least one LLM provider to be configured. The essential variables are tracked in Config.tracked_vars within strix/config/config.py.

STRIX_LLM (Required) The model identifier in LiteLLM syntax (e.g., openai/gpt-5.4, anthropic/claude-3-5-sonnet). This variable is mandatory for every run and determines which provider and model Strix uses for agent reasoning.

Authentication and Base URL Variables Strix supports multiple aliases for API configuration to accommodate different provider conventions:

  • LLM_API_KEY – The API key for the selected LLM provider.
  • LLM_API_BASE – Custom base URL for non-OpenAI providers or self-hosted models.
  • OPENAI_API_BASE – Alias for LLM_API_BASE when specifically using OpenAI.
  • LITELLM_BASE_URL – Alias for LLM_API_BASE for LiteLLM-compatible services.
  • OLLAMA_API_BASE – Alias for LLM_API_BASE when using Ollama locally.

The resolve_llm_config() function in strix/config/config.py processes these variables to determine the final endpoint and credentials.

LLM Behavior and Performance Tuning

Control model behavior and request handling through these optional variables, documented in docs/advanced/configuration.mdx:

  • STRIX_REASONING_EFFORT – Controls the amount of computation the model allocates to reasoning. Accepts values from none to xhigh. Default: high.
  • STRIX_LLM_MAX_RETRIES – Maximum retry attempts for transient LLM errors such as rate limits. Default: 5.
  • LLM_TIMEOUT – Global request timeout for LLM API calls in seconds. Default: 300.
  • STRIX_MEMORY_COMPRESSOR_TIMEOUT – Seconds to wait for memory compression operations before aborting. Default: 30.

Web Search and OSINT Integration

Enable external knowledge retrieval through Perplexity AI:

PERPLEXITY_API_KEY Enables the web-search tool suite. When this variable is unset, Strix disables all web-search capabilities in the tool registry. Referenced in strix/tools/web_search/web_search_actions.py at line 37.

Security and Sandbox Controls

Strix provides granular control over execution environments and browser automation through feature toggles evaluated at startup.

Sandbox Execution

  • STRIX_SANDBOX_MODE – When set to true, forces all tool execution inside the Strix sandbox container. The registry.py file (line 153) evaluates this variable to restrict available tools to sandbox-safe options only.
  • STRIX_DISABLE_BROWSER – Set to true to disable Playwright browser automation entirely. Checked in strix/tools/registry.py at line 56 for security-focused runs.

Docker Runtime Configuration

  • STRIX_IMAGE – Docker image used for sandbox containers. Defaults to the official published Strix sandbox image.
  • STRIX_RUNTIME_BACKEND – Execution backend selection (default: docker).
  • STRIX_SANDBOX_EXECUTION_TIMEOUT – Maximum seconds a tool can run inside the sandbox (default: 120).
  • STRIX_SANDBOX_CONNECT_TIMEOUT – Seconds to wait for the sandbox container to become reachable (default: 10).
  • DOCKER_HOST – Overrides the Docker daemon socket, useful for remote Docker hosts. Referenced in strix/runtime/docker_runtime.py at line 313.

Telemetry and Observability Configuration

Strix implements a layered telemetry system controlled via independent environment variables:

Global Controls

  • STRIX_TELEMETRY – Master switch for all telemetry. Set to 0 to disable. Default: 1 (enabled).
  • STRIX_OTEL_TELEMETRY – Independent toggle for OpenTelemetry export.
  • STRIX_POSTHOG_TELEMETRY – Independent toggle for PostHog product analytics.

OpenTelemetry Export When using external OTLP endpoints (e.g., Traceloop), configure:

  • TRACELOOP_BASE_URL – OTLP endpoint URL for remote trace export. Referenced in strix/telemetry/utils.py at line 165.
  • TRACELOOP_API_KEY – Authentication key for the OTLP endpoint.
  • TRACELOOP_HEADERS – Optional JSON or key=value formatted headers for the OTLP connection.

Network and Proxy Authentication

CAIDO_API_TOKEN Optional authentication token for the CAIDO proxy manager, enabling advanced request interception and management. Referenced in strix/tools/proxy/proxy_manager.py at line 30.

Configuration Loading and Precedence

Strix resolves configuration through a specific hierarchy implemented in strix/config/config.py:

  1. Environment variables – Highest priority, read via os.getenv() in the Config.get() method.
  2. JSON configuration file – Values from ~/.strix/cli-config.json are loaded via apply_saved_config() and injected into the environment at runtime.
  3. Hardcoded defaults – Class-level attributes in Config provide fallback values.

Runtime components such as registry.py, executor.py, and tool_server.py may read specific variables directly via os.getenv() to make early gating decisions before the full configuration is initialized.

Practical Configuration Examples

Configure Strix for local development with Ollama:

export STRIX_LLM="ollama/llama3.2"
export OLLAMA_API_BASE="http://localhost:11434"
export STRIX_SANDBOX_MODE="true"
export STRIX_DISABLE_BROWSER="true"

Configure for production with OpenAI and telemetry disabled:

export STRIX_LLM="openai/gpt-5.4"
export LLM_API_KEY="sk-..."
export STRIX_TELEMETRY="0"
export STRIX_REASONING_EFFORT="high"
export PERPLEXITY_API_KEY="pplx-..."

Programmatic access in Python:

from strix.config import Config, resolve_llm_config

# Resolve model configuration according to env vars

model, api_key, api_base = resolve_llm_config()
print(f"Using model {model} at {api_base}")

# Check telemetry status

otel_enabled = Config.get("STRIX_OTEL_TELEMETRY") != "0"

Summary

  • Strix relies exclusively on environment variables for configuration, managed centrally by the Config class in strix/config/config.py.
  • Required variables: STRIX_LLM and provider-specific API keys (LLM_API_KEY or equivalents).
  • Sandbox control: STRIX_SANDBOX_MODE forces containerized execution, while STRIX_DISABLE_BROWSER removes browser automation capabilities.
  • Telemetry granularity: Global STRIX_TELEMETRY acts as a master switch, with independent overrides for OpenTelemetry and PostHog.
  • Docker flexibility: DOCKER_HOST and STRIX_IMAGE allow deployment on remote Docker hosts or custom sandbox images.
  • Configuration precedence: Environment variables override JSON file settings, which override hardcoded defaults.

Frequently Asked Questions

What is the minimum required configuration to run Strix?

You must set STRIX_LLM with a valid LiteLLM model identifier (e.g., openai/gpt-5.4 or anthropic/claude-3-sonnet) and provide the corresponding API key via LLM_API_KEY. These are the only strictly required variables; all others use sensible defaults defined in strix/config/config.py.

How does Strix handle configuration file versus environment variables?

Strix loads persistent settings from ~/.strix/cli-config.json through the apply_saved_config() method, which injects stored values into the environment. However, actual environment variables take precedence. Runtime components in registry.py and executor.py read directly from os.getenv() to make early execution decisions before full initialization.

Can I disable all telemetry in Strix?

Yes. Set STRIX_TELEMETRY=0 to disable all telemetry collection and transmission. For granular control, you can separately disable OpenTelemetry with STRIX_OTEL_TELEMETRY=0 or PostHog analytics with STRIX_POSTHOG_TELEMETRY=0 while keeping other telemetry streams active.

What is the difference between STRIX_SANDBOX_MODE and Docker configuration variables?

STRIX_SANDBOX_MODE is a logical flag that determines whether tools execute inside a containerized environment (evaluated in registry.py and tool_server.py). The Docker-specific variables—STRIX_IMAGE, DOCKER_HOST, and timeout settings—control the mechanics of how that sandbox container is created and managed by docker_runtime.py. You can have STRIX_SANDBOX_MODE=true while customizing the underlying Docker image or host connection.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →