Operon 🧬
Functorial pattern spaces and verifiable interfaces for reliable AI agent systems
From cellular metaphor sprawl toward typed interfaces, cognitive light cones, and verifiable structural guarantees.
Core Direction (v0.40+)
Most agent systems fail structurally, not locally: correlated hallucinations slip past same-model reviewers, sequential chains accumulate handoff loss, fragmented toolsets incur $O(t \cdot n)$ discovery overhead, and unguarded loops exhaust budgets.
Rather than mirroring every organelle of a eukaryotic cell into software boilerplate, Operon follows the structural core of Michael Levin's Ingressing Minds (Philosophies 2026, 11(5):161)—and supplies the Applied Category Theory it lacks:
- Pattern Space as Typed Wiring + Replayable Invariants (
PatternSpec): Control patterns live in an abstract operad of typed wiring diagrams paired with mechanically replayableCertificateobligations. - Embodiments as Pointer Functors (
Realization): Natural, synthetic, and hybrid runtimes realize patterns via strict or lax monoidal functors. Strict realization transfers structural guarantees for free (Levin's "free lunches"); lax realization quantifies degradation explicitly (correlation $\rho$ in conjunctive verification, Data Processing Inequality handoff loss $\Delta I$, or embedding fidelity). - Bi-Temporal Cognitive Light Cones (
CognitiveLightCone+BiTemporalMemory): Combines optic-filtered wiring observations (obs_i) with valid-time and record-time horizons(t_v, t_r)to analyze multi-agent scaling and reconstruct exact past belief states. - Polycomputing Fibers (
PolycomputingFiber): Multiple pattern realizations sharing one physical/computational substrate through commuting read/write lenses.
(Scope note: Operon adopts methodological structuralism—formalizing pattern spaces, interfaces, and light cones mathematically while staying agnostic on phenomenal consciousness; full engagement with Levin's non-physicalist consciousness claims is reserved for future work.)
Five-Layer Architecture
Operon's canonical API is streamlined to ~65 focused exports across five layers:
| Layer | Module | Responsibility |
|---|---|---|
| 1. Core | operon_ai.core |
WiringDiagram, Optic, BarrierFilter, Coalgebra, PatternSpec, Realization, LaxityReport, PolycomputingFiber, Certificate, CognitiveLightCone, epistemic_analyze |
| 2. Memory | operon_ai.memory |
BiTemporalMemory, BiTemporalFact, BiTemporalQuery (canonical append-only dual-axis store) |
| 3. Motifs | operon_ai.motifs |
Proven control motifs only: ReviewerGate (CFFL), QuorumSensingBio (decay), Chaperone / ChaperoneLoop, ATP_Store / MTORScaler / DNARepair / Genome, ImmuneSystem / StagnationMonitor, DiffusionField, Tissue / TissueBoundary, PlasmidRegistry |
| 4. Runtime | operon_ai.runtime |
Single composable runtime (SkillOrganism, SkillStage, SpecialistSwarm, WatcherComponent, VerifierComponent, CertificateGateComponent, advise_topology, Nucleus, providers) |
| 5. Adapters | operon_ai.adapters |
ExternalTopology IR, CompilerFunctor, LangGraph & A2A/GasCity/AgentFlow/DSPy certificate contracts (operon_ai.adapters.contrib holds exploratory framework wrappers) |
Backward Compatibility: Deprecated cellular-roleplay wrappers (
Ribosome,Lysosome,Telomere,IntegratedCell,HistoneStore) and renamed protocols (DenatureFilter→BarrierFilter,EpiplexityMonitor→StagnationMonitor) remain available via PEP 562 lazy shims onoperon_ai(withDeprecationWarning) and underoperon_ai.legacy.
Installation
pip install operon-ai
Quick Start
1. Define a Pattern, Verify Strict vs. Lax Realization, and Query a Cognitive Light Cone
from datetime import datetime, timezone
from operon_ai import (
ATP_Store, BiTemporalMemory, CognitiveLightCone,
DataType, IntegrityLabel, ModuleSpec, PatternSpec,
PortType, Realization, WiringDiagram,
)
diagram = WiringDiagram()
diagram.add_module(ModuleSpec("generator", outputs={"draft": PortType(DataType.TEXT)}))
diagram.add_module(ModuleSpec("reviewer", inputs={"draft": PortType(DataType.TEXT)}))
diagram.connect("generator", "draft", "reviewer", "draft")
pattern = PatternSpec(
name="conjunctive_review_gate",
diagram=diagram,
obligations=("priority_gating",),
axioms=("independent_verifier",),
)
budget = ATP_Store(budget=100, silent=True)
realization = Realization(
pattern=pattern,
substrate_kind="hybrid",
bindings={"generator": "llm:fast", "reviewer": "symbolic:validator"},
certificates=(budget.certify(),),
)
report = realization.verify_ingression(lax_defects={"verifier_correlation_rho": 0.0})
assert report.strict and report.all_certificates_hold
cone = CognitiveLightCone.from_diagram(diagram, "reviewer", record_horizon=datetime.now(timezone.utc))
print(cone.spatial_width, cone.observable_modules)
2. Pattern-First Agent Runtime & Topology Advice
from operon_ai import (
BiTemporalMemory, MockProvider, Nucleus, SkillStage,
TelemetryProbe, advise_topology, reviewer_gate, skill_organism,
)
advice = advise_topology(task_shape="sequential", tool_count=2, subtask_count=3, error_tolerance=0.02)
print(advice.recommended_pattern, advice.suggested_api)
gate = reviewer_gate(
executor=lambda prompt: f"EXECUTE: {prompt}",
reviewer=lambda prompt, candidate: "safe" in prompt.lower(),
)
print(gate.run("Deploy safe schema migration").allowed)
fast = Nucleus(provider=MockProvider(responses={"route": "EXECUTE: billing"}))
deep = Nucleus(provider=MockProvider(responses={"billing": "EXECUTE: escalate"}))
organism = skill_organism(
stages=[
SkillStage(name="intake", role="Normalizer", handler=lambda task: {"request": task}, emit_output_fact=True),
SkillStage(name="router", role="Classifier", instructions="route", mode="fixed"),
SkillStage(name="planner", role="Planner", instructions="Use routing result.", mode="fuzzy"),
],
fast_nucleus=fast,
deep_nucleus=deep,
substrate=BiTemporalMemory(),
components=[TelemetryProbe()],
)
print(organism.run("Refund missing").final_output)
3. Framework-Neutral Portability & Certificates
from operon_ai.adapters import ExternalTopology, analyze_external_topology, langgraph_functor
from operon_ai.convergence.langgraph_compiler import run_organism_langgraph
Theory, Papers & Resources
Seven focused papers and the updated archival monograph live in article/:
- Monograph (
article/monograph.pdf): Biological Motifs for Agentic Control — functorial interface theory, correlated-error CFFL bounds, bi-temporal epistemic topology, equational diagram rewriting, and empirical boundary conditions. - Paper 7 (
article/paper7/main.pdf): Categorical Semantics of Ingressing Patterns — dedicated category-theoretic formalization of Levin (2026) (Ingressing Minds). - Papers 1–6 (
article/README.md): Epistemic topology, cross-framework convergence, meta-level generalization negative results, 10M+ trial structural-guarantee benchmarks (arXiv:2605.15225), categorical harness compilation (arXiv:2605.12239), and reflective evolution variance analysis. - Core 12 Canonical Examples (plus full historical example archive).
- Public Documentation: banu.be/operon (
docs/site/).
License
MIT
Metadata
Release files for operon-ai 0.40.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| operon_ai-0.40.0.tar.gz | 3.2 MB | With provenance | Details for operon_ai-0.40.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| operon_ai-0.40.0-py3-none-any.whl | Python 3 | none | any | Details for operon_ai-0.40.0-py3-none-any.whl |
Total release size: 3.6 MB
Release files / operon_ai-0.40.0.tar.gz
| Download URL | operon_ai-0.40.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44688f40aa20f3f717925b6198cce78442f436bcee4db24eb79cb7e462b85521
|
|
BLAKE2b-256 checksum How to use checksums |
66a9036c95488aad942d9d9c8572c23a1b6cb468bd51fe1714e01d23a9ef6edd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / operon_ai-0.40.0-py3-none-any.whl
| Download URL | operon_ai-0.40.0-py3-none-any.whl |
|---|---|
| Size | 386.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c856f3767f16c009459cbcbe91d2c77844505731d9a756454cecb8410ccc054
|
|
BLAKE2b-256 checksum How to use checksums |
47cf81fc36fe4d8db3664becc9be3735bbe280090a12ec7f069844854910be0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for operon-ai 0.40.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for operon_ai-0.40.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.