Configuration

Fuze is configured via fuze.toml in your project root. All settings have sensible defaults — you don't need a config file to get started.

Full reference

[defaults]
max_retries = 3           # Max retries per guarded function
timeout = "30s"           # Per-call timeout
max_cost_per_step = 1.00  # USD ceiling per individual call
max_cost_per_run = 10.00  # USD ceiling for the entire run
max_iterations = 25       # Hard iteration cap
on_loop = "kill"          # "kill", "warn", or "skip"
trace_output = "./fuze-traces.jsonl"  # Path for trace output

[loop_detection]
window_size = 5           # Number of recent outputs to compare
repeat_threshold = 3      # Consecutive identical outputs before triggering
max_flat_steps = 4        # Max steps with no cost change before flagging
cost_velocity_window = 60 # Window in seconds for cost velocity check
cost_velocity_threshold = 1.0  # USD/min threshold that triggers an alert

[daemon]
socket_path = "/tmp/fuze.sock"       # Unix: /tmp/fuze.sock
# socket_path = "\\\\.\\pipe\\fuze.sock"  # Windows: \\.\pipe\fuze.sock
api_port = 7700            # HTTP API port for the daemon
storage = "sqlite"         # "sqlite" or "postgres"
storage_path = "~/.fuze/traces.db"
retention_days = 180       # Minimum 180 for EU AI Act Art. 19

[daemon.budget]
org_daily_budget = 100.00       # Org-wide daily spend ceiling (USD)
per_agent_daily_budget = 10.00  # Per-agent daily spend ceiling (USD)
alert_threshold = 0.80          # Alert at this fraction of ceiling

[daemon.alerts]
dedup_window_ms = 60000   # Suppress duplicate alerts within this window (ms)
webhook_urls = []         # List of webhook URLs for alert delivery

[providers]
# Override default pricing for enterprise discounts
# "openai/gpt-4o" = { input = 0.0020, output = 0.008 }

[alerts]
budget_threshold = 0.80   # Alert at 80% of ceiling
webhook_url = ""          # Optional webhook for alerts

[compliance]
enabled = false
risk_level = "minimal"    # "minimal", "limited", or "high"
log_pii = false           # Anonymize personal data in traces

Configuration priority

Settings are merged in this order (last wins):

  1. Built-in defaults — sensible values for all options
  2. fuze.toml — project-level configuration
  3. Per-function options — guard(fn, { maxCost: 0.50 }) overrides everything

Sections

[defaults]

KeyTypeDefaultDescription
max_retriesnumber3Maximum retry attempts
timeoutstring"30s"Per-call timeout
max_cost_per_stepnumber1.00USD ceiling per call
max_cost_per_runnumber10.00USD ceiling per run
max_iterationsnumber25Hard iteration cap
on_loopstring"kill"Behavior on loop detection: "kill", "warn", or "skip"
trace_outputstring"./fuze-traces.jsonl"File path for trace output

[loop_detection]

Controls how Fuze detects repetitive agent behavior.

KeyTypeDefaultDescription
window_sizenumber5Number of recent outputs to compare
repeat_thresholdnumber3Consecutive identical outputs before triggering
max_flat_stepsnumber4Max steps with no cost change before flagging
cost_velocity_windownumber60Window in seconds for cost velocity check
cost_velocity_thresholdnumber1.0USD/min threshold that triggers an alert

[daemon]

KeyTypeDefaultDescription
socket_pathstring"/tmp/fuze.sock"Socket path. On Windows use \\.\pipe\fuze.sock
api_portnumber7700HTTP API port for the daemon
storagestring"sqlite"Storage backend
storage_pathstring"~/.fuze/traces.db"Database file path
retention_daysnumber180Log retention (min 180 for Art. 19)

[daemon.budget]

KeyTypeDefaultDescription
org_daily_budgetnumber100.00Organization-wide daily spend ceiling (USD)
per_agent_daily_budgetnumber10.00Per-agent daily spend ceiling (USD)
alert_thresholdnumber0.80Alert at this fraction of the ceiling

[daemon.alerts]

KeyTypeDefaultDescription
dedup_window_msnumber60000Suppress duplicate alerts within this window (ms)
webhook_urlsarray[]List of webhook URLs for alert delivery

[compliance]

KeyTypeDefaultDescription
enabledbooleanfalseEnable compliance features
risk_levelstring"minimal"AI system risk classification
log_piibooleanfalseStore raw args/results (GDPR warning)