Skip to content

Configuration Reference

WeaveFlow has three configuration layers: command-line flags, process environment, and Graph/Session settings. Keep credentials in the environment or managed secret references; Graph Definitions should describe behavior, not secrets.

Server flags

FlagDefaultPurpose
-addr127.0.0.1:8080Listen address. Non-loopback addresses require a management token.
-data.local/wfRuntime data directory.
-secret-diremptyDirectory for file-backed secret references.
-prefixemptyHTTP route prefix such as /debug.
-cors-origins*Comma-separated browser origins, or *.
-graphemptyGraph Definition JSON to preload.
-log-leveldebugdebug, info, or error.

The default -cors-origins=* accepts requests from any browser origin and is intended for local development. Use an explicit allowlist for cross-origin production deployments.

Example:

bash
go run ./cmd/server -addr 127.0.0.1:8080 -data .local/server \
  -secret-dir .local/secrets -prefix /debug -log-level info

Model variables

VariableUse
OPENAI_API_KEYDefault OpenAI-compatible credential for model examples.
OPENAI_BASE_URLAPI root, commonly ending in /v1.
OPENAI_MODELDefault model ID.
WEAVEFLOW_ASSISTANT_API_KEYEnables the optional server assistant when paired with its model ID.
WEAVEFLOW_ASSISTANT_MODELAssistant model ID.
WEAVEFLOW_ASSISTANT_BASE_URLAssistant provider base URL.
WEAVEFLOW_ASSISTANT_PROVIDERAssistant provider profile.
WEAVEFLOW_ASSISTANT_API_FORMATchat_completions or responses.

Security and runtime variables

VariableDefaultPurpose
WEAVEFLOW_MANAGEMENT_TOKENemptyBearer token protecting management routes.
WEAVEFLOW_TOOL_WORKDIRunsetWorkspace root for file tools; unset uses the process working directory.
WEAVEFLOW_TOOL_SKIP_WORKSPACE_CHECKfalseExplicitly bypasses workspace checks; avoid in production.
WEAVEFLOW_BASH_TIMEOUT120000Bash tool timeout in milliseconds.
WEAVEFLOW_BASH_ALLOWLISTemptyOptional comma-separated command allowlist.
WEAVEFLOW_CODEX_WORKSPACE_ROOTSemptyAllowed roots for the Codex runner.
WEAVEFLOW_CLAUDE_WORKSPACE_ROOTSemptyAllowed roots for the Claude runner.

The server settings API can expose environment metadata and secret references without returning secret values. Restrict management routes, and use a separate secret directory or external secret injection for deployed instances.

Graph and Session settings

Graph Definitions set topology, State Modules, node/condition configuration, policies, and metadata. Graph Sessions are immutable execution views that capture the definition revision and runtime settings. Validate a definition against the current registry before creating a Session.

Container variables

The packaged image adds WEAVEFLOW_WEB_PORT, WEAVEFLOW_SERVER_PORT, WEAVEFLOW_WEB_BACKEND_URL, WEAVEFLOW_DATA_DIR, WEAVEFLOW_SECRET_DIR, WEAVEFLOW_GRAPH, WEAVEFLOW_SERVER_PREFIX, WEAVEFLOW_PUBLISH_HOST, and WEAVEFLOW_PUBLISH_PORT. See Deploy the Server and scripts/.env.example for defaults.

Released under the MIT License.