AGISystem2 implements a layered architecture where each layer has well-defined responsibilities and interfaces. The system transforms natural language into geometric representations, performs reasoning operations on those representations, and produces explainable results. This document provides an overview of the system's structure and the interaction between its components.
AGISystem2's five architectural layers. Each layer depends only on the layers below it.
The Geometry Layer forms the foundation of the system, providing the mathematical primitives that underpin all knowledge representation: vector allocation, distance computation, and geometric shapes. All operations are deterministic, using int8 arithmetic with saturation to prevent overflow. The layer is pure—no state escapes, and the same inputs always produce the same outputs. Key components include VectorSpace, MathEngine, BoundedDiamond, and RelationPermuter.
Above it, the Knowledge Layer manages the storage and organization of concepts, represented as bounded diamond shapes in the vector space. The ClusterManager decides when to expand existing diamonds or create new ones, while TheoryStack enables layered contexts that can hold contradictory information without corrupting base knowledge. See the Knowledge Layer Reference for details on ConceptStore and TheoryLayer.
The Reasoning Layer performs inference operations over the knowledge base. The Reasoner orchestrates different reasoning modes: deduction (inclusion checks), abduction (inverse probes), analogy (geometric translation), counterfactuals (temporary layers), and temporal reasoning (vector rotation). Results include confidence bands and full provenance traces. Other components include Retriever for LSH-based candidate selection, BiasController for fact/value separation, and ValidationEngine for consistency checking.
The Language Layer transforms structured Sys2DSL commands into operations on the knowledge base. The DSL Parser validates syntax and builds abstract representations, while the Fact Encoder transforms parsed structures into geometric points by applying relation-specific permutations and combining vectors with clamped addition. See the Language Layer Reference for Grammar Rules and Query Compiler details.
Finally, the Interface Layer provides the public API surface. EngineAPI exposes high-level methods for ingestion, querying, and administration. AgentSystem2 and Session provide stateful wrappers for multi-step interactions. TranslatorBridge can normalize natural language to constrained grammar when used with an external LLM. See the API Reference for usage details.
Request processing flow. Commands enter through the Interface Layer, are parsed and encoded in the Language Layer, stored or queried in the Knowledge Layer, reasoned about in the Reasoning Layer, and results returned through the Interface Layer with full provenance.
Every operation in AGISystem2 is deterministic. Seeds for permutations and hashes are drawn from configuration and logged. All arithmetic uses int8 with saturation—no floating-point operations, no stochastic sampling. Given the same input and theory stack, the system always produces the same output. This property is essential for auditability, testing, and reproducibility.
Each layer has a single, well-defined responsibility. The Geometry Layer knows nothing about concepts; it only manipulates vectors. The Knowledge Layer knows nothing about reasoning; it only stores and retrieves shapes. This separation makes the system easier to understand, test, and modify.
Every answer includes a provenance trace that explains how it was derived. The trace records which concepts were retrieved, which distances were computed, which theory layers were consulted, and which reasoning steps were applied. This trace can be inspected by humans or auditing tools.
Theory layers compose cleanly. A layer can override specific dimensions of a concept without affecting others. Multiple layers can be stacked to represent different contexts, hypotheticals, or perspectives. Layers can be pushed, popped, saved, and loaded independently.
| Module | Layer | Responsibility | Documentation |
|---|---|---|---|
VectorSpace |
Geometry | Int8 array allocation and basic operations | Geometry |
MathEngine |
Geometry | Masked L1 distance, permutation, rotation | Geometry |
BoundedDiamond |
Geometry | Concept shape with min/max/center/radius | Geometry |
RelationPermuter |
Geometry | Relation-specific permutation tables | Geometry |
ConceptStore |
Knowledge | Persistent concept storage and retrieval | Knowledge |
ClusterManager |
Knowledge | Diamond expansion and splitting | Knowledge |
TheoryStack |
Knowledge | Layered context composition | Knowledge |
Reasoner |
Reasoning | Inference orchestration | Reasoning |
Retriever |
Reasoning | LSH-based candidate retrieval | Reasoning |
BiasController |
Reasoning | Fact/value separation, fairness modes | Reasoning |
DSL Parser |
Language | Sys2DSL command parsing | Language |
EngineAPI |
Interface | Public API surface | API |