Agent patterns

Tool-calling compression

Tool-calling LLMs send function definitions, parameters, and results in every prompt. As tool calls accumulate, so does the prompt size. Compression keeps the relevant tool context.

By Arjun Shah - Creator of SuperCompress - Updated 2026-07-03

Tool call bloat

A tool-calling agent making 5 tool calls might include: function definitions for 10 tools (2,000-5,000 tokens), 5 call histories (500-1,000 tokens each), and 5 results (500-2,000 tokens each). Total: 7,000-16,000 tokens after 5 calls.

Frequently asked questions

Does compression affect function definitions?

No. Function schemas are preserved. Only call history and results that are irrelevant to the current query are compressed.

Can I compress tool results selectively?

Yes. Compress each result against the next query. Results relevant to future calls are preserved.

Build with less context

Put compression in front of your next LLM call.

Use the hosted API or run SuperCompress locally. Keep the evidence, drop the token waste, and measure the savings before it reaches your model.

Get an API keyRead the guide