Home
Labs / Research

ChimaeraOS

A freestanding operating system with an in-kernel LLM and a predictive-coding spiking neural network.

StatusMulti-year research, pre-v1.0
LanguageFreestanding C, x86-64
BootMultiboot2
NotA product. Not for sale.

What it is

ChimaeraOS is a freestanding x86-64 operating system written in C. There's no Linux underneath. No userspace in the conventional sense. Three actively-learning systems are integrated as one kernel-resident stack:

  • A local LLM (Qwen2, 0.5B to 2.5B) running inference directly inside the kernel, with LoRA adapter learning for continuous personalisation
  • A four-layer predictive-coding spiking neural network with spike-timing-dependent plasticity (PC-SNN + STDP) acting as the perception layer
  • A cognition daemon that routes user intent through tool calls, gated by a default-deny privacy broker

The research question driving this is whether genuine continuous learning is achievable in a single-process kernel architecture. Most OSes treat the model as a guest. ChimaeraOS treats the model as a citizen.

The LLM engine

Pure C transformer inference. SIMD-optimised with AVX2 for the matrix multiplications. The model loads at boot, lives in kernel memory, and serves inference requests through a syscall-like interface to the cognition daemon.

Why in-kernel

Userspace LLM inference adds context switch overhead and serialisation cost to every call. In-kernel inference treats the model the same way a memory allocator or a network stack is treated: as core kernel functionality, not as a guest workload. For an OS where the model is the primary interaction surface, this is the right placement.

Adapters are LoRA-based with a weekly retrain cycle. The base model stays frozen; the adapters carry the personalisation. This means the user's adaptation is portable across model upgrades, and the model itself stays auditable.

The perception layer (PC-SNN + STDP)

Four layers of spiking neurons with predictive coding and spike-timing-dependent plasticity. The job of this network isn't classification, it's summarisation. It compresses raw sensor input (keyboard, mic, USB events, filesystem activity, network traffic) into a stream of summary features that the cognition layer can reason about.

STDP gives it online learning: the network adapts to the user's actual patterns without requiring offline retraining. This is the part that makes the system "alive" in a way most OSes aren't.

The cognition daemon

Sits between the LLM and the rest of the kernel. Parses user intent into an action grammar, then routes the actions through a consent broker that enforces privacy policy on every tool call.

The consent broker defaults to deny. Every capability (file read, network call, sensor access) has to be explicitly granted, with the grant scoped in time and intent. This is the OS-level equivalent of capability-based security applied to LLM tool use.

Memory and vector storage

Two layers of memory: a User Sketch (compact, always-resident summary of who the user is and what they're doing) and an episodic memory (timestamped event log of interactions).

Vector index lives in a flat file at v0, with a planned migration to HNSW once the index size and query patterns stabilise. Anomaly detection runs on an Isolation Forest over the featurised event stream, with an "error-neuron summary" sitting on top to surface meaningful deviations to the cognition layer.

The destination architecture

SubsystemImplementation
Shellterminal, compositor, voice
Cognitionaction grammar, consent broker
LLM EngineQwen2, 0.5B to 2.5B
AdaptersLoRA, weekly retrain
MemoryUser Sketch, episodic log
Vector indexflat-file at v0, HNSW later
Anomaly detectionIsolation Forest
PerceptionPC-SNN, 4 layers, STDP
Privacy gatedefault-deny consent broker
Sensorskbd, mic, usb, fs, net
Networkvirtio-net, TLS 1.3, DNS
StorageFAT32, /home, /lived

Open research questions

Most of ChimaeraOS is a bet on questions that aren't fully answered yet:

  • Can in-kernel inference scale? The 0.5B to 2.5B range is what fits comfortably in current consumer-class kernel memory budgets. Whether the architecture scales past that without falling back to userspace is an open question.
  • Does PC-SNN summarisation outperform transformer-based featurisers on real OS event streams? Theoretically the energy profile is better. The empirical answer requires the data.
  • Can capability-based consent stay usable? Default-deny consent brokers usually fail not because they're insecure but because users get fatigued and approve everything. The cognition daemon needs to bundle requests in ways that respect that.

Why this matters for client work

ChimaeraOS isn't a product I'm trying to sell. But the design decisions inform everything else I build: how to think about latency budgets (it shows up in Meet-In), how to think about consent and privacy (it shows up in SASS-E's vault), how to think about evaluation harnesses for LLM systems (it shows up in Prompt Architect).

Research-grade systems engineering at this scale doesn't pay for itself. But it makes the other work sharper, and it's the reason I have opinions worth listening to about anything else on this site.

Status
Multi-year research project. Pre-v1.0. Engineering and research validation happen in parallel. Not a product. Not for sale.