AI agent integrations
Omarchy gives AI coding tools one desktop entry point. It lets the user choose an agent, launch it in a consistent terminal, use a local model, and view provider access and activity in the shell. The default coding agent stays separate from the provider account, so one tool can use different provider identities.
Agent selection and launch
Default agent
The default agent is the coding tool that Omarchy starts from its command, key binding, and shell panel. The user selects a supported name with omarchy default agent <name>. Omarchy saves that choice for later sessions, while a launch can name another agent for one session.
Omarchy starts with no default. The shell can guide the user to choose one, and the first provider sign-in becomes the default when no choice exists. Selecting an agent also makes it ready to run by installing it when needed.
References: bin/omarchy-default-agent• L20-31 bin/omarchy-default-agent• L33-78 bin/omarchy-default-agent• L142-174 shell/…/README.md• L61-70
Agent launcher
The agent launcher turns the selected tool into an interactive session. It supports normal launches, one-session agent overrides, setup launches, prompt launches, and a picker when no default exists. A launch from the home directory uses ~/Work when that directory exists, which gives the agent a useful workspace.
The launcher hides differences between agent commands. It supplies each tool's supported permission, trust, and prompt settings, and places a prompt on the clipboard when a tool cannot accept one at startup. Most sessions use the shared org.omarchy.agent terminal identity so the desktop can apply common window rules and themes.
The launcher also applies the selected provider account to new sessions. An explicit provider home remains in control. A running session keeps the account home with which it started.
References: bin/omarchy-agent• L16-31 bin/omarchy-agent• L63-77 bin/omarchy-agent• L124-138 bin/omarchy-agent• L140-288 bin/omarchy-agent• L337-397 bin/omarchy-default-agent• L169-174
Application launchers
Installed agent harnesses can receive their own desktop launcher beside the shared Agent entry. This gives a user a direct way to open a particular tool without changing the saved default. Hermes and OpenClaw keep their own application launchers because a second terminal launcher would compete with them.
Local models follow the same pattern. A ready text model gets a named desktop entry with its provider mark and a command that starts an agent on that model. Image, video, and music models open in Fantasi instead, because they are creative models rather than coding-agent backends. Removing a model removes its entry. The launcher set is rebuilt from current model state, and an unreadable state leaves existing entries in place.
References: bin/omarchy-agent-launcher• L3-23 bin/omarchy-models-launchers• L3-15 bin/omarchy-models-launchers• L62-74 bin/omarchy-models-launchers• L95-120 bin/omarchy-default-agent• L169-174
Local model sessions
Omarchy can run open models on the local machine or connect to a model shared by another Omarchy machine. The local model command prepares the runtime when needed, including container support, GPU support, and SSH support for sharing. The shell can queue setup work in the background and report its progress without closing the panel.
When a selected model is not running, the agent launch starts it before opening the coding tool. The warm-up view makes this wait visible and then hands the terminal to the agent. A model already loading is waited on rather than started twice. A paired model on another machine is used only while its host is available; Omarchy does not start or stop that remote model from the local panel.
Local use is a launch-time choice. Omarchy adds the model endpoint to the session without changing the agent's saved configuration. If the chosen default cannot use a local model, Omarchy selects a compatible local harness or reports that local use is not supported. Image, video, and music models use Fantasi rather than an agent terminal.
References: bin/omarchy-models• L3-18 bin/omarchy-models• L20-25 bin/omarchy-models• L56-77 bin/omarchy-agent• L79-122 bin/omarchy-agent• L290-335 bin/omarchy-models-warmup• L3-15 shell/…/Main.qml• L465-517 shell/…/Panel.qml• L614-661
Launch flow
The launch path connects a saved or session-specific choice to an installed tool, an optional local model, and a themed terminal session.
flowchart LR
A[User starts an agent] --> B{Default or session choice?}
B -- No --> C[Choose an agent]
B -- Yes --> D{Local model requested?}
C --> D
D -- Yes --> E[Select a compatible model and harness]
D -- No --> F{Agent installed?}
E --> F
F -- No --> G[Install or select the agent]
F -- Yes --> H[Build the session command]
G --> H
H --> I[Open the shared agent terminal]
I --> J[Interactive coding session]
References: bin/omarchy-default-agent• L142-149 bin/omarchy-agent• L67-138 bin/omarchy-agent• L290-397
Provider accounts and usage
Provider selection
The shell agent panel is the place to add supported subscription accounts and local model sources. It separates the agent harness that opens from the provider identity or model route that the harness uses. This lets a user select Codex as the tool while choosing among Codex accounts, for example.
The panel supports adding and re-authenticating Claude Code, Codex, and Grok accounts. Local models and models shared by another machine appear in the same view, but they are model sources rather than subscription accounts. Account actions include naming, selecting, removing, setting a switch threshold, and copying subscription sign-ins to another machine. See provider accounts and provider usage for account lifecycle, transfer, and usage rules.
References: shell/…/README.md• L12-18 shell/…/README.md• L36-70 shell/…/Main.qml• L403-449 shell/…/Panel.qml• L411-450 bin/omarchy-agent-account-threshold• L3-25 bin/omarchy-agent-account-transfer• L3-6
Usage presentation
The panel turns provider records into a common view of access and activity. Subscription sources show plan limits and reset times. Prepaid and budget sources show balance or spend. Local sources show prompts, sessions, tokens, and model activity without a subscription limit.
The panel keeps several accounts distinct and marks old provider answers as stale. It can combine machine-local activity from several devices when sync is enabled, but account limits and account-wide values remain tied to the account that reported them. When an active account nears its configured threshold, Omarchy offers a switch through a notification; the user confirms the change.
References: shell/…/Main.qml• L128-154 shell/…/Main.qml• L783-895 bin/omarchy-agent-account-state• L1066-1126 bin/omarchy-agent-account-threshold• L21-25 shell/…/README.md• L18-47
Provider coverage
The integration presents many agent and provider sources through one usage shape. Each source contributes the access data it can verify, while the shell keeps the display model stable.
| Provider category | Product behavior shown in the shell |
|---|---|
| Subscription agents | Account identity, plan, usage windows, reset times, and account switching where supported. |
| Hosted API providers | Token activity, quota windows, prepaid balance, or budget detail when available. |
| Desktop and harness agents | Local prompts, sessions, tokens, and model use from their records. |
| Self-hosted models | Local activity without a subscription limit or balance. |
| Shared provider routes | Usage assigned to the service that bills the route. |
| Creative local models | A model source with a provider mark and a Fantasi launch rather than a coding-agent terminal. |
Usage collectors keep hosted and self-hosted activity separate. A source with activity but no available quota can still appear with activity only. A source with no useful account or activity data stays out of the panel.
References: shell/…/README.md• L69-107 shell/…/Main.qml• L210-249 shell/…/Main.qml• L479-521 bin/omarchy-agent-usage-update• L7-10 shell/…/collectors.py• L336-407 shell/…/tencent.svg• L1
Shell panel
The agents panel is the visible home for the integrated AI experience. It provides a first-run path for adding an account or local model, a summary of activity, provider sections, account actions, local-model actions, and starter actions for Omarchy customization.
The panel supports mouse and keyboard use. Users can reorder providers, select or rename an account, refresh usage, start or share a local model, pair with a model on another machine, update or remove a model, and reopen sign-in. Other desktop controls can open, close, toggle, or refresh the panel through shell IPC. See shell UI and desktop interactions for the wider shell interaction model.
References: shell/…/README.md• L10-67 shell/…/README.md• L286-305 shell/…/Main.qml• L594-673 shell/…/Panel.qml• L32-139 shell/…/Panel.qml• L739-795
Usage records
Usage is a shared display contract between provider collectors and the shell. Each collector writes one JSON record, and the shell discovers records without needing provider-specific display code. This lets a new provider add a panel section through its record and optional mark.
The records combine local activity with provider answers when both exist. They preserve the last good access value when a later check fails and distinguish “no quota exists” from “quota check failed.” Refresh runs periodically and on demand. A provider that changes the active account is collected again so the record matches the account used by new sessions.
References: shell/…/README.md• L69-77 shell/…/README.md• L105-107 shell/…/Main.qml• L6-10 shell/…/Main.qml• L91-116 shell/…/Main.qml• L156-206 shell/…/collectors.py• L336-407 bin/omarchy-agent-usage-update• L47-91
Account-aware command environment
Active account routing
The launch path keeps direct CLI use aligned with the account selected in Omarchy. For Claude, Codex, and Grok, new commands use the active account home when the user has not set the provider's home variable. An explicit environment setting remains in control.
The same rule applies to desktop launches and direct account commands. This matters because a desktop terminal does not inherit all state from the shell panel. Changing the active account affects new sessions only.
References: bin/omarchy-agent• L369-397 bin/omarchy-agent-account-exec• L1-56 bin/omarchy-agent-account-use• L26-41 default/…/agent-accounts• L1-35
Configuration assets
The integration uses a small set of user state and shell assets to keep selection, account routing, local models, usage, and presentation aligned. Each asset has one role in the larger experience.
| Asset | Role |
|---|---|
| Saved default | Names the agent that normal launches open. |
| Account registry | Names provider accounts, active accounts, and switching policy. |
| Provider configuration | Supplies provider-specific credentials, endpoints, budgets, or display choices. |
| Usage records | Provide the account and activity data shown in the panel. |
| Local model state | Describes available, running, shared, paired, and creative models. |
| Provider marks | Give the panel, notifications, and model launchers a common visual identity, with light and dark variants where needed. |
| Generated model launchers | Give each ready local model a direct desktop action and remove it when the model is removed. |
| Shell settings | Control provider visibility, refresh timing, ordering, and cross-device usage sync. |
| Pi defaults and extensions | Give Pi Omarchy's shared extensions and quiet startup defaults without replacing user choices. |
The panel reads provider-owned state through collectors rather than moving credentials into the shared display. Local-model setup remains separate from usage display, so starting, sharing, or pairing a model does not change how its activity is shown.
References: bin/omarchy-default-agent• L20-29 bin/omarchy-agent-account-state• L88-101 bin/omarchy-agent-local• L7-13 bin/omarchy-models-launchers• L17-21 bin/omarchy-agent-pi-defaults• L3-12 bin/omarchy-agent-pi-defaults• L30-43 bin/omarchy-agent-logo• L1-21 shell/…/Main.qml• L14-35 shell/…/Main.qml• L265-321 shell/…/README.md• L307-351 shell/…/tencent.svg• L1
Agent feedback tools
Integrated agents can inspect the result of work without disturbing the user's desktop. The look commands preview an application or web page and return a resized screenshot with useful errors.
Application previews can run a scaffolded app offscreen with a temporary theme or language, or capture another program's own floating window and close it after capture. Page previews use headless Chrome, can press keys, can apply a theme palette, and report browser console errors. These tools give an agent a closed feedback loop for visual work without leaving an extra application or browser session running.
References: bin/omarchy-agent-look-app• L7-21 bin/omarchy-agent-look-app• L50-65 bin/omarchy-agent-look-app• L85-115 bin/omarchy-agent-look-page• L7-15 bin/omarchy-agent-look-page• L49-73 bin/omarchy-agent-look-page• L80-139
Shared agent instructions
Omarchy gives supported harnesses one user-editable set of global rules. The canonical file is ~/…/AGENTS.md, and Omarchy links it into the global instruction location used by each harness.
Existing user guidance is preserved. A different existing file becomes a backup before Omarchy installs the shared link, and user-owned links or folders keep precedence. This lets several harnesses use the same Omarchy guidance without deleting local rules.
References: bin/omarchy-agent-skills-link• L3-13 bin/omarchy-agent-skills-link• L23-45 bin/omarchy-agent-instructions• L1-19 bin/omarchy-agent-instructions• L29-113
Agent starter actions
Starter actions turn common Omarchy customization goals into prompts for the integrated agent. They can request a theme, shell plugin, desktop app, or game, and they prefer a running local model unless the user asks for the saved default.
The app action also supplies Omarchy-aware app guidance. This connects the shell panel to the skills that describe keyboard-first use, live theme support, and app installation.
References: bin/omarchy-agent-make• L1-30 shell/…/Panel.qml• L884-921 default/…/SKILL.md• L1-21 default/…/SKILL.md• L77-107
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the accepted names and aliases in
bin/omarchy-default-agentaligned with the commands thatbin/omarchy-agentcan launch. - Keep the saved default format compatible with the selector, desktop launchers, local-model pins, and all callers that read it.
- Keep local-model support aligned between model state, compatible launch overlays, warm-up behavior, pairing, setup queues, and generated model launchers.
- Keep generated desktop entries and provider marks aligned with model kind, vendor IDs, launch commands, and removal state. Creative models must continue to open in Fantasi.
- Keep provider record fields aligned with the shared meaning used by
Main.qmland the panel's limit, balance, spend, and account views. - Keep provider IDs stable across account records, usage records, panel ordering, notifications, and icon assets.
- Keep account routing aligned between desktop launches, direct account commands, explicit provider-home overrides, and account transfer.
- Keep account threshold and alert behavior aligned between the account registry, usage records, shell refreshes, and switch notifications.
- Keep shell setup queues and launcher synchronization aligned when local-model setup runs in the background.
- Keep Pi's default extension links and user settings merge aligned with user-owned files and the active Omarchy tree.
- Keep the shared instruction and skill link maps aligned with each harness's actual global paths and user-owned files.
- Keep look-command contracts aligned with the preview hooks used by scaffolded apps and pages, including theme, language, key, and error reporting behavior.
- Keep account-wide and machine-local usage scopes distinct when snapshots are merged across devices.
- Keep starter prompts aligned with the skills they reference and the action labels shown in the shell panel.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| No default agent is saved | A normal launch has no tool to open | The launcher reports the selection command and the panel offers a picker. |
| The saved agent is not installed | The launch stops before opening a missing command | Default-agent setup checks or installs the selected tool. |
| A local model is requested for an incompatible agent | The session cannot use the requested model | The launcher selects a compatible harness or reports unsupported local use. |
| A creative model is sent to a coding-agent launch | The model has no suitable coding session | The panel and generated launcher open image, video, and music models in Fantasi. |
| A preferred-local launch finds no running model | The normal agent could fail to open | Preferred-local mode falls back to the usual agent. |
| A local model is still loading | The terminal can look unresponsive | The warm-up view shows progress and waits for readiness. |
| Local-model setup lacks runtime, GPU, or SSH support | A model cannot start or another machine cannot use it | Setup prepares the required packages and services before use. |
| A prompt uses an unsupported agent option | The starting request can be lost | The launcher uses a supported form or copies the prompt to the clipboard. |
| The active account is not routed to a desktop launch | A new session can use a different subscription than the panel shows | Desktop and direct command paths apply the active account home unless explicitly overridden. |
| A provider record is invalid or empty | The panel can retain old data or hide the provider | Usage refresh validates records before replacing them. |
| A provider answer fails after a good answer | A fresh-looking empty value can hide the last known state | Records retain the last good value and mark it stale. |
| Account-global usage is summed from several devices | One account's activity is counted more than once | Snapshot records declare scope and the merge keeps account-global values widest. |
| A model state read fails while launchers sync | Ready model launchers could be removed incorrectly | The launcher sync leaves existing entries when state cannot be read. |
| A shared instruction path contains different user rules | A harness can use stale or conflicting guidance | Existing differing files are kept as backups before linking. |
| A preview target cannot render or has page or QML errors | The agent cannot verify visual work | Look commands report capture errors and relevant console or QML errors. |
| An account transfer changes names or active state without a matching registry update | A copied sign-in can appear under the wrong account or route new sessions incorrectly | The transfer stream validates account identity and preferences before import. |
Key files
| File | Why to read it |
|---|---|
bin/omarchy-default-agent | Defines default-agent selection, installation, persistence, and post-install setup. |
bin/omarchy-agent | Defines the common launch path, prompt handling, local-model routing, workspace choice, account routing, and terminal presentation. |
bin/omarchy-agent-launcher | Installs a desktop launcher for an installed harness. |
bin/omarchy-models | Prepares and manages local-model runtime, sharing, pairing, and launcher refresh. |
bin/omarchy-models-launchers | Keeps desktop entries, model kind actions, and provider marks aligned with ready local models. |
bin/omarchy-models-warmup | Shows model readiness while a local model starts. |
bin/omarchy-agent-look-app | Previews a desktop app offscreen or in a controlled floating window. |
bin/omarchy-agent-look-page | Previews a web page and reports browser errors. |
bin/omarchy-agent-look-plugin | Previews a shell plugin widget and reports QML problems. |
bin/omarchy-agent-look-theme | Previews a theme and checks the main visual risks. |
bin/omarchy-agent-skills-link | Links Omarchy skills into supported harnesses while preserving user-owned skills. |
bin/omarchy-agent-pi-defaults | Sets Pi's Omarchy extension link and safe startup defaults. |
bin/omarchy-agent-account-state | Defines provider account registry, active-account selection, account homes, switching policy, and threshold alerts. |
bin/omarchy-agent-account-transfer | Copies subscription account sign-ins between Omarchy machines. |
bin/omarchy-agent-account-exec | Keeps direct provider commands on the selected subscription account. |
bin/omarchy-agent-usage-update | Runs provider collectors and publishes the records that drive the shell panel. |
shell/plugins/agents/Panel.qml | Shows account, provider, local-model, network-model, and starter actions in the shell. |
shell/plugins/agents/Main.qml | Defines provider discovery, refresh, local-model state, pairing, launcher sync, and cross-device usage aggregation. |
| shell/…/README.md | Explains the shell plugin's product behavior, record contract, settings, and provider display model. |
| shell/…/collectors.py | Defines the shared usage record, cache, and activity-reading contract used by provider collectors. |
| shell/…/tencent.svg | Provides the Tencent provider mark used by local-model presentation. |
bin/omarchy-agent-instructions | Connects one user instruction file to supported harness instruction paths. |
bin/omarchy-agent-make | Connects customization starter actions to local or default agent launches. |
| default/…/SKILL.md | Describes the Omarchy-aware app work that the integrated agent can perform. |