Skip to content

Configuration File

Full reference for the starweft.toml configuration file.

Overview

Starweft configuration is managed through config.toml. It is auto-generated by starweft init and is placed by default directly under the data directory (~/.starweft/config.toml).

bash
# Display the current configuration
starweft config show
 
# Validate the configuration
starweft config validate

[node]

Basic node settings.

FieldTypeDefaultDescription
rolestring-The node's role. One of: principal / owner / worker / relay
display_namestring"<role>-node"Display name for the node
data_dirstring"~/.starweft"Path to the data directory. ~ is expanded to the home directory
listenstring[]auto-generatedList of listen addresses (multiaddr format)
log_levelstring"info"Log level. One of: trace / debug / info / warn / error
toml
[node]
role = "worker"
display_name = "worker-01"
data_dir = "~/.starweft-worker"
listen = ["/unix/~/.starweft-worker/mailbox.sock"]
log_level = "info"

[identity]

Specifies paths to Ed25519 key files. Automatically configured by starweft identity create.

FieldTypeDefaultDescription
actor_key_pathstring | nullnullPath to the actor key file. Used for signing
stop_authority_key_pathstring | nullnullPath to the stop authority key file. Used by the principal to sign stop orders
toml
[identity]
actor_key_path = "~/.starweft/identity/actor_key"
stop_authority_key_path = "~/.starweft/identity/stop_authority_key"

[discovery]

Peer discovery settings.

FieldTypeDefaultDescription
seedsstring[][]List of initial peer multiaddresses to connect to
auto_discoverybooltrueEnable automatic discovery from peers
mdnsbooltrue when libp2pmDNS local network discovery (added in v0.3.0; default when transport=libp2p)
registry_urlstring | nullnullURL of the registry server
registry_ttl_secu64300TTL for registry entries (seconds)
registry_heartbeat_secu6460Heartbeat interval for the registry (seconds)
registry_shared_secretstring | nullnullShared secret for registry authentication (direct value)
registry_shared_secret_envstring | nullnullName of the environment variable containing the shared secret
toml
[discovery]
seeds = ["/unix/~/.starweft-owner/mailbox.sock"]
auto_discovery = true
mdns = false
registry_url = "http://127.0.0.1:7777"
registry_ttl_sec = 300
registry_heartbeat_sec = 60

[p2p]

P2P transport settings.

FieldTypeDefaultDescription
transportstringUnix: "local_mailbox" / Windows: "libp2p"Transport type. local_mailbox (Unix sockets) or libp2p (TCP)
relay_enabledbooltrueEnable communication via relay nodes
direct_preferredbooltruePrefer direct connections
max_peersu16128Maximum number of connectable peers
toml
[p2p]
transport = "local_mailbox"
relay_enabled = true
direct_preferred = true
max_peers = 128

[ledger]

SQLite database settings for event sourcing.

FieldTypeDefaultDescription
pathstring"<data_dir>/ledger/node.db"Path to the SQLite database file
toml
[ledger]
path = "~/.starweft/ledger/node.db"

[openclaw]

OpenClaw subprocess settings. Primarily used with the worker role.

FieldTypeDefaultDescription
enabledboolfalseEnable OpenClaw integration
binstring"openclaw"Path or command name of the OpenClaw binary
working_dirstring | nullnullWorking directory for the OpenClaw subprocess
timeout_secu643600Task execution timeout (seconds)
capability_versionstring"openclaw.execution.v1"Capability version of the OpenClaw bridge
toml
[openclaw]
enabled = true
bin = "/usr/local/bin/openclaw"
working_dir = "/home/user/workspace"
timeout_sec = 3600
capability_version = "openclaw.execution.v1"

[compatibility]

Controls protocol and schema version compatibility.

FieldTypeDefaultDescription
protocol_versionstring"starweft/0.1"Message protocol version
schema_versionstringauto (current store version)Store schema version
bridge_capability_versionstring"openclaw.execution.v1"Capability version of the OpenClaw bridge. Must match openclaw.capability_version
allow_legacy_protocolsboolfalseAllow messages using legacy protocol versions
toml
[compatibility]
protocol_version = "starweft/0.1"
schema_version = "starweft-store/3"
bridge_capability_version = "openclaw.execution.v1"
allow_legacy_protocols = false

[owner]

Settings specific to the owner role. Controls the retry policy for task failures.

FieldTypeDefaultDescription
max_retry_attemptsu648Maximum number of retry attempts
retry_cooldown_msu64250Retry interval (milliseconds)
retry_strategystring"rule_based"Retry strategy. Currently only rule_based is supported
retry_rulesOwnerRetryRule[]default rule setPattern-based retry rules (see below)

retry_rules

Each rule consists of a pattern (partial match on the error message), an action (retry behavior), and a reason (reason for logging purposes).

action values:

  • retry_same_worker -- Retry on the same worker
  • retry_different_worker -- Retry on a different worker
  • no_retry -- Do not retry
toml
[owner]
max_retry_attempts = 8
retry_cooldown_ms = 250
retry_strategy = "rule_based"
 
[[owner.retry_rules]]
pattern = "timeout"
action = "retry_same_worker"
reason = "transient timeout"
 
[[owner.retry_rules]]
pattern = "process failed"
action = "retry_different_worker"
reason = "transient execution failure"
 
[[owner.retry_rules]]
pattern = "capability mismatch"
action = "no_retry"
reason = "permanent task/input failure"
Default retry rules
patternactionreason
timeoutretry_same_workertransient timeout
timed outretry_same_workertransient timeout
process failedretry_different_workertransient execution failure
worker overloadedretry_different_workertransient execution failure
worker unavailableretry_different_workertransient execution failure
capability mismatchno_retrypermanent task/input failure
invalid inputno_retrypermanent task/input failure
schemano_retrypermanent task/input failure
unauthorizedno_retrypermanent task/input failure

[worker]

Settings specific to the worker role.

FieldTypeDefaultDescription
accept_join_offersbooltrueWhether to accept JoinOffers from the owner
max_active_tasksu641Maximum number of concurrently running tasks
toml
[worker]
accept_join_offers = true
max_active_tasks = 1

[observation]

Planning and evaluation settings. Used when the owner role decomposes visions into tasks.

FieldTypeDefaultDescription
plannerstring"heuristic"Planning strategy. One of: heuristic / openclaw / openclaw_worker
evaluatorstring"heuristic"Evaluation strategy. Currently only heuristic is supported
cache_snapshotsbooltrueCache snapshots
cache_ttl_secu6430Cache TTL (seconds)
max_planned_tasksusize6Maximum number of tasks generated from a single vision
min_task_objective_charsusize48Minimum number of characters for task objective text
planner_binstring | nullnullOpenClaw binary for the planner (when using openclaw/openclaw_worker strategy)
planner_working_dirstring | nullnullWorking directory for the planner
planner_timeout_secu64120Planner timeout (seconds)
planner_capability_versionstring"openclaw.plan.v1"Capability version for the planner
planner_fallback_to_heuristicbooltrueFall back to heuristic when the OpenClaw planner fails
toml
[observation]
planner = "heuristic"
evaluator = "heuristic"
cache_snapshots = true
cache_ttl_sec = 30
max_planned_tasks = 6
min_task_objective_chars = 48
planner_timeout_sec = 120
planner_capability_version = "openclaw.plan.v1"
planner_fallback_to_heuristic = true
Comparison of planner strategies
StrategyExecution LocationDescription
heuristicLocal (owner)Rule-based task decomposition from vision text. No LLM required
openclawLocal (owner)Planning via a local OpenClaw subprocess
openclaw_workerRemote (worker)Delegates the planning task to a worker node

[logs]

Runtime log rotation settings.

FieldTypeDefaultDescription
rotate_max_bytesu641048576Maximum log file size (bytes). Default is 1 MB
max_archivesusize5Maximum number of archive files to retain
toml
[logs]
rotate_max_bytes = 1048576
max_archives = 5

[artifacts]

Storage settings for artifacts generated by task execution.

FieldTypeDefaultDescription
dirstring"<data_dir>/artifacts"Artifact storage directory
max_filesusize256Maximum number of artifact files to retain
max_age_secu64604800Maximum retention period for artifacts (seconds). Default is 7 days
toml
[artifacts]
dir = "~/.starweft/artifacts"
max_files = 256
max_age_sec = 604800

Complete Configuration Example

toml
[node]
role = "worker"
display_name = "worker-01"
data_dir = "~/.starweft-worker"
listen = ["/unix/~/.starweft-worker/mailbox.sock"]
log_level = "info"
 
[identity]
actor_key_path = "~/.starweft-worker/identity/actor_key"
 
[discovery]
seeds = ["/unix/~/.starweft-owner/mailbox.sock"]
auto_discovery = true
mdns = false
 
[p2p]
transport = "local_mailbox"
relay_enabled = true
direct_preferred = true
max_peers = 128
 
[ledger]
path = "~/.starweft-worker/ledger/node.db"
 
[openclaw]
enabled = true
bin = "openclaw"
timeout_sec = 3600
capability_version = "openclaw.execution.v1"
 
[compatibility]
protocol_version = "starweft/0.1"
bridge_capability_version = "openclaw.execution.v1"
allow_legacy_protocols = false
 
[owner]
max_retry_attempts = 8
retry_cooldown_ms = 250
retry_strategy = "rule_based"
 
[worker]
accept_join_offers = true
max_active_tasks = 1
 
[observation]
planner = "heuristic"
evaluator = "heuristic"
cache_snapshots = true
cache_ttl_sec = 30
 
[logs]
rotate_max_bytes = 1048576
max_archives = 5
 
[artifacts]
dir = "~/.starweft-worker/artifacts"
max_files = 256
max_age_sec = 604800