Get started

System Architecture

Quox is the self-hosted control plane for AI agents. This guide explains how all the pieces fit together - from high-level concepts to technical implementation details.

The 30,000 foot view

Quox is the self-hosted control plane for AI agents. It gives agents real access to your infrastructure while you control what they can do, approve what matters, and keep proof of every governed action - you speak naturally, and it handles the technical details.

What problem does Quox solve?

Managing 50+ servers, containers, and services is complex. Traditional approaches require:

  • Memorizing dozens of CLI commands
  • SSH-ing into multiple machines
  • Manually tracking what is running where
  • Maintaining runbooks and documentation

Quox replaces this with a single conversational interface. You say "check disk space on all docker hosts" and it happens - no memorization, no manual SSH sessions.

The core idea

┌─────────────────────────────────────────────────────────────────────┐
│                         YOU (Natural Language)                       │
│                    "restart nginx on nw-web-01"                       │
└─────────────────────────────┬───────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────────┐
│                      Quox DASHBOARD (React)                       │
│                    Command Centre + Voice Interface                  │
└─────────────────────────────┬───────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────────┐
│                     ORCHESTRATION LAYER (QuoxFlow)                     │
│         Smart Router + Claude AI + Memory + Agent Hierarchy          │
└─────────────────────────────┬───────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────────┐
│                      INFRASTRUCTURE LAYER                            │
│              Bastion Host + QuoxAgent Agents + Your Servers                │
└─────────────────────────────────────────────────────────────────────┘

System components

Quox is composed of four main layers, each with a specific responsibility.

Layer 1: Frontend (what you see)

The Dashboard is a React web application with a voice-enabled interface. It provides:

ComponentPurpose
Command CentrePrimary interface with chat, monitoring, and management views
Voice InterfaceVoice-enabled assistant with animated eye visualization
Memory UIView and manage what Quox remembers about you
Agent ViewsMonitor specialized AI agents and their activities
Workflow BuilderCreate and deploy automation workflows

Why React? Fast, component-based development with excellent tooling. The modular design means new features can be added without touching existing code.

Layer 2: Orchestration (the brain)

This is where the magic happens. The orchestration layer includes:

ComponentWhat It DoesWhy It Matters
QuoxFlowWorkflow automation engine with governanceTyped execution, policy gates, audit trails
Claude AIUnderstands your intent, plans actionsNatural language understanding
Smart RouterPattern-matches common requestsFaster responses, reduced API costs
Memory SystemRemembers context, preferences, historyContinuity across conversations
Agent HierarchySpecialized agents for different domainsRight expertise for each task

Why QuoxFlow? Purpose-built for AI agent orchestration with typed inputs/outputs, policy gates, and full audit trails. Self-hosted - your data stays on your infrastructure.

Layer 3: Execution (the hands)

Commands need to reach your servers. This layer handles secure execution:

ComponentPurpose
Bastion HostSingle secure gateway to all infrastructure
QuoxAgent AgentsLightweight agents running on each managed host
SSH ConnectionsEncrypted command execution

Why a Bastion? Security. Your servers are not exposed directly. All access flows through a single, hardened entry point with full audit logging.

Layer 4: Infrastructure (your servers)

The actual hosts, VMs, containers, and services you are managing:

CategoryExamples
HypervisorsProxmox nodes running VMs and containers
Docker HostsContainers running applications
MonitoringGrafana, Prometheus, Uptime Kuma
StorageNAS, TrueNAS systems
NetworkpfSense, Pi-hole DNS

How data flows

Understanding how your request travels through the system helps you troubleshoot and extend Quox.

Request flow: text commands

1. You type: "check disk space on nw-web-01"
                    │
                    ▼
2. Dashboard sends to Collector API (/api/chat)
                    │
                    ▼
3. Smart Router checks: Is this a known pattern?
         │                        │
         │ YES                    │ NO
         ▼                        ▼
4a. Direct execution      4b. Send to Claude with context
    (faster, no AI cost)      - System prompt + self-knowledge
         │                    - Memory context (WSM + semantic)
         │                    - Agent-specific capabilities
         │                        │
         └────────────┬───────────┘
                      │
                      ▼
5. Execute command via QuoxAgent agent or SSH
                      │
                      ▼
6. Response flows back through same path
                      │
                      ▼
7. Dashboard displays formatted result

Request flow: voice commands

1. You speak into microphone
                    │
                    ▼
2. Audio sent to /webhook/transcribe
                    │
                    ▼
3. Whisper AI converts speech to text
                    │
                    ▼
4. Processed as text command (see above)
                    │
                    ▼
5. Response sent to /webhook/speak
                    │
                    ▼
6. ElevenLabs converts text to speech
                    │
                    ▼
7. Audio plays through speakers

Memory flow

Every Conversation
        │
        ├──▶ Episodic Memory (full logs, by date)
        │
        ├──▶ Semantic Memory (extracted facts, preferences)
        │
        ├──▶ Entity Memory (hosts, services, relationships)
        │
        └──▶ Working Set Memory (active context, open loops)

On Next Request
        │
        ├──◀ WSM provides current focus, recent entities
        │
        ├──◀ Semantic provides relevant learned facts
        │
        └──◀ Hybrid search ranks and retrieves context

Technology choices

Every technology choice has a reason. Here is why Quox uses what it uses.

Frontend stack

TechnologyWhy
React 19Component architecture, strong ecosystem, fast rendering
ViteLightning-fast dev server and builds (10x faster than Webpack)
React RouterClean URL-based navigation
CSS (custom)Full control over visual aesthetic, no framework bloat

Backend stack

TechnologyWhy
QuoxFlowTypeScript workflow engine with typed nodes, governance, and audit trails
DockerConsistent deployment, easy updates, isolation
Claude APIStrong reasoning for infrastructure commands
QdrantVector database for semantic memory search

Execution stack

TechnologyWhy
QuoxAgent (Go)Lightweight binary, compiles to single executable, low overhead
SSHIndustry standard for secure remote execution
Bastion patternSecurity best practice for infrastructure access

Why these choices?

  1. Self-hosted first - Your data stays on your infrastructure
  2. Extensible - Each component can be replaced or extended
  3. Observable - Full logging and audit trails throughout
  4. Performant - Smart Router bypasses AI for common patterns (cheaper, faster)

Agent architecture

Quox uses a hierarchical agent system where specialized agents handle different domains.

Agent hierarchy

Level 0: ORCHESTRATOR
         Quox (full access, coordinates all agents)
              │
              ├────────────────┬────────────────┐
              ▼                ▼                ▼
Level 1: MANAGERS
         WARDEN            DAEDALUS        (others)
         (Security)    (Infrastructure)
              │                │
              ▼                ▼
Level 2: SPECIALISTS
         CIPHER           VAULT           ORACLE
         (Network)       (Storage)       (Analytics)
              │
              ▼
Level 3: WORKERS (task-specific agents)

Level 4: OBSERVERS (read-only monitoring)

Agent domains

AgentDomainKey Capabilities
QuoxOrchestrationFull access, delegation, coordination
WARDENSecurityThreat detection, access control, auditing
DAEDALUSInfrastructureHost management, deployments, scaling
CIPHERNetworkNetwork ops, connectivity, troubleshooting
VAULTStorageBackup operations, storage management
ORACLEAnalyticsPattern detection, anomaly detection
ARCHIVISTMemoryKnowledge management, memory extraction

Why hierarchy?

  1. Separation of concerns - Each agent is expert in its domain
  2. Security boundaries - Agents only access what they need
  3. Escalation paths - Complex issues route to appropriate experts
  4. Parallel processing - Multiple agents can work simultaneously

Integration points

Quox is designed to integrate with your existing tools.

Inbound (things talking to Quox)

IntegrationMechanismUse Case
Web BrowserReact app on port 80Primary user interface
API ClientsAPI webhooksProgrammatic access
Voice InputWhisper transcriptionHands-free operation
Slack/TelegramQuoxMCP connectorsChat-based commands

Outbound (Quox talking to things)

IntegrationMechanismUse Case
Linux HostsSSH via bastionCommand execution
Docker HostsQuoxAgent agent APIContainer management
ProxmoxAPI (via QuoxFlow)VM and LXC control
MonitoringPrometheus/GrafanaMetrics and dashboards
NotificationsElevenLabs, SlackAlerts and responses

Extending Quox

New integrations follow this pattern:

  1. Add QuoxFlow workflow for the new service
  2. Register capability in the agent that owns the domain
  3. Add Smart Router pattern for common operations (optional)
  4. Update memory to track new entity types

Security model

Security is not an afterthought - it is built into every layer.

Defense in depth

LayerProtection
NetworkBastion host, no direct server exposure
AuthenticationSSH keys (no passwords in transit)
AuthorizationAgent permissions, memory domain boundaries
AuditAEE protocol logs every action with full envelope trail
ExecutionSafety levels (GREEN/BLUE/AMBER/RED) with approval gates

Safety levels

LevelDescriptionApproval Required?
GREENSafe, read-only operationsNo
BLUELow-risk, logged operationsNo
AMBERCaution, potentially impactfulYes
REDCritical, system-affectingExplicit authorization

What Quox never does

  • Store passwords in memory (credentials use SSH keys)
  • Execute commands without audit trail
  • Bypass safety gates for destructive operations
  • Expose internal services directly to internet

Key terms glossary

TermPlain English Explanation
AEE ProtocolA messaging format that ensures every action is logged and traceable
Bastion HostA secure gateway server - the single front door to your infrastructure
Context InjectionGiving Claude relevant information before it answers your question
QuoxAgentQuox Helper Agent - lightweight software running on each managed server
QuoxFlowWorkflow automation engine (TypeScript, audit-logged)
Smart RouterPattern matching that handles common requests without calling AI
SSHSecure Shell - encrypted protocol for running commands on remote servers
WSMWorking Set Memory - the active context Quox maintains about your current work
WebhookA URL endpoint that triggers an action when called

For technical readers

The sections above give the conceptual overview. Below is the detailed technical reference from the architecture documentation.


QUOX Architecture

This document describes the system architecture, tech stack, and project structure for QUOX.

Overview

Quox is the self-hosted control plane for AI agents. QuoxCORE, the platform this architecture describes, sits between agents and the systems they act on: enforcing policies and approvals, issuing scoped credentials, and recording verifiable evidence of every governed action.

Tech Stack

  • Frontend: React 19 + Vite + React Router
  • Styling: CSS (hal.css for voice interface)
  • Backend: n8n workflow automation (Docker)
  • AI: Claude API (Anthropic)
  • Voice: Whisper (OpenAI) for STT, ElevenLabs for TTS
  • Infrastructure: 50+ Linux hosts via SSH bastion

High-Level Architecture

Browser (React) → n8n Webhooks → Claude/APIs → SSH Bastion → Hosts

Voice Flow

Microphone → /webhook/transcribe → Whisper → text
text → /webhook/chat → Claude → response
response → /webhook/speak → ElevenLabs → audio

Project Structure

/home/control/quox-dashboard/
├── src/
│   ├── App.jsx              # Router setup
│   ├── main.jsx             # Entry point
│   ├── pages/
│   │   ├── HALHome.jsx      # Legacy voice interface
│   │   ├── CommandCenter.jsx # Main command center (primary UI)
│   │   └── views/
│   │       ├── WorkflowLibraryView.jsx  # Workflow template browser
│   │       ├── WorkflowBuilderView.jsx  # AI workflow builder
│   │       ├── InboxView.jsx            # HITL inbox
│   │       └── PluginsView.jsx          # Plugin management
│   ├── components/
│   │   ├── hal/             # Eye visualization components
│   │   ├── monitoring/      # Proxmox, Metrics, Uptime panels
│   │   ├── memory/          # Memory management UI
│   │   ├── activity/        # AEE activity views
│   │   ├── settings/        # Settings panels
│   │   ├── agents/          # Agent stream views
│   │   ├── mha/             # MHA components
│   │   ├── flowchart/       # Mermaid flowchart viewer
│   │   └── workflow/        # Workflow components
│   │       ├── WireMap/     # Visual n8n workflow viewer
│   │       │   ├── WireMap.jsx      # React Flow diagram
│   │       │   ├── WireMap.css      # Styling
│   │       │   ├── wireMapParser.js # n8n JSON parser
│   │       │   └── index.js         # Exports
│   │       ├── WorkflowChat.jsx     # AI chat builder
│   │       ├── WorkflowExplainer.jsx # Workflow analysis
│   │       └── CollectionImporter.jsx # ZIP/folder import
│   ├── services/
│   │   ├── memoryManager.js  # Memory system (episodic, semantic, entities)
│   │   ├── vectorMemory.js   # Qdrant vector store integration
│   │   ├── proxmoxClient.js  # Proxmox API client
│   │   ├── quoxContext.js # QUOX self-knowledge (hardwired)
│   │   ├── mhaClient.js      # MHA API client
│   │   ├── workflowLibrary.js # Workflow library search/filter
│   │   ├── workflowLoader.js  # On-demand workflow JSON loader
│   │   ├── capabilityIndex.js # Unified capability discovery
│   │   └── n8nClient.js       # n8n REST API client
│   ├── config/
│   │   ├── hosts.js          # Centralized host registry
│   │   ├── assistants.js     # Agent personalities/UI
│   │   ├── agentRegistry.js  # Agent capabilities/hierarchy
│   │   └── workflow-library-index.json # 1,340 indexed workflows
│   ├── lib/
│   │   └── aee/              # AEE protocol library
│   ├── test/
│   │   └── memoryManager.test.js # 103 tests
│   └── styles/
│       └── command-center.css # CommandCenter styling
├── public/
│   └── workflows/            # Symlink to workflow JSON files
├── scripts/
│   └── index-workflows.cjs   # Workflow indexer script
├── docs/                     # Documentation
└── dist/                     # Built files served by nginx

External Directories

/home/control/quox-memory/  # Persistent memory storage
├── profile/                 # User profile data
├── episodic/               # Conversation logs by date
├── semantic/               # Learned facts and preferences
└── projects/               # Project-specific memory

/opt/n8n/
├── docker-compose.yml       # n8n + dashboard services
├── .env                     # API keys (OPENAI, ELEVENLABS)
└── data/                    # n8n persistent data

/home/control/mha/           # MHA Helper Agent project
├── cmd/mha/                 # Daemon entry point
├── internal/               # Core implementation
├── configs/                # Configuration files
└── deploy/                 # Deployment scripts

Infrastructure Access

  • Bastion Host: nw-edge-gw-01 (10.20.0.2)
  • SSH User: control
  • Pattern: SSH through bastion to target hosts

Host Categories

CategoryHosts
Proxmoxproxmox01, proxmox02, proxmox03
Dockernw-worker-01, nw-worker-02, nw-worker-03, nw-worker-04
Monitoringgrafana01, prometheus01
Storagenas01, truenas01
Networkpfsense01, pihole01, pihole02

Context Injection

Claude receives system prompt with:

  • QUOX system identity and purpose
  • Full host inventory including IPs, roles, and relationships
  • Agent hierarchy (QUOX → SENTINEL/CIPHER/NOVA/GEMINI → specialists)
  • Assistant-specific self-knowledge (name, role, capabilities, rules, personality)
  • MHA documentation with installation commands
  • Current fleet status (connected agents, hosts without MHA)

Usage

javascript
import { formatContextForSystemPrompt } from '../services/quoxContext'

// Get full context with assistant-specific self-knowledge
const context = await formatContextForSystemPrompt(currentAssistant)

// Check if query is QUOX-related
import { isQuoxQuery } from '../services/quoxContext'
if (isQuoxQuery(text)) { /* special handling */ }

Session Continuity

Each conversation has a session_id for maintaining context across queries.

State Machine (Eye Visualizer)

IDLE (red) → LISTENING (blue) → THINKING (orange) → SPEAKING (green) → IDLE

Voice Modes

ModeElevenLabs VoicePersonality
AssistantRachel (21m00Tcm4TlvDq8ikWAM)Warm, helpful
CyberpunkArnold (VR6AewLTigWG4xSOukaG)Deep, commanding
PreciseAdam (pNInz6obpgDQGcFmaJgB)Measured, precise

Known Limitations

  1. Voice requires API keys (not pre-configured)
  2. SSH may fail if bastion connection drops
  3. Browser may block autoplay audio
  4. No authentication on dashboard (yet)
  5. Direct Proxmox API calls blocked by CORS (use n8n proxy)

Workflow System

WireMap Visual Viewer

The WireMap component renders n8n workflows as interactive diagrams:

  • Technology: React Flow (@xyflow/react v12.10.0)
  • Layout: Top-to-bottom DAG with automatic depth calculation
  • Features:
    • Category-colored nodes (trigger, AI, logic, io, storage, notify, transform)
    • Hover highlighting of connected paths
    • Click to select with detail panel
    • Smooth animated edges

Workflow Library

1,340 indexed workflow templates from AI Agent Vault collection:

  • Categories: ai-llm, communication, productivity, data-processing, integration, automation
  • Search: Full-text, category, integration, tag filtering
  • Schema: AEE-compatible manifests for unified discovery

Key Services

ServicePurpose
workflowLibrary.jsLibrary search, filter, stats
workflowLoader.jsOn-demand JSON loading via public symlink
capabilityIndex.jsUnified capability discovery across entities
n8nClient.jsn8n REST API for create/execute/status

Future RAG Collections

  1. n8n_workflows - 7000+ templates
  2. infrastructure_docs - Host configs
  3. conversations - Session history
  4. code_patterns - Reusable snippets