XNCH is the control plane for responsible intelligence.

A FastAPI service managing every layer of AI governance — authentication, 4-tier memory, policy enforcement, audit, and autonomous learning. Deployed on a dedicated memory node, it is the source of truth for every decision an AI system makes.

XNCH does not generate responses. It provides the structure within which intelligent systems operate safely.

Core Beliefs

Intelligence must be guided, not just scaled.

Technology should deepen human capability, not erode it.

Calm, thoughtful systems will outlast reactive ones.

Serious infrastructure is built quietly before it is recognized loudly.

Memory System

XNCH implements a 4-tier memory architecture. Each layer serves a distinct purpose, balancing speed, persistence, and abstraction.

Layer 0

Sensory Buffer

Redis-backed perception signals — voice, vision, file events. High-throughput, ephemeral, auto-evicted. The system's immediate awareness of its environment.

Silence detection, screen diff monitoring, idle timeout.

Layer 1

Working Memory

Redis session context for active conversations. Preserves recent turns, current intent, and ephemeral state. TTL-bound, auto-expires after session timeout.

Session TTL: 120s. Supports concurrent contexts per actor.

Layer 2

Episodic Store

PostgreSQL with pgvector for persistent decision history. Each episode records an intent, action, outcome, and prediction delta. Supports semantic similarity search across past episodes.

Vector embeddings enable recall of relevant past decisions, not just exact matches.

Layer 3

Pattern Store & Graph

Extracted behavioral patterns stored in SQLite, with a Kuzu graph database for entity relationships. Patterns are mined every 6 hours — clusters of successful (or failed) decision sequences that inform future policy.

Pattern extraction requires ≥10 observations. Success rates, confidence scores, and context signatures drive continuous improvement.

Policy Engine

Every action proposed by an AI system passes through XNCH's policy engine before execution. Policies are defined as YAML rule sets, loaded from versioned directories, and evaluated against the current system state.

Dry-Run Check

Policy alignment is evaluated before a final decision is made. Warnings, modifications, or blocks are returned without side effects.

Authoritative Verdict

A second, binding evaluation issues a signed JWT execution token. BLOCK verdicts are written to the immutable decision ledger.

Autonomous Candidates

The system analyzes past outcomes and generates new policy candidates. Each candidate can be reviewed and approved through governance.

Governance

Actor Model

Every entity that interacts with the system has a role (ADMIN, OPERATOR, VIEWER, AGENT) and a capability set. Capabilities define what actions an actor is permitted to execute.

Weight Configuration

Decision-making weights (policy score, outcome score, risk score, context fit) are configurable per intent class. Changes go through a propose-approve flow with versioning.

Decision Ledger

All verdicts and policy decisions are written to an append-only audit trail. Every BLOCK is recorded with its full context for later review.

Autonomous Learning

XNCH runs a continuous learning loop at 6-hour intervals. Three subsystems operate autonomously:

Pattern Extractor

Mines episodic data for recurring decision patterns — clusters of successful or failed sequences — and stores them with confidence scores.

Score Adapter

Evaluates the accuracy of past scoring decisions. If accuracy falls below a configurable threshold (default 0.6), flags the weight configuration for review.

Policy Candidate Generator

Synthesizes new policy rules from observed patterns. Generated candidates remain in a PENDING state until approved through governance.

Security & Observability

5-Level Trust Model

Inputs are classified by trust level. Higher-risk inputs face stricter policy evaluation and may require human-in-the-loop escalation.

Injection Guard

All inputs are scanned for prompt injection attempts before reaching any LLM. Detected violations are logged and blocked.

Langfuse Tracing

Every LLM call, policy evaluation, and verdict is traced for observability. Full audit trail for debugging and compliance.

Event Log

System events are written to a JSONL audit file. Startup, shutdown, state changes, and anomalies are all recorded.

The Stack

XNCH runs on two dedicated Kubernetes nodes — no cloud dependency for inference.

Memory Node (i7)

Port 8001

PostgreSQL + pgvector
Redis
Kuzu Graph DB
SQLite
agentmemory

Inference Node (i9)

NVIDIA GPU, ≥20Gi VRAM

vLLM (primary inference)
LiteLLM Proxy (routing)
Gemma4 (default model)
llama.cpp (fallback)
Langfuse (observability)

We avoid startup clichés like 'revolutionary', 'disrupting', 'cutting-edge'. Instead, we focus on building infrastructure that matters.

Nexi

XNCH's first product — the adaptive AI that runs on top of this infrastructure. Nexi implements a 15-step decision pipeline with a YAML-defined character, policy alignment, and execution dispatch.