How CRHQ Works

Technical overview of CRHQ architecture — dedicated VPS, tech stack, real-time communication, and agent execution.

CRHQ is a dedicated AI agent platform — each instance runs on its own server with full isolation.

Dedicated VPS

Every CRHQ instance runs on its own Virtual Private Server (VPS) hosted on Hetzner Cloud. This means:

  • Full isolation — Your data, agents, and files are completely separate from other customers
  • Dedicated resources — CPU, RAM, and storage aren't shared
  • Consistent environment — Agents have a stable, predictable server to work with
  • 24/7 uptime — The server runs continuously, even when you're not using it

Tech Stack

ComponentTechnology
BackendNode.js 22 (ES modules)
Web FrameworkExpress
DatabasePostgreSQL 17 with pgvector (vector search)
FrontendReact 19 + TypeScript + Vite
Process ManagerPM2
Web ServerNginx (reverse proxy with SSL)
Agent RuntimeClaude CLI (isolated user process)
Real-timeWebSocket

How Agents Execute

When you send a message to an agent:

  1. Your message is saved to the database and queued
  2. The backend spawns (or resumes) an agent process via Claude CLI
  3. The agent runs as an isolated agent user on the server
  4. The agent reads its instructions, skills, and context
  5. It processes your request, using tools as needed
  6. Responses stream back via WebSocket in real-time
  7. The conversation is saved and indexed

Real-Time Communication

CRHQ uses WebSocket connections for real-time features:

  • Message streaming — Agent responses appear character by character
  • Status updates — Agent state changes (idle, running, error) update instantly
  • Browser screencasting — Live view of agent browser sessions
  • Notifications — Instant alerts for completed tasks

Database

PostgreSQL stores everything:

  • Sessions, messages, and conversation history
  • Agent configurations and instructions
  • Skills, recipes, and their versions
  • Memory entries with vector embeddings (pgvector)
  • Project documents and metadata
  • User accounts and sessions
  • Credentials (encrypted)
  • Job schedules and run history

File System

Agents have access to the server file system for:

  • Reading and writing files
  • Storing temporary work
  • Serving public downloads
  • Managing skill scripts