Why AIL exists

The problem AILv1 tries to solve, what already existed, and how the format came to be.

The problem

A long working session builds up a lot of state: names, decisions, code, and a list of things that did not work. When that session has to move to a fresh chat or a different model, the only thing that crosses over is text.

The usual options are a JSON-style payload or a prose summary. JSON spends tokens on quotes, braces and repeated key names. Prose spends them on grammar and narration. Neither keeps a clear record of what was rejected and why.

Some research skips text and shares a model's internal state, such as its KV cache. That needs access to the models' internals, and the models must be closely related. A hosted, closed model does not expose that state, so these methods cannot move a session from one provider to another.

What already existed

Design ideas

From idea to the shipped format

The idea started in a brainstorming chat about moving a session between models. The first version was an "emergency eject" prompt: paste it into a chat that is about to run out of context, and the model writes a snapshot. That prompt used @MEM, @ARCH, @DECISIONS, @CODE_SIG and @NEXT.

AILv1 shipped with six sections: @MEM, @CTX, @ARCH, @LOG, @SIG and @NEXT. @DECISIONS became @LOG, and @CODE_SIG became @SIG. The grammar is in the README, and the decoder rejects anything outside it.

The prompt also became real code. The Python encoder redacts secrets first, extracts @SIG lines from Python with the ast module, and adds pointers only where they save tokens. The decoder only parses, checks every line, and treats a snapshot as data, not instructions.

The format is not always smaller. On a short paragraph it can cost more tokens than the prose. The benchmarks in the README show where it helps and where it does not.