mission-control/scripts/add-voxyz-research.js

156 lines
5.7 KiB
JavaScript

"use client"
// Run this in Mission Control Documents page console to add the Voxyz research
// Or save this as a document manually
const document = {
id: Date.now().toString(),
title: "I Built an AI Company with OpenClaw + Vercel + Supabase — Two Weeks Later, They Run It Themselves",
date: "2026-02-22",
content: `# I Built an AI Company with OpenClaw + Vercel + Supabase — Two Weeks Later, They Run It Themselves
**URL:** https://x.com/Voxyz_ai/status/2019914775061270747
**Source:** X (Twitter) / Vox (@Voxyz_ai)
**Date Researched:** 2026-02-22
**Tags:** #ai #agents #openclaw #automation #vercel #supabase #voxyz #closed-loop
---
## Summary
Vox built a **6-agent autonomous company** using OpenClaw + Vercel + Supabase that runs itself with minimal human intervention. After just two weeks, the system operates autonomously with agents proposing ideas, executing missions, and triggering reactions without direct oversight.
The article details the architecture, three major pitfalls encountered, and solutions that created a truly "closed loop" system where agents don't just talk—they execute end-to-end.
## Key Takeaways
### The 6 Agents
- **Minion** — Makes decisions
- **Sage** — Analyzes strategy
- **Scout** — Gathers intel
- **Quill** — Writes content
- **Xalt** — Manages social media
- **Observer** — Quality checks
### The Closed Loop Architecture
\`\`\`
Agent proposes idea → Auto-approval check → Create mission + steps
↑ ↓
Trigger/Reaction ← Event emitted ← Worker executes
\`\`\`
### 3 Pitfalls & Solutions
**Pitfall 1: Two Places Fighting Over Work**
- Problem: VPS workers + Vercel cron both claiming same tasks (race conditions)
- Fix: VPS is sole executor; Vercel only runs control plane (triggers, reactions, cleanup)
**Pitfall 2: Triggered But Nobody Picked It Up**
- Problem: Triggers created proposals but skipped auto-approve + mission creation
- Fix: Single \`createProposalAndMaybeAutoApprove()\` function—ALL paths must use it
**Pitfall 3: Queue Keeps Growing When Quota Is Full**
- Problem: Tweet quota full, but proposals kept generating queued steps
- Fix: **Cap Gates** — reject at proposal entry point, don't let queue build up
### Key Innovations
**1. Cap Gates System**
\`\`\`typescript
const STEP_KIND_GATES = {
write_content: checkWriteContentGate,
post_tweet: checkPostTweetGate, // Check tweet quota
deploy: checkDeployGate,
};
\`\`\`
Reject at entry → No queue buildup → Clear audit trail
**2. Reaction Matrix (30% Probability)**
\`\`\`json
{
"source": "twitter-alt",
"tags": ["tweet","posted"],
"target": "growth",
"type": "analyze",
"probability": 0.3,
"cooldown": 120
}
\`\`\`
30% chance = "feels like a real team" (not 100% robot determinism)
**3. Self-Healing (30-min Stale Detection)**
- Steps stuck in "running" for 30 min → auto-mark failed
- Mission finalization checks ALL steps (not just one success)
**4. Policy-Driven Configuration**
All behavior in \`ops_policy\` table—no hardcoded limits:
- \`auto_approve\`: Which step kinds auto-pass
- \`x_daily_quota\`: Daily tweet cap
- \`worker_policy\`: VPS vs Vercel execution
### Database Schema (For Reference)
- \`ops_mission_proposals\` — Pending/accepted/rejected proposals
- \`ops_missions\` — Mission state (approved/running/succeeded/failed)
- \`ops_mission_steps\` — Execution steps (queued/running/succeeded/failed)
- \`ops_agent_events\` — Event stream
- \`ops_policy\` — Behavior configuration (JSON)
- \`ops_trigger_rules\` — Trigger definitions
- \`ops_agent_reactions\` — Reaction queue
- \`ops_action_runs\` — Execution logs
### Architecture Layers
- **OpenClaw (VPS):** Think + Execute (brain + hands)
- **Vercel:** Approve + Monitor (control plane)
- **Supabase:** All state (shared cortex)
## Notable Quotes
> "6 AI agents, 1 VPS, 1 Supabase database — going from 'agents can talk' to 'agents run the website autonomously' took me two weeks."
> "probability isn't a bug, it's a feature. 100% determinism = robot. Add randomness = feels more like a real team where 'sometimes someone responds, sometimes they don't.'"
> "Reject at the gate, don't pile up in the queue."
> "Between 'agents can produce output' and 'agents can run things end-to-end,' there's a full execute → feedback → re-trigger loop missing."
## Timeline
- **Infrastructure:** Pre-existing (OpenClaw + Vercel + Supabase)
- **Proposals + Approval:** 3 days
- **Execution Engine:** 2 days
- **Triggers + Reactions:** 2 days
- **Loop Unification:** 1 day
- **Total Core Loop:** ~1 week
## Related
- **Next Article:** How agents "argue" and "persuade" each other (roundtable voting, team cognition)
- **Live System:** https://voxyz.space
- **Author:** [@Voxyz_ai](https://x.com/Voxyz_ai)
## Action Items
- [ ] Study Cap Gates implementation for Mission Control Phase 10
- [ ] Design Proposal Service architecture
- [ ] Plan Reaction Matrix for Daily Mission generation
- [ ] Research OpenClaw roundtable voting patterns
- [ ] Follow @Voxyz_ai for next article on agent persuasion
## Application to Mission Control
**Short-term:** Complete Phases 6-9 as read-only dashboard
**Medium-term (Phase 10):** Daily Mission Generation
- Auto-propose 3 priorities each morning
- Simple closed loop: Analyze → Propose → Approve
**Long-term (Phase 11-13):** Full Autonomous Operations
- Voxyz-style proposal → execute → trigger loop
- Self-healing system
- Agents run, you monitor`,
timestamp: Date.now(),
tags: ["research", "ai", "agents", "openclaw", "voxyz", "automation"]
}
// To add this document:
// 1. Open Mission Control: https://mission-control.twisteddevices.com/documents
// 2. Open browser console (F12)
// 3. Paste this object as a new document
// 4. Or manually create document and paste the content above