Skip to content

Overview

NEXUS is a microkernel. The kernel is approximately 500 lines of Python across 5 files. It handles routing, memory, messaging, auditing, and trust, nothing else. All intelligence lives in modules that run on top of it.

nexus/kernel/
├── cortex.py # message router + permission gate
├── engram.py # three-tier memory store
├── pulse.py # async pub/sub message bus
├── chronicle.py # immutable audit log
└── aegis.py # trust scoring engine

This separation means the kernel is stable and testable independently of the modules. Adding a new capability never requires touching the kernel.

Every user input follows the same path through the kernel before a module ever sees it:

1. User types message
2. Cortex receives it, parses routing keywords
3. Aegis checks trust score for the target module (must be > 0)
4. Chronicle logs the inbound message (timestamp, source, content hash)
5. Engram stores the message in working memory
6. Module receives (message, context) and executes
7. Engram stores the response in episodic memory
8. Chronicle logs the response and outcome
9. Pulse emits a completion event (other modules may subscribe)

No step is skipped. Every message, including internal module-to-module calls via Pulse, runs through the same trust gate and audit path.

These constraints are architectural commitments, not guidelines:

Local-first. The kernel never touches the network. No telemetry, no central server, no cloud dependency, architecturally enforced, not just policy. Two modules (Collective and Herald) can optionally connect peer-to-peer, but they are blocked by default and require explicit nexus allow --network consent. Even then, every outbound event is logged to Chronicle. There is no central server. Every machine owns its own data.

Lightweight kernel. The kernel runs standalone without any LLM. Connect a model when you’re ready, local open-source models via llama.cpp, Ollama, or vLLM, or cloud providers like OpenAI and Anthropic. Providers can be registered at runtime via the API.

Model-agnostic. The kernel communicates with any LLM over a standard HTTP API. Swap models by changing the provider configuration, no code changes required. Use open-source models for full sovereignty, or cloud APIs for convenience.

Apache 2.0 throughout. Every model recommended in the default configuration is MIT or Apache 2.0 licensed. NEXUS itself is Apache 2.0. It is legally redistributable in commercial products.

Append-only audit. Chronicle uses SQLite WAL mode with no DELETE or UPDATE operations. The audit record is immutable by design, not by convention.

Intelligence modules use the NexusModule interface. Agents use the AgentModule interface, which extends NexusModule with graduated sovereignty: five trust tiers that unlock progressively more capable behavior.

TierComponentsInterface
PerceptionOracle, SentryNexusModule
IntelligenceAtlas, Prism, CipherNexusModule
ActionWraith, Echo, Sigil, Herald, WeaveNexusModule
AdvancedSpecter, Serendipity, ForgeNexusModule
OrchestrationCouncil, AutonomicNexusModule
NetworkCollective, LegacyNexusModule
DifferentiationDream Loop, Adversarial, Tripwire, Provenance, Sandbox, Symbiosis, Consciousness, Ethical PrismNexusModule
Agents (Code)Vex, Arbiter, Carve, Remedy, Scaffold, Axiom, RuneAgentModule
Agents (Data)Flux, Vigil, Gauge, Quarry, LoomAgentModule
Agents (Business)Ledger, Tally, Mint, Redline, MandateAgentModule
Agents (Content)Scribe, Kindle, Thesis, CompassAgentModule
Agents (Ops)Bastion, Dispatch, Sentinel, MnemonicAgentModule
CommunityUser-contributed modules via community/modules/NexusModule
CoreGeneralNexusModule

NEXUS ships with 804 tests covering all kernel components, modules, agents, inference providers, messaging bridges, community ecosystem, and differentiation modules. The test suite requires no running LLM, all LLM calls are mocked. Run with:

Terminal window
pytest tests/ -v