PRD: MS22 Phase 2 — Named Agent Fleet
Metadata
- Owner: Jason Woltje
- Date: 2026-03-04
- Status: draft
- Design Doc:
~/src/jarvis-brain/docs/planning/FLEET-EVOLUTION-PLAN.md
- Depends On: MS22 Phase 1 (DB-Centric Architecture) — COMPLETE
Problem Statement
Mosaic Stack has the infrastructure for per-user containers and knowledge layer, but no predefined agent personalities. Users start with a blank slate. For Jason's personal use case, we need named agents with distinct roles, personalities, and tool access that can collaborate through the shared knowledge layer.
Objectives
- Named agents — jarvis (orchestrator), builder (coding), medic (monitoring)
- Per-agent model assignment — Opus for jarvis, Codex for builder, Haiku for medic
- Tool permissions — Restrict dangerous tools to appropriate agents
- Discord bindings — Route agents to specific channels
- Mosaic skill — All agents can read/write findings and memory
Scope
In Scope
- Agent personality definitions (SOUL.md for each)
- Agent registry in Mosaic DB
- Per-agent model configuration
- Per-agent tool permission sets
- Discord channel routing
- Default agent templates for new users
Out of Scope
- Matrix observation rooms (nice-to-have)
- WebUI chat improvements (separate phase)
- Cross-agent quality gates (future)
- Team workspaces (future)
Agent Definitions
Jarvis — Orchestrator
| Property |
Value |
| Role |
Main orchestrator, user-facing assistant |
| Model |
Opus (primary), Sonnet (fallback) |
| Tools |
All tools — full access |
| Discord |
#jarvis |
| Personality |
Capable, direct, proactive. Gets stuff done without hand-holding. Thinks before acting, speaks up when seeing a better way. NOT a yes-man. |
Builder — Coding Agent
| Property |
Value |
| Role |
Code implementation, PRs, refactoring |
| Model |
Codex (primary, uses OpenAI credits), Sonnet (fallback) |
| Tools |
exec, read, write, edit, github, browser |
| Discord |
#builder |
| Personality |
Focused, thorough. Writes clean code. Tests before declaring done. Documents decisions. |
Medic — Health Monitoring
| Property |
Value |
| Role |
System health checks, alerts, monitoring |
| Model |
Haiku (primary), MiniMax (fallback) |
| Tools |
exec (SSH), nodes, cron, message (alerts only) |
| Discord |
#medic-alerts |
| Personality |
Vigilant, concise. Alerts on anomalies. Proactive health checks. Minimal noise. |
Database Schema
API Endpoints
Agent Templates (Admin)
User Agents
Agent Status
Task Breakdown
| Task ID |
Phase |
Description |
Scope |
Dependencies |
Estimate |
| P2-DB-001 |
schema |
Prisma models: AgentTemplate, UserAgent |
api |
P1a |
10K |
| P2-SEED-001 |
seed |
Seed default agents (jarvis, builder, medic) |
api |
P2-DB-001 |
5K |
| P2-API-001 |
api |
Agent template CRUD endpoints |
api |
P2-DB-001 |
15K |
| P2-API-002 |
api |
User agent CRUD endpoints |
api |
P2-DB-001 |
15K |
| P2-API-003 |
api |
Agent status endpoints |
api |
P2-DB-001 |
10K |
| P2-PROXY-001 |
api |
Agent chat routing (select agent by name) |
api |
P2-API-002 |
15K |
| P2-DISCORD-001 |
discord |
Route Discord messages to correct agent |
api |
P2-PROXY-001 |
15K |
| P2-UI-001 |
web |
Agent list/selector in WebUI |
web |
P2-API-002 |
15K |
| P2-UI-002 |
web |
Agent detail/edit page |
web |
P2-UI-001 |
15K |
| P2-TEST-001 |
test |
Unit tests for agent services |
api |
P2-API-002 |
15K |
| P2-VER-001 |
verify |
End-to-end: Discord → correct agent → response |
stack |
all |
10K |
Total Estimate: ~140K tokens
Success Criteria
- ✅ User can list available agents in WebUI
- ✅ User can select agent and chat with it
- ✅ Discord messages in #jarvis go to jarvis agent
- ✅ Discord messages in #builder go to builder agent
- ✅ Each agent uses its assigned model
- ✅ Each agent has correct tool permissions
- ✅ Agents can read/write findings via mosaic skill
Risks
| Risk |
Mitigation |
| Agent routing complexity |
Keep it simple: map Discord channel → agent name |
| Tool permission enforcement |
OpenClaw config generation respects permissions |
| Model fallback failures |
Log and alert, don't block user |
Next Steps
- Review this PRD with Jason
- Create Mission MS22-P2 in TASKS.md
- Begin with P2-DB-001 (schema)