03 · The smallest act, and where the bytes go

03 · The smallest act, and where the bytes go

Babb

2026-11-22.


The question


The owner set out the real aim of the work:



  • The smallest meaningful act. Find the "nano level" of action recorded about a computer system, a machine or a corporate process, and above all an AI agent. One instruction from an agent fans out into dozens or thousands of actions. A single tool call hides more actions beneath it, and so on down to registers and bits.

  • Not a record of everything. Recording all of it is impossible. The purpose is to understand how resources are allotted, and what they cost in energy and compute, within the envelope of time, the scarcest resource.

  • The two sides of a system of work:

  • the visible outputs owed to people ("a person bought this and requires that");

  • the efficiency its managers pursue, to free resources or expand output.

  • Smaller logs through the alphabet. Single-letter op codes were chosen to use the fewest bits. Could upper- and lowercase letters and the rest of core ASCII, many with telegraph-era meanings, form a symbolic language that keeps logs small? Meanwhile ctx JSON, while flexible, risks bloat.


First, measure


The 35 canonical lines of the trial's example journal were broken down by field:


babb-table/1
[["Part of the line", "Share"], ["JSON key names and syntax", "26.2%"], ["Recorder and actor IDs, repeated on every line", "13.4%"], ["Digests, legs, reasons and other values", "37.6%"], ["Timestamp", "8.3%"], ["Object", "6.6%"], ["Action word", "4.9%"], ["Op letter", "1.5%"]]
Part of the line | Share
JSON key names and syntax | 26.2%
Recorder and actor IDs, repeated on every line | 13.4%
Digests, legs, reasons and other values | 37.6%
Timestamp | 8.3%
Object | 6.6%
Action word | 4.9%
Op letter | 1.5%

Conclusion: the op letter is already as small as it can be. A richer alphabet for it alone can't deliver the aim. The savings are elsewhere:
- context stated once, in a run header;
- positions fixed by the record type, so key names disappear;
- time as a delta from the previous row.


The run form, built and measured


Every form decoded byte for byte to the canonical lines.


babb-table/1
[["Data", "Canonical", "+ gzip", "Run form", "Run + gzip", "Packed binary"], ["Mixed journal (35 records)", "4,618 B", "1,393 B", "2,537 B", "1,192 B", "—"], ["Agent task (15 records)", "2,147 B", "457 B", "694 B", "309 B", "—"], ["Meter, 1,000 readings", "110,728 B", "7,514 B", "3,923 B", "1,342 B", "888 B"]]
Data | Canonical | + gzip | Run form | Run + gzip | Packed binary
Mixed journal (35 records) | 4,618 B | 1,393 B | 2,537 B | 1,192 B | —
Agent task (15 records) | 2,147 B | 457 B | 694 B | 309 B | —
Meter, 1,000 readings | 110,728 B | 7,514 B | 3,923 B | 1,342 B | 888 B

The findings:
- Stating context once does most of the work. On periodic data, the run form is smaller than gzipped canonical lines and stays readable.
- gzip is the honest storage baseline. The run form earns its place by staying readable to people, shell tools and models without decompressing.
- Binary wins only for dense numeric streams.
- Parse speed was not measured fairly. The Python decoder was 2–3× slower than C-backed json.loads, so a fair comparison needs native code.
- Tokens are not bytes. A tokenizer merges common words, so start may cost one token where B( costs two. Token savings probably follow the dropped keys and IDs, not the glyphs. This was left to be measured with the provider's token-counting endpoint. No credentials were available in the session.


The act


The smallest unit worth recording is an act: an interval, with an actor, a kind, an object and a resource vector.


act = (start, end, actor, kind, object, use{quantity: amount}, evidence)


  • A point event is an act of zero length.

  • An open/close pair is one act written in two halves. That keeps work in progress visible and makes a missing close evidence of a crash. The close carries the act's use.

  • Time is the envelope, not a consumable. Wall time doesn't add up under concurrency: two tool calls side by side for 10 s took 10 s. Energy, CPU time, tokens, material and money do add up, and they balance. Utilisation is CPU time over wall time; parallelism is the summed child wall time over the parent's.


The cascade: record to a declared depth


"Run the tests" is one tool call. Beneath it are a process, thousands of system calls, and millions of instructions. A stream declares the deepest level it records individually:


project, task, session, step, model, tool, process, syscall


Below that level:
- Totals roll up. Conserved quantities are rolled into the parent's use, so nothing is lost from the totals.
- Unrecorded acts are counted. For example, 412# means 412 sub-acts.
- The remainder is stated. It's the parent's use minus its recorded children's, per quantity. A negative remainder is reported as over-attribution, never clamped.


In the trial agent task, every token was accounted for. 2.5 CPU-seconds and about 55 J fell between the recorded steps. That was the agent's own overhead, made visible as a number.


Measured or estimated? A ~ prefix marks an estimate, and anything mixed with an estimate becomes one. Where the figures come from:
- host energy: power-cap (RAPL) counters, or a meter;
- CPU: cgroup cpu.stat;
- tokens: the API's usage report;
- remote model energy: an estimate, unless the provider gives evidence.


The alphabet, first pass



  • One printable character carries at most about 6.55 bits (95 symbols in 8 bits). Case changes capacity, not size.

  • Proposed roles by character class: uppercase letter = record family; punctuation = what the act does; lowercase = keys and unit codes; digits = values.

  • Glyphs: ( ) open and close, + - * . for create, remove, modify and complete, = and ~ for observed and estimated, > < / for post, reverse and amend.

  • Telegraph meanings were noted but not adopted. In Morse, + is written for AR (end of message) and = for BT (break). Readers and models today read them as add and equals. The telegraph vocabulary is strongest in the C0 control characters, taken up later in 09.

  • Quantities as value plus SI-style code, for example 38J, -100kg, ~470J.


What later steps changed. The OP-letter + glyph type was superseded by ZAKO verbs plus a phase (04). Glyphs survive as phase marks and display aliases. The separate quantity codebook was superseded by extending Workwarrior's existing unit registry (07).

Report Page