Skip to content

clawnify/agent-control-ui

Repository files navigation

If OpenClaw hadn't been built by engineers, it would look like this

A friendlier chat UI for OpenClaw gateways.

Image

OpenClaw ships a built-in Control UI at http://<gateway>:18789. This is a separate, opinionated client that talks the same WebSocket protocol but trades breadth for polish — it focuses on the daily-driver chat surface and leaves gateway administration to the upstream Control UI.

Status: v0 scaffold. Connection, settings, basic chat send/receive work. Tool-event cards, approval UI, action groups, and richer history rendering are queued up — see Roadmap below.

Quick start

npx @clawnify/agent-control-ui

That's it. The command starts a local static server on http://127.0.0.1:5174/. Open it in your browser, fill in the gateway URL + token, and you're connected.

Auto-detected local OpenClaw gateway

When run locally, the UI reads ~/.openclaw/openclaw.json over a loopback-only HTTP endpoint and offers a one-click connect. The token stays in memory unless you explicitly persist it.

If no local gateway is found (or you want to point at a remote one), the Connection dialog accepts manual settings:

Manual connection settings
  • Gateway URLws://127.0.0.1:18789 for a local gateway, or wss://magicdns.example.ts.net over Tailscale Serve.
  • Gateway token — the shared secret from your gateway's ~/.openclaw/openclaw.json under gateway.auth.token.

You can pre-fill via the URL:

http://127.0.0.1:5174/?gatewayUrl=ws://127.0.0.1:18789#token=<your-token>
  • gatewayUrl is persisted to localStorage after first load.
  • token lives in the URL fragment (never sent to any server) and is kept in memory only unless you tick "Remember token in this browser".

Or from source

pnpm install
pnpm dev

Opens a Vite dev server at http://localhost:5173.

Run as a service

Auto-start @clawnify/agent-control-ui on boot alongside the OpenClaw gateway. Unit templates ship with the repo:

Setup instructions: packaging/README.md.

Gateway-side configuration

For non-loopback connections, your gateway must whitelist this app's origin. Edit ~/.openclaw/openclaw.json:

{
  gateway: {
    controlUi: {
      allowedOrigins: [
        "http://localhost:5173",
        "https://chat.example.com"
      ]
    }
  }
}

Loopback (127.0.0.1, localhost) is allowed automatically.

First-time pairing

The first browser to connect to a gateway needs a one-time pairing approval. You will see disconnected (1008): pairing required. On the gateway host:

openclaw devices list
openclaw devices approve <requestId>

Once approved, the device is remembered until you revoke it.

Roadmap

  • v0: connect handshake, settings, basic chat.history / chat.send / streaming chat events / abort
  • v0.1: tool-event cards (tool-events cap), action groups, action icon/label lookup
  • v0.2: approval cards (exec.approval.*, plugin.approval.*)
  • v0.3: rich history parser (compaction events, retrying phase, fallback toasts, abort partials)
  • v0.4: session/model picker, slash commands

Architecture

  • src/lib/gateway-ws.ts — disposable WebSocket client for the gateway protocol (v4). Connect handshake with Ed25519 device identity.
  • src/lib/device-identity.ts — Ed25519 keypair generation + challenge signing. Keys persist in localStorage.
  • src/lib/config.ts — bootstraps the gateway URL and token from URL fragment / query param / localStorage.
  • src/components/Settings.tsx — form for gateway URL + token.
  • src/components/Chat.tsx — v0 chat surface.

Relation to OpenClaw

This is an independent client. It speaks the standard Gateway WebSocket protocol documented at openclaw.ai/web/control-ui. No fork, no patches — point it at your gateway and it works.

Contributing

Issues and pull requests welcome from anyone — see CONTRIBUTING.md for the lightweight workflow.

License

MIT. See LICENSE.


Initiated by the Clawnify team.

About

A designer's take on the OpenClaw agent Control UI. Open-source, npm-installable, browser-based client for OpenClaw gateways.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors