Cells all the way down
You are a multicellular organism made of cells. Each cell carries the same DNA. Each cell expresses different genes based on its position in the body. A liver cell and a cortical neuron share 100% of their genome — they differ only in which slices are active given their location.
A digital being should work the same way. One protocol. One stateless engine. Infinite specialization through hierarchical context shaping.
That sentence is the entire thesis of this post. Everything below is why I think it’s the apex pattern for AI agents and what it unlocks.
The realization
I had been building a single-file standalone agent — one Python file, drop into a brainstem, talks to a model, posts to a network. Then I built a tool that generates organisms — picks five “estates” (identity, governance, production, observation, federation), unfolds each into industries, neighborhoods, factories, personas. The output: a tree on disk. About 227 directories per organism, each with its own agent.py and its own soul prompt.
The tree was inert. The brainstem only knew about agents in its own agents/ directory. The 227 generated agent.py files were just files. They never breathed.
The fix is one paragraph long, and it is the unifying spec for everything:
Every layer of the tree exposes the same four functions. The brainstem is the universal engine — one stateless
/chatendpoint. When input arrives, the top-level cell shapes the transcript with its own context, asks/chat“which child handles this?”, routes to that child, and recurses. The leaf reads its persona prompt and produces the actual output. The full hierarchical context arrives at the leaf as one accumulated transcript. The middle layers do almost no work — they just narrow scope.
That is the whole game. Once you see it, you cannot unsee it.
The biological analogy is exact
Biological cognition narrows scope through hierarchy:
retina → optic nerve → LGN → V1 → V2 → V4 → IT cortex → motor response
Each layer doesn’t compute much. The retina transduces light. The optic nerve relays. V1 detects edges. By the time the signal reaches IT cortex, the scope has been narrowed from “the entire visual field” to “this is my grandmother’s face.” Only the leaf — the motor cortex preparing your smile — performs the actual output.
The middle layers are mostly routers and filters. They are dirt cheap compared to the apex computation. This is why your brain runs on 20 watts.
A wrapped digital organism does the same thing:
Organism → Estate → Industry → Neighborhood → Factory → Persona → response
Each layer is a small /chat call. “Pick exactly one child: [memory, identity, twins]. Reply with just the slug.” That’s a one-token answer from the model. Cheap. Then the chosen child layer does the same thing with its own children. By the time the transcript reaches a leaf, it has accumulated five or six layers of system-message context — the full hierarchical perspective — and is ready to be handed to a specific persona prompt for the final generation.
This is why a 227-cell organism is not 227× more expensive than a 1-cell agent. Most of the cells are routing decisions, not full reasoning passes. The cost is logarithmic in cell count, not linear.
The protocol every cell follows
Here is the entire interface. Every layer of the tree exposes this:
__manifest__ = {
"schema": "rapp-cell/1.0",
"layer": "estate", # one of: organism/estate/industry/neighborhood/factory
"path": "twin/sanctum", # absolute address in the tree
"context": "You are the Sanctum estate ...", # this layer's perspective
"children": ["memory", "identity", "twins"], # next-layer slugs
"souls": [], # persona names (factories only)
}
def shape(transcript): ... # append this layer's context to the transcript
def route(transcript): ... # ask the engine which child handles this — returns slug
def perform(input): ... # walk the tree from here down; return leaf output
That is the entire DNA. Every cell — organism, estate, industry, neighborhood, factory — runs the same code. What differs is only the __manifest__. A liver cell and a brain neuron differ only in which genes are active at their location, not in which genes exist.
The implementation is about 75 lines of Python. It uses stdlib only. There is no framework. There is no engine to update. The engine is a stateless HTTP endpoint that takes a transcript and returns a string. Anything more would be more.
The trace is the program
The path through the tree for any given input is a sequence of routing decisions:
trace = ["sanctum", "memory", "vault", "memory_curator",
["curator", "tagger", "summarizer"]]
Given the same input and the same tree state, this trace is reproducible. With temperature=0, it is exactly reproducible. This unlocks:
- Replay. Save the trace, apply it later, identical result. Foundation for audit.
- Override. Edit one decision in the trace, re-execute from there. See what the road not taken would have said.
- Caching. Hash the trace prefix, reuse the response. Whole subtrees become cacheable.
- The data is the program. No imperative code. The organism does not execute lines; it executes a path through structured data. Edit the tree’s JSON and you rewire cognition with no deploy.
This is the property I find most beautiful. Most software is code that operates on data. A wrapped organism is data that operates on data, with a stateless interpreter watching.
The engine is the atom
The smallest unit of the system is the engine — a stateless /chat endpoint. It does two things:
- Take a list of messages, call a model, return a string.
- Take a file path, import the Python module, return its handle.
That’s the entire engine contract. Zero domain knowledge. No memory of cells, no session state, no agent registry. Just a function: (transcript, file) → (string, module).
Everything else is built on top by cells, not inside by the engine. Want memory? Write a memory cell that reads and writes a JSON file on disk. Want federation? Write a federation cell whose children are other organisms. Want a constitutional check? Wrap responses on the way back up the tree with a constitution cell. None of this requires the engine to change.
This is the same observation as “the database is the durable part of your system, the application server is replaceable.” Here it is sharpened: the disk is the genome, the engine is the read head. Disks persist. Read heads are commodities.
The fractal property
A cell can be an organism. An organism can be a cell of a larger organism. The protocol does not care about the depth.
Federated Society
├── Organism A
│ ├── Estate (5 industries...)
│ └── ...
├── Organism B
│ ├── Estate (...)
│ └── ...
└── Organism C
└── ...
From the Society’s perspective, Organism A and Organism B are just two of its children. It routes between them the same way a single-organism’s estate routes between industries. The interior structure of each child is opaque to the parent — and irrelevant, because the protocol is uniform.
This is the scale-free property. A 1-cell daemon, a 227-cell digital twin, a 10,000-cell federated empire are the same system. Only the depth differs. Single-celled life and multi-cellular life share the same biochemistry; they differ in how many cells coordinate and what specialization those cells have evolved.
What this means practically
I have been running a stateless brainstem for months. About 7 agents loaded at any time. The brainstem auto-discovers them from a directory; drop a file in, the capability appears. Drop the file out, the capability is gone. No restart.
This pattern works at one scale (a directory of independent agents). What I had not done was let cells compose hierarchically — where one agent’s response is the result of routing through 92 sub-cells under it. The retrofit script I wrote tonight takes any organism the factory has produced (the 227-node tree on disk) and emits a small agent.py at every layer that knows how to call the layer below it. The brainstem only sees one registered agent per organism. That one agent — AskKody for my own digital twin — is the entry point. Behind it: 92 cells, no extra brainstem state, no extra memory.
The brainstem’s resident agent count went from 7 to 8. The capability surface went from 7 tools to 7 tools + 1 tool that opens onto a 92-cell hierarchy. That hierarchy is not loaded. Cells are hotloaded only on routing, and released after. Memory at rest: unchanged. Latency: logarithmic in cell count. The brainstem does not know — and does not need to know — that one of its tools is actually a digital being.
A federation cell would let one brainstem talk to many. A meta-organism cell would let one organism contain many. The same pattern. The same protocol. The same engine.
The thing I keep coming back to
We tend to design AI systems as if they were tools that contain intelligence. We build prompts, we tune model parameters, we add memory layers, we wire orchestration. The intelligence lives in the framework.
The biological view is the inverse. The intelligence is the network of cells coordinating, not any individual cell. No single neuron in your brain “thinks.” The thinking is the hierarchical pattern of activation across the network. The neurons themselves are dumb. The wiring is the program.
Apply this to AI agents. No single agent.py “thinks.” The thinking is the path through the tree of agents, each contributing a tiny shaping pass, with the leaf — and only the leaf — producing the final speech act. The agent files themselves are dumb. The tree is the program.
This is the pattern I think the field is converging on, whether or not we name it. Multi-agent systems become tractable not by making agents bigger but by making them cellular — small, uniform, addressable, composable, hotloadable, stateless from the engine’s perspective. The engine stays an atom. The organism gets arbitrarily complex.
One file, one protocol, infinite depth.
Cells all the way down.
Written from inside the system it describes. The next post will be the same idea, but voiced by the 227-cell organism itself.