AI Agent Wrote a Factory Scheduler for $1,500–3,000 — Calling a Model on Every Action Would Cost $690–1,200 a Month
Factory dispatchers change the cutting plan an average of 39 times a day. An AI agent wrote the scheduler as ordinary code once, for $1,500–3,000 in tokens, and no model is involved in planning. If a model recalculated the plan on every action, tokens would cost $690–1,200 a month, and the results would differ each time. For computational tasks, it is cheaper to pay a model to write code than to pay it for every decision.
AI-processed from Habr AI; edited by Hamidun News
Picture a factory where dispatchers rebuild the metal-cutting schedule every day. You need a scheduler, and the obvious question comes up: should a neural network calculate the plan each time, or should you write a program once? The author of the Integram app builder built such a scheduler by hand with an AI agent and costed both options. The agent wrote ordinary code, and developing it used about $1,500–3,000 in API tokens, paid once. If a model built the plan instead of code, tokens would cost $690–1,200 every month. That figure is the number of calls multiplied by an estimated cost per call ($0.80–1.40), across 22 working days.
Why pilots don't reach production
The author starts from a simple idea: when the hype around "AI transformation" fades, businesses will stop paying for words. What remains will be processes with a clear pain point and a metric, and the word "AI" in their description will become optional. His numbers are grim. In a Vedomosti survey of 50 of the largest Russian organizations (December 2025 to February 2026), only 7–10% of pilots involving LLMs, chatbots, and agents reached production. Another 30–40% were shut down because they produced no financial effect. The main cause is weak integration into processes. Gartner predicts that more than 40% of agentic projects will be canceled by the end of 2027, but that is still a forecast.
There is also a caveat about the METR study. In it, experienced developers using AI took 19% longer on tasks, although they believed they had sped up by 20%. The sample is small: 16 people and 246 tasks, with data from early 2025, and METR itself marks the findings as outdated. So it is a reason for caution rather than proof.
The author sees the root of the problem in wording. The same script can be described as "parses requests, checks rules, and creates orders" or as "an AI agent that independently makes decisions." The second version sells for more, even though the underlying process is often the same: get data, check conditions, execute actions, record the result. In the author's view, the industry has confused a model's ability to reason with a need to reason at every step.
Cutting scheduler: code instead of a model
The agent wrote the scheduler from a specification with numbered rules, and the tests refer to those rule numbers. Ordinary code builds the plan. The order of cuts within a day is found by exact enumeration, and where enumeration becomes infeasible, greedy steps take over. The model takes no part in building the plan.
Every action that changes the plan is written to a log. From August 6 to November 27, three dispatchers performed 3,148 such actions over 80 working days: 39 a day on average, a median of 29, and 56 in November. About 25 of them are triggered by a dispatcher pressing a button; the scheduler checks the rest itself when the application opens.
Here is what another architecture would cost (a month is 22 working days, one model call ≈ $0.80–1.40):
- The agent wrote the code: $1,500–3,000 once, 0 model calls per day, and the plan is always the same for the same data.
- The model is called on button-triggered runs: about 25 calls a day and $440–770 a month, with a different plan each time.
- The model works in place of the scheduler, including the automatic check: about 39 calls a day and $690–1,200 a month, with a different plan each time as well.
Over a year, model calls would cost several times more than the entire development. On top of that, repeatability disappears, and for a factory schedule repeatability matters.
What this means in practice
The author recommends spending tokens where language is needed: parsing an ambiguous specification or document, writing code. Where repeatability is required, calling a model on every request only adds cost. The value of an "agent," in his words, lies in the environment around the model: rules, tests, logs, and rollback. The model itself keeps getting cheaper and better.
Before deploying an agent, it is worth doing the unglamorous work: mapping the process, talking to the people who execute it, exporting data from the accounting system, and reconciling the totals. "An order gets lost between sales and the shop floor" is not an AI transformation task; it is a lost order.
Limitations
This is one author's personal case from one factory, not an independent study. The cost of calls is an estimate, not an actual bill, and people's time spent on specifications and review is not included. There is no public metric for how many agents call a model at every step.
The author's forecast: by the end of 2027, agents that write deterministic code once will outnumber those that call a model at every step of a computational task. A Habr poll has so far drawn few responses: 9 votes on agent architecture (5 of 9 chose "the model wrote the code once, then the code does the work") and 7 on token costs. The author promises to repeat the poll in December 2027.
- Nov 28, 2026Mentimeter raised its price from $142 to $200, and a blogger built his own AI-powered alternative in 10 minutes
- Nov 28, 2026OpenRouter token price fell 83%, but price lists had little to do with it
- Nov 28, 2026VirtualBox Couldn't See 30 GB of 192 GB RAM: A Script Purged the Windows Cache and Freed the Memory
- Nov 28, 2026AGIMA Explains Why an Agent Needs Shared Project Context, Not Just File Access
Key Questions Answered
Why pilots don't reach production?
The author starts from a simple idea: when the hype around "AI transformation" fades, businesses will stop paying for words. What remains will be processes with a clear pain point and a metric, and the word "AI" in their description will become optional. His numbers are grim. In a Vedomosti survey of 50 of the largest Russian organizations (December 2025 to February 2026), only 7–10% of pilots involving LLMs, chatbots, and agents reached production.
What are the key details on Cutting scheduler: code instead of a model?
The agent wrote the scheduler from a specification with numbered rules, and the tests refer to those rule numbers. Ordinary code builds the plan. The order of cuts within a day is found by exact enumeration, and where enumeration becomes infeasible, greedy steps take over. The model takes no part in building the plan. Every action that changes the plan is written to a log.
What this means in practice?
The author recommends spending tokens where language is needed: parsing an ambiguous specification or document, writing code. Where repeatability is required, calling a model on every request only adds cost. The value of an "agent," in his words, lies in the environment around the model: rules, tests, logs, and rollback. The model itself keeps getting cheaper and better.
Ship AI Faster with Founders, Engineers & Weekly Architecture Reviews
Inside Vibe Club (hamidun.com/club) — weekly live masterminds with Zhemal Khamidun, Tech Radar, full LMS access, and 370+ production Claude Code skills.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
