PR #41 · pramaan-io/pramaan-agents · merged 2026-06-11
When a real client opens a case, but the agent's notebook is still in demo mode.
the cost of a notebook that lies
Demo scaffolding in production = a notebook that lies.
The fix — No real filing, no transcript. No real tokens, no fake price.
sequenceDiagram autonumber participant client as client participant atlas as atlas clerk participant baml as BAML participant transcript as transcript client->>atlas: request (empty input) atlas->>atlas: ValueError — fail-closed client->>atlas: valid request atlas->>baml: open transcript baml->>baml: invoke Bedrock Kimi K2.5 baml-->>atlas: real tokens used atlas->>transcript: log real USD
| Method | in → out | what it does |
|---|---|---|
token_cost_usd | (model_id, input_tokens, output_tokens) → float | converts real Bedrock token counts to billed USD via Kimi K2.5 on-demand rates |
_stamp_cost | (stamp, config, collector) → None | writes real token usage onto every event before it lands in the transcript |
Atlas model pricing module — adds Kimi K2.5 on-demand rates and a helper that turns real token counts into billed USD.
| new method | signature |
|---|---|
token_cost_usd | (model_id, input_tokens, output_tokens) → float |
app/atlas/runtime.py+25 −6Atlas turn runtime — records real Bedrock token usage onto every emitted event via the BAML collector, replacing 'TBD' with a real number.
| new method | signature |
|---|---|
_stamp_cost | (stamp, config, collector) → None |
app/atlas/agent.py+13 −2Atlas agent entry point — threads a BAML collector parameter through stream_atlas_turn so real token usage actually reaches the transcript.
collector : _baml_py.Collector | None| File | ± |
|---|---|
app/AGENTS.md | +6 −5 |
app/atlas/AGENTS.md | +8 −8 |
app/atlas/agent.py | +13 −2 |
app/atlas/config.py ★ | +25 |
app/atlas/main.py ★ | +17 −80 |
app/atlas/runtime.py ★ | +25 −6 |
app/atlas/tests/test_atlas_entrypoint.py | +87 |
app/atlas/tests/test_atlas_runtime.py | +33 |