Mission Control as a UI Extension of Clawdbot
Mission Control is designed as a visual frontend for Clawdbot, not a standalone application with its own AI. All AI-powered features (task parsing, event creation, approval decisions) are handled by calling the Clawdbot CLI, which provides:
- β No API keys needed - Clawdbot handles authentication
- β Shared context - Access to Clawdbot's memory and skills
- β
Session history - All interactions logged in
mission-controlsession - β Unified AI backend - Single source of truth for AI processing
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User types in Mission Control: β
β "Add task: review PR #123, high priority, due tomorrow" β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mission Control Frontend (React/Next.js) β
β components/ai-prompt-input.tsx β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mission Control API Route β
β POST /api/tasks/parse β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Clawdbot Helper Functions β
β lib/clawdbot.ts β
β - parseTaskWithClawdbot(prompt) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Execute CLI Command β
β clawdbot agent --message "Parse task: ..." β
β --json β
β --session-id mission-control β
β --timeout 30 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Clawdbot Gateway & Agent β
β - Uses configured AI model (Claude, etc.) β
β - Has access to memory, skills, context β
β - Returns structured JSON response β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mission Control receives JSON: β
β { β
β "title": "Review PR #123", β
β "priority": "high", β
β "dueDate": "2026-02-18" β
β } β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Mission Control stores in database & files β
β - SQLite: prisma/dev.db β
β - Files: clawd/tasks/*.json β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β UI updates with new task β
β Shows success toast β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
File: lib/clawdbot.ts
Key functions:
callClawdbot(instruction, options)- Execute clawdbot agent commandextractJSON(content)- Parse JSON from Clawdbot responsehandleClawdbotError(error)- Classify and handle errorsparseTaskWithClawdbot(prompt)- Task-specific parsingparseEventWithClawdbot(prompt)- Event-specific parsingcheckApprovalRequired(action, context)- Approval checking
Mission Control has three main AI API routes that call Clawdbot:
POST /api/tasks/parse
Body: { prompt: "Add task: review PR, high priority" }
Response: {
title: "Review PR",
priority: "high",
dueDate: "2026-02-18",
tags: [],
...
}POST /api/calendar/parse
Body: { prompt: "Schedule meeting tomorrow 2pm" }
Response: {
title: "Meeting",
startTime: "2026-02-18T14:00:00",
endTime: "2026-02-18T15:00:00",
...
}POST /api/ai/check-approval
Body: {
action: "Delete file mission-control/data.db",
context: { file: "data.db", size: 1024 }
}
Response: {
requiresApproval: true,
reason: "File deletion is irreversible",
riskLevel: "high",
category: "file_delete"
}Dedicated Session:
- Mission Control uses
--session-id mission-controlfor all requests - Creates a persistent session in Clawdbot
- Session history available via
clawdbot sessions list - Can view full conversation:
clawdbot sessions history --session-key mission-control
Benefits:
- Context continuity across requests
- Can reference previous interactions
- Debugging and transparency
- All Mission Control activity visible in Clawdbot
The integration gracefully handles Clawdbot errors:
Clawdbot not running:
{
"type": "not_running",
"message": "Clawdbot gateway is not running. Start it with: clawdbot gateway start"
}Timeout:
{
"type": "timeout",
"message": "Request to Clawdbot timed out. Try again or simplify your request."
}Parse error:
{
"type": "parse_error",
"message": "Could not parse Clawdbot response. Please try again."
}Fallback behavior:
- If Clawdbot fails, Mission Control still creates basic entries
- Title extracted from raw prompt
- Default values used (priority: medium, no due date)
- User can manually edit after creation
-
Clawdbot installed and configured
npm install -g clawdbot clawdbot gateway start
-
No API keys needed - Clawdbot handles authentication
Check that Clawdbot is accessible:
# Check gateway status
clawdbot gateway status
# Test a simple agent call
clawdbot agent --message "Hello" --jsonWhen developing Mission Control:
- Start Clawdbot gateway:
clawdbot gateway start - Start Mission Control:
npm run dev - Test AI features (task creation, event scheduling)
- Check session:
clawdbot sessions list
# List all sessions
clawdbot sessions list
# View mission-control session history
clawdbot sessions history --session-key mission-control
# View last 10 messages
clawdbot sessions history --session-key mission-control --limit 10Error: "command not found: clawdbot"
- Clawdbot not installed
- Solution:
npm install -g clawdbot
Error: "ECONNREFUSED"
- Gateway not running
- Solution:
clawdbot gateway start
Error: "No valid JSON found in response"
- Clawdbot returned unexpected format
- Check session history to see raw response
- May need to adjust prompt templates
Error: "Request timed out"
- Prompt too complex or Clawdbot overloaded
- Increase timeout in
lib/clawdbot.ts - Simplify the prompt
- Users don't need separate Anthropic/OpenAI keys
- One authentication point (Clawdbot)
- Simpler setup
- Clawdbot has access to:
MEMORY.md- Long-term memorymemory/*.md- Daily logs- Skills (task-creator, approval-rules, etc.)
- Previous conversations
- Richer, more context-aware responses
- All Mission Control interactions logged
- Can review what was parsed and how
- Debugging made easier
- Can leverage Clawdbot's skills:
task-creator- Task parsing logicapproval-rules- Approval decision makingcalendar-sync- Calendar event handling
- Skills can evolve independently
- User can see exactly what Mission Control asked Clawdbot
- Can verify AI decisions
- Can manually invoke same commands
- Real-time updates - Use WebSocket/SSE for live updates from Clawdbot
- Approval workflow - Clawdbot requests approval via Mission Control UI
- Bulk operations - "Archive all completed tasks from last week"
- Smart suggestions - Clawdbot proactively suggests tasks based on calendar/emails
- Voice input - Speak tasks/events, processed by Clawdbot
Mission Control can be extended to use other Clawdbot capabilities:
- File operations - "Create a doc from this task's notes"
- Web search - "Find relevant resources for this project"
- Code execution - "Run the test suite for this PR"
- Notifications - "Remind me about this task tomorrow"
-
Start Clawdbot:
clawdbot gateway start
-
Test task parsing:
# In Mission Control UI "Add task: test task, high priority, due tomorrow" # Or via CLI clawdbot agent --message "Parse task: test task, high priority, due tomorrow" --json --session-id mission-control
-
Verify session:
clawdbot sessions list # Should show: mission-control clawdbot sessions history --session-key mission-control # Should show the task parsing request
Mock Clawdbot responses:
// In tests
jest.mock('child_process', () => ({
execSync: jest.fn(() => JSON.stringify({
role: 'assistant',
content: '{"title": "Test Task", "priority": "high"}'
}))
}))By integrating directly with Clawdbot, Mission Control becomes a visual extension rather than a separate system. This architecture provides:
- β Simpler setup (no API keys)
- β Richer context (access to Clawdbot's memory)
- β Better transparency (session history)
- β Unified experience (one AI backend)
Mission Control handles the presentation layer (UI, database, file sync), while Clawdbot handles the intelligence layer (parsing, reasoning, decision making).
For more information:
- Design doc:
docs/plans/2026-02-17-mission-control-clawdbot-integration.md - Setup guide:
SETUP.md - Main README:
README.md