ASI Chain Runtime Environment Full

Approved by Ursula Addison on 2026-05-08

← Back to ASI Chain Runtime Environment

Responsible: Greg Meredith, Mike Stay

Papers: Meredith, Goertzel, Warrell, Vandervorst (2023), Meta-MeTTa (compilation to rho-calculus); Goertzel (2025), Hyperon Whitepaper §2.5, §3.4–3.5, §3.8; Goertzel (2025), TrueAGI State Management Platform

GitHub: asi-chain, F1R3FLY-io (org), MeTTa-IL, MeTTaTron

Documentation: docs.asichain.io

Status: ASI Chain infrastructure is under active development. The F1R3FLY engine, Rholang runtime, and MeTTa-IL compiler exist as in-progress implementations. MeTTaCycle integration with PeTTa and ChromaDB is operational in prototype. The full decentralized cognitive execution pipeline (inference settlement, CRDT state management, multi-party governance) is on the development roadmap.

This card provides technical depth beyond the concise ASI Chain index card and its subcards (F1R3FLY, MeTTa-IL, MeTTaCycle). ASI Chain is the blockchain runtime environment for decentralized AGI — a Layer 1 execution fabric designed for the massive, concurrent, graph-based workloads that cognitive systems produce.

Core Mechanisms

Dual-Engine Architecture. ASI Chain is powered by two complementary engines:

  • F1R3FLY handles deterministic infrastructure: consensus, state management, and concurrency. Grounded in Rholang (Reflective Higher-Order Process Calculus), it models every interaction as concurrent processes communicating over channels. Rholang extends the pi calculus (standard formalism for concurrent processes since the 1990s) with a critical additional property: reflection — programs can inspect and modify their own structure, enabling true metaprogramming. This reflective capability, absent in pi calculus, is described as "a necessary component for any real AGI" because cognitive self-modification requires a process to reason about and rewrite itself. (Provenance: blog/post, SingularityNET Medium — "One Step Closer to Human-Like AGI: Calculus of Concurrency", Apr 2023) BlockDAG data structures allow thousands of non-conflicting AI processes to execute in parallel.
  • MeTTaCycle hosts AGI cognitive processes — compiling and executing MeTTa workloads across Hyperon subsystems. It governs the dynamic evolution of AtomSpaces, using ChromaDB for embeddings/semantic operations and PeTTa for reasoning.

MeTTa-IL Routing. MeTTa-IL (Intermediate Layer) is the bridge between MeTTa programs and execution targets. It performs semantic analysis and determines routing:

  • Local execution: Logic needing low-latency reasoning is lowered to MORK for in-memory processing
  • Distributed execution: Logic requiring global synchronization is lowered to F1R3FLY's distributed path

MeTTa-IL is grounded in reflective higher-order pi-calculus with Object-Capability (Ocaps) security — access rights are unforgeable and mathematically verifiable. MeTTa-IL uses BNFC grammars to define algebraic theories (Monoid, Rig, Group, etc.) as module specifications, enabling formal verification of the compilation target.

RSpaces and Storage. F1R3FLY uses reified RSpaces and MORK PathMaps (specialized Merkle Tries) for programmable storage with high-efficiency structure sharing. LMDB provides durable low-latency persistence. RSpaces treat storage as a reactive system rather than static buckets — functioning simultaneously as blockchain, file system, or vector database depending on access patterns.

Effort Objects and Resource Metering

Any Internet-facing computational service must protect against denial-of-service attacks. Ethereum's solution — metering each virtual machine step with gas tokens — demonstrated that economically secured computation can scale to millions of transactions. Meta-MeTTa §6 applies this same principle to MeTTa's operational semantics, defining effort objects (EOs) as the native resource metering mechanism for decentralized MeTTa execution.

Formal Definition. The standard four-register MeTTa state \(\langle i, k, w, o \rangle\) is extended to a five-register model:

\[\langle i, k, w, o;\; eos \rangle\]

where the fifth register \(eos\) contains terms of the form \((h(p)\; eo)\), pairing a private-key-derived identity function \(h(p)\) with an effort object balance \(eo\). A polymorphic cost function \(\#\) maps terms to EO costs, and the EO domain forms a commutative group under \(+\) and \(-\), supporting additive accounting across transitions.

Resource-Bounded Transitions. Every rewrite rule in MeTTa's operational semantics is reprised with resource guards. A transition is permitted only when sufficient EOs remain: the cost \(c\) of each operation (computed from substitution sizes and result terms) must satisfy \((e + e') - c > 0\), where \(e\) is the EO balance carried by the triggering term and \(e'\) is the account balance in the \(eos\) register. If the balance is insufficient, the transition is blocked (the term remains unchanged and the account is preserved). Each term carries a cryptographic signature \(t_{\chi(p, eo)}\) binding it to its owner's identity and EO allocation.

Metered Operations. All six rewrite rules (Query, Chain, Transform, AddAtom, RemAtom, Output) and all builtin operations (Boolean, numeric, and string arithmetic) are metered. The cost of a Query or Chain includes the sum of unification costs \(\sum_i \#(\sigma_i)\) plus the sum of substituted result sizes \(\sum_i \#(u_i \sigma_i)\). Storage operations (AddAtom, RemAtom) cost \(\#(t)\) proportional to the stored term's size. This ensures that every computational and storage step on the decentralized network has a well-defined, verifiable price.

Compilation Correctness. The Meta-MeTTa paper proves that this resource-bounded semantics compiles correctly to Rholang. Theorem 2 establishes that resource-bounded MeTTa computations are bisimulation-equivalent to their Rholang translations: \(S_1 \approx S_2 \Leftrightarrow [\![S_1]\!]_M \approx [\![S_2]\!]_M\). The translation maps the \(eos\) register to a dedicated Rholang channel \(c\), with each transition checking and updating balances via channel reads and writes. When EOs are exhausted, the Rholang translation preserves the term and balance unchanged — graceful degradation rather than crash.

Mathematical / Formal Foundations

The State Management Platform design document describes the formal underpinnings for ASI Chain's cognitive state management:

  • Rholang and Process Calculi. Every AI instance runs as a process: \(\mathrm{AI}(s) = \mathtt{receive}(i).(o,s').\mathrm{AI}(s')\), supporting dynamic creation (fork), name-passing (capabilities), and secure routing. The rho-calculus provides reflective quoted names (\(@\mathrm{Term}\)) enabling processes to introspect their own structure via dereference (\(*\mathrm{Name}\)).
  • State-Transition Monoids. Each input induces an endomorphism \(\delta_i : S \to S\) on the state space; sequences form a free monoid. Snapshots after inputs \(i_1 \ldots i_n\) are \(s_n = \delta_{i_n} \circ \cdots \circ \delta_{i_1}(s_0)\), enabling precise replay and branching.
  • Coalgebraic Streams. Each AI instance defines streams of outputs and next states as an \(F\)-coalgebra. Final coalgebra uniqueness guarantees consistent replay semantics.
  • CRDT Join-Semilattices. For geo-distributed deployment, concurrent state branches merge via \(s_A \sqcup s_B\) with guaranteed convergence (associative, commutative, idempotent).
  • Lenses and Permissions. Category-theoretic lenses (get, put) project and update subviews of state, obeying round-trip laws. These map to Rholang contracts on MeTTaCycle for permissioned access control.

These foundations are described in the design document as the proposed mathematical architecture; the current implementation uses simpler mechanisms while this infrastructure is built out.

Inference Settlement

The whitepaper describes ASI Chain as targeting native inference settlement — verifying cognitive state transitions (reasoning steps) rather than just token transfers. The effort object mechanism provides the economic foundation: each inference step costs EOs proportional to its computational complexity, and the metered Rholang translation ensures that the blockchain can verify both the correctness of the inference and the proper deduction of resources. This means the blockchain can verify that a PLN inference chain is valid, that a self-modification satisfies admission certificates, or that a transferred skill maintained its SubRep guarantees. This capability depends on the full MeTTa-IL → F1R3FLY compilation pipeline being operational.

System Interfaces

  • MORK: Local execution target for low-latency cognitive processing. MeTTa-IL routes hot computation to MORK while using F1R3FLY for distributed consensus.
  • DAS: In decentralized mode, DAS event streams replicate across ASI Chain nodes with CRDT merging. DAS provides the persistence layer; ASI Chain provides the consensus and audit layer.
  • MeTTa: MeTTa programs compile to MeTTa-IL which targets either MORK (local) or Rholang (distributed) execution.
  • Self-Modification Pipeline: Staged deployment (shadow → dual-run → elevation) uses RSpace executors with capability-based security. All modification artifacts receive CIDs for immutable audit trails.

Deployment Modes

  • Single machine: ASI Chain can run locally, providing cryptographic provenance and audit without a distributed network.
  • Private cluster: Traditional cloud deployment (AWS, Azure, or smaller providers) with centralized consensus.
  • Public decentralized: The open ASI Chain network with geo-distributed nodes and CRDT-based eventual consistency.

Implementation Anchors

  • asi-chain — ASI Alliance blockchain runtime (Scala/Rust/TypeScript)
  • MeTTa-IL — Intermediate language with GSLT foundation and Rholang compilation
  • MeTTaTron — F1R3FLY-native MeTTa compiler

Current Status

  • Under development: F1R3FLY engine, Rholang runtime, MeTTa-IL compiler, MeTTaCycle prototype (PeTTa + ChromaDB)
  • Proposed: Native inference settlement, full CRDT state management, multi-party governance via smart contracts, RGB/Lightning/Ethereum protocol interop

Open Problems / Research Directions

  • Completing the MeTTa → MeTTa-IL → Rholang compilation pipeline with proven correctness
  • Calibrating effort object costs to real hardware performance (the polymorphic cost function \(\#\) must be tuned per deployment)
  • Scaling inference settlement to handle real-time cognitive workloads at blockchain consensus speeds
  • CRDT convergence for large, rapidly evolving AtomSpaces across geo-distributed nodes
  • Multi-protocol interop (RGB, Lightning, Ethereum) for broader Web3 integration

Status and Resources


Related cards: MeTTa Full · DAS Full · PRIMUS Full



Discussion