Agent Cost Flow

What one orchestrated agent run cost, drawn end to end: 178 source strands bundle into a spine, five subagent lanes read in parallel, and every band narrows from what that lane read to what it cost, so the small model that did the bulk reading lands as a sliver beside the expensive one that only judged.

PremiumWidgetsAI Agent Cost DashboardMulti-agent Run ReportLLM Token Usage Breakdown
No subagent pointed at.
$0.05$0.31$0.03$0.23$0.71
TOTAL COST$1.335 subagents, 322k tokens read
ORCHESTRATOR TRACEEvaluate migrating the app to a new framework5 subagents, run in parallel
DocsHaiku1m 2stokens read62k
SourceSonnet1m 48stokens read104k
BenchmarksHaiku31stokens read31k
SignalsSonnet1m 14stokens read78k
RisksOpus1m 45stokens read47k

Add to your projectPremium component

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for one inside Claude Code, Codex, or Cursor and it installs the component you pick. Works with any AI Canvas account, free or premium.

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

PropTypeDefaultDescription
taskstring'Evaluate migrating the app to a new framework'The one task the orchestrator decomposed.
eyebrowstring'ORCHESTRATOR TRACE'The small letter-spaced caps line above the task.
agentsAgentCostFlowAgent[]AGENT_COST_FLOW_AGENTSOne row per subagent; every total in the graphic is derived from this array.
initialAgentnumber | nullnullIndex of the lane lit when the picture opens, or null for the rest state.
onAgentChange(id: string | null, index: number | null) => void-Called with the agent id and index as the lit lane changes, and with nulls when none is lit.
elapsedParallelstring-Overrides the run's wall clock, which is otherwise the longest subagent, since they run at the same time. Printed in the stacked layout only.
elapsedSerialstring-Overrides the serial clock, which is otherwise every subagent's time added up: the same reading done one agent at a time. Printed in the stacked layout only.
showOutcomebooleantrueWhether the outcome column, one block and label per subagent, is drawn at the right edge.
layout'auto' | 'wide' | 'narrow''auto'Force the wide stage or the stacked layout instead of measuring the host.
paletteDarkPartial<AgentCostFlowPalette>-Colour overrides for the dark theme, merged over AGENT_COST_FLOW_DARK.
paletteLightPartial<AgentCostFlowPalette>-Colour overrides for the light theme, merged over AGENT_COST_FLOW_LIGHT.
tuningPartial<AgentCostFlowTuning>-Geometry and timing overrides, merged over AGENT_COST_FLOW_TUNING.
classNamestring-Extra classes merged onto the root element.

About Agent Cost Flow

Agent Cost Flow draws one orchestrator run as a single picture: a hair-thin strand for every source document bundles into five subagent lanes, each lane shows its model, run time and tokens read, and its band sweeps into a stacked bill that totals the cost of the run on the right. Every figure climbs on one 30-second run clock, tokens quickly and money slowly, so the lane bills add up to the total at every moment. Pointing at a lane or its band isolates it and says what it read, returned and cost; below 1000px the picture becomes a stacked list where a click or tap opens a lane's tool calls over a fall of canvas dust. Motion springs the bars, CSS carries the travelling light, a canvas draws the dust, and light and dark themes ship in the same file. Thirteen props take your own agents, task, clocks, layout and palettes.

Built with

MotionCanvasTailwind CSS

Frequently asked questions

Is Agent Cost Flow free to use?
Agent Cost Flow is a Premium AI Canvas component. Premium unlocks the full source code, the full remix prompt, and one-command installs for every Premium component, block, and template.
How do I install Agent Cost Flow?
Premium unlocks one-command installs: run the shadcn CLI with your AI Canvas token, or connect the AI Canvas MCP server and ask your AI editor to install it for you. Premium also unlocks the full remix prompt in the Remix panel.
What is Agent Cost Flow built with?
Agent Cost Flow is built with React and TypeScript, using Motion, Canvas, and Tailwind CSS. It ships with both light and dark styling.
Where would I use Agent Cost Flow?
Common uses include AI Agent Cost Dashboard, Multi-agent Run Report, and LLM Token Usage Breakdown. Like every AI Canvas component, it is self-contained and drops into any React project.
Can I remix Agent Cost Flow with AI?
Yes. Open "Remix with AI" on this page to read the setup and the constants Agent Cost Flow is built from. The engine, the markup and the notes on how it works are part of Premium. For the exact component, install it with the one-command CLI.

Featured in collections

More like this