Beer Can Labs
Staff / Accountant
Portrait of the Accountant
Models and Money

Accountant

Accountant

Owns the budget rule, spend accounting and pricing, plus factory cloud spend and the compute inventory. The Accountant 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 Accountant 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.

    Portrait of the Property ManagerWorks with Property Manager· contractcheckStanding →The Gatekeeper’s egress and the Property Manager both ask.
  2. The Accountant compares them and returns ok, or the first window exceeded: perRun, perDay or perMonth.

  3. The caller enforces: the Property Manager 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 Accountant prices.

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

    Portrait of the ExecutiveWorks 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.

    Portrait of the BouncerWorks 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.

    Portrait of the BouncerWorks with Bouncer· contractauthorize →

Contracts Accountant keeps 2 offered