Articles for people who
ship the stack
Rewrites on React, Node.js, TypeScript and AI. A translated body is shown when it exists. If it does not, you see the English text and a note that says so.
Tagged: Cost Optimization
Pricing a Typed Decision Router in Front of Frontier LLM Calls
How to model the expected cost of gating LLM traffic with a typed decision model like Jev, set confidence thresholds, and validate routing quality before you ship it.
12 min readDesigning Ambient AI Agents: Wake Funnels, Cheap Sleep and Safe Wakes
How to build event-driven AI agents that stay idle cheaply: layered triage before any model call, safe wake reconstruction, storm handling and attention budgets.
25 min readFine-Tune or Call the API? Costing a Document-Extraction Pipeline
A worked cost model for an audit document pipeline shows why model routing beats fine-tuning on price, and when schema accuracy or EU data residency justify owning a model.
13 min readEscalate Nodes, Not Tasks: A Six-Level Ladder for LLM Workflow Costs
Why choosing between a DAG and an agent per task inflates LLM costs, and how a per-node escalation ladder with contracts, scopes and budgets keeps them bounded.
14 min readSwapping LLM Models Safely: Human Labels, Per-Step Metrics, Effort Settings
How to migrate a multi-step LLM pipeline to newer models without chasing phantom regressions: human ground truth, per-step metrics, stale prompts and reasoning effort.
16 min readWhy AI Agents Burn Budget Without Finishing, and How to Stop Them
Learn why tool-calling agents keep looping when "done" is undefined, where the token spend goes, and which stop conditions beat simply raising step or budget caps.
7 min readRight-Sizing LLMs: Routing, Retrieval and Evaluation Over Raw Model Size
Learn how to choose between small and large language models by workload, measure cost per successful task, and use routing, RAG, caching and validation first.
28 min readWhy Agentic AI Costs Explode: An Architecture-First Cost Model
Explains why LLM agent costs must be measured per completed task, not per call, and outlines architectural levers like model routing, context budgets, and caching to control spend.
5 min read
About these articles
Request a 24h estimate
Need the same stack in a production operator layer? Send the brief — estimate within 24 hours.