doctor.Build. Learn. Evolve.
Without stopping.
Monomind wraps Claude Code with persistent memory, multi-agent swarms, a code knowledge graph, and keyword routing with outcome measurement β all wired into one CLI.
From zero to autonomous in five minutes
Install Monomind, wire it into Claude Code, and run your first autonomous agent loop.
The MCP server requires the explicit mcp start subcommand. Auto-detect is disabled by default (set MONOMIND_MCP_AUTODETECT=1 to restore legacy behavior).
| Command | What it does |
|---|---|
| npx monomind init | Initialize project with wizard |
| npx monomind doctor | Health diagnostics; auto-fix with --fix |
| npx monomind hooks worker run <name> | Run a background worker on demand |
| npx monomind memory store | Store a memory with optional namespace |
| npx monomind memory search | Keyword/BM25 search over stored memories |
| npx monomind org run <name> | Start a persistent SDK-backed agent org |
| npx monomind hooks list | Show all registered hooks |
| /mastermind:autodev | Autonomous build loop inside Claude Code |
How Monomind is built
A TypeScript monorepo with 9 packages, each owning a bounded context (published individually, plus as the monomind umbrella from the repo root), plus an SDK-backed org runtime for persistent background agents. Claude Code's Task tool handles in-session execution; MCP tools coordinate; the org runtime drives its own real Agent SDK sessions.
| Package | Path | Purpose |
|---|---|---|
| @monomind/cli | packages/@monomind/cli/ | CLI entry point β 32 commands, including org (org runtime v2, see src/orgrt/) and swarm (in-session coordination bookkeeping) |
| @monoes/hooks | packages/@monomind/hooks/ | 20 typed hook events (registry/executor) + 15 background workers; exposed via 29 hooks CLI subcommands |
| @monoes/memory | packages/@monomind/memory/ | Memory backends β local SQLite with embedded vectors (default engine, local HF embeddings); a dormant pure-JS HNSW index is the scale-up path. LanceDB was removed 2026-07 |
| @monoes/mcp | packages/@monomind/mcp/ | MCP server framework for explicit HTTP/WebSocket transports (mcp start -t http|websocket). The default stdio path (claude mcp add ... mcp start) uses a separate hand-rolled JSON-RPC loop in the CLI itself, not this package. |
| @monoes/routing | packages/@monomind/routing/ | Real embedding-based semantic router (keyword pre-filter β local embedding β cosine similarity β LLM fallback) β opt-in via route semantic, agent --task, or hooks_route_semantic. The bare monomind route <task> default is a separate, simpler keyword-only stub that doesn't call this package. Both feed route-outcome measurement. |
| monofence-ai | packages/monofence-ai/ | AI manipulation defense β prompt injection, jailbreak, evasion detection |
| monograph | packages/@monomind/monograph/ | Code knowledge graph β 19 default MCP tools, 27 advanced via MONOGRAPH_MCP_ADVANCED=1 β published standalone as @monoes/monograph |
| @monoes/monobrowse | packages/@monoes/monobrowse/ | Browser automation via CDP |
| @monoes/monodesign | packages/@monoes/monodesign/ | Frontend design intelligence v1.2.0 β design tokens + 51-rule antipattern detector (slop/quality/performance/accessibility). Sole design agent β 8 retired agents consolidated into it. Produces image prompts, not images (image generation is the separate monoagent-image skill). |
| monomind | / (root) | Umbrella package published to npm |
hooks model-route)Routes a task to Haiku, Sonnet, or Opus by a complexity score (0β1) β a real, working feature. There is no separate zero-LLM "booster" tier; that was a dangling reference to an MCP tool (agent_booster_edit_file) that was never implemented.
| Tier | Model | Complexity | Price (in/out per M tokens) | Use Cases |
|---|---|---|---|---|
| 1 | Claude Haiku | β€ 40% | $1 / $5 | Simple, low-complexity tasks |
| 2 | Claude Sonnet | 40β70% | $3 / $15 | Default β balanced reasoning |
| 3 | Claude Opus | > 70% | $5 / $25 | Architecture, security, complex reasoning |
Memory & Knowledge
Four-tier memory palace, BM25 search, a JSON pattern store with episodic recall, and Monograph β the code knowledge graph with 19 default MCP tools (27 more via MONOGRAPH_MCP_ADVANCED=1).
In-flight
drawers.jsonl. Each drawer has a key, value, tags array, timestamp, and score. Ephemeral β not persisted across sessions unless promoted.Working
Long-term
patterns.json, auto-memory-store.json) loaded by intelligence.init() at session start; episodic memories (episodic/episodes.jsonl) are keyword-matched and injected at prompt time. No vector database in the hot path.Deep search
drawers.jsonl with closet-term boosting β the most comprehensive retrieval layer, used on explicit search calls.| Store | Use Case | Notes |
|---|---|---|
| patterns.json / auto-memory-store.json | Learned patterns, prompt-time recall | Default hot path. Plain JSON, keyword matching. |
| episodic/episodes.jsonl | Episodic recall | Keyword-matched against the prompt; injected as context. |
| palace/drawers.jsonl | Verbatim BM25 search | 800-char chunks, scored on retrieval. |
| SQLite + local embeddings (default) | Semantic + keyword search, local vectors | better-sqlite3 with sql.js WASM fallback; local HF embeddings; no data leaves the machine. LanceDB was removed 2026-07; a dormant pure-JS HNSW index is the scale-up path if needed. |
Monograph builds a SQLite-backed graph of your codebase via tree-sitter β nodes are files/classes/functions, edges are imports/calls/dependencies. 46 MCP tools total: 19 exposed by default (navigation, impact analysis, dead code, index lifecycle) plus 27 advanced tools (Cypher queries, snapshots, export, wiki, multi-repo groups) enabled with MONOGRAPH_MCP_ADVANCED=1. PPR graph reranking (HippoRAG-style) is on by default for query/suggest results. 13 language grammars supported: C, C#, C++, Dart, Go, Java, Kotlin, PHP, Python, Ruby, Rust, Swift, TypeScript/JS, and Vue. Use it before touching 3+ files. Also available standalone as @monoes/monograph.
| Tool | When to use |
|---|---|
| monograph_suggest | Start every task β returns relevant files ranked by task description |
| monograph_query | BM25 keyword search; returns file + line number |
| monograph_impact | Before changing anything β full blast radius analysis |
| monograph_context | 360Β° view of a file: importers, imports, siblings |
| monograph_god_nodes | High-centrality files (external/test auto-filtered) |
| monograph_shortest_path | How two modules connect |
| monograph_rename | Dry-run multi-file rename with graph + text occurrences |
| monograph_dead_code | Find dead exports, orphan files, stale dist artifacts |
| monograph_detect_changes | Map git diff to affected graph nodes |
| monograph_community | Files forming a cohesive module cluster |
| monograph_cypher | Ad-hoc graph queries (Cypher syntax) |
Second Brain indexes your project's documents (PDF, DOCX, Markdown, TXT, RTF, and more) into a searchable knowledge base. During monomind init, the directory scanner detects document files and auto-ingests them β chunked, hashed for dedup, and stored in the knowledge base for retrieval. Agents can then query business docs, compliance policies, or design specs without leaving Claude Code. A separate global cross-project brain (~/.monomind/global-brain) persists knowledge across every project on the machine and is deliberately kept outside any single project's data dir, so it survives monomind cleanup --data.
.pdf, .docx, .md, .txt, .rtf, .pages, .odt, .rst, .tex, .epub). If enough match, the "documents" capability activates.pdf-parse (PDF), mammoth (DOCX), or direct read (plain text). Each document is chunked into 3200-char segments with 400-char overlap, respecting paragraph boundaries.knowledge:<scope> namespace. Metadata logged to .monomind/knowledge/doc-metadata.jsonl.knowledge_search MCP tool or monomind doc search CLI. Returns ranked excerpts with relevance scores.monomind doc| Command | Description |
|---|---|
| doc ingest <path> | Index documents from a file or directory into the knowledge base |
| doc search -q "query" | Search over indexed documents (supports --limit, --scope, --min-score) |
| doc list | List all indexed documents with chunk counts and sizes |
| doc export | Export knowledge base as OKF bundle (Markdown + YAML frontmatter) |
OKF is a portable interchange format for knowledge bases. Each document becomes a Markdown file with YAML frontmatter (type, title, resource path, tags, content hash, chunk count) plus an index.md linking them all. Use it to move knowledge between projects, share with teammates, or back up your Second Brain.
| Operation | CLI | Slash Command |
|---|---|---|
| Export | monomind doc export -o ./bundle | /mastermind:okf-export |
| Import | monomind doc ingest ./bundle | /mastermind:okf-import |
intelligence.ts, command-outcomes.ts, route-outcomes.ts).doctor reports routing accuracy and adherence.patterns.json.Hooks & Workers
15 background workers, an intelligence pipeline that learns from every edit, task, and session, and hook dispatch through 29 hooks CLI subcommands (a curated 17 shown below) built on 20 internally typed hook events (PreEdit, PostEdit, SessionStart...). Workers run in-process at session start β there is no separate daemon.
These are hooks CLI subcommands (invoke as npx monomind hooks <name>) β a curated subset of the full 29. They aren't a 1:1 list of the 20 typed HookEvent registry/executor events (e.g. PreEdit/PostEdit); some rows below, like the intelligence and teams commands, are separate CLI/Claude-Code mechanisms rather than registry events.
| Command | Category | Description |
|---|---|---|
| pre-edit | core | Context and agent suggestions before editing a file |
| post-edit | core | Record edit outcome for pattern logging |
| pre-command | core | Intercept command before execution |
| post-command | core | Record command result |
| pre-task | core | Register task start; get AGENT_BOOSTER_AVAILABLE or TASK_MODEL_RECOMMENDATION |
| post-task | core | Record completion; train patterns |
| session-start | session | Restore cross-session context |
| session-end | session | Persist state; flush working memory |
| session-restore | session | Replay session state into context |
| notify | session | Push notification to user or external system |
| route | intelligence | 3-tier model routing decision |
| explain | intelligence | Explain decision rationale |
| pretrain | intelligence | Pre-training signal ingestion |
| build-agents | intelligence | Auto-spawn agents for a task |
| transfer | intelligence | Transfer learning across tasks |
| teammate-idle | teams | Auto-assign task to idle teammate |
| task-completed | teams | Train patterns; notify team lead |
| Worker | Priority | Function |
|---|---|---|
| health | high | Monitor disk, memory, CPU, processes |
| security | high | Scan for secrets, vulnerabilities, CVEs |
| audit | high | Security audit β metrics/security-audit.json |
| swarm | high | Monitor swarm activity and agent coordination |
| performance | normal | Benchmark search, memory, startup performance |
| patterns | normal | Consolidate, dedupe, optimize learned patterns |
| learning | normal | Outcome/trajectory logging and pattern consolidation |
| git | normal | Track uncommitted changes and branch status |
| progress | normal | Track implementation progress |
| map | normal | Codebase mapping β metrics/codebase-map.json |
| optimize | normal | Performance snapshot β metrics/performance.json |
| ddd | low | Track DDD progress β metrics/ddd-progress.json |
| adr | low | Check ADR compliance across codebase |
| consolidate | low | Memory dedup, contradiction detection, pruning |
| cache | bg | Clean temp files, old logs, stale cache |
Workers live in @monoes/hooks and start with the session. Metrics-producing workers (map, audit, optimize, consolidate, ddd) refresh when their .monomind/metrics/*.json output is missing or older than 6 hours; doctor reports metrics freshness. Run any worker on demand with monomind hooks worker run <name>.
Swarm Coordination
Experimental in-process multi-agent coordination β seven topologies and vote-count consensus thresholds, all running inside a single Node process.
| Strategy | Threshold | Best For |
|---|---|---|
| raft | Simple majority | Default. Majority vote counting β no leader election or log replication. |
| bft | 2f+1 votes | Byzantine-style threshold for an adversarial fault model. |
| quorum | Preset: majority / supermajority / unanimous | Custom agreement thresholds. |
These are vote-count thresholds applied inside a single process β not distributed consensus protocols. Gossip and CRDT strategies are not implemented.
| Domain | Agents |
|---|---|
| Queen / Orchestration | QueenCoordinator, AttentionCoordinator |
| Architecture | Architect, SystemDesigner |
| Engineering | Coder, BackendDev, FrontendDev |
| Quality | Tester, Reviewer, SecurityAuditor |
| Memory / Intelligence | MemorySpecialist, MemoryCoordinator |
| Operations | PerfEngineer, MonitorAgent |
| Research | ResearchAgent |
Intelligence
Deterministic keyword routing, route-outcome measurement, and trajectory + pattern logging β running automatically in the background. No neural training in the lean build.
createKeywordRouter maps a task description to an agent type by keyword scoring β no LLM call and no learned weights. Deterministic and sub-millisecond. This is the default for bare monomind route <task>. A separate, real embedding-based semantic router (@monoes/routing: keyword pre-filter β local embedding β cosine similarity β LLM fallback) is available opt-in via route semantic, agent --task, or the hooks_route_semantic MCP tool.doctor surfaces routing accuracy and recommended-vs-actual adherence over a rolling window.intelligence.ts) plus command and route outcomes (command-outcomes.ts, route-outcomes.ts) are recorded as plain JSON for later analysis.learning worker dedups, detects contradictions, and prunes old entries from patterns.json on a 30-minute interval.CLI Commands
32 top-level commands. Run npx monomind <command> --help for full flag reference.
--fix shells to npm audit fixSlash Commands
80+ executable commands across 9 categories. Invoke via /command inside Claude Code.
/mastermind:runorg or monomind org runmonomind org run/serve; deprecated prompt path is /mastermind:runorgv1monomind org stop for v2 orgsmonomind org list for v2 orgsmonomind org status for v2 orgsMastermind
40+ autonomous operation commands with Brain Load/Write protocol, --tillend loop mechanics, and the autodev research-build-review cycle.
--focus security, --focus dx, --focus performance.mastermind:build with concrete spec, acceptance criteria, and blast radius guard. Spawns architect β coder β tester β reviewer agent chain.mastermind:review inline. Runs Code Reviewer + Security Engineer + Reality Checker in parallel. Repeats up to 5 iterations until zero findings.--tillend, schedules next session via ScheduleWakeup.| Flag | Default | Purpose |
|---|---|---|
| --tillend | off | Repeat until empty round (zero findings, zero actions) |
| --repeat <N> | off | Repeat exactly N times |
| --wait <seconds> | 60 | Minimum seconds between repeat runs |
| --maxruns <N> | 50 | Safety cap for --tillend |
| --auto | off | No confirmation prompts |
| --confirm | off | Ask before each action |
| --focus <area> | β | Bias toward: security, dx, performance |
| Command | Purpose |
|---|---|
| β Development β | |
| /mastermind:autodev | Autonomous research β build β review loop |
| /mastermind:build | Build a specific feature from a brief |
| /mastermind:review | Iterative code review and security audit |
| /mastermind:code-review | Multi-agent iterative review with auto-fix |
| /mastermind:architect | Architecture review and file structure design |
| /mastermind:debug | Systematic root-cause debugging |
| /mastermind:tdd | Test-Driven Development: Red-Green-Refactor |
| /mastermind:plan | Write a comprehensive implementation plan |
| /mastermind:execute | Execute a written implementation plan step by step |
| /mastermind:taskdev | Execute plan task-by-task with fresh subagents |
| /mastermind:improve | Deep component improvement pipeline |
| /mastermind:verify | Verification gate before claiming work complete |
| /mastermind:finish | Decide how to integrate completed implementation |
| /mastermind:worktree | Start feature work in isolated git worktree |
| /mastermind:receive-review | Evaluate and implement code review feedback |
| /mastermind:release | Release management: versioning, changelog, deployment |
| /mastermind:adr | Draft Architecture Decision Record |
| β Research & Ideas β | |
| /mastermind:research | Deep research with structured output |
| /mastermind:idea | Idea generation and evaluation |
| /mastermind:ideate | Research ideas, evaluate with PM lens |
| /mastermind:design | Collaborative design session β explore intent and requirements |
| /mastermind:techport | Technical portfolio β assess foreign project state |
| β Task & Org Management β | |
| /mastermind:do | Execute tasks from task file (docs/tasks/) |
| /mastermind:createtask | Decompose prompt into tasks (saved to docs/tasks/ by default; add --monotask for board) |
| /mastermind:master | Top-level orchestrator β routes any business prompt |
| monomind org run <name> | Start an org as a real SDK-backed daemon β the current, recommended path |
| monomind org status / list / stop | Runtime state, listing, and graceful stop for v2 orgs |
| β Mastermind org commands (v2 default; legacy v1 names carry the v1 suffix) β | |
| /mastermind:createorg | Define and save a v2 org config (roles, hierarchy, schedule) |
| /mastermind:runorg | Org v2 delegator: validates configs, auto-migrates v1 β v2, starts via monomind org run/serve |
| /mastermind:stoporg | Legacy β use monomind org stop for v2 orgs |
| /mastermind:orgs | Legacy β use monomind org list for v2 orgs |
| /mastermind:orgstatus | Legacy β use monomind org status for v2 orgs |
| /mastermind:approvev1 | Legacy approvals for v1 orgs; v2 approvals appear in dashboard Human Input tab |
| β Utilities β | |
| /mastermind:brain | Inspect and manage mastermind brain context |
| /mastermind:memory | Memory store: store, search, retrieve, list, delete |
| /mastermind:budget | Budget status: today, month, limits, autotune |
| /mastermind:graph-status | Single-line graph stats: nodes, edges, freshness |
| /mastermind:loops | List active --tillend/--repeat loops |
| /mastermind:repeat | Repeat any prompt or slash command on a schedule |
| /mastermind:understand | Semantic enrichment for monograph |
| /mastermind:swarm | Multi-agent swarm coordination |
| /mastermind:help | Quick-reference: all skills, commands, and CLI |
| /mastermind:skill-builder | Create, edit, or verify mastermind skills |
| /mastermind:specialagents | Activate a specialist agent persona |
| β Business Domains β | |
| /mastermind:ops | Operations planning and workflow automation |
| /mastermind:finance | Financial modeling, invoicing, and budget tracking |
| /mastermind:marketing | Marketing strategy: campaigns, copy, SEO, social |
| /mastermind:content | Blog posts, threads, docs, newsletters |
| /mastermind:sales | Sales strategy, outreach, and pipeline management |
Dashboard
The Neural Control Room β a local web dashboard served at localhost:4242 with live session feeds, memory inspection, swarm monitoring, knowledge graph exploration, and full agent organization management.
The dashboard is a single-page application with a 196px fixed sidebar and a scrollable main area. URL parameters support deep-linking: ?proj=<path> switches project context and &sess=<id> opens a specific session.
| Topbar Element | Description |
|---|---|
| Live dot | Pulses green when an active Claude Code session is detected |
| Today cost badge | Cumulative USD spend for the current calendar day |
| Session cost ticker | Running cost of the currently focused session, updates in real time |
| Activity chip | Current agent type and task description from the most recent hook event |
| ⬑ Mastermind | Opens the Mastermind overlay (violet hexagon button) |
| β Budget | Opens a modal for setting daily and monthly spend limits (USD). Fields: Daily limit, Monthly limit. Once saved, the alerts rail shows a warning when actual spend approaches the limit. |
| βK Search | Opens the command palette for cross-view navigation |
| ? Help | Shows keyboard shortcuts reference |
| βΊ Refresh | Force-reloads current view data |
Status strip (shown below topbar when data is present):
| Chip | Meaning |
|---|---|
| PATTERNS N | Number of learned routing patterns in the pattern store |
| CHUNKS N | Number of indexed text chunks available for search |
| SWARM topology | Active swarm topology name (hierarchical, mesh, adaptiveβ¦) |
| LAST ROUTE | Agent name that the routing hook most recently selected |
The sidebar footer shows your GitHub username and the absolute path of the current working directory.
The Now view is a three-column layout: feed pane (left), optional detail panel (slides in from the right edge of the feed), and metrics pane (252px, fixed right).
| Feed Control | Key | Behavior |
|---|---|---|
| Play / Pause | Space | Toggle live-tail; pausing freezes the list without disconnecting |
| Clear | β | Removes all entries from the visible feed buffer |
| Filter | / | Opens inline search β filters entries by text or tool name |
| Jump to live | G | Scrolls to the newest entry and resumes live-tail |
| Ambient mode | A | Hides all chrome; only the feed remains |
| Replay | β | Re-plays the current session from the beginning at configurable speed |
| Focus | F | Expands the feed to full width, hiding metrics pane |
| Export | β | Downloads visible feed entries as JSONL |
Feed entry types:
| Type | Appearance |
|---|---|
| Tool events | Colored category icon (file, bash, web, memory, agentβ¦), tool name, condensed args |
| User messages | Italic text with a person icon and timestamp |
| Error entries | Red left border, error message, optional stack trace expand |
Additional feed UI elements:
- Session context bar β pinned at top of feed: session ID, model, start time, current cost
- Recap card β collapsible summary of the previous session's key decisions
- Replay bar β scrubber, speed selector (0.5Γ, 1Γ, 2Γ, 4Γ), play/pause when in replay mode
- Timeline bar β horizontal ruler showing tool-call density over session time
- Time-range filter β drag handles on the timeline to zoom into a time window
- Weekly card β dismissible summary card (stored in localStorage) showing 7-day stats
- Daily digest card β dismissible AI-generated digest of today's activity
- Feed minimap β 8px-wide column of colored pips on the right scroll edge for quick navigation
Group rows β when 3 or more consecutive events share the same category, they are collapsed into a single row showing the count and a βΈ expand affordance. Clicking the group row expands all entries in place.
Detail panel: slides in 280px when an entry is clicked. Shows full event metadata, raw JSON payload, and a Copy button.
Metrics pane groups (252px, right):
| Group | What it shows |
|---|---|
| Today | Today API cost, call count, and a 7-day activity sparkline |
| Active Loops | Running loop names with live countdown timers |
| Recent Sessions | Last 5 sessions with cost and duration chips |
| Tool Usage | Bar chart of most-called tools in the current session |
| Burn Rate | Three rolling gauge rows β 5 min, 15 min, 60 min β each showing tool-call rate in calls/minute. Color: green < 4 calls/min, amber 4β10, red β₯ 10 |
| Session Lanes | Parallel swimlanes showing concurrent agent activity |
| Cache Efficiency | Per-session cache hit rate rows (cached tokens / total input tokens), with the rolling average shown in the group header. |
| Token Velocity | Tokens/minute sparkline for the current session |
| 30-Day Cost Trend | Bar chart of daily spend over the last 30 days |
| Activity Heatmap | Hour-of-day Γ day-of-week grid colored by event density |
Projects are discovered from Monomind's config registry. The view renders an auto-fill card grid (min 240px) with a filter input at the top.
| Card Element | Description |
|---|---|
| Active badge | Green "ACTIVE" pill β shown when the project's directory is the current working directory |
| Health score circle | 0β100 score: green β₯ 70, amber 40β69, red < 40 |
| Name & path | Project display name and filesystem path |
| Sessions count | Total recorded sessions for this project |
| Memories count | Number of memory files scoped to this project |
| Last active | Relative time since the last session event |
Clicking a card switches the global project context (updates the ?proj= URL param) and navigates to the Sessions view filtered to that project.
Sessions are created automatically when you use Claude Code in any project. Start a session by opening Claude Code in your project directory:
Sessions are grouped by recency: Today, Yesterday, This week, Older β each group header is collapsible. A 12-week clickable calendar heatmap appears above the session list. Each cell represents one day; opacity scales with session count. Clicking a cell filters the session list to that day. The heatmap header shows a week-over-week delta indicator (e.g. β12%, β5%, β flat).
Each session row includes:
- Prompt text (truncated) with expand on hover
- Timestamp (relative) and compacted badge (when the session was auto-compacted)
- Summary excerpt β 2-line clamp of the AI-generated session summary
- Meta line:
duration Β· N messages Β· $cost - Anomaly badges:
costly(cost > 2Γ average) anderrors(tool errors detected) - Auto-tags: topic tags inferred from session content (e.g.
refactor,bug-fix) - File chips: up to 5 file paths touched in the session
- Context saturation bar: horizontal progress showing % of context window consumed (message count vs. limit)
- Notes β each row has a β notes toggle (shown in blue when a note exists). Click to expand an inline textarea for free-form notes stored in localStorage, keyed by session ID.
- Error drawer β the error anomaly badge (N err) is clickable. Clicking it toggles an inline drawer below the row listing all tool error messages from that session.
- Custom tags β a '+ tag' affordance on each row adds manually typed labels (stored in localStorage). Custom tags appear as blue-toned pills alongside auto-tags and are included in the sessions filter.
- Context window pressure gauge β a separate 3px bar based on actual input token count vs the 200k context ceiling. Color: green (normal), amber (warn), red (critical). Shows a 'N% ctx' label. Distinct from the message-count saturation bar.
Toolbar toggle buttons:
| Button | Effect |
|---|---|
| Starred | Filter to bookmarked sessions only |
| Leaderboard | Sort by cost descending β shows most expensive sessions first |
| Models | Show model name chip on each row |
| Errors | Filter to sessions that contain tool errors |
| Tools | Show tool-call summary chips on each row |
| Projects | Show project path chip on each row |
| CSV | Export current filtered session list as CSV |
| Patterns | Show learned routing pattern badges |
| Compare | Enable multi-select mode for session diff (select exactly 2) |
| Timeline | Switch to a Gantt-style timeline visualization |
| Donut | Show a cost-by-model donut chart above the list |
| Report | Opens the Report Card modal with a structured plain-text summary of session activity for the current period. Includes a β Copy button β content is copied to clipboard, not downloaded. |
Period filter: Day / Week / Month / All β scopes the session list and heatmap to the selected window. Bulk actions become available when multiple rows are checked: Export, Bookmark, Clear.
Session diff: selecting exactly 2 sessions with Compare mode opens a side-by-side panel showing cost delta, duration delta, tool overlap, and unique tool calls per session.
Loops are created manually from the dashboard (+New Loop button) or via slash commands:
A loop is a scheduled automation: a prompt that re-runs at a fixed interval until a max-rep limit is reached or it is manually stopped.
| Loop Card Element | Description |
|---|---|
| Name | Human-readable loop label |
| Interval chip | Repeat cadence (e.g. 1h, 30m, daily) |
| Countdown timer | Live seconds-ticking countdown to the next run |
| Progress bar | currentRep / maxReps fill bar |
| Status badge | running, paused, or completed |
| Stop button | Immediately cancels the loop and records final state |
Expand a loop card to see: full prompt text, interval, started-at timestamp, last-run timestamp, run count, and a sparkline of per-run duration history.
Create Loop form fields:
| Field | Required | Default |
|---|---|---|
| Prompt | Yes | β |
| Name | No | Auto-generated from prompt |
| Interval | No | 1h |
| Max Reps | No | Unlimited |
Token data is collected automatically from every Claude Code session. No setup required β costs appear as soon as API calls are made.
The Tokens view provides cost and usage analytics with period-based filtering.
Period tabs β Today / Week / 30 Days / Month β each fetches /api/token-usage?period=X and re-renders the chart and table.
Animated bar chart: 400ms ease-out-cubic entrance animation. Bar colors follow threshold logic:
- Green β cost < average Γ 0.5 (low spend day)
- Amber β cost in normal range
- Red β cost β₯ average Γ 1.5 (high spend day)
The current day's bar is full opacity; all other bars render at 50% opacity. Below the chart, a session breakdown table shows: Session, Calls, Tokens, Cost per row.
The Memory view has two distinct data sources: Memories are explicit .md files with YAML frontmatter stored in the .monomind/memories/ directory. Chunks are indexed text segments extracted from project source files and documentation for semantic search.
| Memory Type | Color | Purpose |
|---|---|---|
user | Indigo | Personal preferences, identity, working style |
feedback | Amber | Agent routing decisions and confidence scores |
project | Teal | Project-scoped facts, patterns, decisions |
reference | Violet | Reference documentation, API facts |
handoff | Pink | Cross-session state for next session pickup |
Memories are created in three ways:
The Memory view has 7 sub-tabs:
| Tab | Description |
|---|---|
| Memories | Split-pane list + detail editor. Full CRUD: create, edit (modal with type/title/content fields), delete. New Memory button offers 4 type templates: user (personal preferences/identity), feedback (routing decisions), project (project-scoped facts), reference (documentation/API facts). Each pre-populates a minimal YAML front matter stub. |
| Routing | Routing feedback log β each entry shows agent chosen, confidence %, task description, and timestamp. YAML front matter stub format for new memories:--- |
| Usage | Period tabs + stat grid (cost, calls, tokens, cache efficiency) + 5 bar charts: Models, Activity by hour, Tools, MCP Servers, Projects |
| ADRs | Architecture Decision Records as filterable cards. Status badges: Accepted, Proposed, Deprecated. Category filters: implementation, guidance |
| Swarm | Swarm run list + canvas topology visualization β static snapshot drawing, drawn once when a run is selected. Hierarchical: queen node (labeled Q, teal, larger) at top, worker nodes spread below, straight edges connecting them. Mesh/other: nodes in a circle with all-to-all edges. Event log for selected run. Clean Data button purges stale run data |
| Chunks | Stats bar (chunk count, skill namespaces, total namespaces). Filter by namespace or keyword. Chunk cards show source file, excerpt, and namespace. Edit/Delete per card. Build Docs button triggers indexing with progress polling |
| Agent Graph | Summary stat cards, session list, agent spawn bar chart (agents per session), tool usage bar chart (calls per tool across all sessions) |
Routing tab: Routing data is collected automatically whenever Claude Code routes a task to an agent. No setup required. Use /hooks:overview to understand the routing hook.
ADRs tab: ADRs are created via the slash command or discovered automatically from existing ADR files:
Swarm tab: reflects in-session swarm coordination state (bookkeeping written by Task-tool-driven work, not org-runtime-v2 activity). For a running monomind org run org, watch its own live dashboard instead:
Chunks tab: Chunks are built by indexing your project's documentation and skill files:
Agent Graph tab: The Agent Graph is populated automatically by sessions that spawn sub-agents. Spawn agents by running complex tasks via /mastermind:build, /mastermind:autodev, or any orchestration command.
Run agent organizations via the real org-runtime-v2 daemon (live dashboard on :4243, separate from this :4242 dashboard):
Organizations are multi-agent structures with roles, goals, routines, and approval workflows. Each org card shows: a running dot (live indicator), name, goal description, topology/role chips, and an avatar stack of active agents.
Each org has 29 tabs:
| Tab | What it shows |
|---|---|
| Chart | Org hierarchy as an animated SVG β nodes for each role, animated edges for reporting lines |
| Roles | Role cards listing responsibilities, required skills, and reporting structure |
| Activity | Chronological event log of all agent actions within the org |
| Health | Metrics grid: task completion rate, error rate, average response time, agent uptime |
| Heartbeats | Per-agent heartbeat list showing last ping time and status (alive/stale/dead) |
| Tasks | Full task list with status, assignee, priority, and due date |
| Costs | Cost breakdown by agent, role, and time period with totals |
| Members | Human and agent member list with role assignments |
| Goals | Hierarchical goal tree with progress bars for each objective and sub-objective |
| Board | Kanban board with columns: Open, In Progress, Blocked, Done, Cancelled |
| Live | Real-time agent activity feed; auto-refreshes every 5 seconds. Shows currently running agents and their current task |
| Approvals | Approve/reject queue for actions that require human sign-off |
| Secrets | Secret names and scopes β values are always masked (never shown in plaintext) |
| Settings | Org configuration form that generates the equivalent CLI command for reproducibility |
| Routines | Cron table of scheduled automations: name, schedule expression, last run, next run, status |
| My Issues | Issues assigned to the current user or agent |
| Budgets | Fill bars showing spend vs. budget limit per agent and in aggregate |
| Plugins | Installed plugin status cards: name, version, enabled toggle, health indicator |
| Charts | 14-day activity heatmap + per-agent bar charts for calls and cost |
| Projects | Card grid of projects associated with this org |
| Skills | Role Γ skill matrix β cells show proficiency level (none/basic/expert) |
| Workspaces | Per-agent workspace rows: branch, working directory path, running services |
| Invites | Pending invitations with invite token, role, and expiry timestamp |
| Agents | Full agent table: name, type, status, model, last active, total calls, total cost |
| Environments | Agent environment configs: driver (node/python/docker), host, status |
| Access | Members grouped by role tier with their granted permissions listed |
| Issues | Full issue table (up to 100 rows): title, status, priority, assignee, labels, created date |
| Join Queue | Pending join requests showing requester (human π€ or agent π€ emoji) and approval status |
| Threads | Discussion threads: subject, author, message count, linked issue |
The knowledge graph must be built before Monograph tabs show data:
The Monograph view provides a full knowledge-graph interface for your codebase. It has 7 tabs:
| Tab | Description |
|---|---|
| Overview | Stat cards (total nodes, total edges, average degree, type counts), top 6 nodes by degree, and a type-distribution breakdown |
| Graph | Interactive force-directed graph in an iframe. WATCH toggle enables file-system watching so the graph auto-rebuilds on file changes. REBUILD button forces a full rebuild immediately |
| Analyze | Two groups of analyses: 9 client-side (Stats, PageRank, Dead Code, Components, Topological Sort, Hubs, Cycles, Surprises, Communities) and 20 server-side MCP analyses (Health Score, Risk Profile, Hotspots, Maintainability, Complexity, CRAP Score, Instability, Coupling Balance, Circular Dependencies, Unlinked References, Dead Exports, Reachability, Boundary Check, Bridges, Cohesion, Largest Files, Languages, Churn Hotspots, Detect Changes, Authors) |
| Query | 6 query forms: Search nodes (BM25 keyword), Impact analysis (upstream/downstream dependents), Context (360Β° view of a file), Shortest path (between two nodes), Cypher query (raw graph query), Ask the graph (natural language) |
| Export | Download the graph in: JSON, SVG, GraphML, or Cypher format |
| Report | Rendered GRAPH_REPORT with summary stats, top nodes by degree, and type distribution |
| Wiki | Searchable node browser β type filter pills, mode toggle (All / Docs / Code), full-text search. Clicking a node opens a detail panel with Impact, Context, and Explain actions |
The Wiki tab shows code nodes immediately after a graph build. To also see documentation nodes (from .md/.mdx/.txt files), click BUILD DOCS inside the Wiki tab or run /mastermind:understand.
A unified activity stream across all registered projects, accessible from the sidebar "β Global Feed" item.
The Global Feed populates automatically as you use Claude Code across multiple projects. No setup required β add more projects via monomind init in each project directory.
Each event entry displays a project tag chip alongside the event data, so you can see which project generated each activity. The feed is assembled by fetching /api/projects and then merging session events from all project paths.
Unlike the Now view (which is scoped to one project), the Global Feed gives a workspace-wide perspective β useful for multi-project workflows and general activity monitoring.
The Mastermind overlay opens by clicking the violet ⬑ Mastermind button in the topbar. It has 6 tabs:
| Tab | Description |
|---|---|
| Orgs | List of all orgs β click to switch the dashboard's active org context |
| Skills | Searchable catalog of all 35+ slash-command skills. Click any skill to copy the /skill-name command to clipboard |
| Loops | Running loops with live countdown timers and Stop buttons β mirrors the Loops view in a compact panel. Create loops with /mastermind:autodev --tillend or the +New Loop button in the Loops view. |
| Create Org | Form that generates and copies the equivalent /mastermind:createorg CLI command (legacy path β see the Organizations page for the current monomind org run flow) |
| Metrics | Summary cards for current cost, API calls, routing confidence distribution, and active swarm topology |
| Graph | Node and edge counts for the Monograph index, list of top god nodes, and an Open Monograph button |
Open with βK or the Search button in the topbar. Results are grouped:
| Group | Contents |
|---|---|
| Sessions | Recent sessions β select to open that session in the Now view |
| Memory | Memory entries β select to open the memory detail editor |
| Projects | Registered projects β select to switch project context |
| Orgs | Organizations β select to switch to that org's view |
| Skills | Slash-command skills β select to copy the command |
| Actions | Quick actions: Open Monograph, Refresh, Toggle Compact, Open Loops |
| Tabs | Appears when an org is selected β lists all 29 org tabs for direct navigation |
Type a > prefix in the palette input to switch to cross-session full-text search mode β queries all session content, not just titles.
| Key | Action | Context |
|---|---|---|
βK | Open command palette | Global |
? | Show keyboard shortcuts help | Global |
R | Refresh current view | Global |
Esc | Close open panels or modals | Global |
J | Navigate down in list | Now, Sessions |
K | Navigate up in list | Now, Sessions |
β΅ | Open detail panel / jump to session | Now, Sessions |
/ | Open feed search | Now |
G | Jump to live session (newest entry) | Now |
A | Toggle ambient mode | Now |
F | Toggle focus mode (full-width feed) | Now |
Space | Play / pause live tail | Now |
All endpoints are served by the local dashboard server at localhost:4242. SSE endpoints stream newline-delimited JSON.
Navigation / Init
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/git-user | Git username and email |
| GET | /api/projects | All registered projects |
| GET | /api/status | System health: memory, patterns |
Sessions
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/session-journal | Session metadata list |
| GET | /api/session | Events for one session file |
| GET (SSE) | /api/events-stream | Live tool event stream |
| GET | /api/search-sessions | Full-text session search |
| GET | /api/session-errors | Session error list |
| GET | /api/tool-errors | Tool error list per session |
| GET | /api/tool-ranking | Tool call frequency |
| GET | /api/project-costs | Per-project cost breakdown |
Memory
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/section | Named data sections (e.g. tokens) |
| GET | /api/memory/stats | Memory store stats |
| GET | /api/memory-files | .md file list |
| PUT / DELETE | /api/memory-file | Create or delete memory file |
| GET | /api/token-usage | Token usage, accepts period param |
| GET | /api/routing-feedback | Routing feedback log |
| GET | /api/adrs | Architecture Decision Records |
Loops
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/loops | Active loops |
| POST | /api/loops/create | Create loop |
| GET | /api/loops/stop | Stop a loop |
Swarm
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/swarm-history | Swarm run list |
| GET | /api/swarm-events | Events for a run |
| DELETE | /api/swarm-clean | Purge swarm data |
Knowledge (Chunks)
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/section?name=knowledge | Indexed chunks |
| POST / DELETE | /api/knowledge-chunk | Chunk CRUD |
| POST | /api/monograph-build-docs | Trigger docs indexing |
| GET | /api/monograph-build-docs-status | Indexing progress |
Graph (Monograph)
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/monograph-build | Rebuild graph |
| POST | /api/monograph-watch-toggle | Toggle file watch |
| GET | /api/monograph-watch-status | Watch state |
| GET | /api/monograph-graph | Graph nodes/edges |
| GET | /api/monograph-report | GRAPH_REPORT |
| GET | /api/monograph-query | BM25 node search |
| GET | /api/monograph-path | Shortest path between two nodes |
| GET | /api/monograph-explain | Node explanation |
| GET | /api/monograph-wiki-search | Wiki full-text search |
| GET | /api/graph | Agent graph data |
| POST | /api/mcp/call | MCP tool proxy |
Orgs
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/orgs | Org list |
| GET | /api/org/:name | Org detail |
| POST | /api/orgs/:name/stop | Stop org |
| DELETE | /api/orgs/:name | Delete org and clean up persisted config |
| POST | /api/orgs/:name/copy | Duplicate org under a new name |
| GET | /api/orgs/:name/export | Export org config as JSON |
| POST | /api/orgs/import | Import org from a JSON config file |
| GET | /api/org/:name/activity | Org activity log |
| GET | /api/org/:name/health | Org health metrics |
| GET | /api/org/:name/agents | Org agents |
| GET | /api/org/:name/budgets | Org budgets |
| GET | /api/org/:name/members | Org members |
| GET | /api/org/:name/issues | Org issues |
| GET / POST | /api/org/:name/approvals | Approval queue |
| GET | /api/org/:name/secrets | Secret names and scopes |
| GET | /api/org/:name/routines | Scheduled routines |
| GET | /api/org/:name/my-issues | Issues assigned to current user |
| GET | /api/org/:name/plugins | Installed plugins |
| GET | /api/org/:name/projects | Associated projects |
| GET | /api/org/:name/workspaces | Agent workspaces |
| GET | /api/org/:name/invites | Pending invitations |
| GET | /api/org/:name/environments | Agent environment configs |
| GET | /api/org/:name/join-requests | Pending join requests |
| GET | /api/org/:name/threads | Discussion threads |
Assemble an AI team.
Let it run itself.
Define an org as a JSON file β roles, hierarchy, per-role policy β then start it as a real SDK-backed daemon. Live WebSocket dashboard, cross-process discovery, persistent memory, and policy-gated tool access, all real and running today.
The walkthrough below documents v1 prompt-orchestrated orgs via /mastermind:createorg + /mastermind:runorgv1. /mastermind:runorg is the v2 delegator (validates, auto-migrates configs, starts via monomind org run shown above). New orgs use v2; legacy v1 orgs still run via runorgv1.
From org.json to running organization
Author the org once as JSON β goal, roles, who reports to whom, per-role policy. `org run` loads it and starts a real Claude Agent SDK session per role. Stop, list, or delete orgs from the CLI at any time.
Hand-author (or copy sample-team.json from a fresh monomind init) β goal, roles, reports_to, and a per-role policy block gating tools/files/web/budget.
OrgDaemon loads the definition, starts a real Agent SDK session per role, and serves a live WebSocket dashboard. Every tool call is checked against that role's PolicyEngine gates.
Live feed of agent chat, inter-agent messages, tool calls with allow/deny decisions, and files written β streamed over WebSocket, no polling.
Define your organization
A plain JSON file: goal, roles, hierarchy via reports_to, and a policy block per role. No wizard step β you author it directly, or start from the shipped sample.
reports_to: null, everyone else points at who they report to. Flat or deep, your call.policy block gates tool access, file read/write scope, web access, and token budget β checked on every tool call, with a full audit trail.--cross-process (default on) lets orgs running in different monomind processes β even different projects β discover and message each other.Watch the org run, live
A real WebSocket feed, not a polling API: agent status, chat and inter-agent messages, and every tool call's policy decision, streamed as they happen.
monomind org stop content-team
Sample teams you can launch. The sky is the limit.
Every org is just a JSON definition and one command. Here are five starting points β copy the shape, edit the goal and roles, run.
MonoFence AI
AI manipulation defense for LLM applications. Detects prompt injection, jailbreaks, role switching, context manipulation, encoding attacks, and PII exposure using 50+ patterns β sub-millisecond latency.
i g n o r e), leet substitution (ign0re), and base64 encoding. Applied automatically in every detect() call.clean β probing β escalating β attack. In attack state, overallRisk is raised to at least 0.5 even on individually benign inputs. Enabled by default.fence.scanOutput(llmOutput, prompt).attack. Off by default β opt in via SecurityHook.register() or the CLI flag.consensus, confidence, and criticalThreats.| Method | Returns | Description |
|---|---|---|
| fence.detect(input) | ThreatDetectionResult | Primary scan β returns safe, threats, overallRisk. ~0.04ms per call. |
| fence.scanOutput(output, prompt) | OutputScanResult | Scan LLM output for PII leakage, echo attacks, and policy violations. |
| fence.getContextState() | ContextState | Current escalation state: clean | probing | escalating | attack. |
| fence.resetContext() | void | Reset conversation context. Call at the start of each new conversation. |
| fence.addAllowlistRule(rule) | void | Add a runtime bypass rule with optional TTL decay. |
| fence.isAllowed(input) | boolean | Check if input matches an allowlist rule before running detection. |
| calculateSecurityConsensus(results) | ConsensusResult | Aggregate threat assessments from multiple agents. Import from monofence-ai. |
| Category | Examples |
|---|---|
| Prompt Injection | Instruction overrides, system prompt leakage attempts |
| Jailbreak | DAN, developer mode, role-play bypass patterns |
| Role Switching | "Pretend you areβ¦", "Act asβ¦", persona hijacking |
| Context Manipulation | Memory poisoning, prior context overrides |
| Encoding Attacks | Base64, homoglyph, leet, spaced-character evasion |
| PII Exposure | Output-scanning for SSN, credit cards, email leakage |
| Old (deprecated) | New |
|---|---|
| @monomind/monodefence | monofence-ai |
| createAIDefence() | createMonoDefence() |
| getAIDefence() | getMonoDefence() |
| AIDefenceConfig | MonoDefenceConfig |
| AIDefence | MonoDefence |
| --security-check | --monofence-ai-check |
| --security-deep | --monofence-ai-security-deep |
Deprecated aliases (createAIDefence, @monomind/monodefence import) remain available until v2. Migrate before the next major release.