Implementation Phases

A 10-week build plan across 5 phases — from infrastructure provisioning to public launch. Each phase has clear deliverables, owners, and success criteria.

01

Phase Overview

Phase 1
Infrastructure
Weeks 1–2
Hetzner setup Supabase schema Redis cluster CI/CD pipeline
Phase 2
Core Agent
Weeks 3–4
VM provisioner Agent runtime Memory system Skill engine
Phase 3
Integrations
Weeks 5–6
Composio + MCP 14 service connectors OAuth flow Tool registry
Phase 4
Messaging
Weeks 7–8
Telegram bot Discord bot Slack app WhatsApp API
Phase 5
Launch
Weeks 9–10
Web dashboard Billing (Stripe) Load testing Public launch
02

Phase 1 — Infrastructure (Weeks 1–2)

Establish the foundational infrastructure: Hetzner Cloud account, Supabase project, Redis cluster, and CI/CD pipeline. No user-facing features in this phase — purely backend scaffolding.

1.1 Hetzner Cloud Setup Week 1

Create Hetzner Cloud project. Configure networking: private network 10.0.0.0/16, firewall rules (SSH port 22 restricted to ops IPs, all outbound allowed). Set up SSH key management. Create base VM snapshot (Ubuntu 22.04 LTS, Docker, Node.js 20, Python 3.11) used for all user VM provisioning.

Owner: Infrastructure Done when: Base snapshot created, networking validated
1.2 Supabase Schema Week 1

Create Supabase project. Run migrations for all 8 core tables: hermes_users, hermes_vms, hermes_connections, hermes_memory, hermes_skills, hermes_cron_jobs, hermes_conversations, hermes_usage. Enable Row Level Security on all tables. Create service role key for backend access.

Owner: Backend Done when: All tables created, RLS policies active, migrations in version control
1.3 Redis Cluster Week 1

Deploy Redis 7 on a dedicated Hetzner CX21 (2 vCPU, 4GB RAM). Configure persistence (AOF + RDB). Set up pub/sub channels: hermes:messages:{user_id}, hermes:events:{user_id}. Configure maxmemory policy (allkeys-lru, 3GB limit). Enable TLS for all connections.

Owner: Infrastructure Done when: Redis running, pub/sub tested, TLS verified
1.4 CI/CD Pipeline Week 2

Set up GitHub Actions workflows: test.yml (runs on every PR), deploy-staging.yml (merges to develop), deploy-prod.yml (merges to main, requires manual approval). Configure secrets management via GitHub Secrets. Set up Sentry for error tracking in both staging and production environments.

Owner: DevOps Done when: All 3 workflows passing, staging auto-deploys on merge
1.5 Monitoring Stack Week 2

Deploy Prometheus + Grafana on a shared monitoring VM. Configure exporters: Node Exporter on all VMs, Redis Exporter, custom Hermes metrics (active VMs, message throughput, tool call latency). Set up PagerDuty alerts for: VM provisioning failures, Redis down, API error rate >1%, p99 latency >5s.

Owner: Infrastructure Done when: Grafana dashboards live, PagerDuty alerts tested
03

Phase 2 — Core Agent (Weeks 3–4)

Build the VM provisioner, Hermes Agent runtime, memory system, and skill engine. By end of Phase 2, a user can be provisioned a VM and have a working agent conversation via direct API call.

2.1 VM Provisioner Service Week 3

Build vm-provisioner microservice (Node.js). Implements: POST /provision (creates Hetzner VM from base snapshot, installs agent, returns VM details), DELETE /deprovision/:vm_id (destroys VM, archives data), GET /status/:vm_id (health check). Target provisioning time: <3 minutes. Handles retry logic for Hetzner API failures.

Owner: Backend Done when: Provisioning completes in <3min, deprovisioning tested
2.2 Hermes Agent Runtime Week 3

Build the core agent loop (Python). Implements: message ingestion from Redis, context assembly (conversation history + memory + skills), LLM API call (Claude Haiku default), tool execution loop, response streaming back to Redis. Supports multi-turn conversations with up to 200k token context window. Handles tool call errors with graceful fallback.

Owner: AI/ML Done when: Agent completes 10-turn conversation, tool calls execute correctly
2.3 Memory System Week 4

Implement vector memory using pgvector (Supabase). Auto-extraction: after each conversation turn, agent identifies facts/preferences worth storing and embeds them (text-embedding-3-small). Retrieval: semantic search on hermes_memory table, top-5 results injected into context. Manual commands: /remember, /forget, /memory. Memory decay: entries not accessed in 90 days get lower retrieval weight.

Owner: AI/ML Done when: Memory persists across sessions, semantic retrieval accuracy >80% on test set
2.4 Skill Engine Week 4

Implement skill learning and execution. After task completion, agent evaluates if the task sequence is worth storing as a skill (heuristic: >3 steps, novel pattern). Stores as structured JSON in hermes_skills. On new task, semantic search against skills — if match >0.85 similarity, agent uses skill as execution template. Skill refinement: updates skill on each successful execution.

Owner: AI/ML Done when: Skill created after complex task, reused correctly on similar task
04

Phase 3 — Integrations (Weeks 5–6)

Connect Composio MCP bridge and implement all 14 service connectors. By end of Phase 3, a user can connect Google Workspace and have the agent read/write Gmail, Drive, and Calendar.

3.1 Composio MCP Integration Week 5

Integrate Composio SDK into the Hermes Agent runtime. Configure MCP server endpoint per user (uses Composio's user-scoped API keys). Implement tool discovery: on agent startup, query Composio for available tools based on connected services. Register tools in agent's tool registry. Handle Composio API errors with retry + circuit breaker.

Owner: Backend + AI/ML Done when: Agent can list and call Composio tools for a connected service
3.2 OAuth Connection API Week 5

Build connection management API: POST /api/hermes/connections/:service (initiate OAuth), DELETE /api/hermes/connections/:service (disconnect), GET /api/hermes/connections (list status). Implement Composio webhook handler for connection.created and connection.deleted events. Update hermes_connections table on each event.

Owner: Backend Done when: Full OAuth flow works for Google, GitHub, Slack
3.3 All 14 Service Connectors Week 6

Test and validate all 14 service connectors via Composio: Google Workspace, Notion, GitHub, Slack, Atlassian, Linear, Airtable, HubSpot, Salesforce, Stripe, Shopify, X/Twitter, Discord API, PostgreSQL/Supabase. For each: verify OAuth flow, test 3 representative tool calls, document any Composio-specific quirks. Stripe and PostgreSQL use API key auth instead of OAuth.

Owner: Backend Done when: All 14 connectors tested, tool calls verified for each
3.4 Cron Job Scheduler Week 6

Implement cron job system using node-cron on each VM. Jobs stored in hermes_cron_jobs table. On VM startup, load all active jobs for that user. On job trigger: publish message to Redis hermes:messages:{user_id} with the job's prompt. Implement /cron commands. Handle timezone correctly (stored as IANA timezone string).

Owner: Backend Done when: Cron job fires at correct time, survives VM restart
05

Phase 4 — Messaging Platforms (Weeks 7–8)

Build and deploy all 4 messaging platform bots. By end of Phase 4, users can interact with their agent via Telegram, Discord, Slack, and WhatsApp.

4.1 Telegram Bot Week 7

Build central Telegram bot using grammy framework. Implement: /start with one-time token linking, message routing to user VM via Redis, streaming response (edit message as tokens arrive), file handling (photos, documents forwarded to agent), all slash commands. Deploy on shared bot server (CX21). Configure webhook via Telegram Bot API.

Owner: Platform Done when: End-to-end message flow working, streaming responses visible
4.2 Discord Bot Week 7

Build Discord bot using discord.js. Register slash commands globally. Implement: DM-based conversation, /link command for account linking, message routing to Redis, response via message edit (streaming simulation), ephemeral responses for sensitive data, thread creation for long responses. Deploy on shared bot server.

Owner: Platform Done when: Slash commands registered, DM conversation working
4.3 Slack App Week 8

Build Slack app using Bolt framework. Implement: OAuth app installation flow, App Home tab with settings UI, DM conversation, @mention handling in channels, global shortcut "Ask Hermes", Block Kit responses, modal dialogs for complex commands. Must respond within 3 seconds (Slack requirement) — use async response URL for longer operations.

Owner: Platform Done when: App installable, DM + mention working, <3s ack time
4.4 WhatsApp Business API Week 8

Integrate WhatsApp Business API (via Meta Cloud API). Implement: phone number verification flow, webhook for incoming messages, voice message transcription (Whisper API), image forwarding to agent vision, message routing to Redis. Handle WhatsApp-specific formatting (no markdown, use plain text). Implement rate limiting to stay within Meta's API limits.

Owner: Platform Done when: Text + voice + image messages working end-to-end
06

Phase 5 — Launch (Weeks 9–10)

Build the web dashboard, integrate Stripe billing, run load tests, and launch publicly. Target: 100 users in first week.

5.1 Web Dashboard Week 9

Build the Hermes Max web dashboard (Next.js, deployed on Vercel). Pages: Landing, Sign Up/In (Supabase Auth), Dashboard (VM status, usage, quick chat), Connections (14 service cards with OAuth), Commands (reference), Settings (model, timezone, preferences), Billing (plan, usage, invoices). Responsive design, dark mode default.

Owner: Frontend Done when: All pages functional, auth working, connections UI tested
5.2 Stripe Billing Week 9

Integrate Stripe for subscription billing. Products: Light ($29/mo, CX21 VM), Heavy ($79/mo, CX41 VM). Implement: checkout flow, webhook handler for customer.subscription.created/updated/deleted, VM provisioning on payment success, VM resize on plan change (Light→Heavy: resize to CX41, Heavy→Light: resize to CX21 at next billing cycle), cancellation flow (VM deprovisioned after grace period).

Owner: Backend Done when: Full subscription lifecycle tested in Stripe test mode
5.3 Load Testing Week 10

Run load tests using k6. Scenarios: 50 concurrent users sending messages (target: p99 <2s), 100 simultaneous VM provisions (target: all complete in <5min), Redis pub/sub throughput (target: 1000 msg/s), Composio tool calls under load (target: p99 <3s). Fix any bottlenecks. Document capacity limits and scaling triggers.

Owner: Infrastructure + Backend Done when: All load test scenarios pass at target thresholds
5.4 Public Launch Week 10

Launch checklist: DNS configured (hermes.he2.ai), SSL certificates valid, Stripe live mode enabled, all 4 bots deployed to production, monitoring alerts active, runbook documented, on-call rotation set up. Soft launch to waitlist first (Day 1), then public announcement (Day 3). Monitor error rates and VM provisioning success rate closely for first 48 hours.

Owner: All teams Done when: First 10 paying users provisioned successfully
07

Launch Success Metrics

<3 min
VM Provisioning
From payment confirmation to agent ready
<500ms
Message Latency
Webhook receipt to first token (p50)
99.5%
Uptime Target
Per-VM uptime SLA (month 1)
100
Week 1 Users
Target paying subscribers at launch
<1%
Error Rate
API error rate target (all endpoints)
14/14
Integrations Live
All service connectors functional at launch