NeoDevEx case studies

AI costs · October 2026

We cut our AI bill per task by about a third, and the work still gets done.

Every time our agent works on a task, we pay the AI provider for how much text it reads and writes. We ran five everyday coding tasks 154 times, counted exactly what each one cost, and compared the same job on Devin.

What we found

Where we still fall short

Bottom line: the same work now costs about a third less, and we are far cheaper per task than Devin, partly because we use a cheaper AI model.

Full technical write-up, for engineers

Module 04 · Token costs · three rounds, 2026-10-13

We counted every token our agent spends, found the Layman integration saving nothing, and fixed it.

NeoDevEx ships a vendored copy of Layman, a prompt-compression and brevity toolkit, to keep model costs down. We ran five real coding tasks 154 times on Gemini 2.5 Flash and read the token counts the model provider reported. On a fresh install the integration as shipped saved 0 tokens: it only compressed workspace memory, which starts empty, while every model call resent a fixed 15,600-token prefix. We moved Layman to where the tokens actually go. The same tasks now use 36% fewer tokens and cost 35% less (median per task), with the same pass rate. On an identical triage task, Devin charged $0.22 and NeoDevEx $0.017.

−36%tokens per task, median of 5 tasks × 4 runs (cost −35%)
−25%first model call: 15,582 → 11,736 tokens, resent on every step
17 / 20tasks passed after, 16 / 20 before
13×cheaper than Devin on the same triage ($0.017 vs $0.22)

Where the tokens go

An agent run is a loop of model calls, 3 to 20 per task here, and every call resends the whole context: a fixed prefix plus the conversation so far. Before our changes the fixed prefix was 15,582 tokens. Input was 98% of all tokens; output (including the model's thinking) was 2%, but at Flash's prices it was about a fifth of the cost.

The first call of a run, by part (before)

Skills index~6.0k
SDK system prompt~4.5k
Tool schemas~4.0k
Our runtime notes~0.7k
Repo context, user msg~0.5k

Estimated from the character share of each part of the logged request against the provider's 15,423-token count for that call. The skills index lists the name and description of every bundled skill (69 of them) on every call; the SDK system prompt holds safety and security rules we chose not to touch. Automation runs add the delivery contract (about 1,200 tokens) to their first message, which is also resent on every call.

Layman, as it was integrated

What we found

  • foundLayman ran in one place only: the workspace-memory snippets attached to chat messages. A fresh install has no workspace memory, so it saved 0 tokens per task.
  • foundThe vendored compressor is deterministic and only removes filler words. On our already-terse prose it saved 0% of the delivery contract, 5% of the runtime notes and under 1% of the skill descriptions.
  • foundIts plain prose pass broke a file name ("AGENTS.md" became "AGENTS. md"). Layman's protected pass, which keeps paths, code and commands byte for byte, does not; we use only that one now.

What Layman is good at

  • useRewriting long Markdown once, keeping every fact, command and heading (its /layman:compress). We did this to the automation delivery contract and checked the result with Layman's own validator.
  • use"Ultra" short descriptions: what a thing does and when to use it, no examples or filler. We applied it to the skills index.
  • triedBrief mode for the agent's own messages. Measured in rounds 1 and 2, it made agents skip instructions and did not lower total tokens, so it is off (see Rounds).

What we changed

  • shippedLean skills index. 46 of the bundled skills have trigger keywords and are injected in full whenever your message mentions one. They no longer also sit in the index sent on every call; the 8 skills without keywords stay listed and invocable. About −3,000 tokens per call. Trade-off: the agent cannot pull in a keyword skill on its own if no keyword appears in the conversation.
  • shippedLayman skill descriptions. Every description cut to what the skill does and when to use it, at most 140 characters, through Layman's protected compressor (13,649 → 6,574 characters). The skill's full content still loads when it is used.
  • shippedDelivery contract v6. The rules every automation run carries, rewritten Layman-style: 5,028 → 3,707 characters (−26%), with every command, code block, section name, signature and RESULT line unchanged. Layman's validator passes it against v5.
  • shippedShorter runtime notes. The block that tells the agent which local services exist, same URLs, commands and JSON, fewer words.
  • droppedBrief-mode output directive. Measured twice, removed (below).

Results: before and after, 4 runs per task

Round 3, runs interleaved so provider-side caching and load could not favour either side. "Before" is the app as it was this morning; "After" is the app with the four shipped changes. Medians per task; total tokens = input + output.

TaskPassed beforePassed afterTokens beforeTokens afterChangeCost beforeCost after
T1 · Fix the failing tests4/44/4207,41797,452−53%$0.0302$0.0187
T2 · Answer a code question1/41/447,82136,346−24%$0.0124$0.0081
T3 · Review a pull request (automation)4/44/486,48776,364−12%$0.0128$0.0150
T4 · Triage a bug report (automation)4/44/4161,430147,580−9%$0.0179$0.0174
T5 · Add a feature with a test3/44/4319,726169,866−47%$0.0445$0.0178
All five tasks16/2017/20822,882527,609−36%$0.118$0.077

Every model call got cheaper: input per call fell 14% (20,562 → 17,663 tokens) and cost per call 17% ($0.00301 → $0.00251). How much a whole task saves also depends on how many steps the agent happens to take, which varies run to run: using means instead of medians, the saving is 16% of tokens and 19% of cost. T2 fails on both sides for the same reason: Gemini 2.5 Flash names only one of the two bugs.

We also measured the app as it stands after another change landed the same day (a <WORKING_RULES> block from separate work on chat quality): 29% fewer tokens than before, but 13/20 passed, mostly because T5 dropped to 1/4 (the test went into the wrong file and unrelated bugs got fixed). That block is under review separately; the numbers above isolate the token changes.

The same task on Devin

Devin does not show token counts; it bills each session in dollars (ACU-based credits), which its usage page lists. We ran T4 (triage the discount bug report, no posting) on Devin with the identical bug report and repository.

Devin$0.22
NeoDevEx before$0.023
NeoDevEx after$0.017

Devin

  • devin$0.22, about 16 minutes. Correct root cause, P0, a fix, and it also flagged the second (shipping) bug.
  • devinOther sessions in the same account cost $1.20 to $5.20 each (a review $3.14, test coverage $5.20, a security scan $5.02).

NeoDevEx

  • neo$0.017 median, about 40 seconds, 4 of 4 correct (root cause, priority, fix). Before our changes: $0.023.
  • neoAll 154 benchmark runs in this study, three rounds, cost $3.47 in total.

Most of that gap is the model: Devin uses its own frontier models, NeoDevEx ran Gemini 2.5 Flash. The Layman work is what we control on top of any model, and it applies to every model, including stronger ones that cost more per token.

How we got there: three rounds

Round · variantRunsPassedTokens vs beforeCost vs beforeVerdict
1 · Layman compression + brief-mode output directive1510/15 (before 12/15)+10%+1%Rejected: agents skipped instructions
2 · Layman compression only1513/15 (before 12/15)−9% first call−17% (mean)Kept; saving too small
2 · Compression + narration-only directive1512/15+26%+20%Rejected
3 · Compression + lean skills index2017/20 (before 16/20)−36%−35%Shipped

The brief-mode directive is what Layman is best known for, and it reads well in a chat. On an agent it backfired: told to write less, Gemini 2.5 Flash also read less carefully, put a requested test in the wrong file, fixed things it was not asked to, and took more steps. Output was only about 2% of tokens anyway.

What is left

  • Tool schemas (~4k tokens per call). The task-tracker tool alone is about 1,300 tokens on every call and was used in none of the 154 runs. Dropping it would save roughly another 7%, but it is the agent's planning tool on long tasks, so we left it in.
  • Automation runs. Real automation runs build their agent inside the automation service, not from the app's chat settings, so in production they get the shorter contract but not the lean skills index. T3 and T4 here ran with the app's settings plus the contract.
  • Prompt caching. Gemini already serves about 70% of input tokens from its cache at a quarter of the price, which is why cost falls less than tokens on some tasks.

How we measured

  • The harness (run_bench.py) runs each task with OpenHands SDK 1.42.1, the version the agent-server ships, and builds the agent from the exact settings the app sends (dump-app-context.test.ts calls the app's own buildStartConversationRequest): same tools, skills and system-prompt additions. The browser tool was off for every variant.
  • Model: Gemini 2.5 Flash. Token counts and costs are what the provider reported for each call, summed by the SDK; nothing is estimated except the per-part breakdown of the first call.
  • Tasks ran on a fresh copy of a small cart service with two planted bugs. Each task has a mechanical pass check: tests pass, the answer names both bugs, the review flags the wrong divisor, the triage names totalWithDiscount and the divide-by-100 fix, the new test file exists and the function returns the right value.
  • Variants were interleaved run by run. With 4 runs per task the step count still varies a lot, which is why we report medians and means.

What could skew this

  • One model and one small repository. On a large repository the conversation part grows and the fixed prefix becomes a smaller share, so the percentage saving will be smaller.
  • Devin was run once on one task; its other costs come from unrelated sessions in the same account.

Raw data