Skip to main content
cascadeflow operates in one of three modes, set at initialization.

Modes

off

No tracking, no enforcement. The harness is completely disabled. This is the default.

observe

Track all metrics and decisions, but never block execution. Every LLM call and tool execution is recorded with full decision traces. Actions are computed but not enforced — applied is always false in trace records.
Use observe for:
  • Initial production rollout to validate metrics before enforcing
  • Shadow-mode testing to understand what the harness would do
  • Cost and usage analytics without affecting agent behavior

enforce

Track all metrics and enforce constraints. When a hard cap is hit (budget, tool calls, latency, energy) or a compliance violation is detected, the harness takes action: stop, deny_tool, or switch_model.
Use enforce when:
  • You have validated metrics in observe mode
  • You need hard budget caps to prevent runaway costs
  • Compliance requirements mandate model gating

Rollout Guidance

Recommended rollout sequence for production:
  1. Deploy with observe — No risk to agent behavior. Collect metrics, review decision traces, validate that the harness sees what you expect.
  2. Review traces — Check that compliance allowlists, budget calculations, and KPI scoring match your expectations.
  3. Switch to enforce — Once validated, change the mode. The harness will now enforce constraints.
  4. Monitor — Use session.summary() and session.trace() to monitor enforcement in production.

Mode Behavior Matrix