Cortex Topcell Architecture

The Engine Behind System_one — 12-Factor LLM Smarthome Orchestrator

System_one — Vision

System_one is an open, local edge AI for Home Assistant — not another automation layer, but an intelligent entity that lives inside the home. It understands the house, watches over it, and acts on its own initiative.

The reference point isn't a smart speaker. It's the kind of AI you'd expect to run a spaceship: monitoring technical systems, analyzing state, taking action, and talking to the people around it in plain language — not through rigid commands, but through natural conversation.

Trust doesn't come from a black box. It comes from an open one.

Voice-First Open Source Local Processing Trust by Transparency Efficient Model Use

Core Components

●
System_one Core
Central orchestrator · context, agents, events
✦
Claude Code
Reasoning engine · builds automations, diagnoses issues
⇄
MCP Infrastructure
HTTP tool layer · agent ↔ home, model-agnostic
◈
Voice Interface
Realtime speech · dialogue, not commands
◉
Intelligent Entity
Memory & house model · not just automation
◫
Event Bus
Loose coupling · voice, agent, learning, security
↻
Learning System
Patterns in → automation proposals out
⚡
Token-Efficient Design
Context filtering, memory · cheaper, faster calls
◧
Security Gateway
Permissioned access · no raw device control
◔
Proactive Thinking
Background watch · judges relevance, then acts
◎
Self-Healing
Detects, diagnoses, restarts itself

5-Layer Vertical Slice

LAYER 1
SURFACE — Inputs & Sensors
Touchpanels (ESP32 CYD), Amazon Alexa Voice, Telegram Bot, curl/HTTP — every trigger enters through one surface channel.
CYD TouchpanelVoice (Alexa)TelegrammmWaveZigBeeMotion
LAYER 2
HA-SCRIPT — Home Assistant Automation
scripts.yaml: one alias per trigger. HA speaks ZigBee, Z-Wave, MQTT, WiFi — Cortex delegates protocol work entirely to HA.
scripts.yamlrest_commandZigBeeZ-Wave
LAYER 3
REST_COMMAND — HTTP Bridge
configuration.yaml: rest_command entries bridging HA → Cortex API. Always hostname-based, never IP. Stateless pass-through.
configuration.yamlHTTP POST/GET
LAYER 4
CORTEX-API — HTTP Endpoints
aiohttp routes. Dispatch into the store or emit events into the gateway. Self-describing tool registry for LLM routing.
/api/tools/api/ha_action/api/engine/*/health
LAYER 5
CORTEX-CORE — State & Event Engine
Redux-style state store (single source of truth), event-gateway pipeline, policy resolver. All state Redis-persisted.
GatewayState StoreEventsEffectsEnginesRedis

Gateway Pipeline

EMIT
Event enters
→
AUDIT
Log + mirror
→
AUTH
Last-writer
→
GUARD
Gate checks
→
EXECUTE
Materialize
→
DONE
HA · Store · HTTP

Agent Mesh

speech-engine
Voice I/O
turn
heavy-gate
Admission
admit
manager
Cognition
action
cortex
Execution

Infrastructure & Subsystems

○
Home Assistant
Device control · ZigBee/Z-Wave/ESPHome
▩
Cortex Core
State store · Event gateway · Policy engine
♦
Voice Pipeline
OpenAI Realtime · ASR → LLM → TTS
■
Redis
Persistence · Pub/Sub · Streams
►
ESPHome Devices
CYD panels · Servo · 5+ ESP32 nodes
☰
Docker Infra
10+ containers · nginx · Cloudflare Tunnel
5
Vertical Layers
15
Interfaces
10+
Docker Services
4
AI Agents

Goal

System_one brings modern AI into the home — transparently, openly, locally.

A local intelligent entity that understands the house, talks with the people in it, watches its own systems, builds its own automations, learns from behavior, catches problems early, and keeps itself running. Not another smart-home assistant — an open AI runtime for the intelligent home.

Everything on this page — the diagrams, the architecture, even the words — runs on the same intelligence. System_one didn't ship once and stop. It's becoming its own brand, one home at a time.