Deterministic serialization for multi-agent LLM sessions - 3.45x fewer tokens than JSON, up to 9.9x for non-English content A developer built a serialization protocol called SCP that reduces token usage in multi-agent LLM sessions by up to 3.45x compared to JSON, and up to 9.9x for non-English content. The protocol replaces natural language or JSON messages with short positional ASCII identifiers resolved against an external dictionary, eliminating hallucination risk on decode. Benchmarks show significant savings, especially for non-English languages, though caching discounts from providers like Anthropic and OpenAI may affect real-world cost benefits. Multi-agent LLM systems -” several models exchanging messages within one session -” pay for context, not intelligence. Every round trip in natural language or verbose JSON burns tokens re-stating structured context that a fixed, external schema could carry in a fraction of the size. I got tired of watching this happen in my own pipelines, so I built a small serialization protocol to fix it. Sharing it here in case it's useful to others hitting the same wall. Move inter-agent messages from natural language / JSON to short, positional ASCII identifiers P1:A2:X0:V4 , resolved against an external, versioned dictionary.json . A deterministic Python layer handles encode/decode -” no model involved in reconstructing meaning, so there's no hallucination risk on the decode side. php def encode payload: dict, schema: dict - str: parts = for field name, field id in schema "fields" .items : if field name not in payload: continue value = str payload field name value id = schema "values" field name value parts.append f"{field id}{value id}" return ":".join parts Unknown fields or values raise an explicit error instead of guessing -” the whole point of an external schema is that the model never has to improvise meaning on decode. Conceptually this is closer to Protocol Buffers than to prompt engineering: a fixed contract, not a clever prompt. Measured on cl100k base industry-standard reference tokenizer : | Format | Tokens | |---|---| | Natural language RU | 49 | | Standard JSON | 38 | | SCP ASCII ID-stack | 11 | 3.45x fewer tokens than JSON. Full reproducible benchmark script is in the repo -” run it yourself against your own tokenizer before trusting these numbers for a cost projection. Tokenizer vocabularies are trained predominantly on English text, so non-Latin scripts pay a real, measurable tax. Same sentence, same meaning, measured multiplier vs. the SCP ID-stack: | Language | Multiplier vs. SCP | |---|---| | English | 1.89x | | Russian | 5.11x | | Arabic | 5.56x | | Japanese | 4.22x | | Hindi | 9.89x | Because the ID-stack costs the same regardless of source language 9 tokens either way -” it's just ASCII after encoding , SCP's savings scale disproportionately for non-English multi-agent deployments. That's not a marketing angle, it's just what the tokenizer does. cl100k base as a common reference point. If you're deploying against a different model family, re-run the benchmark script against that tokenizer before relying on these numbers.Anthropic and OpenAI both offer ~90% discounts on cached input tokens. Three conditions determine whether SCP's savings actually materialize in a caching setup: python mvp/encoder decoder.py encode '{"system": "Quantumoan", "version": "4", "action": "paradigm shift", "target": "cognitive profiles alignment"}' - P1:V4:A2:X0 python mvp/encoder decoder.py decode "P1:V4:A2:X0" - {"system": "Quantumoan", "version": "4", "action": "paradigm shift", "target": "cognitive profiles alignment"} Repo AGPLv3 : https://github.com/andrey-architect/scp-protocol https://github.com/andrey-architect/scp-protocol Would genuinely like to know where this breaks -” issues and PRs welcome.