Beer Can Labs
Staff / Treasurer
$
Money and models

Treasurer

Head of Spend and FinOps

Owns the budget rule, spend accounting and pricing, plus factory cloud spend and the compute inventory. The Treasurer answers one question, whether an agent is inside its limits, and every other member enforces the answer.

Design rules
E5, E7, M3
Contracts offered
2
Key flows
4

On the job

  • Answers standing for an agent: per run, per day, per month
  • Prices each model call from the Executive’s token counts
  • Reports cloud spend and compute inventory with a read-only role
  • Stores budgets an admin sets, with no default budget

Not my job

  • Block anything itself. Callers enforce: 402, blockRun, budget.alert.
  • Count tokens. That is the Executive.
Key product flows

What Treasurer does, step by step

Flow

Answer: is this agent in good standing?

checkStanding is asked before a model call, before a wake, before a message goes into a live run, on ledger ingest and on a policy update.

  1. The caller passes the agent’s limits and its spend for the run, the day and the month.

    Works with Landlord· contractcheckStanding →The Gatekeeper’s egress and the Landlord both ask.
  2. The Treasurer compares them and returns ok, or the first window exceeded: perRun, perDay or perMonth.

  3. The caller enforces: the Landlord returns 402, the egress refuses the call, the control plane raises budget.alert.

  4. The refusal is ledgered with the window.

Flow

Price a model call

The Executive counts; the Treasurer prices.

  1. The Executive reports input, output, cacheRead and cacheWrite tokens.

    Works with Executive· contractcostUsd / priceFor →
  2. priceFor finds the model’s price and costUsd turns the tokens into dollars.

  3. The cost is added to the agent’s run, day and month spend.

Flow

Set a budget

There is no default. Until an admin sets one, nothing is enforced for that agent or for the factory.

  1. An admin sends PUT /api/v1/spend/budgets.

    Works with Bouncer· contractauthorize →The spend tools are one grant, factory-spend.
  2. validateBudgetLimits rejects anything that is not a positive number.

  3. The change is ledgered.

Flow

Report cloud spend and compute

Model spend and infrastructure spend in one view.

  1. A dedicated read-only role reads the provider’s cost and compute inventory. Agents never hold it.

  2. Spend is attributed to agents and to the factory. Budgets are evaluated on gross usage, before credits.

  3. The console reads GET /api/v1/spend/report and /spend/compute.

    Works with Bouncer· contractauthorize →

Contracts Treasurer keeps 2 offered