Skip to content

Add OpenClaw as an AI agent option - #9869

Closed
mbot11 wants to merge 1 commit into
omacom:quattrofrom
mbot11:add-openclaw-agent
Closed

mbot11 wants to merge 1 commit into
omacom:quattrofrom
mbot11:add-openclaw-agent

Conversation

@mbot11

@mbot11 mbot11 commented Sep 2, 2026

Copy link
Copy Markdown

Add OpenClaw as an AI agent option

Summary

Adds OpenClaw (formerly Clawdbot/Moltbot) to the AI
coding-agent roster on quattro, following the exact conventions of the
existing agents:

  • lazy-loaded launcher via mise (agent_package="npm:openclaw")
  • a row in Setup > Defaults > Agent with the standard checkmark guard
  • an unattended launch mapping in omarchy-agent (openclaw tui, prompt
    seeded via --message)
  • an agents-panel usage collector matching the packaged collector record
    contract (schemaVersion: 1), writing openclaw.json next to
    claude.json and codex.json

Why

OpenClaw is one of the most widely used agent harnesses, and its terminal UI
(openclaw tui) is a full agent surface with tool approvals. Users who run it
alongside Claude Code / Codex / OpenCode currently get no agents-panel usage
tracking and no default-agent option. This patch closes both gaps the same way
every other agent is wired.

Changes

  1. bin/omarchy-default-agent — openclaw / open-claw case, usage strings
  2. bin/omarchy-agent — launch case: openclaw tui (gateway-connected TUI),
    --message "$prompt" for prompt seeding
  3. default/omarchy/omarchy-menu.jsonc — setup.default.agent.openclaw row
  4. bin/omarchy-agent-usage-openclaw — new usage collector (same record
    contract as the packaged collectors; discovers sessions via
    openclaw sessions --json --all-agents and prompt counts from gateway
    audit events)

Notes for review

  • OpenClaw is a gateway-first tool; openclaw tui talks to the local Gateway
    (loopback) and works headless, so the launch mapping needs no special flags.
  • The usage collector shells out to the openclaw CLI rather than reading its
    state SQLite directly (the store uses the sqlite-vec extension), which
    also keeps it stable across OpenClaw schema changes.
  • The collector only reports metadata (counts, model names, token totals) —
    no message content, credentials, or provider keys are read or written.

Testing

  • bash -n on both modified scripts; JSONC parse on the modified menu
  • openclaw tui launches against a running gateway and accepts --message
  • collector verified against a live gateway: correct today/session/token
    aggregates, atomic write to ~/.local/state/omarchy/agents/usage/openclaw.json

@smfworks

Copy link
Copy Markdown
Contributor

Cross-referencing with #7919, which wires the same agent entries (bin/omarchy-agent, bin/omarchy-default-agent, omarchy-menu.jsonc) plus the full install/remove/onboarding flow: these two PRs edit the same files from different bases and will conflict.

The unique piece here is real and needed: there is no omarchy-agent-usage-openclaw on main, and the packaged collectors (claude, codex, fireworks) are what feed the agents usage panel — without one, OpenClaw shows up in the panel with no stats. I verified this collector's CLI calls against openclaw 2026.9.4: sessions --json --all-agents --limit all and audit --json + --cursor pagination are all valid flags, and the record matches the packaged contract (schemaVersion 1, same field set).

Suggestion: drop the duplicated agent wiring from this PR (that's #7919's territory) and either rebase this collector on top of #7919's wiring once it lands or offer it to #7919 directly. The collector is worth keeping; the overlapping wiring will just burn review time on conflicts.

@dhh

dhh commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thanks! OpenClaw is already a default agent on quattro through omarchy-install-openclaw-cli, so the agent wiring here is superseded. Closing.

@dhh dhh closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants