cascadeflow skill

The cascadeflow skill and MCP server: a cheap model answers first, a stronger one steps in on doubt, budget stays in check

  • 3,926 ★ on the repository
  • Last commit
  • MIT
Skill

Extended access

Why this level

  • Sends requests to several model providers with your keys
  • Changes which model answers the user
All reasons and checks

lemony-ai/cascadeflow

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/cascadeflow

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Sends requests to several model providers with your keys
  • Changes which model answers the user

This is third-party code. Review the repository files before installing.

What it does

cascadeflow is a control layer inside the agent loop, not a proxy at the HTTP boundary. It decides at each step which model answers, whether the budget is exceeded and whether a policy check passes. The base technique: a cheap drafter model first, a quality check, and a stronger model only when needed. The `cascadeflow` skill from the `skills` directory teaches an agent to use `CascadeAgent`, `ModelConfig`, `cascadeflow.init` and `cascadeflow.run`, pick model pairs and wire the layer into LangChain, OpenAI Agents, CrewAI, PydanticAI, Google ADK, n8n and Vercel AI SDK. A separate MCP server exposes routing as a tool to clients such as Claude.

Who it is for. Python and TypeScript agent developers whose model bill keeps growing while simple requests go to the priciest model.

Good fit when

  • The model-call bill keeps growing while most requests are simple.
  • An agent in a loop must stop when the budget is exceeded.
  • A decision log is required: which model answered and why.
  • A routing layer is added to an existing LangChain or CrewAI project.
  • Different agent skills need different models and reasoning levels.

Not a fit when

  • The agent calls one model and the bill is small.
  • You need an external gateway with one key for all teams.
  • Quality matters more than price and a strong model is needed on every request.

Example request

Add cascadeflow to our LangChain agent: cheap drafter model, quality validation on, a budget cap of 2 dollars per run.

Limitations

The README's savings figures come from the MT-Bench, GSM8K, MMLU and TruthfulQA test sets; your workload will differ, so enable observe mode first. The layer runs inside the agent process, so it needs code changes and does not replace a network gateway. The MCP variant adds a host-model turn to each call, and that time counts in the economics. Semantic checks need extra packages, and `cascadeflow[semantic]` pulls a model of about 80 MB.

How to disable. Remove the `cascadeflow.init` call and uninstall the dependency with `pip uninstall cascadeflow`. Delete the skill from the agent's skills directory and the MCP entry from the client config.

FAQ

How do I install it?

For Python run `pip install cascadeflow`, for TypeScript install `@cascadeflow/core`. The skill lives in `skills/cascadeflow` and is copied into the agent's skills directory.

Is it a proxy?

No. The layer runs inside the agent process and sees every model and tool call, so it decides on loop state rather than a single HTTP request.

How do I connect MCP?

Install `pip install "cascadeflow[mcp]"` and create a server with `create_mcp_server`. A local client runs over stdio, a remote one over streamable-http.

Which frameworks does it work with?

LangChain, OpenAI Agents SDK, CrewAI, PydanticAI, Google ADK, n8n and Vercel AI SDK. A Hermes Agent integration exists.

How do I check savings on my own data?

Turn on observe mode: the layer records decisions without changing answers. The trace shows where a cheap model would have managed alone.

Discussion

No questions or reviews yet.

Skills

Skill, plugin and MCP server: fast Jev and Laya models make choices instead of a pricey chat model in browsers, games and routing.

PluginExtended access182Repository stars

Ollaya skill and MCP server: an agent puts typed questions to local decision models and gets probabilities with no LLM call

SkillExtended access1.5KRepository stars

The Roboflow plugin gives an agent computer vision skills: data, training, model evaluation, inference and platform API calls.

PluginExtended access54Repository stars

A terminal agent and Python framework with MCP, SKILL.md and ACP support for coding, building and evaluating your own agents

CLIBroad access4KRepository stars

One agent launches others in the background: Claude Code, Codex, Copilot CLI, Grok Build and Pi, with a model chosen per stage.

SkillBroad access119Repository stars

README in short

The README presents cascadeflow as an in-loop intelligence layer with under 5 ms overhead. Python and TypeScript examples and an integration table are included.

README badge

Report a problem