CascadeFlow is an in-process agent runtime harness for multi-model cascading, enabling per-step model decisions, budget gating, and audit trails within agent loops. It supports Python and integrates with multiple providers and frameworks.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
Agent Runtime Intelligence Layer for AI agents. It operates in-process inside the agent loop to optimize cost, latency, quality, budget, compliance, and energy. It supports multiple frameworks and providers and offers per-step decision tracing and runtime enforcement actions.
How it works
CascadeFlow uses speculative execution with quality validation: run small fast models first, validate quality, and escalate to larger models only as needed. It tracks cost, latency, and other metrics, and can enforce actions such as allow, switch_model, deny_tool, or stop based on policy state. It provides a unified API across providers and supports additional integrations (LangChain, OpenAI Agents SDK, CrewAI, PydanticAI, Google ADK, n8n, Hermes Agent, etc.).
Getting started
Install via:
pip install cascadeflow
npm install @cascadeflow/core
Example Python usage:
pip install cascadeflow[all]
from cascadeflow import CascadeAgent, ModelConfig
agent = CascadeAgent(models=[
ModelConfig(name="nous/hermes-flash", provider="openai", cost=0.000375),
ModelConfig(name="gpt-5", provider="openai", cost=0.00562),
])
result = await agent.run("What's the capital of France?")
print(f"Cost: ${result.total_cost:.6f}")
Optionally, semantic quality validation can be added by installing cascadeflow[semantic] and using SemanticQualityChecker as shown in the README excerpt.
Getting started (continued)
The README also shows a tiered integration model:
- Tier 1: zero-change observability
- Tier 2: scoped runs with budget
- Tier 3: decorated agents with policy
Recent releases
Latest release is v1.2.0 (2026-04-02): features include wiring up PreRouter for complexity-based routing in n8n, trace export and offline casc, and related fixes. Earlier releases include v1.1.0 (2026-03-08) Hardening Release, v1.0.0 (2026-02-22) changes, and v0.7.x updates.
Traction
Stars: 3767. Forks: 814. Open issues: 8.
Behind the repo
No explicit startup or company link is provided in the given content beyond project scope and integrations.
Caveats
License: MIT. Created 2025-10-24. Last push 2026-07-01. Language: Python. See repository for more license and age details.






