Skip to main content

Observe Mode — Zero-Change Visibility

Observe mode tracks every LLM call without blocking or modifying any behavior. This is the safest way to start: no enforcement, no model switching, just metrics.

Prerequisites

  • cascadeflow installed (Installation)
  • At least one provider API key set (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
1

Add one line

Add cascadeflow.init(mode="observe") before any LLM calls in your application:
Every call is now tracked. Nothing is blocked or changed.
2

See what you spend

Wrap a block with cascadeflow.run() to get aggregate metrics:
3

Read the decision trace

Even in observe mode, cascadeflow records what it would have done:
This lets you audit compliance violations, budget overruns, and routing decisions before turning on enforcement.

TypeScript

What You Learn in Observe Mode

  • How much each agent run actually costs
  • Which models are called and how often
  • Where latency accumulates across steps
  • Which calls would violate compliance policies
  • Whether budget caps would have triggered

Next Step

Ready to enforce constraints? Add budget enforcement →