> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corepillar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cost Calculator

> Describe an agent, generate realistic test scenarios for it, run them against one or more real models, and get measured cost, latency and pass/fail per model.

The Cost Calculator answers "what will this agent cost to run, and which model should it run on?" with measured numbers instead of guesses. You describe an agent, AgentHub writes a batch of test conversations for it, and then plays every conversation against the models you choose. Each model's real token usage, cost, latency and graded quality come back side by side, projected to your monthly volume.

The page subtitle: "Describe an agent, estimate per-run cost, generate synthetic scenarios, and run them for measured cost and pass/fail."

## The three steps

A stepper at the top shows **1 Configure › 2 Scenarios › 3 Results**. You can click back to any step you have already reached; later steps stay disabled until you get there.

```mermaid theme={null}
flowchart LR
  A["1. Configure<br/>system prompt, tone,<br/>skills, memory, tools,<br/>models, scenario count"] -->|Generate Scenarios| B["2. Scenarios<br/>written by an independent<br/>generator model, streamed in"]
  B -->|Run scenarios| C["Execution<br/>every scenario played against<br/>every selected model<br/>(real, billed calls)"]
  C --> D["Grading<br/>independent judge model<br/>scores each transcript"]
  D --> E["3. Results<br/>recommendation, cost,<br/>forecast, TCO, audit"]
  C -.->|one trace per scenario| T["Traces<br/>source = simulation"]
```

<CardGroup cols={2}>
  <Card title="Step 1: Configure" icon="sliders-horizontal" href="/agenthub/cost-calculator/configure">
    Every field on the setup screen, the model panel and the pre-run estimate.
  </Card>

  <Card title="Step 2: Scenarios and running" icon="list-video" href="/agenthub/cost-calculator/scenarios">
    How scenarios are generated and streamed, categories, and what happens when you click Run.
  </Card>

  <Card title="Step 3: Results" icon="chart-no-axes-combined" href="/agenthub/cost-calculator/results">
    The recommendation, scale, comparison, forecast, TCO, Agent Audit and per-scenario detail.
  </Card>

  <Card title="Templates" icon="layout-template" href="/agenthub/cost-calculator/templates">
    Ten ready-made agents, including the Coding Agent Template.
  </Card>

  <Card title="Import from traces" icon="activity" href="/agenthub/cost-calculator/import-from-traces">
    Seed the configuration from real runs, or analyze real runs directly.
  </Card>
</CardGroup>

## Estimate first, then real spend

The Cost Calculator separates what is free from what costs money.

| Stage | Calls a model? | Who pays |
| - | - | - |
| The **Estimated cost** shown while you configure | No. It is calculated in your browser from the prompt size, scenario count and the catalog price of each selected model. | Nobody |
| **Generate Scenarios** | Yes, one fixed generator model (Claude Sonnet 5.5). Never a model you are testing, and never your keys. | CorePillar |
| **Run scenarios** | **Yes. Every turn of every scenario is a real call to each model you selected, using the API key that model is bound to.** | **You, through your provider key** (or the Platform Demo Key, if the model is bound to it) |
| Grading each scenario | Yes, one fixed judge model (GPT-4.1, temperature 0). Never the model under test. | CorePillar |
| **Best overall** recommendation (comparing two or more models) | Yes, a small Claude Haiku 4.5 call. | Your organization's Platform Demo Key allowance |
| **Run Agent Audit**, **Suggest improvements**, re-run passes | Yes, on the model you are testing. | You, through your provider key |

<Warning>
  Running scenarios spends real money on your provider account. A batch of 30 scenarios against three models is 90 conversations, and multi-turn scenarios can play up to 16 user turns each, with the whole transcript re-sent on every turn. Check the **Estimated cost** before you click **Generate Scenarios**, and keep the scenario count small while you are iterating. The estimate is a single point estimate, not a ceiling.
</Warning>

## Every run leaves traces

Each executed scenario is written as a real trace in [Traces](/agenthub/traces), alongside your live traffic:

* **Source:** `simulation` (live SDK traffic is `live`)
* **Environment:** `development`
* **Root name:** `scenario:<scenario name>`
* **Tags:** the scenario category, `cost-calculator`, the batch's simulation ID, and the model identifier
* **Spans:** one LLM span per turn with real tokens, cost and latency, plus one tool span per simulated tool call, named `tool_call: <Tool>.<operation>`

That means you can open any scenario in the trace waterfall, and you can run [evaluation collections](/agenthub/evaluation/overview) over simulated traces exactly as you would over production ones. The [Simulations](/agenthub/simulations) page lists every run with its pass/fail breakdown.

## Recent runs

When the project has earlier runs, a **Recent** strip above the stepper shows up to six of them, each with its measured cost (or the estimate, if it never ran) and the model identifier ("draft" when no model was recorded). Click one to load it: a run that executed opens on its results, otherwise on its scenarios. A run that failed before executing anything shows "That run never executed any scenarios — nothing was measured".

You can also link straight to a run with `?run=<run id>` on the Cost Calculator URL. **Share Results** on the results page copies exactly that link along with a text summary.

## Permissions

| Action | Needs |
| - | - |
| Open the page and view runs | Any AgentHub user in the organization |
| Generate scenarios, run them, run Agent Audit | `run_agents` or `manage_agents` (Owner, Admin, Editor by default). Without it: "You need permission to run scenarios in this project." |
| Add a model from the Cost Calculator's model panel | `manage_model_keys` or `manage_agents`. Without it: "You need the "manage model keys" permission to add models." |
| Create a new project from a template | Owner or Admin |

See [Roles and permissions](/agenthub/settings/roles-and-permissions).

## Limits

| Limit | Value |
| - | - |
| Scenarios per run | 1 to 1,000 |
| System prompt | 20,000 characters |
| Tone & personality | 2,000 characters |
| Skills, memory items and tools combined | 50 |
| Item name | 200 characters |
| Item content (skill or memory text) | 20,000 characters |
| User turns played per scenario | Happy path, edge case, refusal: 2. Tool failure: 4. Multi-turn: 16. |
| Scenarios executing at once | Up to 32 across all models in a batch, shared equally between models (at least 4 each) |
| Traces selectable for import | 25 (20 adopted per **Import & analyze**) |

## What it does not do

* **It never runs your agent's code.** Your agent is described by its prompt, tone, skills, memory and tool list, and the model under test plays that role. Your actual application is not involved.
* **Tool calls are simulated.** When a scenario calls a connector such as Stripe or Jira, AgentHub writes a realistic simulated response into the conversation. Nothing is sent to the real system, even for a tool marked "real". Tool failure scenarios inject an error mid-conversation to test recovery.
* **No scheduled or recurring runs.** Every run is started by hand.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.