Marketing decision engine

A budget model that learns every week, not every quarter.

CASCADE is a Bayesian state-space control engine for marketing spend. It updates its beliefs with each period of data, says how sure it is, notices when a channel's returns change, and recommends the next allocation under your constraints. It ships as an MCP server, so the agents your team already runs can call it directly.

Aggregate spend and outcome data only. No user-level tracking, no cookies, no pixels.

AnalystPull the last 12 months of daily cost and conversion value by channel from Google Ads, load it into CASCADE, and tell me if it's safe to act on.

Agent▸ google-ads.search 365 days × 4 channel types
▸ cascade.create_workspace search, shopping, video, display
▸ cascade.record_observations_from_csv 365 periods
▸ cascade.backtest holdout 56 days

AgentVerdict: edge over best baseline, 90% interval coverage 91%. Search and Shopping are identified. Video's interval spans zero, and Display spend sits in the flat part of its saturation curve, so its return is not identifiable yet.

AnalystRecommend next week's split for $120k. Keep Display ≥ $8k, ramp ≤ 20%.

Agent▸ cascade.recommend_allocation → Search $58k · Shopping $36k · Video $14k · Display $12k. Forecast $412k ± $31k. Shall I explain the reasoning or stage the budget changes for approval?

The problem

Standard measurement tells you what happened. It is slow to notice when things change.

Each of the three common approaches was designed for a different question than "what should I spend next week?"

Marketing mix modeling

Refit quarterly, stale in between

A good MMM is a careful structural fit over two or three years of data. Then it sits still for months while the market moves. A shift in a channel's return is only visible at the next refit, and even then it is averaged into history.

Multi-touch attribution

Built on tracking that no longer exists

MTA needs a user-level path from impression to conversion. Privacy changes and platform walls have removed most of that path. What remains is partial, and each platform grades its own homework.

Platform dashboards and rules

Point estimates with no uncertainty

A ROAS number in a dashboard carries no statement of confidence. Decisions get made on noise, and nobody can say whether a channel's return is actually known or just assumed.

What's different

CASCADE is a control system, not a report.

It takes the structural knowledge an MMM provides and keeps it alive between refits, with the statistical machinery to know when it is right and when it is not.

1 Online Bayesian learning

A Kalman-filter dynamic linear model updates the posterior over channel returns with every period of spend and outcome. There is no refit cycle. The estimate you see reflects last week's data.

2 Calibrated uncertainty

Every estimate carries a 90% interval, and in benchmarks those intervals cover about 90% of outcomes. The engine flags channels whose interval spans zero and warns when spend sits in the flat part of a saturation curve, where return is not identifiable no matter how much data arrives.

3 Change detection that rewinds

A CUSUM statistic watches the standardized forecast errors. When it alarms, the filter rewinds to where the evidence began, widens its beliefs there, and replays the data since, so the estimate after the alarm is what a fast-forgetting model would have produced from the change onward. False alarms are rare by design: roughly one per 900 calibrated observations.

4 Decisions under your constraints

Allocation respects per-channel minimums and maximums, ramp limits, and a ROAS chance constraint. Thompson sampling explores where uncertainty is high. Infeasible constraints are refused with an explanation rather than silently relaxed, and every recommendation comes with a plain-language rationale.

5 Starts from the MMM you already have

Import a Meta Robyn export and the workspace inherits its channels, adstock and saturation curves, coefficients and confidence intervals as priors. Robyn supplies the structural fit; CASCADE steers week to week between refits. Response curves and controls are Robyn-compatible by construction.

6 Privacy by architecture

The model consumes spend per channel and an aggregate outcome per period, plus optional controls like promotions or competitor activity. Nothing about individual users enters the system, so there is nothing to lose when tracking rules change again.

CapabilityQuarterly MMMMTAPlatform ROASCASCADE
Updates with each period of dataNoDaily, where trackedYesYes
Cross-channel, not platform-attributedYesPartialNoYes
Stated, calibrated uncertaintySometimesNoNoYes
Detects a change in a channel's returnAt next refitNoNoYes, with rewind
Recommends an allocation under constraintsOffline optimizerNoNoYes
Explains the recommendationVia analystNoNoYes
No user-level data requiredYesNoPlatform-sideYes
Callable by an agent as a toolNoNoVia platform APIsNative MCP
Agent integration

Delivered as an MCP server. Your agents do the orchestration.

Model Context Protocol is the open standard that lets Claude, Cursor, and other agent runtimes call external tools. CASCADE exposes its engine as nine MCP tools and two resources. Data comes in from the platform MCP servers you already connect, recommendations go back out the same way, and a human approves the change.

Google Ads MCP cost, conversions (GAQL) Meta / GA4 / CRM spend, revenue, controls Robyn export structural MMM fit as priors Agent Claude Code · Claude Desktop Cursor · scheduled runner tool calls estimates, verdicts CASCADE MCP server create_workspace record_observations import_robyn_model backtest estimate_channel_effects recommend_allocation simulate_budget explain_last_decision Human approval then push budgets

Scroll sideways to see the whole flow.

Register it like any other MCP server

# Claude Code
claude mcp add cascade -- uv --directory /path/to/cascade-engine run cascade-mcp

# or run it as a shared HTTP endpoint for a team or a scheduler
uv run cascade-mcp --transport streamable-http --port 8000

Workspaces persist as JSON on disk. There is no database to run, no login to manage, and no dashboard to learn. The conversation is the interface, and the agent's transcript is the audit trail.

The closed loop is yours to schedule

MCP is request and response, so the daily or weekly loop lives in your agent or scheduler, where it belongs:

  1. Pull the latest period of spend and outcome through the platform MCP servers.
  2. record_observations to update the posterior. Read back the one-step error and any change alarm.
  3. recommend_allocation with next period's budget and constraints.
  4. explain_last_decision, then stage the change for a person to approve.
  5. Push the approved budgets back through the platform servers.

The tool surface

create_workspace

Declare channels, controls, adstock and saturation transforms, baseline, seasonality, priors, and change detection.

record_observations

Feed periods of spend per channel and outcome. Returns one-step error, detected changes, and warnings.

record_observations_from_csv

Same, from a long or wide CSV such as a GAQL export, with a channel map and control columns.

import_robyn_model

Build a workspace from a Robyn export: channels, hyperparameters, coefficients and intervals become the online model's priors.

backtest

Replay history and score one-step forecasts on a holdout against naive, seasonal-naive, rolling-mean and static OLS baselines. Returns a verdict.

estimate_channel_effects

Per-channel coefficient, 90% interval, identifiability, marginal outcome per dollar at current spend, diagnostics.

recommend_allocation

Next-period split with forecast, honouring min/max, ramp limits and a ROAS chance constraint.

simulate_budget

Forecast any hypothetical split and control values without recording it.

explain_last_decision

Plain-language rationale for the last recommendation.

How a pilot runs

Four steps, with a gate before anyone touches a budget.

The best first account has a channel that spends continuously and carries a large share of revenue, such as search or paid social for a direct-response advertiser. That is where signal is strongest.

Connect the data

Twelve months of daily or weekly spend per channel and a cross-channel outcome, pulled through platform MCP servers or loaded from CSV. If you have a Robyn model, import it as the starting point.

Pass the backtest gate

A 28 to 56 day holdout, scored against four baselines with coverage reported. We only proceed if the verdict shows an edge and intervals are honest. If it doesn't, you learn that before spending anything.

Steer with approval

Weekly recommendations under your constraints, each with a rationale. A person approves before anything moves. Ramp limits keep every change inside the range the model can vouch for.

Review change alerts

When a channel's return shifts, the engine says so and traces it back to the period where the evidence began. Those alerts are the agenda for your monthly review.

Get started

Bring one account and twelve months of data. Leave with a verdict.

A working session is a few hours with your data and your agent tooling. You see the backtest, the estimates and a first recommendation, and you decide whether a pilot is worth running.