Architecture¶
System Layout¶
┌─────────────────── Dell k3s (100.95.212.93) ──────────────────┐
│ │
│ ┌──────────────── Rig vCluster ────────────────┐ │
│ │ │ │
│ │ ┌──────────────────────────────────────────┐ │ │
│ │ │ Automate-E Runtime │ │ │
│ │ │ │ │ │
│ │ │ ┌────────────┐ ┌────────────┐ │ │ │
│ │ │ │Conductor-E │ │ Dev-E │ │ │ │
│ │ │ │(character) │ │ (character)│ │ │ │
│ │ │ └─────┬──────┘ └─────┬──────┘ │ │ │
│ │ │ │ │ │ │ │
│ │ │ ▼ │ │ │ │
│ │ │ ┌────────────┐ │ │ │ │
│ │ │ │Conductor-E │ │ │ │ │
│ │ │ │API (.NET) │ │ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │Event Store │ │ │ │ │
│ │ │ │Assignment │ │ │ │ │
│ │ │ │Escalation │ │ │ │ │
│ │ │ └─────┬──────┘ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ ▼ │ │ │ │
│ │ │ ┌────────────┐ │ │ │ │
│ │ │ │ PostgreSQL │◀───────┘ │ │ │
│ │ │ │ + Marten │ (events + memory) │ │ │
│ │ │ └────────────┘ │ │ │
│ │ └──────────────────────────────────────────┘ │ │
│ └───────────────────────────────────────────────┘ │
│ │
│ ┌──────────────── Tablez vCluster ──────────────┐ │
│ │ (separate tenant, client work) │ │
│ └────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌────────────┐ ┌──────────┐
│ GitHub │ │ Discord │ │ Review-E │ │ OpenClaw │
│ │ │ + Slack │ │ (Pi4-02) │ │ (LLM │
│ Issues │ │ │ │ │ │ gateway) │
│ PRs, CI │ │ #tasks │ │ Reviews │ │ │
│ Milest. │ │ #admin │ │ every PR │ │ All │
│ │ │ #dev-e │ │ │ │ models │
└──────────┘ └──────────┘ └────────────┘ └──────────┘
Design Decisions¶
Automate-E as Shared Runtime¶
All rig agents run on Automate-E — same Docker image, different character.json. This avoids building Discord bots, Slack bots, dashboards, memory, and agent loops from scratch for each agent.
| Built Once in Automate-E | Used By All Agents |
|---|---|
| Messaging adapters (Discord, Slack) | Conductor-E, Dev-E, Monitor-E, Architect-E |
| LLM via OpenClaw (all models) | All agents |
| Dashboard (logs, sessions, costs) | All agents |
| Memory (PostgreSQL) | All agents |
| Webhooks + CronJobs | Conductor-E (GitHub webhooks, 60s loop) |
| Health endpoints | All agents (k8s probes) |
Multi-Platform Messaging¶
Automate-E abstracts messaging behind an adapter interface. Agents work on Discord or Slack without code changes — just change messaging.platform in character.json.
LLM via OpenClaw¶
All LLM calls route through OpenClaw instead of direct SDK calls. Benefits:
- Model flexibility — switch models per agent via config
- Cost tracking — OpenClaw tracks usage per agent
- All providers — Claude, GPT, Gemini, local models
- Fallback — automatic fallback on model unavailability
- Routing — cheapest/fastest model per task type
Event Sourcing with Marten¶
The Conductor-E API (Layer 3 backend) uses Marten on PostgreSQL for event sourcing. See Event Store.
Automate-E (Layer 1 runtime) uses plain PostgreSQL for agent memory. These are separate concerns:
| Database | Purpose | Used By |
|---|---|---|
| Automate-E PostgreSQL | Agent memory, conversations, patterns | All agents via Automate-E |
| Conductor-E PostgreSQL | Event store, projections, rig state | Conductor-E API only |
Could share the same PostgreSQL instance with different schemas, or run separate.
Stateless Conductor-E¶
Conductor-E's Automate-E instance runs a cron every 60 seconds that calls the Conductor-E API. The API reads events and makes decisions. If either crashes, they restart and resume — no state lost.
Dev-E: Automate-E + Claude Code CLI¶
Dev-E is an Automate-E instance with a tool that runs Claude Code CLI headless. It receives assignments from the Conductor-E API, clones repos, runs Claude Code, creates PRs, and reports status back via events.
Review-E Stays External¶
Review-E on Pi4-02 works well on agent-runner. Moving it adds complexity with no benefit.
Resource Budget¶
| Component | CPU Req | CPU Limit | Mem Req | Mem Limit |
|---|---|---|---|---|
| Conductor-E (Automate-E) | 100m | 500m | 256Mi | 512Mi |
| Conductor-E API (.NET) | 100m | 500m | 128Mi | 512Mi |
| Dev-E (Automate-E) | 500m | 2000m | 512Mi | 4Gi |
| PostgreSQL | 100m | 500m | 256Mi | 512Mi |
| Total | 800m | 3500m | 1.1Gi | 5.5Gi |
Dell has i7/32GB — plenty of headroom.
Networking¶
| Service | Access | Method |
|---|---|---|
| Conductor-E Dashboard | rig.dashecorp.com |
Cloudflare Tunnel + Access |
| Conductor-E API | Internal (ClusterIP) | Automate-E calls as tool |
| PostgreSQL | Internal (ClusterIP) | Conductor-E API + Automate-E |
| Dev-E | Outbound only | GitHub, Claude API, Discord/Slack |
| OpenClaw | Internal or external | LLM routing for all agents |
Secrets¶
| Secret | Used By | Source |
|---|---|---|
GITHUB_TOKEN |
Conductor-E, Dev-E | GitHub App token |
DISCORD_BOT_TOKEN |
Automate-E instances | Discord bot |
SLACK_BOT_TOKEN |
Automate-E instances | Slack bot (when added) |
OPENCLAW_API_KEY |
Automate-E instances | OpenClaw auth |
CLAUDE_OAUTH_TOKEN |
Dev-E (Claude Code CLI) | 1-year Max subscription token |
POSTGRES_PASSWORD |
Conductor-E API, Automate-E | Generated |
GHCR_PULL_SECRET |
All pods | Image pull secret |
Repos¶
| Repo | Purpose | Tech | Exists? |
|---|---|---|---|
Stig-Johnny/automate-e |
Shared agent runtime | Node.js, Discord.js, Helm | Yes — evolve |
Stig-Johnny/conductor-e |
Conductor backend API | .NET 10, Marten, ASP.NET Core | New |
Stig-Johnny/rig-gitops |
FluxCD manifests | YAML, Kustomize | New |
No separate dev-e repo — Dev-E is an Automate-E instance with a character.json config in rig-gitops.
Implementation Order¶
- Evolve Automate-E — messaging adapter interface, OpenClaw integration, platform-agnostic character.json
- Build Conductor-E API — .NET 10, Marten event store, assignment, escalation, human gates
- Deploy Conductor-E — Automate-E instance + API in rig vCluster
- Deploy Dev-E — Automate-E instance with Claude Code CLI tool
- Wire up — GitHub webhooks → Conductor-E, assignment → Dev-E, events flowing