Skip to content
Now on Confluent Cloud

Predict the next stockout
Optimize for service level

Streaming data is where the mission-critical decisions live. One statement of Flink SQL forecasts, flags and finds the setpoint, inside the stream, with no training.

Live stream

Every event scored in flight. Poke it.

Stream
Function
Confidence
 
0events scored
0flags
TTMmodel
~3 msper call, CPU
01 / INNOVATION

Forecast it. Then optimize it.

A pump caught drifting today is a work order, next week it is an outage. The model that forecasts the series is also a model of the plant, so an optimizer can search the setpoints inside the guardrails.

Which setting earns the most and still meets spec?

Two knobs, three objectives: quality, energy, margin. The model forecasts what every setting does. The optimizer searches, respects the limits, and the operator approves.

View
How much we feed, t/h
How hot we run, °C
 
Before and after
BeforeAfter
Feed196 t/h–
Temperature1,418 °C–
Quality94.8%–
Energy89 kWh/t–
Marginbaseline–
1Forecast quality and energy for every setting
2Drop the ones that miss spec or cross a limit
3Pick the most profitable, send to the operator
recommendationPress Optimize
Illustrative: at 1.2 million tons a year, $2 a ton is about $2.4M a year for one mill.
2 to 5×faster optimization
93 → 99%quality accuracy
$2per ton
Design partners in cement, steel, pulp and paper, food and telecommunications

No training. Draw anything.

The model has never seen your signal. Sketch one and watch it forecast.

Draw a signal

Drag across the canvas, or start from a shape.

Shapes
Model
Horizon
 
Draw here → release → forecast
–pattern found
0training steps
1.4Mparameters
–forecast time
Same call for a sensor, a SKU, a card or a cell tower

Then something acts on it.

An agent reads the forecast and the flag, reasons, and writes the decision to a topic. Experts set the gates.

Stream to decision

One event, five hops, under a second.

Scenario
 
Kafka topic
pos_sales
waiting for an event
AI_FORECAST
Granite TTM
AI_DETECT_ANOMALIES
99% band
Streaming Agent
AI_RUN_AGENT
Action topic
purchase_orders
// agent log. press Run one event.
0decisions
–stream to action
5expert gates
The three statements behind it
-- 1. wrap the model as a tool
CREATE TOOL forecast_sku AS
  AI_FORECAST(units_sold, event_time,
    JSON_OBJECT('model' VALUE 'ttm', 'horizon' VALUE 7));

-- 2. bind a model, a prompt and tools
CREATE AGENT replenisher WITH (
  model  = 'granite-llm',
  prompt = 'Keep service level at P90. Raise a PO when projected stock falls under lead time demand. Explain in one line.',
  tools  = ['forecast_sku', 'stock_lookup', 'raise_po']
);

-- 3. run it per event, write decisions back
INSERT INTO purchase_orders
SELECT store_id, sku, AI_RUN_AGENT('replenisher', ROW(store_id, sku, units_sold, event_time))
FROM pos_sales;

Streaming Agents syntax as previewed by Confluent. Names and clauses can change before GA.

One stream. Every decision.

Flink runs the models on every event. Decisions land as topics, tables, alerts and agent calls.

01Streams in
POS and e-commerce
Card payments
SCADA and historians
Network telemetry
Market data
Meters and IoT
120+ connectors, Schema Registry contracts
02Confluent Cloud
Kafka topicsevery series, every event, in order. Durable and replayable for audit and re-runs
Flink SQLAI_FORECAST · AI_DETECT_ANOMALIES · TS_EMBED · TS_SEARCH · TS_OPTIMIZE
Granite Time Series modelshosted by Confluent, zero-shot, no credentials or serving to manage, your data stays in your org
Streaming AgentsCREATE TOOL · CREATE AGENT · AI_RUN_AGENT, gates for experts
one statement per decision, billed as Flink compute
03Decisions out
Purchase orders topic
Holds and alerts
Tickets with a cause
Setpoint recommendations
Tableflow to Iceberg
Apps, BI and agents via MCP
consumed as events, tables or tool calls
1statement
0decisions in flight
0models to train
Nothing leaves Confluent Cloud. Models run next to the topic.

Four models. One family. 44M+ downloads.

Pick one. Every simulation follows.

02 / VALUE

Value decays by the minute.

Slide the moment you act. Watch what is left of the decision.

value captured time to act 100%
secondminutehourdayweek
Card frauda stolen card, first swipe
Stockouta store, a hot SKU, a weekend
Network faulta cell site, drop rate rising
Kiln driftquality sliding, energy climbing
Illustrative curves
1 syou act after

From 30 models to 2.

A cement producer, one mill. Flip it.

30models per mill
26weeks to deliver
93%accuracy

8 to 10 regression models per cement grade, 3 grades, retrained in batch. 6 months for one mill.

Real time, bespokecustom models on streams, rebuilt per use case
Autonomous enterprisefoundation models and governed agents on Confluent
Bespoke and batchwhere most teams are today
Zero-shot, batchfoundation models, agents as nightly jobs
bespoke → foundation models and agents
batch → real time
$2EBITDA per ton
$10s to 100s Mfinancial benefit
Client identities withheld

Real outcomes on real streams.

5 to 10× productivity. Every point of accuracy worth millions. Client identities withheld.

Telco · network operations production0 tickets without a cause
IBM Network Intelligence, Granite TSPulse
Telemetry in, anomalies out, agentic root cause, remediation human-in-the-loop or autonomous.
TSPulseagentic RCAMCP tools
Financial services · markets production~0%
Multivariate asset forecasts, Granite TTM
Per asset class, against the incumbent model. Zero-shot first, tuned where the backtest paid.
TTMmultivariatebacktested
Grocery · planning reference design+0 pts
Every SKU in every store, hourly
Around 100,000 SKUs across thousands of stores. Reorder point and purchase order raised in the stream from the P10 to P90 band.
AI_FORECASTP10 to P90Tableflow
03 / USE CASES

Inside the plant.

A cement line on Confluent. Sensor to setpoint and back.

From sensor to setpoint

Pick a story, or click the kiln, the mill or the preheater.

Story
Lens
Production optimization

Free lime is trending up. The quality forecast says 97.1% in 40 minutes, below the 98.5% target.

97.1%quality in spec · target 98.5
94kWh per ton · target 92
196t/h throughput
$0.00margin vs baseline, per ton
0 hdowntime avoided
Simulated line. The topics, the statements and the gates are the real ones.

Try it on your world.

One Flink SQL function each. Real models on real data in the playground.

Every SKU, every store, every hour

28 days with quantiles. The purchase order comes from the band.

Promo next week
Service level
Stock on hand
Agent decision
SKUoat milk 1Lstore112lead time2 daysnext 7 days–reorder point–stock runs out–
purchase order–
AI_FORECAST, model ttm, horizon 28, maxContextSize 730. Promo applied as an exogenous driver.
+5 to 10accuracy points
100kSKUs, thousands of stores
hourlynot weekly
04 / START

Run it on your stream.

Three moves. The first takes a minute.

01

Paste one statement

Any topic with a value and a timestamp.

SELECT event_time, value,
  AI_FORECAST(value, event_time,
    JSON_OBJECT('model' VALUE 'ttm', 'horizon' VALUE 12))
  OVER (PARTITION BY series_id ORDER BY event_time
        RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS f
FROM your_topic;
02

Call it from Flink SQL

Models hosted by Confluent. AI_FORECAST and AI_DETECT_ANOMALIES today, TS_EMBED, TS_SEARCH and TS_OPTIMIZE next.

Watch the walkthrough
03

Book a working session

Bring a topic and a decision. One afternoon, your data.

Build the note

Briefing note

Four lines. Copy it into an email to your IBM or Confluent contact.

Technical reference: functions, parameters, limits
SELECT event_time, load_kw,
  AI_FORECAST(load_kw, event_time,
    JSON_OBJECT('model' VALUE 'ttm', 'horizon' VALUE 12))
  OVER (PARTITION BY meter_id ORDER BY event_time
        RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS forecast
FROM meter_readings;
ParameterDefaultMeaning
modelttmttm, flowstate, patchtstfm or timesfm-2.5. Hosted by Confluent. Both functions.
horizon5Future steps to forecast. AI_FORECAST only.
minContextSize20Points required before output starts. Fields are null until then.
maxContextSize512Most recent points used. Older points are truncated.
confidencePercentage99.0Symmetric prediction interval. AI_DETECT_ANOMALIES only.
upperBoundConfidencePercentage / lowerBound…nullAsymmetric overrides for one side of the interval.
rmseWindowSize5Rolling window for the RMSE of predictions.
ModelHorizonContextNotes
ttmup to 9652 to 512Picks the TTM variant that matches horizon and context. Fast default.
flowstateover 6up to 4,096Context plus horizon under 4,102. Seconds-level and hourly data alike.
patchtstfmup to 8,17616 to 8,064Context plus horizon up to 8,192. Long horizons, full distributions.
timesfm-2.5model limitmultiple of 32Google Research model, also available in both functions.

Output of AI_FORECAST: forecast ARRAY<ROW<timestamp, mean, q10, q50, q90>> and metadata. Output of AI_DETECT_ANOMALIES: is_anomaly, forecast_value, lower_bound, upper_bound, actual_value, timestamp, rmse. Inputs: value DOUBLE, timestamp TIMESTAMP(3), evenly spaced for best results. Billed as Flink compute.