Web app · AI economics · vanilla JS
AI bot cost calculator
Before launching a bot, the client asks: “How much will it cost per month?” The answer depends not on the number of customers but on tokens: the length of the instructions, the retrieved knowledge base fragments, the conversation history and the answers. The calculator breaks the bill into these parts and shows what prompt caching, a shorter context or routing simple questions to a cheap model gives you.
Scenario: Three typical scenarios: a knowledge base support bot, a lead qualification bot and an agent with tools. You can set your own numbers.

Open the demo
The calculation is saved in the page URL — you can send the link to a colleague. Prices can be edited right in the table.
The app runs in your browser: nothing is sent to a server.
What the demo shows
How to try it
Choose a scenario
“Support”, “Lead qualification” or “Agent with tools” — the parameters are filled in automatically.
Compare models
The chart shows a month on each model, and the selected model shows what the bill is made of.
Count your own text
Load the o200k vocabulary (3 MB) and paste a system prompt — the calculator counts the tokens and puts them into the calculation.
Send the link
The page URL keeps all parameters and price edits: a colleague opens the same calculation.
No paid neural networks
The calculator sends nothing to neural networks: tokens are counted by its own tokenizer in the browser. Prices were collected on October 10, 2026, with dollar prices converted at the Central Bank rate on the same date. Prices change — check them on the providers’ websites before budgeting. For Claude, YandexGPT and GigaChat the token count is estimated with o200k plus a correction: they have their own tokenizers.
The demo runs without OpenAI, YandexGPT or GigaChat API keys. Wherever a production system calls a model, there’s a local stub with the same interface — so the demo is free, always available and never makes things up.
What a production project adds
- Budget calculation before development: scenarios, load, model choice and headroom for growth
- Tracking actual tokens in a running bot and a spending report by day and scenario
- Prompt caching, history compression and routing questions between a cheap and a strong model
- Comparing cloud models with your own on a rented server by price and answer quality
Stack
- All demos by stack:
- Vanilla JS
- JavaScript without frameworks
- BPE tokenizer
- Web Worker
- SVG
- URLSearchParams
- JSDoc
- Vite
Based on
Books and university courses whose ideas are at work in this demo.
Book · Charles Petzold
Code: The Hidden Language of Computer Hardware and Software
A real o200k tokenizer in the browser shows how text turns into numbers for the model and why the same meaning takes more tokens in Russian.
Book · John Berryman, Albert Ziegler
Prompt Engineering for LLMs
The calculation shows what the context is made of — instructions, knowledge base fragments, history, answer — and what each part costs in tokens.
Book · George S. Clason
The Richest Man in Babylon
Before launching a bot I calculate what it will cost per month and show how to pay less: prompt caching, fewer fragments, a cheaper model for simple questions.
Developer’s comment
Anton Goncharov
AI systems developer · Python
For business
- The model budget is known before development — and you can see what it’s made of.
- Often the better deal isn’t a cheap model but a short context and prompt caching: the advice is recalculated instantly.
- The estimate lives in the URL — you can send it to the CFO.
For developers
- A custom byte-level BPE with the o200k vocabulary in a Web Worker; a test against a reference checks it matches tiktoken.
- All parameters are in the page URL, so the estimate survives reloads and forwarding.
- Charts are plain SVG without libraries; types are JSDoc checked by tsc.
Tips
Tip 01
Count tokens with a real tokenizer on your own texts: Russian takes noticeably more tokens than you’d expect.
Tip 02
Put the unchanging part of the prompt first — then prompt caching kicks in.
Want the same for your business?
Tell me about your task — I’ll tell you what from the demo fits, how long it will take and what I’ll need from you.
Other demos in this section
All demos- live
Web app · agent diagram
AI agent builder
A support agent is assembled from blocks: intents, a knowledge base, API calls, checks and operator handover. Send a customer message and watch its path light up on the diagram step by step.
- React
- TypeScript
- live
Web app · question → SQL → chart · PostgreSQL in the browser
AI data analyst
A manager asks in plain words — “revenue by channel for Q3”, “which customers stopped ordering” — and gets SQL, a chart, a table and a conclusion. The sales database is real PostgreSQL running right in the browser.
- React
- TypeScript
- live
Web app · risks against a standard · Word with tracked changes
Contract review
A counterparty sent their own contract — the review compares it with the company’s standard, highlights risky clauses, explains why they’re dangerous and suggests wording. The output is a Word file with tracked changes and a disagreement protocol.
- React
- TypeScript
- live
Web app · tasks from chat · kanban · evening digest
AI agent in a team chat
People write in the team chat as usual — “Pete, fix the price list by Friday”. The agent creates a task on the kanban board, moves it through “On it” and “Done”, reschedules and reassigns tasks, reminds about overdue work in the morning and sends a digest in the evening.
- React
- TypeScript
- live
Web app · shared inbox · CRM · protection against bank detail fraud
AI inbox triage
The agent reads the sales team’s shared inbox: it understands what each email is, extracts fields, creates a deal, a ticket or a task in the CRM and drafts a reply. An invoice with new bank details or a phishing email is caught before anyone pays or clicks a link.
- React
- TypeScript
- live
Web app · marketplaces · moderation check · unit economics
Product listings for WB and Ozon
The agent turns a supplier’s text into two listings — for Wildberries and for Ozon: a title within the marketplace limit, a description with search keywords, attributes from the reference lists. Then it checks what listings usually fail moderation on and calculates what’s left from each sale.
- React
- TypeScript
- live
Web app · meeting transcript · minutes · kanban
Meeting minutes → kanban tasks
The agent reads a stand-up transcript and builds the minutes: decisions, tasks with an assignee and deadline taken from live speech, risks and open questions. Tasks go to the kanban board, and at the next meeting the agent moves them through statuses itself.
- React
- TypeScript
- live
Web app · personal data · healthcare · analytics
Anonymizing data before it reaches a neural network
The agent finds full names in any grammatical case, phones, passports, SNILS numbers, cards, addresses and diagnoses in emails and transcripts, replaces them before sending to an external neural network, and restores its answer to the real data on your side. It anonymizes a patient table for analytics so that nobody can be identified.
- React
- TypeScript
- live
Web app · automation · amoCRM, 1C, Telegram
An n8n-style automation pipeline
Three working scenarios of a furniture factory on a canvas, as in n8n: website leads go to amoCRM and to managers by lead temperature, YooKassa payments go to 1C with retries and an error branch, and every morning there’s a digest for the director. Trigger an event and watch records flow from node to node; the workflow can be edited and exported to real n8n.
- React
- TypeScript
- live
Web app · multi-agent system · content
A team of AI agents for content
Six agents prepare a publication from a brief: the editor-in-chief plans, the researcher finds facts in the knowledge base, the writer writes, the fact-checker and editor send the draft back for revision, and the SMM agent adapts the text for Telegram, VK, a newsletter, a blog and a carousel. You see the agents’ entire conversation, every edit and what would have been published without checks.
- React
- TypeScript
- live
Web app · HR · scoring and chatbot
CV screening and an interviewer bot
Twenty CVs for three vacancies are analyzed in seconds: employment periods, experience, salary and city, match with the requirements and a quote from the CV for every “yes” or “no”. What’s missing from the CV is clarified by a bot: it asks only the missing questions, follows up on vague answers and books an interview. Gender, age and family are left out of the assessment.
- React
- TypeScript
- live
Web app · RAG · neural network in the browser
Search sandbox
How a support bot finds an answer in a knowledge base: documents are cut into fragments, search runs by keywords, by meaning or as a hybrid, and every fragment found shows why it ranks above the others.
- React
- TypeScript
- In-browser neural network
- live
Web app · metrics · CI thresholds
Bot quality evaluation
Before a new bot configuration is rolled out, it’s run against control questions. Here you can see how that works: hit@1, hit@3, the share of correct refusals, a comparison with production and a red banner if CI would block the release.
- React
- TypeScript
- In-browser neural network
- live
Web app · AI security · vanilla JS
Prompt injection defense trainer
Try to trick a support bot: coax out a secret promo code, extract the system prompt or get a refund without grounds. Six defense levels, direct attacks and attacks via emails, reviews and the knowledge base, and a check log based on the OWASP Top 10 for LLMs.
- Vanilla JS
