Interactive Workflows
Kompile's chat harness pairs interactive numbered wizards with / commands and MCP tools so you can run long-lived, multi-agent, resource-safe, and policy-governed workflows directly from the terminal — without memorizing command flags.
Wizard-First Rule
Almost every configuration command opens a numbered interactive wizard when run bare (or with init/setup/create): /onboard, /setup, /auth, /model, /subagent-config, /workflow create, /roles, /policy-enforce, /enforcer init, /resources setup, /ui, and kompile configure. The explicit subcommands shown below are optional shortcuts for scripts and power users.
1. Onboarding & Environment Inspection
Run /onboard (or kompile onboard) on a fresh machine to detect external agent CLIs (claude, codex, opencode, agy), configure credentials, import existing conversation histories, and register TLS peers.
Use /explain anytime to audit what is active:
/explain all # full inventory of install, harnesses, auth, limits, LSP, peers
/explain subagents # concurrency caps, token/time budgets, model bans, failover
/explain enforcer # active project rules, resource policy, and judge mode
/explain mcp # configured MCP servers and injected tool surface2. Workflow Teams & Deterministic Gates
Use /workflow to define multi-participant agent teams with explicit delegation edges, per-participant models, and human-in-the-loop approval gates.
Interactive wizard (recommended): run /workflow create to step through numbered pickers for workflow name → participants (with inline role creation) → lead → delegation edges → routing purposes → concurrency limit → approval gates → participant models → save — no hand-editing chat-workflows.json.
Quick inspection & gate commands:
/workflow create # interactive numbered team-creation wizard
/workflow list # list saved teams and their participant models
/workflow show # inspect the active team, gates, and routing
/workflow model # interactively change a participant's model
/workflow approve [gate] # approve the next pending gate (or a named gate)For single-agent deterministic guardrails (requiring specific skills/memories to be loaded and a plan before file mutation), configure workflow policy through /judge workflow:
off— disabled.advisory— warns the agent when a required skill, required memory (project:file.mdorglobal:file.md), or plan step is skipped.enforced— blocks mutating actions until prerequisites are met, retrying up toworkflowMaxCorrections(default2, max8).
3. Multi-Agent Delegation & Progress Reports
Kompile exposes three delegation primitives (task, multi_task, quorum_task) plus live inspection and resumption:
- Control budgets & safety with the
/subagent-configwizard (recommended):- Run bare
/subagent-configto open the interactive numbered settings wizard (concurrency caps, token/USD/active-runtime budgets, model bans, routes, crash auto-resume, tool preloading, and prompt controls). - Run
/subagent-config failoverto open the interactive fallback-ladder wizard. - Direct shortcuts (for quick tweaks or scripting):
text/subagent-config # interactive numbered settings wizard /subagent-config failover # interactive fallback-ladder wizard /subagent-config status # print current settings without opening the menu /subagent-config max 4 # direct shortcut: cap concurrent children /subagent-config ban *opus* # direct shortcut: glob-ban models for subagents /subagent-config cost-budget 2.00 # direct shortcut: USD ceiling per subagent - Run bare
- Enforce durable handoffs: every subagent launched via
task,multi_task, orquorum_taskmust post a report through theprogresstool before its exit is accepted.- Read the latest main reports:
/progress-reports [n] - Read subagent reports only:
/progress-reports-subagents [n]
- Read the latest main reports:
- Inspect live children & token usage:
task_transcript(MCP tool) renders the parent/child tree and live output tail of active or completed background subagents./subagent-breakdownbreaks down where a subagent spent tokens (startup prompt, skills, tool schemas, tool results).subagent_resumecontinues any saved child conversation with the same or a different agent.
4. Scheduled Loops, Broadcasts & Auto-Continue
Automate monitoring, periodic checks, and multi-session coordination:
/loop # session-scoped recurring prompt
/loop-global # project-scoped recurring prompt
/loop-bounded # recurring prompt that stops after N runs or duration
/loop-broadcast # recurring message broadcast to every other active agent
/message-broadcast <text> # queue a one-shot message to every other active agentPair loops with /continue and /reminder for unattended runs:
/continue onauto-replies when an agent pauses with a routine confirmation question; tune keywords with/continue-trigger./reminder(session) and/reminder-global(project) inject short standing rules into every turn so agents never drift from project invariants.
5. Live Judge, Policy Audits & Rollback
Kompile separates inline guardrails, periodic policy audits, and tool hooks:
| Layer | Interactive Wizard | Direct Commands | What it enforces |
|---|---|---|---|
| Judge / Enforcer | Bare /enforcer (/judge), /enforcer init, kompile configure enforcer, kompile configure judge | /judge status|on|off, /judge-global, /judge direction, /judge memory on | Real-time rule checks, goal-drift direction checks, memory-before-response mandate, and interactive judge chat (/judge chat). |
| Periodic Policy Audit | Bare /policy-enforce or /policy-enforce-global | /policy-enforce status|run | Staged terminal editor for project/session policy items, turn/time triggers, and auditor model. See Policy Enforce. |
| Tool Hooks | Ask your agent (hooks tool) or /hooks | /hooks list|add|edit|disable|delete | Deterministic pre/post tool hooks stored in .kompile/hooks.json or ~/.kompile/hooks.json. See Hooks. |
| Diff Archive & Rollback | — | /archive, /diff, /rollback | Inspect diffs from enforced turns and roll back unwanted mutations safely. |
6. Resource Admission, Reactive Monitors & Live Telemetry
Protect shared dev boxes and GPUs — and eliminate wasteful sleep / timeout polling loops — when running builds, test suites, or multiple agents concurrently (see Monitors & Reactive Wake-Ups for the full architecture):
- Classify heavy commands with the
/resources setupwizard (backed by~/.kompile/resource-policy.jsonand.kompile/resource-policy.json):- Run
/resources setup(or/resources add) to walk through numbered prompts for scope (project/user), rule name, executable, optional argument prefix, and class (highvs.low). - Direct shortcuts:
textCommands classed/resources setup # interactive guided rule wizard /resources rule mvn-build high mvn # direct shortcut: add one rule /resources check "mvn -pl :kompile-cli-main test"highare admitted through the shared activity lane and RAM/GPU guards. When blocked, the agent receivesresourceWaitIdandwakeSupported=trueso it can pause cleanly and resume automatically once resources free up. See Resource Policies. - Run
- Use event-driven monitors & bound runtimes with
process,process_notify,edit_coordinator, and/process-config:- Every
process action=launchautomatically arms a completion monitor (with optionalmonitor_messageand host-sidetimeout_minutes) so the harness wakes the agent when the command exits — the Enforcer bans shellsleep, wait loops, andtimeout <duration> <cmd>. - Subscribe to another session's shared-pool process with
process action=monitor/process_notify, or watch a peer-held file lock withedit_coordinator action=monitor_edit(advisory wake — re-runquery_editsbefore registering). - Inspect or cancel active completion monitors from chat with
/process-monitors listand/process-monitors cancel <id>(or Cancel wake-up in Web/processes), and set host defaults with/process-config:
text/process-config set maxRuntimeMinutes 20 /process-config set testTimeoutMinutes 30 /process-config set maxConcurrent 4 - Every
- Inspect live telemetry & logs:
/resource-monitor— live CPU, RSS, GPU, and managed subprocess view (withkill <id> confirm)./process-logs tail <id> 100or/process-logs grep <id> ERROR— inspect managed process, runtime, subprocess, and LSP logs./dashboard&/dashboard-<topic>(tools,judge,tests,disk,messages,crawl,graph,tokens,tasks,processes,timeline) — structured session diagnostics./cost&/usage— dollar cost and vendor quota window breakdown by main vs. subagents, model, and vendor.
7. Context Hygiene, Recovery & Store GC
- Compaction: run
/compactmanually,/compact reviewedto retire specific completed topics, or/auto-compactfor automatic model-aware compaction. - Session Recovery: use
/recover status|reload|forkto reload a session journal from disk or fork into a new session without losing transcript state;/resumeand/resume-allrestore prior or crashed sessions. - Cross-Machine Sources:
/sourcesand/blob-storeunify local directories, external harnesses, encrypted TLS peers (Peer Sync), and remote blob stores (s3,filesystem,kompile-http). - Store Cleanup:
/gcinspects Kompile home stores (dry-run by default),/gc run --yescleans reversible stores,/gc chatspacks old sessions, and/gc pin <id>protects important sessions. See Chat.