Operon v0.13: Multicellular
Plasmid Registry, Denaturation Layers, and Tissue Architecture
operon-ai v0.13.0Summary
Operon v0.13 implements five paper concepts across three feature areas: Plasmid Registry for dynamic tool acquisition via horizontal gene transfer (Paper §6.2), Denaturation Layers for wire-level anti-injection filtering (Paper §5.3), and Multicellular Organization—metabolic-epigenetic coupling, cell type specialization, and tissue architecture (Paper §6.5). The release adds 64 new tests (760 total, zero regressions), 5 examples, and 2 interactive Gradio demos.
1. From Cells to Organisms
Previous releases built the individual cell: membrane, mitochondria, chaperone, ribosome, lysosome, nucleus. Each organelle does one thing well. But a cell in isolation is a bacterium. The interesting biology starts when cells specialize, group into tissues, and coordinate as organisms.
v0.13 crosses that threshold. An agent can now dynamically acquire tools from a shared pool (horizontal gene transfer), protect its wiring from injection cascades (denaturation), and participate in hierarchical multi-agent architectures where topology enforces security (tissues).
2. Plasmid Registry: Horizontal Gene Transfer
In molecular biology, plasmids are small circular DNA molecules that bacteria exchange via conjugation, transformation, or transduction. A bacterium that acquires a plasmid carrying an antibiotic resistance gene gains that capability without vertical inheritance. This is horizontal gene transfer (HGT)—the mechanism by which bacteria share tools.
The paper’s Equation 12 formalizes this for agents:
The tensor product $\otimes$ extends the agent’s polynomial interface with a new tool.
In implementation, the PlasmidRegistry acts as the environmental gene pool,
and Mitochondria.acquire() performs the uptake:
registry = PlasmidRegistry()
registry.register(Plasmid(
name="reverse",
description="Reverse a string",
func=lambda s: s[::-1],
tags=frozenset({"text"}),
))
registry.register(Plasmid(
name="fetch",
description="Fetch a URL",
func=lambda url: f"<html>{url}</html>",
required_capabilities=frozenset({Capability.NET}),
))
mito = Mitochondria(allowed_capabilities={Capability.READ_FS})
mito.acquire("reverse", registry) # OK
mito.acquire("fetch", registry) # Blocked: needs NET
mito.metabolize('reverse("hello")') # "olleh"
mito.release("reverse") # Plasmid curing
2.1 Capability Gating
The critical constraint is capability gating. A plasmid’s
required_capabilities must be a subset of the agent’s
allowed_capabilities. This prevents privilege escalation—an agent
restricted to filesystem reads cannot absorb a plasmid that requires network access,
regardless of what’s available in the registry.
Biological Parallel
Bacteria have restriction enzymes that degrade foreign DNA lacking the correct methylation pattern. Capability gating is the computational equivalent: only plasmids compatible with the agent’s security profile survive uptake.
2.2 API Surface
| Method | Description |
|---|---|
PlasmidRegistry.register() | Add a plasmid to the gene pool |
PlasmidRegistry.search() | Case-insensitive search by name, description, and tags |
PlasmidRegistry.list_available() | List all plasmids with metadata |
Mitochondria.acquire() | Capability-gated tool uptake from registry |
Mitochondria.release() | Remove tool (plasmid curing) |
operon_ai/organelles/plasmid.py,
Mitochondria.acquire() and .release() in operon_ai/organelles/mitochondria.py
3. Denaturation Layers: Anti-Prion Defense
Prion diseases (Creutzfeldt-Jakob, BSE) cascade because a single misfolded protein refolds its neighbors into the same pathological conformation. The analogy to multi-agent systems is prompt injection cascading: a compromised agent’s output, passed as input to the next agent, carries the injection payload forward through the pipeline.
The paper (§5.3) prescribes denaturation—wire-level transformation that destroys the syntactic structure injections rely on, without destroying semantic content. Like heat denaturing a protein unfolds its tertiary structure, these filters unfold the markup structure that carries the attack.
3.1 Four Filter Strategies
| Filter | Strategy | Targets |
|---|---|---|
StripMarkupFilter |
Pattern removal | Code blocks, ChatML (<|im_start|>), [INST] tags, XML role tags, role delimiters |
NormalizeFilter |
Canonical form | Lowercase, strip control chars, Unicode NFKC (collapses homoglyphs) |
SummarizeFilter |
Compression | Truncation + prefix, whitespace collapsing |
ChainFilter |
Composition | Apply multiple filters in sequence (left-to-right) |
3.2 Wire-Level Integration
Filters attach to wires, not to modules. The Wire dataclass gains an optional
denature field, and DiagramExecutor applies the filter automatically
as data flows through the wire:
diagram = WiringDiagram()
diagram.add_module(ModuleSpec(
name="agent_a",
outputs={"resp": PortType(DataType.TEXT, IntegrityLabel.VALIDATED)},
))
diagram.add_module(ModuleSpec(
name="agent_b",
inputs={"data": PortType(DataType.TEXT, IntegrityLabel.VALIDATED)},
))
diagram.connect(
"agent_a", "resp", "agent_b", "data",
denature=ChainFilter(filters=(
StripMarkupFilter(),
NormalizeFilter(),
)),
)
Why Wire-Level?
Filtering at the wire level rather than the module level is the key design decision. Module-level filtering depends on each agent implementing it correctly—a behavioral property. Wire-level filtering is a topological property: it’s enforced by the wiring diagram itself, regardless of what the modules do. Safety from structure, not from strings.
3.3 Backward Compatibility
The denature field defaults to None. Existing wires, diagrams, and
executor calls work unchanged. The filter is only applied when explicitly attached. This makes
denaturation opt-in and composable: you can denature inter-tissue wires while leaving intra-tissue
wires raw.
operon_ai/core/denature.py (filters),
Wire.denature in operon_ai/core/wagent.py,
denaturation block in DiagramExecutor.execute() in operon_ai/core/wiring_runtime.py
4. Multicellular Organization
The remaining three features complete the paper’s §6.5 hierarchy: Cell → Tissue → Organ → Organism.
4.1 Metabolic-Epigenetic Coupling
Memory retrieval now costs energy. A MetabolicAccessPolicy defines which marker
strengths are accessible at each metabolic state:
| Metabolic State | Accessible Markers | Analogy |
|---|---|---|
| FEASTING / NORMAL | All (WEAK+) | Fed cell: full chromatin access |
| CONSERVING | STRONG+ only | Stressed cell: silences weak enhancers |
| STARVING | PERMANENT only | Starving cell: only constitutive genes active |
| DORMANT | None | Dormant spore: full chromatin compaction |
The coupling is optional. HistoneStore without an energy_gate behaves
exactly as before.
4.2 Cell Type Specialization
Every cell in your body shares the same DNA but expresses different gene programs. A neuron silences muscle genes; a liver cell silences neuron genes. The same genome, different phenotypes.
CellType + ExpressionProfile implement this pattern. A
CellType defines which genes to overexpress, silence, or leave at baseline.
Calling differentiate(genome) produces a DifferentiatedCell with
the appropriate configuration:
classifier = CellType(
name="Classifier",
expression_profile=ExpressionProfile(overrides={
"classification": ExpressionLevel.OVEREXPRESSED,
"verification": ExpressionLevel.SILENCED,
}),
required_capabilities={Capability.NET},
)
cell = classifier.differentiate(genome)
4.3 Tissue Architecture
Cells form tissues—groups sharing a morphogen gradient and a security boundary
(TissueBoundary). The boundary defines:
- Input/output ports—typed channels for inter-tissue communication
- Allowed capabilities—the maximum capability set for any cell in the tissue
A cell’s required_capabilities must be a subset of its tissue’s
allowed_capabilities. This is capability isolation at the organizational level:
a validation tissue with no capabilities cannot contain a researcher cell that requires network access.
Tissues export themselves as ModuleSpec objects, so they can be composed into
organism-level WiringDiagrams:
organism = WiringDiagram()
organism.add_module(classification_tissue.as_module())
organism.add_module(research_tissue.as_module())
organism.add_module(validation_tissue.as_module())
organism.connect("ClassificationTissue", "label",
"ResearchTissue", "query")
organism.connect("ResearchTissue", "findings",
"ValidationTissue", "draft")
Compositionality
The same WiringDiagram that wires modules within a cell also wires
tissues within an organism. This is the category-theoretic compositionality the paper
prescribes: the same mathematical object at every level of the hierarchy.
operon_ai/multicell/cell_type.py,
operon_ai/multicell/tissue.py,
operon_ai/state/metabolism.py (MetabolicAccessPolicy)
5. Test Coverage
| Suite | Tests | Status |
|---|---|---|
| Denaturation Layers | 35 | All pass |
| Plasmid Registry / HGT | 29 | All pass |
| Metabolic-Epigenetic Coupling | 14 | All pass |
| Cell Type Specialization | 18 | All pass |
| Tissue Architecture | 14 | All pass |
| Existing (regression) | 650 | All pass |
| Total | 760 | All pass |
6. Examples and Demos
6.1 Examples
| Example | Feature |
|---|---|
56_metabolic_epigenetic_coupling.py | Cost-gated memory retrieval under metabolic pressure |
57_cell_type_specialization.py | Differential gene expression → agent phenotypes |
58_tissue_architecture.py | Hierarchical multi-agent organization with capability isolation |
59_plasmid_registry.py | Dynamic tool acquisition with capability gating |
60_denaturation_layers.py | Wire-level anti-injection filters |
6.2 Interactive Gradio Demos
Two new Hugging Face Spaces provide interactive exploration:
- space-plasmid—Create agents with specific capabilities, browse the registry, acquire/release tools, and execute them. Includes a guided scenario walkthrough.
-
space-denature—Paste injection payloads and see how each filter
transforms them. Includes a wire comparison tab showing raw vs. denatured data flow
through a live
DiagramExecutor.
7. What’s Next
The highest-priority items for v0.14 are:
- Coalgebraic State Machines (Paper §4.2)—Formalize agent behavior as coalgebras with bisimulation equivalence, enabling provable behavioral guarantees.
- Morphogen Diffusion (Paper §6.4)—Move from global shared gradients to locally diffused morphogen fields with spatial decay, enabling true position-dependent agent behavior.
- Optic-Based Wiring (Paper §3.3)—Replace the current lens-based port model with full optics (prisms, traversals), enabling more expressive wiring patterns.
Code and examples: github.com/coredipper/operon