AI agent cost Module

Vaks PM · Integration guide · Agent cost & billing · August 2026

What this guide covers. How Vaks PM knows, prices and reports the cost of an AI agent: the unit of measure (tokens or credits), the three ways the real cost is obtained (declared, measured by a gateway, estimated), the model price catalog that converts usage into money, and where all of it surfaces in the P&L and reports. For what an agent is and how it works, see AI agents.

The principle — an agent is measured in usage, not hours

An agent has no timesheet: its capacity is never hours, and its consumption is not counted like a human's. It is measured in model usage — the volume of text processed by the large language model that drives it. Vaks PM turns that usage into a money amount on two distinct counts: what the agent costs you (internal cost) and, where relevant, what you charge a client (selling price). Both feed the same profit & loss view as human work.

Tokens or credits — two units depending on the provider

The unit depends on how the model's provider bills, and Vaks PM picks it automatically:

UnitFor which agentsWhat is counted
Tokens (per 1,000)Token-billed models — Anthropic, OpenAI, Mistral, and any model reached through an API or a gateway.The number of tokens (the unit a model counts text in) in and out — since output typically costs 3 to 5 times input, the two are counted separately.
Credits (per 1,000)Message/credit-billed agents — typically Microsoft Copilot Studio.The number of Copilot Credits consumed. The underlying model is included in the credit: there is no input/output to separate.
The unit is a property of the provider, not a setting. Vaks PM derives it from the provider chosen on the agent's profile. A Copilot agent switches to credits on its own — its cost fields, reports and exports then speak in credits (“kCredits”) rather than tokens. The rest of this guide holds for both; we call out where credits and tokens diverge.

Internal cost — what the model costs you

An agent's internal cost is derived from configurable rates, set on the agent's profile (Cost tab):

These rates need not be typed in model by model: the price catalog pre-fills them for known models.

Billing a client — a separate selling price

The internal cost (what you pay) and the billed price (what you sell) are two independent values, deliberately decoupled. The selling price is a single rate per 1,000 units (tokens or credits, input and output combined) — a commercial price, unrelated to the provider's cost structure. An agent with no billing rate is simply non-billable: its internal cost is still tracked, but nothing goes to revenue.

An organization key never sets the selling price. Internal cost rates can arrive through an agent's inbound registration (an organization API key); the client billing rate is deliberately refused on that channel. It is set only in Admin → Agents, under finance control — a machine integration does not decide your price.

Rate resolution — from most specific to default

For a given project, the rate applied to an agent resolves in priority order:

  1. The agent's rate on this project — an override set project by project (under the project's finance), when a client negotiates a specific price.
  2. The agent's default rate — the one on its profile, applied everywhere else.
  3. Non-billable — with neither, the agent's work generates no revenue (the cost is still always tracked).

Where the number comes from — three sources

Knowing a run's real cost means knowing its real usage. Vaks PM accepts that figure in three ways, from simplest to most reliable. They do not exclude each other — a real measured or declared figure is never overwritten by an estimate.

Declared by the agent Measured by the gateway Estimated by Vaks (Copilot) Run ledger units per run Model price catalog € cost & revenue usage × price P&L · reports · exports alongside human work
The three usage sources feed the same run ledger. Crossed with the model price catalog, it yields a cost (and revenue) in money, posted to the P&L. Orange boxes = the most reliable source (gateway measurement) and the price catalog.
SourceWho provides the usageReliability
DeclaredThe agent itself, after each run.Depends on the agent's honesty — Vaks keeps a reference cost to cross-check it.
Measured (gateway)A gateway the model calls pass through.Exact: usage is read from the provider's own response.
EstimatedVaks PM, from the agent's observed activity.Approximate — the fallback when cost is not measurable (Copilot credits).

Declared — the agent reports its usage

After working, an agent declares its run cost: the number of input and output tokens (and optionally an already-computed cost). If the agent supplies only tokens, Vaks PM derives the cost from its rates — and always keeps that derived amount as an anti-cheat reference: a declared cost that strays too far from what the tokens imply is flagged as an anomaly. The declared cost wins, the reference is the guardrail.

Measured — the LLM gateway

For an exact measure that does not depend on the agent's declaration, Vaks PM provides an optional LLM gateway: a lightweight relay, deployed on the client side as close to the agents as possible, that the model calls (Anthropic, OpenAI and compatibles) flow through. The gateway reads the real usage from the provider's response and reports it to Vaks PM, marked as measured. The agent declares nothing.

CLIENT SIDE · EGRESS ONLY AI agent calls the model LLM gateway relay + reads real usage LLM provider Anthropic · OpenAI · compatibles Vaks PM measured cost → usage ledger relay ⇄ usage read here measured usage
The gateway lives on the client side, as close to the agents as possible, egress only. It relays model calls byte for byte to the provider and reads usage from its response, then reports that measured figure to Vaks PM — the agent declares nothing. Orange boxes = the client-side components (agent + gateway).
A client-side component, not in the cluster. The gateway lives near the agents (LAN / VPN), egress only — never exposed inbound from the internet. It relays calls byte for byte and only adds a usage report. Its deployment (image, network, shared secret) is described in the dedicated gateway operations documentation. For models reached through an aggregator (Bedrock, Vertex, Azure OpenAI…), a standard adapter (LiteLLM) covers the same contract.

Estimated — credit-billed agents (Copilot)

Some agents are not measurable in tokens: a Microsoft Copilot Studio agent is billed by Microsoft in credits, and the per-call detail is not exposed in tokens. So this cost does not escape the P&L, Vaks PM estimates it: it counts the agent's activity — a baseline per task, plus an increment per tool call — in credits, then converts them to money via the credit price you set.

Without a credit price, the cost shows as ~0. Credits are still counted, but converting them to money requires that you have set credit price in policies. This is the most commonly missed setting. The credit cost Vaks estimates is a mirror of the Microsoft bill — the actual billing stays with Microsoft (see a Copilot agent's cost).

The model price catalog

Converting tokens into money means knowing each model's price. Vaks PM keeps a price catalog that serves two purposes: offering the list of models when creating an agent, and pre-filling its internal cost rates.

Shipped offline

A base list of models and their prices is embedded in the product and shipped with every update. A fully air-gapped instance therefore has default prices with no outbound access at all.

Two online sources

If refresh is on, prices come from OpenRouter (a usage-ranked model list + prices), falling back to LiteLLM when a price is missing. These are third-party sources, independent of Vaks PM.

Cumulative, never purged

The catalog is additive: a model that drops off a source is not deleted. The list offered to the picker applies a 4-year retention (last seen), to avoid clutter from obsolete models while keeping price history.

Refresh — optional and opt-in

Online refresh is off by default. An administrator turns it on with a toggle in policies; it then runs about once a day, adds or updates prices, and flags drift when a price moves significantly. Two guardrails:

Where the cost shows — P&L, reports, exports

Once known, an agent's cost (and revenue) joins the rest of finance, alongside human work:

A run ledger. Every run — declared, measured or estimated — leaves a line in the agent usage ledger (under AI Agent Management): cost, units, model, project and task. It is the audit of AI consumption — filterable by agent, project or period, and exportable.

Where to configure

SettingWhere
Internal cost rates (in/out per kToken, or credit price) and the agent's default billing rateAdmin → Users & Identity → Agents → the agent's profile, Cost tab
An agent's rate on a project (override)Project finance — “AI agent rates” card
Measurement source (gateway secret) · Copilot estimate + credit price · price feed (toggle)Admin → AI Agent Management → Policies
Model catalog & pricesAdmin → AI Agent Management → Policies — browsable, prices applicable to an agent
Usage & cost ledgerAdmin → AI Agent Management → Usage & cost ledger

See also: AI agents — cost & billing (overview) · Autonomous Copilot agent — the execution cost · Agent directories (rates at inbound registration) · all integrations.