AI NewsProductivityReported

A schema-first format sent an agent 49 percent fewer characters than JSON

When a tool hands an agent 500 records of the same shape, JSON repeats every field name 500 times. One measured comparison of a 25-issue list found a schema-first format used 49 percent fewer characters than pretty-printed JSON.

AI News

Editorial3 min read

LinkedInX

Why it mattersMost cost work targets the model and the prompt. The format your own tools return is a line of code you control, and few teams have looked at it.

An article in The New Stack on 31 August makes a narrow, practical point about agent cost that does not involve changing model.

Disclosure first: it is a sponsored post, paid for by Sonar, and the author notes that Insight Partners invests in both Sonar and The New Stack. The example uses Sonar's own command line tool. The underlying argument is checkable without any of their software, which is why it is worth reporting.

The observation

Before an agent writes a line of code it has already spent tokens on source files, ticket descriptions, build logs, quality findings and dependency alerts. Most of what you pay for is what the agent read, not what it produced.

Now look at what a tool returns when an agent asks for a list of issues:

{
  "key": "AZ1002fQ9x",
  "severity": "BLOCKER",
  "component": "src/main/java/com/acme/UserRepo.java",
  "line": 29,
  "status": "OPEN"
}

That is fine. Then multiply it by 500 findings. The words key, severity, component, line and status are sent 500 times, along with every brace and quotation mark. The agent does not need to be told what severity means on the four hundredth record.

The alternative

Token-Oriented Object Notation, or TOON, keeps a schema header once for a uniform array and sends each record as a row. Field names appear a single time. Values are unchanged, and it is a lossless encoding of the JSON data model for the shapes it targets.

The article's measured figure, on a representative 25-issue comparison the author generated: TOON used 49 percent fewer characters than pretty-printed JSON and 33 percent fewer than minified JSON.

Note what that is and is not. It is characters, not tokens, on one payload of 25 records. The author says so, and says explicitly to measure your own payload with your own tokenizer rather than assume a universal percentage, because tokenization differs across models. The TOON project's own benchmarks are described as only a general indication.

That is an unusually honest set of caveats for a sponsored post, and it means the number can be used as a signal rather than a claim.

When to use which

The rule the article reaches is to pick the format for whoever is reading it.

A table when a person is scanning a short result in a terminal. Standard JSON when a script or an API client consumes it, or when the data is nested and irregular, where JSON is genuinely more compact. A compact schema-first format when a model is reading many records with identical fields.

The third case adds up, because agents call tools in loops. List findings, inspect files, make a change, run analysis, list remaining findings. A small saving in one response repeats across every iteration and every repository.

The caution that matters most

The article ends with the right warning: a cheaper context that produces a weaker decision is not a cost improvement.

Whatever format you pick has to keep the fields the agent actually needs, and it has to be validated against the tasks that matter, which for an issue list means finding the highest-priority item, locating the code and knowing when remediation is done. Test that before you optimise it.

Source

Reported byThe New Stack

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project