Mare Liberum

900 mTwilight zone

The engine room

Guides for developers

Five tasks of developers who build AI agents, each answered with what to type, what it was measured to spare and where it spares nothing. Every number comes from a measured run in the open (/engine, /proof) or from the code, and the page names which. No account, no key.

Cut the token costs of an AI agent

Where an agent's tokens go and six opt-in levers that spare some of them: TOON for tables, fields=, a lean MCP door, POST /compress, since= and budget=. Each with what it was measured to spare, where it spares nothing, and a line to copy.

Lean MCP door: a smaller tool list

An MCP client that loads every tool definition reads the whole tool list on every model call. The lean door lists four tools that find and call all the others. When it helps, when it does not (Claude Code defers tool definitions already), and the line for each client.

Read a web page again for 51 tokens

An agent that checks a page for changes pays for the whole page each time. With the ETag of its first read, the reader answers unchanged in one line, only the lines that changed, or a 304 without a body.

Only the fields you need

Name the fields an agent needs, with dots for nested ones, and every other member of a JSON answer stays out. Deterministic, no model in between; it leaves things out, so it says so in a header and counts in no headline.

/compress in a LiteLLM proxy or the Vercel AI SDK

Send long tool results through POST /compress before they reach the model: lossless steps only, the answer taken only when it is smaller, the original kept on any error. A LiteLLM proxy callback and a Vercel AI SDK middleware to copy.

For programs