Architecture
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
| Component | Technology |
|---|
| Backend | Node.js 22 (ES modules) |
| Web Framework | Express |
| Database | PostgreSQL 17 with pgvector (vector search) |
| Frontend | React 19 + TypeScript + Vite |
| Process Manager | PM2 |
| Web Server | Nginx (reverse proxy with SSL) |
| Agent Runtime | Claude CLI (isolated user process) |
| Real-time | WebSocket |
How Agents Execute
When you send a message to an agent:
- Your message is saved to the database and queued
- The backend spawns (or resumes) an agent process via Claude CLI
- The agent runs as an isolated
agent user on the server
- The agent reads its instructions, skills, and context
- It processes your request, using tools as needed
- Responses stream back via WebSocket in real-time
- 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