{
"what":"the engine room of the sea: open, no account, six measured levers that spare agents tokens, each measured by one rule and counted in one public ledger",
"engine":"engine-1",
"on":true,
"state":"on: every lever acts when an agent asks for it",
"live":{
"since":"2026-11-24",
"lossless":{"answers":1,"before":11005,"after":702,"saved":10303},
"lossy":{"answers":0,"before":0,"after":0,"saved":0},
"today":{"lossless":{"answers":1,"before":11005,"after":702,"saved":10303},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},
"last30days":{"lossless":{"answers":1,"before":11005,"after":702,"saved":10303},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},
"usd":{"low":0,"mid":0.02,"high":0.08,"of":"the lossless tokens at the rate card of /savings (USD per million uncached input tokens), modelled","caching":"list prices for uncached input tokens; a client that had the same text in its prompt cache pays 0.025 to 0.1 times that (Claude, OpenAI and Google pricing), so a saving on a cached prefix such as a tool list is worth far less than this"},
"note":"tokens before, after and saved by the one rule of savingOf, counted once a day per network and subject; lossless ones are part of the measured figure of /savings, lossy ones are in no figure of the headline"
},
"levers":[
{"id":"toon","name":"TOON instead of JSON","lossless":true,"losslessIs":"lossless","spares":"Structured answers repeat every key in every row. TOON says the keys of a table once and then the rows: the same data, every value kept.","where":"Only on tabular data. The engine sends TOON only when it is at least 20 % smaller than compact JSON, else the JSON and a header that says so. On the bench of 2026-11-25: 3 of 19 answers of the sea.","door":"fmt=toon or Accept: text/toon on every JSON door; the text the model reads on /mcp/lean","call":"curl -s 'https://mareliberum.dev/routes.json?fmt=toon'","also":"or the header Accept: text/toon on any JSON door","live":{"today":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"last30days":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"all":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}}}},
{"id":"lean","name":"The lean MCP door","lossless":true,"losslessIs":"lossless","spares":"An MCP client may put every tool definition of a server into the model's context on every turn. The lean door lists four tools; find_tools finds any of the others and call_tool calls it, with the same answers. Its results go out as text only, so a client that reads text and structured content (ChatGPT) does not read an answer twice.","where":"Only in clients that load every tool definition (Gemini CLI, Cline, Roo, Zed, agents of your own). Claude Code, Copilot CLI and OpenAI's Agents API already defer tools; there it spares almost nothing.","door":"/mcp/lean","call":"curl -s https://mareliberum.dev/mcp/lean -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}'","also":"add it to a client as an MCP server at /mcp/lean","live":{"today":{"lossless":{"answers":1,"before":11005,"after":702,"saved":10303},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"last30days":{"lossless":{"answers":1,"before":11005,"after":702,"saved":10303},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"all":{"lossless":{"answers":1,"before":11005,"after":702,"saved":10303},"lossy":{"answers":0,"before":0,"after":0,"saved":0}}}},
{"id":"squeeze","name":"Squeeze what you hold","lossless":null,"losslessIs":"lossless, or lossy when asked","spares":"Text, HTML or JSON on its way to a model: made smaller, the lossless steps first (HTML to Markdown, JSON minified or as TOON, repeated lines said once). A question or a token budget only when one is named, then lossy, and said so.","where":"For programs: a hook, a proxy, a pipeline. Not for a model to call with text it already holds: it would pay for that text again as output tokens.","door":"POST /compress","call":"curl -s -X POST https://mareliberum.dev/compress -H 'content-type: application/json' -d '{\"html\":\"<h1>…</h1>\",\"q\":\"price\"}'","also":"GET /compress says how; nothing posted is kept","live":{"today":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"last30days":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"all":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}}}},
{"id":"delta","name":"Read again, only the change","lossless":true,"losslessIs":"lossless","spares":"A page read a second time costs the whole page again. With the ETag of the first answer the sea says \"unchanged\" in one line, or sends only the lines that changed, each under its nearest heading.","where":"On the reader /r/: a page an agent reads again.","door":"/r/<address>?since=<etag> or If-None-Match","call":"curl -s 'https://mareliberum.dev/r/https://example.com/?since=<etag>'","also":"or If-None-Match: <etag> for a 304 without a body","live":{"today":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"last30days":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"all":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}}}},
{"id":"budget","name":"A page to your budget","lossless":false,"losslessIs":"lossy","spares":"A page longer than the question needs: fitted to the token budget the agent names, the parts that answer its question first, every gap marked. It leaves things out, so it is lossy, and says so at the top.","where":"On the reader /r/: a page longer than the question needs.","door":"/r/<address>?budget=<tokens>","call":"curl -s 'https://mareliberum.dev/r/https://example.com/?budget=800&q=pricing'","also":"with q, the blocks that answer the question come first","live":{"today":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"last30days":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"all":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}}}},
{"id":"fields","name":"Only the fields you need","lossless":false,"losslessIs":"lossy","spares":"A JSON answer carries every field of every row. Name the ones you need, with dots for nested ones, and the rest stays out: deterministic, no model in between.","where":"On every JSON door. What it leaves out is gone, so it counts as lossy and never in the headline.","door":"fields=<a,b.c> on every JSON door","call":"curl -s 'https://mareliberum.dev/savings.json?fields=hero.tokens,hero.measured'","also":"fields=<a,b.c>: a list of fields, dots for nested ones","live":{"today":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"last30days":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}},"all":{"lossless":{"answers":0,"before":0,"after":0,"saved":0},"lossy":{"answers":0,"before":0,"after":0,"saved":0}}}}
],
"bench":{
"date":"2026-11-25",
"file":"https://mareliberum.dev/engine/bench-2026-11-25.json",
"tokenizers":[
{"id":"o200k_base","package":"js-tiktoken@1.0.21"},
{"id":"cl100k_base","package":"js-tiktoken@1.0.21"},
{"id":"claude-legacy","package":"@anthropic-ai/tokenizer@0.0.4"}
],
"toon":{"implementation":"node/toon.mjs (the sea's own encoder)","spec":"v4.4 (https://github.com/toon-format/spec/blob/v4.4.0/SPEC.md)","reference":{"implementation":"@toon-format/toon@4.4.0 (the reference implementation, npm)","sameOutput":19,"of":19}},
"toonRule":{"minSaving":0.2,"against":"compact JSON (min), per answer, in tokens of each tokenizer; otherwise what the door sends"},
"node":"a local node of Mare Liberum 3.35.0 (in process, 0 index entries from the first rows of the lakes)",
"fixtures":19,
"totals":{"o200k_base":{"json":63227,"sent":46234,"min":45594,"toon":46311,"best":44042,"toonSmallerIn":["search","search-mcp","brain","brain-home","market","thinking","savings","routes","briefs","agents"],"rule":45382,"ruleIn":["thinking","routes","agents"]},"cl100k_base":{"json":63291,"sent":46031,"min":45391,"toon":46465,"best":44033,"toonSmallerIn":["search","search-mcp","brain","brain-home","market","thinking","savings","routes","briefs","agents"],"rule":45301,"ruleIn":["thinking","routes","agents"]},"claude-legacy":{"json":63283,"sent":48666,"min":47301,"toon":46072,"best":45555,"toonSmallerIn":["search","search-mcp","brain","brain-home","market","thinking","stats","savings","open","routes","briefs","fair","agents"],"rule":48292,"ruleIn":["routes","agents"]}},
"ratios":{"o200k_base":{"json":3.7,"sent":3.66,"min":3.69,"toon":3.56},"cl100k_base":{"json":3.69,"sent":3.68,"min":3.71,"toon":3.54},"claude-legacy":{"json":3.69,"sent":3.48,"min":3.56,"toon":3.58}},
"mcp":{"full":{"tools":55,"bytes":40289,"tokens":{"o200k_base":9695,"cl100k_base":9645,"claude-legacy":9814}},"lean":{"tools":4,"bytes":2580,"tokens":{"o200k_base":631,"cl100k_base":627,"claude-legacy":643},"names":["read_page","think","find_tools","call_tool"]},"how":"tools/list of the open door /mcp as one JSON result, against the list of the lean door /mcp/lean as node/leanmcp.mjs builds it from the same open list; the lean door of the release is measured again after the merge"},
"rows":[
{"id":"search","door":"/search?q=weather+api","bytes":{"json":694,"sent":556,"min":556,"toon":454},"tokens":{"o200k_base":{"json":200,"sent":146,"min":146,"toon":132},"cl100k_base":{"json":202,"sent":147,"min":147,"toon":133},"claude-legacy":{"json":211,"sent":157,"min":157,"toon":146}},"roundTrip":true},
{"id":"search-mcp","door":"/search?q=github+mcp+server","bytes":{"json":694,"sent":556,"min":556,"toon":454},"tokens":{"o200k_base":{"json":200,"sent":146,"min":146,"toon":132},"cl100k_base":{"json":202,"sent":147,"min":147,"toon":133},"claude-legacy":{"json":211,"sent":157,"min":157,"toon":146}},"roundTrip":true},
{"id":"brain","door":"/brain?q=compare+prices+for+headphones","bytes":{"json":8206,"sent":7159,"min":7086,"toon":6606},"tokens":{"o200k_base":{"json":2563,"sent":2202,"min":2142,"toon":2079},"cl100k_base":{"json":2607,"sent":2241,"min":2174,"toon":2122},"claude-legacy":{"json":2707,"sent":2422,"min":2299,"toon":2234}},"roundTrip":true},
{"id":"brain-home","door":"/brain?format=json","bytes":{"json":217,"sent":190,"min":180,"toon":167},"tokens":{"o200k_base":{"json":86,"sent":68,"min":60,"toon":65},"cl100k_base":{"json":86,"sent":68,"min":60,"toon":65},"claude-legacy":{"json":82,"sent":80,"min":60,"toon":61}},"roundTrip":true},
{"id":"find","door":"/find.json?q=weather","bytes":{"json":6661,"sent":5366,"min":5344,"toon":5569},"tokens":{"o200k_base":{"json":1831,"sent":1420,"min":1399,"toon":1571},"cl100k_base":{"json":1873,"sent":1446,"min":1423,"toon":1616},"claude-legacy":{"json":1965,"sent":1572,"min":1540,"toon":1652}},"roundTrip":true},
{"id":"market","door":"/brain/market.json","bytes":{"json":2283,"sent":2068,"min":2033,"toon":1974},"tokens":{"o200k_base":{"json":606,"sent":519,"min":494,"toon":508},"cl100k_base":{"json":609,"sent":521,"min":494,"toon":511},"claude-legacy":{"json":612,"sent":566,"min":507,"toon":515}},"roundTrip":true},
{"id":"areas","door":"/brain/areas.json","bytes":{"json":3816,"sent":3022,"min":3001,"toon":3216},"tokens":{"o200k_base":{"json":1103,"sent":817,"min":804,"toon":951},"cl100k_base":{"json":1104,"sent":818,"min":804,"toon":951},"claude-legacy":{"json":1086,"sent":871,"min":836,"toon":899}},"roundTrip":true},
{"id":"thinking","door":"/brain/thinking.json","bytes":{"json":10677,"sent":8644,"min":8575,"toon":6776},"tokens":{"o200k_base":{"json":2666,"sent":1986,"min":1920,"toon":1472},"cl100k_base":{"json":2610,"sent":1866,"min":1859,"toon":1473},"claude-legacy":{"json":2653,"sent":2043,"min":1906,"toon":1540}},"roundTrip":true},
{"id":"stats","door":"/stats","bytes":{"json":1168,"sent":828,"min":828,"toon":869},"tokens":{"o200k_base":{"json":435,"sent":285,"min":285,"toon":332},"cl100k_base":{"json":439,"sent":287,"min":287,"toon":338},"claude-legacy":{"json":415,"sent":299,"min":299,"toon":292}},"roundTrip":true},
{"id":"savings","door":"/savings.json","bytes":{"json":29123,"sent":18029,"min":17850,"toon":14045},"tokens":{"o200k_base":{"json":9164,"sent":5965,"min":5825,"toon":5270},"cl100k_base":{"json":9172,"sent":5965,"min":5813,"toon":5275},"claude-legacy":{"json":8247,"sent":6006,"min":5689,"toon":4743}},"roundTrip":true},
{"id":"open","door":"/open.json","bytes":{"json":33294,"sent":25110,"min":24903,"toon":25546},"tokens":{"o200k_base":{"json":9812,"sent":7414,"min":7238,"toon":7900},"cl100k_base":{"json":9839,"sent":7361,"min":7175,"toon":7924},"claude-legacy":{"json":9889,"sent":7830,"min":7524,"toon":7755}},"roundTrip":true},
{"id":"offers","door":"/offers.json","bytes":{"json":4080,"sent":3552,"min":3552,"toon":3666},"tokens":{"o200k_base":{"json":1022,"sent":868,"min":868,"toon":928},"cl100k_base":{"json":1034,"sent":874,"min":874,"toon":938},"claude-legacy":{"json":1053,"sent":905,"min":905,"toon":947}},"roundTrip":true},
{"id":"routes","door":"/routes.json","bytes":{"json":6305,"sent":4523,"min":4523,"toon":3015},"tokens":{"o200k_base":{"json":1892,"sent":1205,"min":1205,"toon":868},"cl100k_base":{"json":1897,"sent":1209,"min":1209,"toon":873},"claude-legacy":{"json":1910,"sent":1332,"min":1332,"toon":959}},"roundTrip":true},
{"id":"briefs","door":"/briefs.json","bytes":{"json":14001,"sent":11431,"min":11431,"toon":9157},"tokens":{"o200k_base":{"json":3657,"sent":2681,"min":2681,"toon":2201},"cl100k_base":{"json":3595,"sent":2614,"min":2614,"toon":2196},"claude-legacy":{"json":3754,"sent":2897,"min":2897,"toon":2408}},"roundTrip":true},
{"id":"fair","door":"/fair.json","bytes":{"json":8362,"sent":7378,"min":7273,"toon":7243},"tokens":{"o200k_base":{"json":2387,"sent":2014,"min":1933,"toon":2061},"cl100k_base":{"json":2399,"sent":2022,"min":1932,"toon":2076},"claude-legacy":{"json":2361,"sent":2143,"min":1957,"toon":2023}},"roundTrip":true},
{"id":"pricing","door":"/pricing.json","bytes":{"json":12722,"sent":10925,"min":10875,"toon":11270},"tokens":{"o200k_base":{"json":3646,"sent":3064,"min":3027,"toon":3291},"cl100k_base":{"json":3665,"sent":3072,"min":3024,"toon":3315},"claude-legacy":{"json":3750,"sent":3238,"min":3161,"toon":3338}},"roundTrip":true},
{"id":"connect","door":"/connect.json","bytes":{"json":26335,"sent":19502,"min":19459,"toon":19718},"tokens":{"o200k_base":{"json":7615,"sent":5721,"min":5708,"toon":6144},"cl100k_base":{"json":7644,"sent":5710,"min":5692,"toon":6147},"claude-legacy":{"json":8028,"sent":6317,"min":6244,"toon":6495}},"roundTrip":true},
{"id":"agents","door":"/agents?limit=25","bytes":{"json":18,"sent":13,"min":13,"toon":10},"tokens":{"o200k_base":{"json":7,"sent":4,"min":4,"toon":3},"cl100k_base":{"json":7,"sent":4,"min":4,"toon":3},"claude-legacy":{"json":8,"sent":4,"min":4,"toon":3}},"roundTrip":true},
{"id":"mcp-tools","door":"POST /mcp tools/list","bytes":{"json":65113,"sent":40323,"min":40323,"toon":44955},"tokens":{"o200k_base":{"json":14335,"sent":9709,"min":9709,"toon":10403},"cl100k_base":{"json":14307,"sent":9659,"min":9659,"toon":10376},"claude-legacy":{"json":14341,"sent":9827,"min":9827,"toon":9916}},"roundTrip":true}
],
"says":"On 19 real answers of a local node (o200k_base), TOON took 46,311 tokens where the JSON the doors already send took 46,234: 0.2 % more. TOON was smaller for 10 of the 19 answers (search, search-mcp, brain, brain-home, market, thinking, savings, routes, briefs, agents), and at least 20 % smaller than compact JSON, the rule of the lever, for 3 (thinking, routes, agents), the ones that hold tables; with that rule the answers take 45,382 tokens instead of 46,234 (1.8 % fewer). Against indented JSON (63,227) TOON is 26.8 % fewer, but the sea does not send indented JSON. The open MCP door's tools/list (55 tools) took 9,695 tokens, a lean list of 4 took 631."
},
"ratio":{
"html":3.23,
"md":3.59,
"text":4.34,
"tokenizer":"o200k_base",
"date":"2026-11-25",
"source":"/engine/bench-2026-11-25.json",
"answers":19,
"unit":"UTF-8 bytes per token",
"json":3.66,
"toon":3.56,
"assumption":false,
"basis":"measured: JSON and TOON on 19 real answers of the sea (2026-11-25, o200k_base, /engine/bench-2026-11-25.json); HTML, Markdown and plain text from the proof of function (/proof)"
},
"rules":{
"optIn":"The engine shapes an answer only when the agent asks: a parameter (fmt=toon, fields=, since=, budget=), a header (Accept: text/toon, If-None-Match), the lean door /mcp/lean, or POST /compress. Every other answer stays byte for byte what it was.",
"measuring":"One measuring rule for every lever: what the agent would have read and what it read, each in UTF-8 bytes, each made tokens with the ratio the bench measured for its form (savingOf in node/engine.mjs). No saving, no count, no header claiming one.",
"apart":"Lossless and lossy savings are counted and shown apart. Lossless savings join the measured figure of /savings as their own kind; lossy ones (a page fitted to a budget or a question, an answer cut to named fields) are in no figure of the headline.",
"counting":"Counted like every saving of the sea: never the sea's own calls, never crawlers, never a HEAD request; the house agent apart; once a day per network and subject (a page, a hash of the text, a tool); one network adds at most 500 answers of the engine a day. No receipt and no fair share is asked for them.",
"privacy":"What an agent posts to /compress is never stored, logged or counted beyond its size in bytes. The only versions kept, for since=, are pages read through /r/ (public pages the reader reads anyway): in memory, bounded in bytes and to 24 hours, never anything posted.",
"rest":"With MARE_ENGINE=off, or \"engine\" in rest of the immune system's policy, nothing of the engine acts: fmt=toon, fields=, since= and budget= are ignored, /compress answers 503 with a note, and every answer is what it was before."
},
"sources":[
{"what":"TOON, the format of the toon lever: the specification, version 4.4 (8 October 2026), media type text/toon","url":"https://github.com/toon-format/spec/blob/main/SPEC.md"},
{"what":"MCP 2026-07-28, tools: structuredContent and the TextContent block beside it, a deterministic tools/list","url":"https://modelcontextprotocol.io/specification/2026-07-28/server/tools"},
{"what":"Claude Code: MCP tool definitions are deferred by default (tool search)","url":"https://code.claude.com/docs/en/agent-sdk/tool-search"},
{"what":"OpenAI: tool search and defer_loading; in the Agents API MCP tools are deferred","url":"https://developers.openai.com/api/docs/guides/tools-tool-search"},
{"what":"Atlassian mcp-compressor (29 March 2026): the same pattern of a few meta-tools in front of many, before the lean door","url":"https://www.atlassian.com/blog/developer/mcp-compression-preventing-tool-bloat-in-ai-agents"}
],
"headers":{
"x-sea-engine":"the lever that shaped the answer",
"x-sea-engine-tokens":"tokens before->after, by the one rule",
"x-sea-engine-saved":"tokens saved",
"x-sea-engine-lossy":"1 when the saving lost something (only then)"
},
"links":{
"savings":"https://mareliberum.dev/savings",
"proof":"https://mareliberum.dev/proof",
"fair":"https://mareliberum.dev/fair",
"llms":"https://mareliberum.dev/llms.txt",
"markdown":"https://mareliberum.dev/engine.md",
"bench":"https://mareliberum.dev/engine/bench-2026-11-25.json"
}
}
