Flow Cortex

In development

Faster agents.
Fewer tokens.

Most tool-call arguments already exist in context. Flow Cortex points at them instead of typing them out again.

A model that proposes typed tool calls, and a runtime that checks every call before it runs. Built for API workflow agents.

Public tool calls measured
17,437
Lower decision latency than literal JSON
5.5×
Same call, two ways

User Refund the duplicate charge on my last order.

Conventional JSON 0 steps 0 ms
Flow Cortex 0 steps 0 ms
tool
refund
order_id
obs2 · /orders/0/id
amount_minor
obs2 · /orders/0/refundable_minor
currency
obs2 · /orders/0/currency
reason
duplicate_charge
Illustrative. Steps timed at an assumed 8 ms each.
01

Fewer tokens.

A value already in context costs one reference, not every character of it.

02

Lower latency.

Fewer sequential model steps means less waiting between actions.

03

Typed by construction.

Every proposal is valid for the tool's schema before your code sees it.

Measured, not promised

Most arguments are already on the page.

We counted where every argument value came from in 17,437 public tool calls. The census motivated the design. The next section shows what a trained model does with it.

Calls analysed14,285from 1,980 recorded runs
Calls with no composed value88.9%every argument found verbatim in context
Median model steps per call182plain JSON vs. references
Arguments per call, mean2.1median 1, 90th percentile 4

Where argument values come from

Successful agent runs · tau-bench
A prior tool result

An ID, amount or date returned by an earlier call.

Flow Cortex emits one reference token

Trained and measured

Same model. Two ways of answering.

We fine-tuned one 9B model twice on the same examples: once to write the full JSON, once to write a short sequence of choices that the runtime expands into the same JSON. Both were scored on the same held-out records.

Decision time, same engine877160 ms5.5× lower, vLLM, one request at a time
Output tokens per decision1411112× fewer. Tool calls shrink 197 to 9
Exact match, 300 held-out records88.392.3%Ahead by 4 points. 95.3% ignoring wording
Actions the runtime checks accept99.3100%Choices can only form valid actions

Median decision time

Lower is better. The JSON baseline is also shown with its best speed-up, speculative decoding.

  1. Literal JSON vLLM877 ms
  2. Literal JSON vLLM + speculative decoding499 ms
  3. Flow Cortex vLLM160 ms
  4. Flow Cortex vLLM + prefix cache, warm139 ms

Includes reading the prompt, building state, every model call, the grammar and the checks. 20 held-out records, one request at a time. Flow Cortex needs about seven short model calls per decision; the model call time (about 20 ms each) is most of the remaining 150 ms.

Match by action

Share of held-out records where the action matches. Flow Cortex is scored on content, ignoring sentence wording; literal JSON on strict exact match.

ActionLiteral JSONFlow Cortex
call 197 records88.3%95.4%
respond 2185.7%85.7%
ask_user 3171.0%96.8%
abort 43100%100%
final 8100%87.5%

Tool calls are the main job and improve. The right action and the right tool were chosen on all 300 records. Literal JSON is scored strictly, so with wording ignored its numbers can only rise.

Lower latency

Keep the agent loop moving.

Move the sliders to estimate decoding time for one task. Step counts come from the census. Time per step is your assumption; on our trained model we measured 6.6 ms per step.

Decoding time saved per task 1,128 ms 3.9× fewer sequential steps
  1. Conventional JSON 31.5 steps per call1,512 ms
  2. Flow Cortex 8.0 steps per call384 ms

Estimate, not a benchmark. Mean steps from the census times your step time. Excludes prefill and runtime checks, which are the same for both. The published anchor for an 8B model is 6.3 to 9.2 ms per step.

Typed responses

Five actions. One closed record.

Every decision is exactly one of five actions. Records are closed, so an extra field is invalid, and identifiers are minted by the runtime, so the model cannot invent one.

decision.json
Invariant

Trust boundary

The model proposes. The runtime decides.

A typed call is not a correct call. A well-formed refund can still name the wrong account or amount. Ordinary code checks every proposal before anything reaches a tool.

  • The model cannot grant a capability, mint a receipt or change policy.
  • Tool output is data, even when its text reads like an instruction.
  • A fallback is a different proposer, never a different executor.
  • A finished task may only cite receipts that tools actually returned. A made-up receipt is rejected.
  • The model is only offered the actions a request allows. Anything else is rejected before it can run.

Proposal refund(order: obs2/orders/0, amount: 4,250, currency: USD)

  1. Authorization scopeThe user granted refunds in this session
  2. Order ownershipThe order belongs to the signed-in account
  3. Refundable amountAmount is at most what the order allows
  4. Currency and versionMatches the order at its current version
  5. Duplicate ledgerNo earlier refund for this charge

Press Run checks to send the proposal through the runtime.

Agentic workflows

One task. Many tool calls.

The first workload is API workflow agents: lookups and updates keyed by IDs, enums, dates and amounts. Pick one to see where each value comes from.

    Not built for

    • Code, shell commands or long documents as arguments
    • Multi-step planning and open-ended reasoning
    • Automatic execution of irreversible writes

    Hard planning steps route to a larger model, and that route passes the same runtime checks.

    Build with Flow Cortex

    Less waiting.
    More doing.

    We are looking for teams running API workflow agents to share traces for the next census and to try early builds.

    What does your agent do?