Cost
Native AI is free at runtime. Every model decision costs money, so cost is a design parameter, like a frame budget.
How cost is calculated
Section titled “How cost is calculated”Typed-decision providers charge for input tokens only: the context sent to the model. The answer (one choice) is free.
cost per hour = decisions per hour × tokens per decision × price per tokendecisions per hour = active entities × 3600 ÷ seconds between decisionsTokens per decision is the part the protocol controls. Measured on the reference service with the Lango manifest:
| Batch | Memory per entity | Tokens per request | Tokens per entity |
|---|---|---|---|
| 1 entity | none | ~370 | ~370 |
| 16 entities | none | ~3,800 | ~240 |
| 16 entities | 8 reports | ~8,500 | ~530 |
Batching shares the world description between entities. Memory roughly doubles the per-entity size.
Prices
Section titled “Prices”| Provider | Model | Input, per 1M tokens | Output | Source |
|---|---|---|---|---|
| OpenAI Decisions | gpt-6-luna |
$0.10 | free | Decisions guide |
| TypeSafe | jev-1.13 |
$0.042 | free | TypeSafe models |
| General LLM with structured output | varies | varies | charged | Provider pricing |
Prices as of October 2026; check the sources before budgeting. OpenAI notes that regional and long-context multipliers may apply.
With ~400 tokens per decision:
| Provider | Cost per decision | Decisions per $1 |
|---|---|---|
| OpenAI Decisions | ~$0.00004 | ~25,000 |
| TypeSafe Jev | ~$0.000017 | ~60,000 |
Worked examples
Section titled “Worked examples”Single player, one fight. 6 enemies, a decision every 5 s, with memory (~550 tokens):
6 × 3600 ÷ 5 = 4,320 decisions/h × 550 = 2.4M tokens/hOpenAI Decisions ≈ $0.24 per hour of play · Jev ≈ $0.1050,000 concurrent players, naive. 20 entities each, every 5 s, ~550 tokens:
200,000 decisions/s = 720M decisions/h × 550 = 396B tokens/hOpenAI Decisions ≈ $39,600 per hour · Jev ≈ $16,600 per hour (≈ $0.33–0.79 per player-hour)50,000 concurrent players, designed. Applying the levers from Deployment and load brings it to ~1,000 decisions/s at ~300 tokens:
3.6M decisions/h × 300 = 1.08B tokens/hOpenAI Decisions ≈ $108 per hour · Jev ≈ $45 per hour (≈ $0.001–0.002 per player-hour)Development only, shipped with a local policy. 40 hours of playtesting with a few enemies at ~$0.24 per hour:
≈ $10 in total with OpenAI Decisions, ≈ $4 with Jev — and $0 per decision after releaseThe difference between the naive and designed cases is ~350×. It comes from fewer decisions and smaller contexts, not from a cheaper model.
Levers, in order of impact
Section titled “Levers, in order of impact”- Decide less often. Events with a long
refresh_ms, and longer TTLs. Halving the frequency halves the cost. - Decide for fewer entities. Only engaged, visible or important ones; let background entities run native AI.
- Decide at a higher level. One squad or director decision instead of many individual ones (groups).
- Reuse decisions. The decision cache, keyed by bucketed observations and shared across sessions.
- Shrink the context. Batch entities, send static text once (scopes and profiles), trim memory to what matters, send relevant objects only, and cap it with
max_input_tokens. - Choose the provider. Typed-decision models are cheaper and faster than general LLMs for this job.
- Distill. A local policy trained on logged decisions costs nothing per decision. Used fully, it moves model cost from runtime to development.
Budgets (proposed)
Section titled “Budgets (proposed)”Cost must have a ceiling the game controls. Proposed for 0.2:
- The manifest or session declares budgets: per session per hour, per entity type, per game per day.
- The service tracks spend from provider
usageand answersFALLBACKwith reasonbudgetwhen a budget is exhausted — the player sees native AI, never an error. - Higher-priority entities (bosses, story characters) draw from the budget first.
What the reference service measures today
Section titled “What the reference service measures today”The 0.1 service reads usage from each provider reply, converts it to dollars with a built-in price table and shows the cost per batch and per client in the console. Regional and long-context premiums are not applied, so treat the numbers as estimates.