. | .
\|/
.--- O ---.
/ /|\ \
' / | \ '
. | .
AI Cockpit · One IDE. Every AI.
A multi-agent orchestration interface for Claude, Gemini, Ollama, online LLM providers (Workers), and local CLI tools (Tools).
Built by Dario Ruggi · maestro.ruggi.site
The cockpit window has four regions:
┌──────────────────────────────────────────────────────────────────┐
│ TOPBAR — 5 supplier cards · Start/Stop/Restart · Theme · Rules │
│ Project / Chat / Path · Jobs · Accumulator · Help │
├──────────┬──────────────────────────────────────┬────────────────┤
│ LEFT │ CONSOLE (chat scroll) │ RIGHT │
│ SIDEBAR │ │ SIDEBAR │
│ │ user: ... │ │
│ Chats │ CLAUDE: ... │ Preview │
│ Projects │ GEMINI: ... │ Code │
│ Files │ OLLAMA: ... │ Library │
│ │ │ Snippets │
│ │ ┌──────────────────────────────┐ │ Sources │
│ │ │ PROMPT · Execute/Clear │ │ Config │
│ │ │ Attach · Save · Voice │ │ Search │
│ │ └──────────────────────────────┘ │ Capabilities │
│ │ Mode: Single·Pipeline·Broadcast·Plan│ Plans │
│ │ Style: Chat·Build·Debug·Research·… │ Attachments │
│ │ Toolbar: Translate·Summarize·Skills… │ Usage │
├──────────┴──────────────────────────────────────┴────────────────┤
│ FOOTER — Font size · Typography · Caveman · Model selector │
└──────────────────────────────────────────────────────────────────┘
To do anything:
For multi-agent flows, switch the mode strip below the prompt to Pipeline, Broadcast, or Plan before pressing Execute.
Five cards run across the top of the cockpit. Each represents one provider class. Only the active card is expanded; the others show just an icon, the selected model name, and a thin progress bar.
| Card | Color | What it is |
|---|---|---|
| CLAUDE | amber | Anthropic Claude — best at reasoning, refactoring, architecture |
| GEMINI | blue | Google Gemini — fast iteration, broad knowledge, summaries |
| OLLAMA | orange | Local models running on your GPU — fully offline |
| WORKERS | purple | Online LLM APIs — Groq, HuggingFace, OpenRouter, etc. |
| TOOLS | teal | Local CLI binaries — ffmpeg, whisper, pandoc, etc. |
Click any inactive card to make it active. The previous active card collapses to its icon-only state. The console border-color and Execute-button color follow the active agent so you always know what’s loaded.
Inactive — icon + selected model name + 3px progress bar.
Active — icon + agent name + AGENT button label, model dropdown, settings or open-tmux button, and a full usage line below.
The progress bar reflects different things per agent:
While the agent is responding, you’ll see a small ⏳ placeholder for that message which gets replaced as tokens stream in.
Click the Stop button next to Execute. The stream is aborted on both the frontend and the backend (the agent’s tmux process is signaled). The partial response stays in the chat for context.
The Up arrow key in the empty textarea brings up your previous prompt for quick edit-and-resend.
Click the Attach button (next to the prompt) or drag files onto the chat to attach. Text/code files are inlined as agent context; images go to vision-capable models. Manage attached files in the Attachments tab (right sidebar).
You can also attach reference material from the Library, Snippets, and Sources tabs — click any item’s attach icon to insert it into your next prompt as quoted context.
| Button | Action |
|---|---|
| EXECUTE | Send prompt (same as Ctrl+Enter) |
| CLEAR | Empty the prompt text area |
| SAVE | Save prompt text to Snippets or Library |
| Attach | Open file picker to attach files |
| 🎤 Voice | Record and transcribe locally (whisper.cpp) |
Below the prompt textarea is the mode strip:
┌─────────────────────────────────────────────────────────┐
│ ◉ Single ○ Pipeline ○ Broadcast ○ Plan │
└─────────────────────────────────────────────────────────┘
Prompt goes to the active agent only. Standard chat behavior.
Prompt goes to agent A; A’s response becomes the prompt for agent B; B’s response becomes the prompt for agent C; etc. Useful for refinement chains:
Claude analyzes the spec → Gemini drafts code → Ollama runs the test suite
To configure pipeline order, the Multi-agent panel above the mode strip lets you select which agents to include and in what order.
Same prompt sent to every selected agent in parallel. Responses appear side-by-side. Useful for getting different perspectives on a question or comparing model output quality.
Treats the prompt as a goal and triggers the Orchestrator. All 3 main agents draft a plan in parallel; a synthesizer merges the votes; the result is saved to the Plans right-sidebar tab where you can review, edit, and execute it step-by-step. See The Orchestrator + Planner.
The style strip (below modes) prepends an instruction to every prompt, steering how the agent responds:
| Style | Behavior |
|---|---|
| Chat | Conversational — answers in prose, no code unless asked |
| Outline | Plan first, then implement |
| Research | Explore and explain with sources and reasoning |
| Build | Default builder mode — writes working code directly |
| Debug | Focus on finding and fixing bugs |
| Analyze | Deep analysis of code, data, or architecture |
| Report | Structured output — formal report with sections and conclusions |
In Plan mode, the style prefix is NOT prepended to the orchestrator goal — it only applies to direct agent prompts.
The cockpit organizes work into projects (folders on disk) containing chats (separate conversation threads).
Projects live under:
/home/dario/Software/Programing/LocalAIProjs/
Each project is a directory; each chat is a
chat_<name>.json file inside that directory.
The new project becomes the active one. The path appears in the topbar’s info bar.
The chat is created inside the active project. The textbox in the topbar shows the active chat name.
Each chat has independent history, attachments, and proposals.
Click any project name → that project becomes active. Click any chat name → that chat becomes active.
The info bar (Project: foo · Chat: bar · /path/...) always reflects the current context.
If no project is selected, the cockpit operates in _standalone mode — chats live in ~/scripts/cockpit_data/_standalone/. Useful for quick one-off questions.
The left sidebar has three tabs:
| Tab | Purpose |
|---|---|
| Chats | List of chats in the current project. Create, rename, import/export, detach, delete. |
| Projects | All projects. Create, switch, edit COCKPIT.md rules, delete. |
| Files | Project directory file tree. Click to preview/edit. Map button generates a Pascal/PHP unit map. |
The right sidebar has 11 vertical icon tabs:
| Tab | Purpose |
|---|---|
| Preview | Live preview of HTML/Markdown files. Updates when you select a file from the file tree. |
| Code | Inline code editor with syntax highlighting, find/replace, line numbers, word wrap. |
| Library | Saved references — URLs, file paths, notes. Scopeable to project or global. |
| Snippets | Reusable code fragments with language tags. Save from chat (F2) or add manually. |
| Sources | Source code files used as context or reference material for agents. |
| Config | Configuration — storage paths, attachment routes, import/export settings. |
| Search | Web search (Brave/DDG). Results can be fetched and injected into prompt context. |
| Capabilities | MCP servers and tool-shims. Toggle ON/OFF per capability. |
| Plans | Orchestrator plans — view steps, run/sequence/schedule, inspect votes. |
| Attachments | Files attached to the current chat. Upload, manage, and reference in prompts. |
| Usage | Token usage, quota tracking, and paid API spend for all suppliers and workers. |
Click any tab to open its panel. Only one panel is visible at a time. Tab state persists across page loads.
Below the tabs, the Pending Proposals section shows agent suggestions (file edits, commands) awaiting your approval. Approve or reject individually or in batch. Always visible regardless of which tab is open.
The Capabilities tab unifies three layers underneath:
SKILL.md folders)You declare a capability once with up to three implementations; the cockpit routes correctly per agent.
| ID | What | Claude | Gemini | Ollama |
|---|---|---|---|---|
filesystem |
Read/write project files | MCP | MCP | shim |
git |
Inspect/modify git repo | MCP | MCP | shim |
web-search |
Brave/DDG search | MCP | — | shim |
web-fetch |
Fetch URL → text | MCP | MCP | shim |
ssh |
Run commands on remote hosts | — | — | shim |
Click + New in the Capabilities toolbar. Provide:
This scaffolds an empty CAP.json at:
~/scripts/cockpit_data/capabilities/<id>/CAP.json
Edit the file to wire up implementations. See
CAPABILITIES_README.md for the full schema.
Browse the registry suggestions via the cloud_download button in the Capabilities toolbar. Suggested options include GitHub, Slack, GDrive, SQLite, and Memory. Currently you copy the package name into a custom capability manifest (auto-install is a future feature).
The Plan mode treats your prompt as a goal and breaks it into executable steps using all three agents collaboratively.
USER GOAL
│
├──→ Claude ─┐
├──→ Gemini ─┼──→ 3 draft plans
└──→ Ollama ─┘
│
▼
SYNTHESIZER (default: Claude)
│
▼
MERGED PLAN — saved to Plans tab
If only one voter produces valid JSON, the synthesizer is skipped — that voter’s plan IS the plan. If the synthesizer fails, the longest valid voter plan is used as fallback.
| Button | What it does |
|---|---|
| ▶ Run | Execute all remaining steps honoring auto-run mode |
| ⏸ Pause | Stop auto-progression after current step |
| 🗳 Votes | Show all 3 original voter plans side-by-side |
| 🗑 Delete | Remove the plan from disk |
| ▶ (per step) | Run just that step now |
| ⏭ (per step) | Mark step skipped |
| ✏ (per step) | Edit the step’s description |
Click the tune icon in the Plans toolbar to cycle through:
| Mode | Behavior |
|---|---|
auto |
Run all steps to completion, no prompts |
approve_destructive |
Pause before any step marked destructive (default) |
approve_each |
Pause before every step (browser confirm dialog) |
manual_only |
Don’t auto-progress; click Run on each step manually |
A step is marked destructive when it writes files, modifies git, runs network commands beyond GET, or uses ssh.
Click the ✏ pencil next to any pending step to rewrite its description. Already-running and done steps can’t be edited (re-run them with the per-step ▶ button if needed). Edits persist on disk.
Workers are online LLM providers used for tasks the main agents can’t do (image generation, audio, niche translations) or as fallback when the main providers are exhausted.
| Provider | Free? | Specialty |
|---|---|---|
| Groq | Yes (generous) | Ultra-fast text inference |
| HuggingFace | Yes (hourly) | Text + image-gen + audio + translate |
| OpenRouter | Has free tier | Universal LLM gateway |
| Together AI | $1 free | Open-weight models, image gen |
| DeepInfra | Pay-per-use | Cheap inference |
<provider>:<model> pairsKeys are encrypted with AES-256-GCM at rest. The
encryption key is derived from your machine’s
/etc/machine-id plus a fixed cockpit salt, which means:
This is not military-grade — anyone with shell
access on your machine can decrypt. Same security level as your
~/.ssh/ keys.
The cockpit dispatches via HTTP, captures the response, and renders it inline:
<img><audio controls>When enabled for a project, all main agents (Claude/Gemini/Ollama) get a system-prompt addition advising them about the marker:
%%WORKER:provider:task:prompt%%
crud_executor.sh dispatches the markers and surfaces
results inline. To enable, POST to
workers.php?action=set_auto_route with
{"project":"myproject","enabled":true}.
The WORKERS card’s bar shows aggregate tokens used; the settings modal shows per-provider call counts, error counts, tokens in/out, and last-call timestamp. Right-click the card’s usage area to reset all counters.
Tools are local CLI binaries for file → file transformations. No internet, no API keys, no usage tracking.
| Tool | Presets | What it does |
|---|---|---|
| ffmpeg | 9 | Audio/video conversion, extraction, resize, frames |
| whisper | 7 | Speech-to-text (auto/EN/ES/HE), SRT, translate-to-EN |
| pandoc | 8 | Document conversion (md ↔︎ pdf/docx/html/epub) |
$PATH
for binariessudo nala install ffmpeg whisper pandoc)<tool>:<preset> pairsThe output appears inline as a clickable file path with size, runtime, and embedded preview if it’s an image/audio/video.
Browsers refuse to expose absolute file paths to JavaScript. The Browse button only fills in the filename. You’ll need to paste the full absolute path manually. This is a fundamental browser security restriction with no workaround in pure web code.
Default resolution order:
~/scripts/cockpit_data/tools_outputs/<tool>/<timestamp>/Same pattern as Workers. When enabled per-project, agents emit:
%%TOOL:tool:preset:input_path%%
# or with extra args:
%%TOOL:tool:preset:input_path|extra_args%%
Three right-sidebar tabs hold reference material:
Long-form reference texts — design docs, specs, project briefs, AI persona descriptions. Stored as markdown files at:
~/scripts/cockpit_data/library/
To add: paste content into the chat with a %%LIB:title%%
marker, or use the agent’s “Save as Library entry” suggestion that
follows substantive responses.
To use: click the 📎 attach icon to insert the entry as quoted context in your next prompt.
Short, reusable code snippets — boilerplate, regex patterns, useful one-liners. Same workflow as Library entries.
URLs, file paths, or other external references the agent should be aware of. Linked rather than copied — the agent fetches the content fresh each time the source is referenced.
The Search right-sidebar tab provides web search via Brave Search (primary) → DuckDuckGo lite → DuckDuckGo HTML (fallback chain).
Two extra buttons:
Search results have a fetch button that retrieves the page’s text content and adds it to the chat as quoted context.
| Shortcut | Action |
|---|---|
| Ctrl+Enter | Send prompt to active agent |
| Esc | Cancel current request / close any modal |
| Ctrl+F | Search in chat console (or find/replace in editor) |
| ↑ / ↓ | Cycle prompt history (in empty prompt box) |
| F1 | Context help for element under cursor |
| ? | Open full help guide |
| F2 | Save selected text to Snippets |
| F3 | Save selected text to Library |
| F8 | Open Ollama Model Manager |
| Double-click chat | Rename chat |
| Tab (in editor) | Insert 2 spaces |
| Right-click (chat) | Copy, Select All, Save to Snippets/Library |
| Right-click (prompt) | Cut, Copy, Paste, Select All, Save |
open_in_new) on the agent’s
cardcockpit_start.sh reports an error, check
~/scripts/cockpit.logCaused by:
Click Stop to abort, then re-send. The token cleanup runs every poll so stale state is cleared.
Capabilities take effect on the next agent session start. Click Restart in the topbar to reload all sessions with the new capability configuration.
API key is missing, expired, or invalid. Open Workers settings and re-paste the key.
Rate limited — you’ve hit the provider’s per-minute or per-hour cap. Wait or switch to a different provider/model.
Either:
sudo nala install <name>After installing, click Detect in Tools settings to refresh.
Check the auto-run mode in Plans toolbar’s tune
button. If it’s approve_destructive and a step is marked
destructive, the orchestrator pauses for confirmation. Click ▶ on the
next pending step to continue.
The cockpit’s runtime configuration is split across these files:
/var/www/html/cockpit/ ← Web root (PHP backend + frontend)
├─ index.html ← UI
├─ bridge.php ← Stream/poll/cleanup
├─ files.php, status.php, ... ← Other backends
├─ capabilities.php, orchestrator.php, ...
├─ paths.json ← Where cockpit_data lives
├─ workers_providers.json ← Worker provider catalog (seed)
└─ tools_builtins/*.json ← Tool definitions (seed)
/home/dario/scripts/ ← Scripts run by Apache user
├─ cockpit_start.sh, cockpit_stop.sh
├─ agent_loop.sh ← Per-agent dispatch
├─ crud_executor.sh ← %%CRUD%% / %%TOOL:%% / %%WORKER:%%
└─ cockpit_data/ ← Per-user state
├─ library/, snippets/, sources/
├─ capabilities/_builtin/
├─ workers_state.json
├─ workers_keys.enc ← Encrypted API keys
├─ workers_usage.json
├─ tools/, tools_outputs/
└─ tools_state.json
/home/dario/Software/Programing/LocalAIProjs/ ← Projects root
├─ <project>/
│ ├─ chat_<name>.json
│ ├─ capabilities.json ← Per-project enabled caps
│ ├─ orchestrator.json ← Per-project plan settings
│ └─ plans/plan_<id>.json
Most files are JSON; edit them directly with xed if
needed. The cockpit re-reads configuration on each request, so changes
take effect immediately (except agent capabilities, which require a
session restart).
This section covers features added after the original guide. Everything here is local-first and offline unless noted.
Global standing rules that are prepended to every supplier’s context at dispatch — Claude, Gemini, Ollama, and text Workers alike. Write once; they apply everywhere.
COCKPIT.md and layer on top.cockpit_data/directives_global.md (+
_compact.md, _config.json).The 🎤 Voice button records your microphone and transcribes it locally with whisper.cpp — audio never leaves the machine.
HE to force
Hebrew (otherwise it can be mistaken for Arabic);
Auto/EN/ES for the rest.Auto uses the largest). The button
tooltip shows the active model.Each supplier card’s dropdowns are driven by a JSON file, so options can be changed without touching code.
claude --effort <level> flag:
low, medium, high, xhigh (Extra), max.cockpit_data/claude_controls.json /
gemini_controls.json) in the editor. Add an option to the
options array, Save, and it appears in the dropdown.Snippet/source/file editing now uses a draggable, resizable floating editor with:
Capability enablement is a single global on/off per capability — it
applies to all projects, free chats, and every supplier
the capability declares (the CLAUDE/GEMINI/OLLAMA badges are
informational, set by the capability’s CAP.json).
CAP.json in the editor) and delete.time capability (uvx
mcp-server-time).In Workers settings, Discover probes each provider’s
/models endpoint and shows the full list. Click
+ next to a model to make it
selectable (it’s added to that provider, text kind). A
filter box narrows long lists.
See Comprehensive help system below for the full, current description.
A scheduled job left “running” for more than 15 minutes (its worker died) is now auto-marked failed, so the Jobs badge no longer shows stale “running” counts.
The same provider can be reached two ways: as a supplier (CLI subscription, via tmux — Claude, Gemini, Ollama) and as a worker (HTTP API, BYOK). Alongside the free-tier workers (Groq, OpenRouter, …) you can now add three paid API workers: OpenAI (ChatGPT), Claude (Anthropic API), and Gemini (Google API). The CLI supplier roles are untouched — this is purely additive.
Because these cost real money per call, they sit behind a deliberate safety stack (all enforced server-side, so no UI state can bypass it):
Why bother: a free/alternate API key can pick up when your paid CLI subscription hits a limit, and a Broadcast can fan out across mixed-cost providers at once.
Pricing is editable per model (via the provider’s controls); until provider cards carry pricing, edit the input/output rates in the worker config.
Cockpit replaces all native browser right-click menus with themed, app-native context menus that follow the active theme.
Input fields (text inputs, textareas, dropdowns) retain the native browser menu for paste and spell-check.
All confirm() and prompt() browser dialogs have been replaced with Cockpit-native modals that follow the active theme.
true/false.null.All modals use CSS variables (--bg-base, --border-mid, --text-base, --accent-*) — they adapt to every theme automatically, including dark, light, and custom themes.
Completed, halted, or failed plans now show a Re-Run button in the plan toolbar. Clicking it resets all steps to "pending" and restarts execution from step 1. Previous step results are cleared. Confirmation is required before re-running.
When paid API spend reaches 80% of any configured cap (global or per-model), a system message warns you in the chat. Warnings are checked after every paid API call and include the current percentage and cap value.
The Model Manager (F8) now includes a runtime knobs panel at the bottom:
| Knob | Default | What it controls |
|---|---|---|
keep_alive | 5m | How long models stay loaded in memory after last use |
num_ctx | 4096 | Context window size in tokens (higher = more VRAM) |
num_parallel | 1 | Concurrent requests per loaded model |
max_loaded | 1 | Maximum models loaded simultaneously |
Click Save knobs to persist to cockpit_data/ollama_config.json. Values are read by agent_loop.sh on session start via environment variables (OLLAMA_KEEP_ALIVE, etc.). Restart agent sessions for changes to take effect.
Generate media locally using your GPU — no internet, no cost.
| Type | Engine | Time | Output |
|---|---|---|---|
| Image | stable-diffusion.cpp (SD 1.5) | ~20 sec | PNG with presets: Logo, Icon, FavIcon, Background, Image |
| Sound | Piper TTS | ~5 sec | WAV spoken audio from text |
| Video | sd.cpp + ffmpeg | ~2-3 min | Animated GIF from varying-seed frames |
Results appear inline in the chat with Save/Download/Delete buttons. All files go to cockpit_data/generated/.
Translation uses local LibreTranslate — no data leaves your machine.
The Track button starts/stops a timer for the current project.
Three toolbar buttons provide embedded panels without leaving Cockpit:
Extracts reusable knowledge from PDFs and documents using a local pipeline:
Panel tabs: Queue (pending files), Results (processed documents), Health (pipeline checks). Click Run to process. Progress is shown live.
Skills are reusable prompt templates with auto-trigger capability.
SKILL.md files in cockpit_data/skills/<name>/ directories with YAML frontmatter.The Summarize button generates a summary of the current chat session using the active agent. The summary appears as a new message. Useful for creating a recap before switching tasks or sharing context.
The Caveman toggle (bottom-right of prompt area) controls token compression for online suppliers (Claude, Gemini, Workers). Ollama (local) is never affected.
| Level | Effect | Savings |
|---|---|---|
| Off | Normal prompts and responses | — |
| Strip | Removes filler words, articles, pleasantries from your prompt before sending | ~30% |
| Strip+AI | Strip mode + asks the agent to respond in terse caveman style | ~60-75% |
The help system has been expanded to cover every Cockpit feature:
data-help attributes on 50+ UI elements.help.json in the floating code editor to customize topics.