---
license: agpl-3.0
tags:
- snapkitty
- agents
- python
---
> Source: [github.com/SNAPKITTYWEST/nekomata](https://github.com/SNAPKITTYWEST/nekomata)
NEKOMATA 猫又
The Autonomous Container Engine
Infrastructure that rewrites itself.
---
```
███╗ ██╗███████╗██╗ ██╗ ██████╗ ███╗ ███╗ █████╗ ████████╗ █████╗
████╗ ██║██╔════╝██║ ██╔╝██╔═══██╗████╗ ████║██╔══██╗╚══██╔══╝██╔══██╗
██╔██╗ ██║█████╗ █████╔╝ ██║ ██║██╔████╔██║███████║ ██║ ███████║
██║╚██╗██║██╔══╝ ██╔═██╗ ██║ ██║██║╚██╔╝██║██╔══██║ ██║ ██╔══██║
██║ ╚████║███████╗██║ ██╗╚██████╔╝██║ ╚═╝ ██║██║ ██║ ██║ ██║ ██║
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
Infrastructure is code.
Code is data.
Data is alive.
```
---
## What Is This?
Nekomata is the **first AI-native container engine** built from first principles in Common Lisp. Not a Kubernetes alternative. A Kubernetes **replacement**.
The Nekomata (猫又) is a supernatural cat with two tails: **code** and **data**. In Common Lisp, these are the same thing. Infrastructure is s-expressions. Containers evaluate. They transform. They **rewrite themselves**.
```
╔══════════════════════════════════════════════════════════════════════╗
║ ║
║ Kubernetes: 50B of YAML debt on a distributed key-value store ║
║ Nekomata: s-expressions that evaluate their own infrastructure ║
║ ║
║ Kubernetes: Reactive watch loops waiting for state drift ║
║ Nekomata: Predictive LLM→ASM compilation of intent ║
║ ║
║ Kubernetes: Monolithic control plane (etcd + api-server + ...) ║
║ Nekomata: Sparse Mixture of Experts — 6 specialists, Top-K=2 ║
║ ║
║ Kubernetes: Immutable containers, no runtime modification ║
║ Nekomata: Live REPL injection + genetic self-modification ║
║ ║
╚══════════════════════════════════════════════════════════════════════╝
```
---
## Setup
```bash
# One command — installs Docker + SBCL + Quicklisp
bash setup.sh
```
Supports Ubuntu/Debian, Fedora/RHEL, Arch Linux, and macOS (via Homebrew).
Or manually:
```bash
# 1. Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER && newgrp docker
# 2. SBCL
sudo apt install sbcl # or: brew install sbcl
# 3. Quicklisp
curl -O https://beta.quicklisp.org/quicklisp.lisp
sbcl --load quicklisp.lisp --eval '(quicklisp-quickstart:install)'
# 4. Load Nekomata
cd nekomata && sbcl --load nekod.asd --eval '(ql:quickload :nekod)'
```
---
## Quick Start
```lisp
;; Load the system
(ql:quickload :nekod)
;; Start the daemon
(nekod:nekomata-main)
;; Define a container — infrastructure as code, literally
(nekod:define-container my-app
:image "nginx:latest"
:ports '((8080 . 80))
:env '((:NODE_ENV . "production"))
:restart-policy :always)
;; Self-healing failover chain
(nekod:with-failover my-app my-app-replica my-app-standby)
;; Drop into the live REPL
(nekod:nekod-repl)
```
---
## Architecture
```
┌─────────────────────────────────────────────────────────────────────┐
│ NEKOMATA ENGINE │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────┐ ┌──────────────┐ ┌──────────────────────────┐ │
│ │ CLI │ │ EVAL LOOP │ │ CONTAINER REGISTRY │ │
│ │ neko.lisp│──>│ nekod-repl │──>│ define-container │ │
│ └───────────┘ └──────────────┘ │ with-failover │ │
│ └──────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ SPARSE MoE ROUTER │ │
│ │ │ │
│ │ Input(8) ──> Gate Network ──> Top-K(2) ──> Softmax │ │
│ │ │ │
│ │ ┌──────────┬──────────┬─────────┬──────────┬──────────┬──┐ │ │
│ │ │SCHEDULING│NETWORKING│ STORAGE │ RECOVERY │ SECURITY │SC│ │ │
│ │ │ cron │ socket │ disk │ failover │ auth │al│ │ │
│ │ │ deploy │ http │ persist │ rollback │ encrypt │e │ │ │
│ │ │ queue │ route │ worm │ backup │ seal │ │ │ │
│ │ └──────────┴──────────┴─────────┴──────────┴──────────┴──┘ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ LLM → ASM COMPILER │ │
│ │ │ │
│ │ "scale nginx to 5" │ │
│ │ │ │ │
│ │ v │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ │ │
│ │ │ TOKENIZE │──>│ AST │──>│ CODEGEN │──>│ VERIFY │ │ │
│ │ │ intent │ │ extract │ │ x86/ARM │ │ bytes │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ └─────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ SELF-MODIFICATION │ │
│ │ │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ │ │
│ │ │ HOT-SWAP │ │ GENETIC │ │ STATE │ │ROLLBACK │ │ │
│ │ │ live fn │ │ evolution │ │ capture │ │ points │ │ │
│ │ │ redefine │ │ crossover│ │ snapshot │ │ restore │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ └─────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ DOCKER SUBSTRATE │ │
│ │ │ │
│ │ Unix Socket ──> HTTP/1.1 Protocol ──> Container Lifecycle │ │
│ │ /var/run/docker.sock │ │
│ │ │ │
│ │ create | start | stop | kill | list | inspect | stats │ │
│ │ pull | tag | prune | network | volume │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ SOCKET INGRESS PIPELINE │ │
│ │ │ │
│ │ /var/run/docker.sock │ │
│ │ │ │ │
│ │ v │ │
│ │ Unix Domain Socket (SBCL/CCL/IOlib portable) │ │
│ │ │ │ │
│ │ v │ │
│ │ Incremental HTTP Parser (chunked + content-length) │ │
│ │ │ │ │
│ │ v │ │
│ │ Docker /events Stream (infinite chunked consumption) │ │
│ │ │ │ │
│ │ v │ │
│ │ Compiled DFA Classifier (Thompson + subset construction) │ │
│ │ │ │ │
│ │ v │ │
│ │ 8-Feature Routing Vector ──> Top-K=2 Sparse MoE │ │
│ │ │ │ │
│ │ v │ │
│ │ Expert Dispatch + Deterministic Receipt │ │
│ │ │ │
│ │ Security: capability-based policy, path validation, │ │
│ │ DENY-by-default, no raw socket to untrusted agent │ │
│ │ │ │
│ │ Backpressure: high/low watermarks, queue depth cap, │ │
│ │ event size limits, zero unbounded growth │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
```
---
## The 5-Layer Stack
```
LAYER 5: SELF-MODIFICATION
┌────────────────────────────────────────────┐
│ Genetic evolution loop │
│ Hot-swap live function redefinition │
│ State capture + rollback points │
│ Tournament / roulette selection │
└────────────────────────────────────────────┘
│
LAYER 4: LLM → MACHINE CODE
┌────────────────────────────────────────────┐
│ Intent tokenization │
│ AST extraction (infra-ast struct) │
│ x86-64 + ARM64 code generation │
│ Byte-level verification │
│ Constraint algebra (cpu/mem/latency) │
└────────────────────────────────────────────┘
│
LAYER 3: SPARSE MoE ROUTING
┌────────────────────────────────────────────┐
│ 6 domain experts │
│ Noisy Top-K gating (k=2) │
│ Load-balance loss │
│ Xavier/Glorot trained weights (R pipeline) │
│ WORM-sealed gradient history │
└────────────────────────────────────────────┘
│
LAYER 2: REGEX MATHEMATICS
┌────────────────────────────────────────────┐
│ Kleene algebra (concat/union/star) │
│ DFA compilation + socket event filtering │
│ NL intent → regex pattern mapping │
│ Formal algebra at the wire level │
└────────────────────────────────────────────┘
│
LAYER 1: LISP CORE
┌────────────────────────────────────────────┐
│ s-expression infrastructure DSL │
│ Container lifecycle management │
│ Docker Engine API (Unix socket) │
│ Condition system + restarts │
│ Image persistence (save/restore world) │
└────────────────────────────────────────────┘
```
---
## User Guide
### Container Management
```
╔══════════════════════════════════════════════════════════════╗
║ COMMAND DESCRIPTION ║
╠══════════════════════════════════════════════════════════════╣
║ neko run Create and start a container ║
║ neko stop Stop a running container ║
║ neko kill Force-kill a container ║
║ neko list List all managed containers ║
║ neko status Show system status + expert load ║
║ neko evolve Run one generation of evolution ║
║ neko repl Drop into the Nekomata REPL ║
║ neko save Snapshot current world state ║
╚══════════════════════════════════════════════════════════════╝
```
### Container DSL Examples
```lisp
;; ─── Basic Container ────────────────────────────────────────────
(define-container web-server
:image "nginx:alpine"
:ports '((80 . 80) (443 . 443))
:env '((:WORKER_PROCESSES . "auto"))
:restart-policy :always)
;; ─── Database with Persistent Volume ────────────────────────────
(define-container postgres-db
:image "postgres:16"
:ports '((5432 . 5432))
:env '((:POSTGRES_PASSWORD . "sovereign")
(:POSTGRES_DB . "nekod"))
:volumes '(("/data/pg" . "/var/lib/postgresql/data"))
:restart-policy :unless-stopped)
;; ─── Failover Chain (automatic promotion) ───────────────────────
(with-failover postgres-db postgres-replica postgres-standby)
;; ─── Natural Language Intent ────────────────────────────────────
(nekod-eval "scale web-server to 5 replicas with 512mb memory limit")
;; => Compiles to ASM, verifies bytes, executes container operations
```
### The REPL
```
╔══════════════════════════════════════════════════════════════╗
║ NEKOMATA REPL v1.0 ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ nekod> (list-containers) ║
║ => (# ║
║ # ║
║ #) ║
║ ║
║ nekod> (route-intent "deploy new redis cluster") ║
║ => Expert: SCHEDULING (0.72) ║
║ Expert: STORAGE (0.28) ║
║ Action: create-cluster redis 3 replicas ║
║ ║
║ nekod> (evolve-generation :population 20 :rounds 5) ║
║ => Generation 1: best-fitness 0.847 ║
║ Generation 2: best-fitness 0.891 ║
║ Generation 3: best-fitness 0.923 ║
║ ... ║
║ Winner: scheduling-expert-v3 (fitness: 0.961) ║
║ Hot-swapping into live router... ║
║ Done. ║
║ ║
║ nekod> (save-nekod-image "checkpoint-2026-08-08") ║
║ => World saved. 847 objects, 12.3MB. ║
║ WORM sealed: a8f3c91d... ║
║ ║
╚══════════════════════════════════════════════════════════════╝
```
---
## MoE Router — Sparse Expert Selection
```
┌─────────────────────────────────────────────┐
│ INPUT VECTOR (8 features) │
│ │
│ [is_proof, is_auth, is_code, is_system, │
│ complexity, entropy, confidence, urgency] │
└──────────────────────┬──────────────────────┘
│
v
┌─────────────────────────────────────────────┐
│ GATING NETWORK │
│ │
│ s_i = dot(W_i, h) + b_i + noise_i │
│ noise_i ~ N(0, softplus(W_noise · h)) │
│ │
│ Top-K selection (K=2) │
│ Softmax over selected ONLY │
└──────────────────────┬──────────────────────┘
│
┌────────────────┼────────────────┐
v v v
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ EXPERT A │ │ EXPERT B │ │ (inactive) │
│ prob: 0.72 │ │ prob: 0.28 │ │ prob: 0.00 │
└──────────────┘ └──────────────┘ └──────────────┘
│ │
v v
┌─────────────────────────────────────────────┐
│ OUTPUT = p_A * expert_A + p_B * expert_B │
└─────────────────────────────────────────────┘
```
### The 6 Experts
| Expert | Domain | Handles |
|--------|--------|---------|
| **SCHEDULING** | Time + orchestration | cron, deploy, queue, scaling events |
| **NETWORKING** | Connectivity | socket, http, routing, port management |
| **STORAGE** | Persistence | disk, WORM chains, volumes, snapshots |
| **RECOVERY** | Fault tolerance | failover, rollback, restart, backup |
| **SECURITY** | Auth + crypto | certificates, encryption, sealing |
| **SCALING** | Load management | replicas, sharding, capacity planning |
### Weight Training Pipeline
```
WORM Chain ──> R Feature Extraction ──> Xavier/Glorot Init
(.jsonl) (8 features) (W1: 8x16, W2: 16x6)
│
v
Forward Pass + Backprop
Binary Cross-Entropy Loss
│
v
WORM Seal (every 10 epochs)
SHA-256 weight hash
│
v
Export: router_weights.json
│
v
Lisp: load-trained-weights
Hot-loaded into live router
```
---
## LLM → Machine Code Compilation
```
╔══════════════════════════════════════════════════════════════╗
║ ║
║ "scale nginx to 5 with 256mb memory limit" ║
║ ║
║ │ TOKENIZE ║
║ v ║
║ [:scale :nginx :to :5 :with :256mb :memory :limit] ║
║ ║
║ │ AST EXTRACT ║
║ v ║
║ #S(INFRA-AST ║
║ :TYPE :SCALE ║
║ :TARGET "nginx" ║
║ :PARAMS (:COUNT 5 :MEMORY 268435456)) ║
║ ║
║ │ CODEGEN (x86-64) ║
║ v ║
║ #(#x48 #x89 #xF8 ; mov rax, rdi ║
║ #x48 #x6B #xC0 5 ; imul rax, 5 ║
║ #xC3) ; ret ║
║ ║
║ │ VERIFY ║
║ v ║
║ [OK] First byte valid (0x48 = REX.W prefix) ║
║ [OK] Last byte = 0xC3 (RET) ║
║ [OK] No privileged instructions ║
║ [OK] Length within bounds ║
║ ║
╚══════════════════════════════════════════════════════════════╝
```
### Supported Backends
| Backend | Status | Instruction Set |
|---------|--------|-----------------|
| **x86-64** | Production | REX prefix, MOV, ADD, IMUL, XOR, PUSH/POP, CALL, RET |
| **ARM64** | Production | Fixed-width 32-bit, MOV/MOVK, ADD, SUB, MUL, BR, RET |
---
## Self-Modification Engine
```
╔══════════════════════════════════════════════════════════════╗
║ GENETIC EVOLUTION LOOP ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ 1. POPULATION ║
║ Generate N candidate expert functions ║
║ ║
║ 2. EVALUATE ║
║ Run each candidate against real container workloads ║
║ Fitness = success_rate * latency_inverse * memory_eff ║
║ ║
║ 3. SELECT ║
║ Tournament selection (pool=4) OR roulette wheel ║
║ ║
║ 4. CROSSOVER ║
║ Swap s-expression subtrees between parents ║
║ Code IS data — crossover is tree surgery ║
║ ║
║ 5. MUTATE ║
║ Random subtree replacement, constant perturbation ║
║ ║
║ 6. HOT-SWAP ║
║ Winner replaces live expert function — zero downtime ║
║ Automatic rollback if fitness drops below threshold ║
║ ║
║ 7. SEAL ║
║ State captured, rollback point created, WORM sealed ║
║ ║
╚══════════════════════════════════════════════════════════════╝
```
---
## Regex Mathematics — Formal Algebra at the Wire
```
╔══════════════════════════════════════════════════════════════╗
║ KLEENE ALGEBRA PRIMITIVES ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ LITERAL(c) Match single character c ║
║ CONCAT(r1, r2) Sequence: r1 then r2 ║
║ UNION(r1, r2) Choice: r1 or r2 ║
║ KLEENE(r) Zero or more: r* ║
║ PLUS(r) One or more: r+ ║
║ OPTIONAL(r) Zero or one: r? ║
║ ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ DFA COMPILATION: ║
║ ║
║ regex-algebra.lisp ──> pattern-compiler.lisp ║
║ (algebraic form) (DFA states + transitions) ║
║ ║
║ dfa-step(state, char) => next-state ║
║ dfa-run(dfa, string) => accept | reject ║
║ ║
║ SOCKET FILTERING: ║
║ ║
║ Every Docker event passes through DFA filter ║
║ Pattern: container.(start|stop|die|kill) ║
║ Only matching events reach the MoE router ║
║ ║
╚══════════════════════════════════════════════════════════════╝
```
---
## Project Layout
```
nekod/
├── nekod.asd ASDF system definition
├── setup.sh One-command Docker + SBCL installer
├── README.md This file
├── LICENSE AGPL-3.0 + cloud provider poison pill
├── assets/
│ └── nekomata-avatar.png Production model avatar
│
├── core/ ─── LAYER 1: LISP CORE ───
│ ├── package.lisp Package definitions (nekod + nekod.docker)
│ ├── conditions.lisp Error hierarchy + restart system
│ ├── sexpr-infra.lisp Container DSL (define-container, with-failover)
│ ├── eval-loop.lisp Nekomata REPL (nekod-eval, nekod-repl)
│ ├── image-persist.lisp World state save/restore
│ └── nekomata.lisp Entry point + container registry
│
├── docker/ ─── DOCKER SUBSTRATE ───
│ ├── unix-sock.lisp Real Unix socket I/O (SBCL/CCL/IOlib)
│ ├── protocol.lisp Incremental HTTP/1.1 parser (chunked + CL)
│ ├── events.lisp Streaming /events consumer (infinite chunked)
│ ├── container.lisp Container lifecycle (create/start/stop/kill)
│ ├── image.lisp Image management (pull/list/tag/prune)
│ ├── network.lisp Network create/connect/disconnect
│ ├── volume.lisp Volume create/mount/prune
│ └── inspect.lisp Container + stats inspection
│
├── moe/ ─── LAYER 3: SPARSE MoE ───
│ ├── router.lisp Gating network (score, top-k, softmax)
│ ├── sparse-activate.lisp Noisy Top-K + load-balance loss
│ ├── expert-train.lisp Online weight updates from telemetry
│ ├── load-balance.lisp Expert utilization balancing
│ ├── load-trained-weights.lisp R-trained weight loader (JSON import)
│ └── experts/
│ ├── scheduling.lisp Cron, deploy, queue management
│ ├── networking.lisp Socket, HTTP, port routing
│ ├── storage.lisp Disk, WORM, volume persistence
│ ├── recovery.lisp Failover, rollback, restart
│ ├── security.lisp Auth, encryption, sealing
│ └── scaling.lisp Replicas, shards, capacity
│
├── regex-math/ ─── LAYER 2: KLEENE ALGEBRA ───
│ ├── regex-algebra.lisp RE structs (literal/concat/union/kleene)
│ ├── pattern-compiler.lisp Thompson NFA → subset DFA compilation
│ ├── socket-filter.lisp Compiled DFA event classifier + features
│ └── intent-parse.lisp NL intent → expert keyword mapping
│
├── socket/ ─── SOCKET INGRESS PIPELINE ───
│ ├── backpressure.lisp Watermarks, queue depth, size limits
│ ├── policy.lisp Capability-based security boundary
│ ├── receipt.lisp Deterministic operation receipts
│ └── agent-ingress.lisp Event → classify → route → dispatch
│
├── llm2asm/ ─── LAYER 4: LLM → MACHINE CODE ───
│ ├── tokenizer.lisp Intent tokenization + kernel map
│ ├── ast-extract.lisp infra-ast struct, intent type detection
│ ├── codegen.lisp AST → byte vector compilation
│ ├── verify.lisp Byte-level safety verification
│ ├── jit-link.lisp JIT stub (mmap + mprotect reference)
│ ├── constraint-build.lisp Constraint algebra (cpu/mem/latency)
│ └── backends/
│ ├── x86-64.lisp x86-64 instruction encoders
│ └── arm64.lisp ARM64 fixed-width instruction encoders
│
├── selfmod/ ─── LAYER 5: SELF-MODIFICATION ───
│ ├── gen-loop.lisp Genetic evolution loop
│ ├── hot-swap.lisp Live function redefinition + rollback
│ ├── state-capture.lisp State snapshots
│ ├── evolve.lisp Crossover + selection algorithms
│ └── rollback.lisp Rollback points, with-rollback macro
│
├── cli/ ─── USER INTERFACE ───
│ └── neko.lisp 8 CLI commands (run/stop/kill/list/...)
│
├── tests/
│ ├── test-core.lisp Core test suite
│ ├── test-edge-cases.lisp Edge case coverage
│ └── socket-tests.lisp Socket layer: 28 unit + 4 integration tests
│
└── docs/ ─── DOCUMENTATION ───
├── manifesto.org Why Nekomata exists
├── architecture.org 5-layer system design
├── moe-theory.org Sparse MoE mathematics
├── regex-calculus.org Kleene algebra formalism
└── migration.org Kubernetes escape route
```
---
## Why Common Lisp?
```
╔══════════════════════════════════════════════════════════════╗
║ ║
║ CODE = DATA ║
║ An s-expression describing a container IS that container. ║
║ No YAML. No templating. No string interpolation. ║
║ The description evaluates to the thing itself. ║
║ ║
║ CONDITION SYSTEM ║
║ Not try/catch. Restarts. When a container dies, the ║
║ condition system offers: restart, promote-replica, ║
║ rollback, or escalate. Decided at runtime, not design-time. ║
║ ║
║ IMAGE-BASED PERSISTENCE ║
║ Save the entire world to disk. Restore it later. ║
║ The running state IS the deployment artifact. ║
║ No container image layers. No registries. Just the world. ║
║ ║
║ MACROS ║
║ define-container is a macro. with-failover is a macro. ║
║ The language extends itself to become the domain. ║
║ Infrastructure IS language. Language IS infrastructure. ║
║ ║
║ HOT RELOAD ║
║ Redefine any function while the system runs. ║
║ No restart. No redeployment. The new code IS the system. ║
║ Genetic evolution swaps expert functions live. ║
║ ║
╚══════════════════════════════════════════════════════════════╝
```
---
## Migration from Kubernetes
```
╔══════════════════════════════════════════════════════════════╗
║ K8S → NEKOMATA MIGRATION PATH ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ Step 1: Install nekod alongside existing cluster ║
║ (nekod speaks Docker socket directly — no conflict) ║
║ ║
║ Step 2: Convert Deployment YAMLs → define-container forms ║
║ One YAML = one s-expression. Mechanical. ║
║ ║
║ Step 3: Wire failover chains ║
║ (with-failover primary replica standby) ║
║ ║
║ Step 4: Enable MoE routing ║
║ Expert weights train on YOUR workload patterns ║
║ ║
║ Step 5: Enable self-modification ║
║ The system evolves its own expert functions ║
║ ║
║ Step 6: Decommission K8s control plane ║
║ etcd, kube-apiserver, kube-scheduler — gone. ║
║ Nekomata IS the control plane now. ║
║ ║
╚══════════════════════════════════════════════════════════════╝
```
---
## Performance Characteristics
```
╔══════════════════════════════════════════════════════════════╗
║ METRIC VALUE ║
╠══════════════════════════════════════════════════════════════╣
║ Memory per expert ~2.3 KB (sparse activation) ║
║ Router decision latency <1ms (dot product + softmax) ║
║ Active experts per call 2 (Top-K=2, out of 6) ║
║ Agents at 2.3KB each 500+ sustainable ║
║ Code generation x86-64 + ARM64 native ║
║ Hot-swap latency ~0ms (defun redefinition) ║
║ World snapshot Full state in single file ║
║ Container start Direct Docker API (no etcd) ║
╚══════════════════════════════════════════════════════════════╝
```
---
## License
**AGPL-3.0** with cloud provider poison pill.
The engine is free. Sovereignty is not optional.
Any cloud provider deploying Nekomata as a hosted service MUST:
1. Release all modifications under AGPL-3.0
2. Provide users a prominent link to modified source
3. Not remove attribution to SnapKitty Collective
---
### 💼 Commercial License
Snapkitty code is free and open under **AGPL-3.0** for open-source use. Building a commercial product or service? A **proprietary commercial license** from Snapkitty Collective LLC lets you ship this code without the AGPL's source-sharing and network-use obligations.
**[→ Get a commercial license](mailto:A.parr@belespritdaccord.uk?subject=Commercial%20license:%20nekomata)** · A.parr@belespritdaccord.uk
## Credits
```
╔══════════════════════════════════════════════════════════════╗
║ ║
║ Architecture Ahmad Ali Parr ║
║ Engineering SnapKitty Collective ║
║ Model Avatar Nekomata — the two-tailed sovereign cat ║
║ Execution WORM-sealed, receipt-generating ║
║ ║
║ "Infrastructure that rewrites itself." ║
║ ║
╚══════════════════════════════════════════════════════════════╝
```
---
猫又 — The two-tailed cat that never dies.