Terminal UI (TUI)
The Hivemind TUI is a terminal interface for running the swarm and inspecting runs. Launch it with:
hivemind tui
(Or run hivemind with no subcommand.)
Layout
Main screen
- Branding — Title line: “Hivemind — Distributed AI Swarm Runtime.”
- Prompt box — Single-line (or multi-line) input for the task. Placeholder suggests a sample task.
- Action hints — Short reminder of keybindings (Esc, Enter, r, o, q).
- Output container — Large scrollable area showing “Response” and the last run’s result. While a run is in progress, a loading state and step status (e.g. “Planning…”, “Step 2 of 5: …”) are shown.
The layout is output-first: one main view with prompt at top and most of the space for the response.
Dashboard (key d)
Pressing d opens the Dashboard screen with six panels:
- Tasks — Lists tasks from the last run: task id, status (e.g. pending, running, completed), runtime, worker.
- Swarm graph — Represents the task DAG / swarm structure from the last scheduler state (live view of the run).
- Memory — Shows recent memory entries from the default store (loaded when the dashboard opens). Supports optional namespace filter (e.g. research_memory, coding_memory).
- Activity feed — Chronological feed of agent actions: task started/completed, tool calls, from the event log.
- Knowledge graph — Entities and relationships built from memory (documents, concepts, datasets, methods; edges). Built on demand when the dashboard opens.
- Logs — Event log content from the current run’s events folder (and optional log path).
Leaving the dashboard: Press Esc or q to return to the main (prompt + output) screen.
Keyboard shortcuts
| Key | Action |
|---|---|
| Enter | Run swarm with the current prompt (if not empty). In Dashboard Tasks view: open task detail for the selected task. |
| r | Run swarm (same as Enter when prompt has focus). |
| d | Open Dashboard (tasks, swarm graph, memory, logs). |
| p | Toggle pause/resume during a run. When paused, current tasks finish but no new tasks start; status shows "⏸ PAUSED". |
| i | Inject a note to the swarm. Opens an overlay; the message is stored as high-priority memory and included in subsequent agent context. |
| Esc | Unfocus input so r / q work from the main screen; or close Dashboard and go back. |
| o | Focus the output area. |
| q | Quit the app (or go back from Dashboard). |
Tip: If a key doesn’t work, focus may be in the prompt input; press Esc to move focus out, then r or q.
Task detail (Dashboard)
In the Tasks panel, use the arrow keys to select a task row and press Enter to open a detail overlay with full description, result text, tools used, duration, retry count, and any error.
Running a task
- Type your task in the prompt box (e.g. “Summarize swarm intelligence in one paragraph”).
- Press Enter or r.
- A spinner and step status (e.g. “Planning…”, “Executing step 1 of 5…”) appear while the swarm runs.
- When the run finishes, the response area shows the aggregated result (e.g. last task result or combined result).
- Open the Dashboard with d to see tasks, swarm graph, memory, and logs from this run.
Events are written to the configured events directory (e.g. .hivemind/events), so you can also inspect or replay runs from the CLI or scripts.