MSPclaw: What's Done,
What's Next
SuperOps bridge is working end-to-end. The core engine, playbooks, and WebSocket protocol are solid. Four focused sprints to get from demo-ready to production-ready.
What's Already Built
| Component | What exists | Status |
|---|---|---|
| Orchestration engine | ReAct reasoning loop (Thought/Action/Observation), max 12 steps, LLM-agnostic (OpenAI / Gemini / Claude / Ollama). Retry logic + error recovery added in v0.3. | DONE |
| Playbook matcher | 15 YAML playbooks: password reset, printer, WiFi, VPN, slow PC, onboarding, offboarding, disk, email, software install. Keyword + OS matching. | DONE |
| WebSocket dispatcher | Persistent server-to-agent connections. Handles approvals, questions, async resume, duplicate question detection. | DONE |
| Agent daemon | Runs on client Mac. 17 tools: real macOS diagnostics + mock enterprise APIs (AD, M365, Jamf, VPN, printer, SharePoint). | DONE |
| SuperOps bridge | GraphQL read (getTicket, getTicketList) + write-back (createTicketNote). WebSocket loop with approval handling. bridge.py working. | DONE |
| Auth / API key | Bearer token required on all endpoints. Read from MSPCLAW_API_KEY env var. Shipped in v0.3 (server/auth.py). JWT + RBAC planned for v0.4. | DONE v0.3 |
| Human approval gates | Destructive tools (reset_password, disable_ad_account) require live tech approval before execution. Auto-deny after 5 minutes. Configured per playbook via requires_approval list. | DONE v0.3 |
| Audit trail | Append-only JSONL per day + SQLite audit_events table. Records all tool calls, approvals, questions, resolutions. CLI: mspclaw audit. | DONE v0.3 |
| Device memory | Agent remembers user name, department, floor from prior sessions. Never re-asks known info. Enriches brain context from second session onward. CLI: mspclaw devices. | DONE v0.3 |
| Resolution feedback | Users confirm if the fix worked (yes/no/partial). Per-playbook resolution rates tracked. CLI: mspclaw stats shows success rate per playbook. | DONE v0.3 |
| Structured escalation | When stuck, brain packages: what was tried + why it failed + suggested next steps. Webhook notification to Slack/Teams. Stored in escalations table. | DONE v0.3 |
| Technician registry | YAML-backed tech registry (techs.yaml). Tracks name, email, role, Slack ID. Used for approval attribution and escalation routing. CLI: mspclaw tech add/list/remove. | DONE v0.3 |
| Asset mapping | Still hardcoded to one MACHINE_ID in bridge.py. Multi-client routing not built. This is the current blocker for multi-tenant use. | BLOCKER |
| Webhook trigger | Bridge still runs manually (python bridge.py ticket_id). No auto-trigger from SuperOps on ticket create. | NEXT |
| Real enterprise APIs | M365 password reset, AD unlock, Jamf, printer, VPN are all realistic mocks. No real API calls yet. | NEXT |
| Windows playbooks | All 15 playbooks are macOS only. Windows paths, commands, and tools not yet written. | LATER |
| ConnectWise / Halo connectors | Bridge template documented in GUIDE.md. REST calls documented. Not implemented. | LATER |
| Docker / deployment | Manual install scripts only. No container builds yet. | LATER |
How the Full Loop Works Now
|
2. PULL bridge.py calls SuperOps GraphQL → gets ticket subject
|
3. SEND bridge.py opens WebSocket to MSPclaw server → sends subject + client_id
|
4. MATCH MSPclaw matches subject to playbook (keyword scoring)
|
5. REASON Brain (Claude/OpenAI) runs ReAct loop → decides tool calls
|
6. EXECUTE Dispatcher sends tool calls → agent on Mac runs them → returns results
|
7. APPROVE Bridge handles approval_request messages (auto or interactive)
|
8. WRITE bridge.py gets final_answer → calls createTicketNote on SuperOps
|
GAP: Step 1 is manual. Step 3 uses one hardcoded client_id. No Windows.
The Asset Mapping Problem (Blocker)
Right now MACHINE_ID is hardcoded in bridge.py.
In a real MSP with 50 client companies and 500 devices, you need to know:
when ticket T comes in from client C, which registered agent should execute the playbook?
For v1, a simple config file or environment variable mapping is fine.
The MSPclaw DB already has a Client table that could store this mapping.
Long-term: agents register with a company_id and the server exposes a lookup endpoint.
Sprint 1: Fix Asset Mapping
Unblock multi-client routing. Without this, MSPclaw only works for one device. This is the single highest-priority task.
Sprint 2: Webhook Trigger (Auto-trigger on Ticket Create)
Right now the bridge runs manually. The goal is: new ticket created in SuperOps automatically triggers MSPclaw with no human intervention.
Sprint 3: Swap Mocks for Real APIs
Mock enterprise tools in agent/tools/mock_enterprise.py return realistic JSON but don't call real APIs. Priority order: password/AD first (highest ticket volume), then printer, then the rest.
Sprint 4: Windows Playbooks + User-Facing Replies
Marketplace (After Sprints 1-4)
The playbook YAML format is already marketplace-ready. The structure and the keyword matching engine exist. What's needed is the registry + community contribution layer.
| Item | What it requires | When |
|---|---|---|
| playbook-registry.json | Add a registry file listing all community playbooks with PSA/OS support matrix. Mirrors TacticalRMM community_scripts.json pattern. | PHASE 2 |
| Playbook builder tool | Visual step editor, trigger form, dry-run test mode. Separate web app or bundled with MSPclaw server UI. | PHASE 2 |
| GitHub-based contribution flow | Community submits playbooks via PR to a community-playbooks repo. CI runs test matrix. Maintainer promotes to official tier. | PHASE 2 |
More PSA Connectors
The bridge template from GUIDE.md means each new PSA is ~200 lines of Python. SuperOps is done. Build these in order of MSP install base.
| # | PSA | Auth | Note endpoints | Effort |
|---|---|---|---|---|
| 1 | SuperOps DONE | Bearer + CustomerSubDomain | GraphQL createTicketNote | DONE |
| 2 | ConnectWise | clientId + Basic (pubkey:privkey) | POST /service/tickets/{id}/notes | ~1 day |
| 3 | Halo PSA | OAuth2 bearer | POST /api/tickets/{id}/notes | ~1 day |
| 4 | Datto Autotask | API key + integration code | POST .../TicketNotes | ~1 day |
| 5 | Freshdesk | API key as Basic auth | POST /api/v2/tickets/{id}/notes | ~1 day |