AtomSpace is the foundational data structure at the heart of Hyperon — a typed, content-addressed metagraph that serves as both shared memory and control plane for all cognitive processes. It is the substrate in which knowledge, code, inference results, attention values, motivational states, and neural representations all coexist and interoperate.
Status: The AtomSpace concept and Space API abstraction are current — implemented in the reference Hyperon codebase (hyperon-experimental) and in MORK. The reference AtomSpace, MORK, and DAS backends are operational. Neural Spaces are experimental; blockchain-backed Spaces via F1R3FLY are proposed.
An AtomSpace is a generalization of a hypergraph. Where a traditional graph connects pairs of nodes with edges, and a hypergraph allows edges to connect arbitrary sets of nodes, a metagraph goes further: edges (Links) can themselves be members of other edges, and both nodes and links carry typed values. This recursive structure naturally represents the nested, multi-relational knowledge structures required for general intelligence — logical implications, probabilistic dependencies, procedural programs, and attention metadata can all be expressed as atoms within the same graph.
Every atom in AtomSpace is typed. The type system encodes data categories (symbols, numbers, expressions), function types, and logical connectives. The scope and enforcement of type constraints varies across backends — the reference implementation and MORK each handle types somewhat differently. MeTTa programs can introspect and manipulate the type structure itself.
A defining feature of AtomSpace is that programs and data share the same representation. A MeTTa function definition, a PLN inference rule, a MOSES-generated program, and a factual knowledge assertion are all atoms in the metagraph. This homoiconicity enables:
AtomSpace is accessed through a universal Space API that abstracts over multiple possible backends. A Space supports operations for adding, removing, querying, and pattern-matching atoms. Current and planned backends:
Atoms in AtomSpace are content-addressed — identified by what they contain rather than where they are stored. In MORK, this is implemented through content identifiers (CIDs) derived from the atom's path in the trie structure, enabling efficient verification and deduplication. Content addressing is what makes distributed and decentralized AtomSpaces practical: the same atom resolves to the same identifier regardless of which node stores it.
Atoms carry associated values beyond their structural content:
The AtomSpace concept originated in the OpenCog project as a C++/Scheme hypergraph database. The original implementation stored atoms in an in-memory graph with optional PostgreSQL persistence. In Hyperon, the concept has been generalized: AtomSpace is now an abstract interface (the Space API) that can be implemented on different backends — from MORK's prefix trees to DAS's distributed storage — while preserving consistent semantics for cognitive processes built on top of it.
Technical Deep Dive: AtomSpace Full — metagraph formal definition, Atom/Value distinction, TruthValue-to-FloatValue transition, Space API abstraction, classical C++ vs. Rust implementations, performance architecture, and historical design decisions.