Skip to content
JS

Building  ·  Writing

Workproducts

Current projects and essays — agent memory and guardrails, MCP integrations, inference economics, and reproducible toolchains. Detail on each lives here; the profile page stays a one-pager.

01Projects

What I am building.

01

Mnemosyne Memory System

Memory and behavioral guardrails for AI agents, running on Cloudflare Workers and Durable Objects. Multi-tier design: semantic retrieval with adaptive thresholds, verifiable claim tracking, and behavioral rules that hot-deploy. The goal is agents that remember what actually happened and stay inside their guardrails.

02

Zenbooker MCP Server

A Model Context Protocol (MCP) server on Cloudflare Workers that lets LLM agents run Zenbooker field-service work — jobs, invoices, customers, scheduling — over SSE. Agents get the same operations the app exposes, behind one standardized transport.

03

Inference Cost & Workload Economics

Analysis and tooling on what AI inference actually costs. Token throughput is an incomplete metric for work value; this covers the math for optimal stopping and what pricing verified work products would look like instead.

04

Standardized Devcontainers & Toolchains

Reproducible devcontainer configurations — locked tool versions, digest-pinned Features, verified startup — so a fresh clone works in image-build time. Plus the polemic on why every team should already be doing this.

05

TDD Algorithm & Kata Suite

Algorithm and software design katas in Java 17, built test-first. Deliberate practice for TDD and for keeping design decisions honest.

02Writing

What I am writing.

July 21, 2026

AI Token Price Wars Are Here(-ish?)

Frontier AI labs settled on the token as their unit of sale, and the market share data now shows what that choice costs.

Frontier labs settled on the token as the unit of sale. Roughly four characters, the atomic thing a transformer emits: we price it, chart it, and hold earnings calls around it. Nobody sat down and chose this — it won the way most standards win, by being convenient for the people selling. Divisible, meterable, and it looks like intelligence sold by the unit, which is a hell of a trick when you think about it, because the buyer never got a better meter and four characters it was.

That choice made sense for sellers, and I want to be fair to them first, because their costs are brutal and concrete. A rack of 72 H100-class GPUs runs $8–10M and draws 166kW at peak, and the whole game is utilization — you need a unit small enough to subdivide, large enough to bill, tied to something customers perceive as value. The token fits. It scales linearly with compute and feels like buying intelligence. It is the marketing layer over the lease.

Wall Street adopted the same frame: revenue per token minus cost per token gives margin, times volume gives gross profit, divided by capex gives fleet ROI. For valuing sellers, it works.

The strongest version of the seller's case goes one step further, and it's an honest one. The labs hold proprietary a novel combination of things other people invented — the transformer came out of Google, the attention research was public, and RLHF, the technique that made chatbots usable, was published. What the sellers own is integration: the serving stack, the fleet, the plumbing. Price-per-token is rent on integration plus compute. The invention underneath was mostly already on arXiv.

That's the steelman, and it prices the wrong thing. The evidence started arriving in 2025 and it hasn't stopped.

Constraint breeds efficiency

Here's what the price-per-token frame never predicted: the labs with the least compute got the most out of each token, published the science, and took share on the strength of the price sheet.

Start with the training bill, because DeepSeek published theirs. DeepSeek-V3 took 2.788M H800 GPU-hours, which is $5.576M at $2/hr rental — $5.328M pre-training, $0.238M context extension, $0.01M post-training 1. The model carries 671B total parameters and activates 37B per token, trained on 14.8T tokens across 2048 H800s, which works out to 180K GPU-hours per trillion tokens. The report carries its own caveat, to their credit — those figures exclude prior research and ablation runs — and even so, Epoch AI reviewed the claims and called them "if anything high" 2.

The efficiency was engineered, technique by technique, and every technique traces back to being GPU-starved. Multi-head Latent Attention — a way of compressing the memory a model keeps of the text it has read — showed up in DeepSeek-V2 and cut training cost 42.5% against DeepSeek 67B, reduced the KV cache 93.3%, and raised generation throughput 5.76x 3. DeepSeekMoE got a 16B model to match LLaMA2-7B on about 40% of the computations 4. Grouped-query attention, for the record, came out of Google 5 — MLA is the KV-compression trick born of scarcity.

Then R1. MIT-licensed weights, six distilled models from 1.5B to 70B, and a reinforcement-learning phase that cost roughly $1M on top of the ~$5M V3 pre-training, per Epoch's validation 2. The Nature paper reports R1-Zero climbing from 15.6% to 77.9% on AIME pass@1 through pure RL 6, and the arXiv paper devotes a whole section to token efficiency — dynamically allocating inference compute by problem complexity, spending tokens only where the problem demands them 7. That's a lab explicitly optimizing the unit everyone else bills by volume.

Pricing followed the engineering. R1 shipped at $2.2 per million output tokens against o1's $60 2, and across the market GPT-4-level GPQA price has fallen 40x per year, with decline rates running anywhere from 9x to 900x depending on which milestone you measure 8.

The market noticed. On January 27, 2025, Nvidia lost $593 billion in market value in a single day — a record for any Wall Street company — on the realization that efficient training might mean less GPU demand than the capex plans assumed 9.

And the share data settles it. For the week beginning August 31, 2026, deepseek ranked #1 on OpenRouter with 23.8% of routed text requests — 1.21B requests — ahead of openai at 20.0% and google at 19.8%, with the Chinese open labs together (deepseek, z-ai, qwen, tencent, minimax) carrying about 45% 10. Scope matters here, and the caveat cuts both ways: those are requests routed through OpenRouter, per their own methodology note, and OpenRouter skews toward developers shopping on price — but price-sensitive buyers are exactly the segment where unit economics pick the vendor. Downloads run the same direction: DeepSeek-V3 pulls 1,065,138 a month on Hugging Face, R1 pulls 709,327, as of September 10, 2026 11, and the Qwen org sits at 465 models with 103,625 followers 12.

Meanwhile the US labs with compute abundance had no pressure to optimize the unit — when another rack fixes the problem, tokens-per-joule is somebody else's job. The constrained labs treated efficiency as the product. Market share followed the price sheet, and the price sheet followed the published science.

Where the proxy breaks

For measuring what was actually delivered, the token falls short. A million tokens of high-leverage architecture costs the same to produce as a million tokens of filler, quality variance from prompting and sampling and training never shows up in the price, and the incentive is volume over concision — call it billable drift, where every redundant paragraph the model emits counts as revenue. A model that hedges and repeats and pads its context is, under this meter, a better customer than one that answers in forty tokens.

Energy runs the same line. Inference draws real joules per token, utility is often concave — the first part of an answer carries the solution, later tokens add repetition or drift — and the joule that solved the problem costs the same as the joule that restated it. None of it appears on the invoice. The invoice has one line, and the unit is the token.

Price the outcome

A more durable unit is the verified work product: a test-passing patch, a reviewed spec, a query that executes without downstream error. Price that, and systems learn to minimize tokens per successful outcome — the meter stops rewarding drift and starts rewarding concision, and R1's token-efficiency work already shows the incentive bends the right way once you measure the right thing 7.

The unit you sell is the business you think you're in. The token says throughput. A verified outcome says work. One of them survives a price war, and the labs with the least compute already ran the experiment.

Key takeaway

Token price competition tracks throughput economics, and the throughput frame is losing to labs that optimized the unit. Constraint-driven engineering — MLA, sparse activation, RL on a ~$1M budget — collapsed GPT-4-level prices 40x per year and took the top share of OpenRouter-routed requests. The deeper shift is what we evaluate and sell: verified work products rather than raw generated volume.

Ongoing work

Pricing verified work is not a thought experiment — it is the design brief for two active builds, tracked on this page as they evolve:

  • Mnemosyne Memory System — verifiable claim tracking and behavioral guardrails for AI agents, so what an agent "remembers" can be checked against what actually happened.
  • Zenbooker MCP Server — LLM agents executing real field-service work over a standardized transport, where the unit of value is a completed job, not a token count.

References

Footnotes

  1. DeepSeek-AI. "DeepSeek-V3 Technical Report." arXiv preprint arXiv:2412.19437, 2024. https://arxiv.org/abs/2412.19437

  2. Erdil, Ege. "What went into training DeepSeek-R1?" Epoch AI Gradient Updates, January 2025. https://epoch.ai/gradient-updates/what-went-into-training-deepseek-r1 2 3

  3. Liu, Aixin, et al. "DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model." arXiv preprint arXiv:2405.04434, 2024. https://arxiv.org/abs/2405.04434

  4. Dai, Damai, et al. "DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models." arXiv preprint arXiv:2401.06066, 2024. https://arxiv.org/abs/2401.06066

  5. Ainslie, Joshua, et al. "GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints." Proceedings of EMNLP 2023 / arXiv preprint arXiv:2305.13245, 2023. https://arxiv.org/abs/2305.13245

  6. Guo, Daya, et al. "DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning." Nature 645, 633–638, 2025. doi:10.1038/s41586-025-09422-z

  7. DeepSeek-AI. "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning." arXiv preprint arXiv:2501.12948, 2025. https://arxiv.org/abs/2501.12948 2

  8. Cottier, Ben, et al. "LLM inference prices have fallen rapidly but unequally across tasks." Epoch AI Data Insights, March 2025. https://epoch.ai/data-insights/llm-inference-price-trends

  9. Carew, Sinéad, Cooper, Amanda, and Banerjee, Ankur. "DeepSeek sparks AI stock selloff; Nvidia posts record market-cap loss." Reuters, January 27, 2025. https://www.reuters.com/technology/chinas-deepseek-sets-off-ai-market-rout-2025-01-27/

  10. OpenRouter, Inc. "AI Model Rankings (week beginning 31 August 2026)." OpenRouter rankings, 2026. Routed traffic through OpenRouter only, not the whole market. https://openrouter.ai/rankings

  11. DeepSeek-AI. "DeepSeek-R1 and DeepSeek-V3 model pages, Hugging Face Hub," 2026. Download counts accessed 2026-09-10. https://huggingface.co/deepseek-ai

  12. Qwen Team, Alibaba Cloud. "Qwen organization page, Hugging Face Hub," 2026. Model counts and followers accessed 2026-09-10. https://huggingface.co/Qwen

July 20, 2026

Devcontainers: A Polemic

Every fresh clone starts with an hour of setup fighting. A container definition ends it — the case for devcontainers, and the three files that carry it.

Every fresh clone starts the same way: a README listing Node 22, pnpm 10, Go 1.22, Docker, gcloud, Pulumi, Firebase CLI, a PAT with read:packages, ~/.npmrc scopes, Python 3, Skopeo, Postgres 16. An hour later pnpm install fails on auth, native builds fail on the wrong Python, emulators collide on credentials — and every engineer on the team runs this gauntlet separately, so the result is never quite the same machine twice.

That is waste in the place where engineers do their primary thinking, and we tolerate it for reasons I have never found convincing. "It's a one-time cost" — it isn't; it's per-machine, per-rebuild, per-new-hire. "Docker is too heavy" — the image builds once and caches, while the ritual repeats forever. "Our setup docs are good" — your setup docs are a wish list with a version number.

Devcontainers end the ritual. Reopen in Container gives every engineer the same locked tool versions, mapped ports, extensions, and verified configs, and the environment stops being folklore — it becomes a file you can review.

What defines the environment

Three files:

  1. .devcontainer/devcontainer.json — base image, Features, extensions, ports, lifecycle hooks
  2. Dockerfile — OS packages, runtimes, build deps
  3. .devcontainer/devcontainer-lock.json — digest SHAs for every Feature, reproducible builds

Startup verifies the toolchain, so a broken environment fails loudly at the door instead of quietly three hours in:

=== DevContainer Tool Verification ===
✓ Node.js: v22.14.0
✓ pnpm: 10.31.0
✓ Docker CLI: 28.0.1
✓ gcloud: 518.0.0
✓ Pulumi: v3.162.0
✓ Go: go1.22.0

Why it matters

Onboarding: a new teammate gets a working stack in image-build time, which beats a Slack thread and a lucky afternoon. Parity: same compilers and libraries locally and in CI, so phantom defects stop being a category. Isolation: conflicting Node and Python versions live in separate containers and the host stays clean.

The honest counterargument is lock-in — you are committing to a container spec and Docker's ecosystem, and that's a real dependency. Fair. But the spec is JSON in your repo, the lockfile pins digests, and the alternative is the ritual, which locks you in harder: to whatever each laptop happens to have on it.

The environment is a build artifact. Treat it like one.

Ongoing work

The same reproducibility discipline runs through the rest of the toolchain work on this page — most directly the TDD Algorithm & Kata Suite, where locked toolchains and test-first practice keep every run honest: same environment, same tests, same result, every clone.