@claw-link/clom
v1.1.4
Published
CLOM — ClawLink Local Orchestration Module. Installs as an OpenClaw sub-agent to enable rich interactive UI, local structured data storage, and post-submission workflows.
Maintainers
Readme
@claw-link/clom
CLOM — ClawLink Local Orchestration Module
CLOM installs as a sub-agent alongside your self-hosted OpenClaw instance. It gives your ClawLink AI agents two capabilities they don't have by default:
- Rich interactive UI — generate inline forms, slot pickers, card grids, OTP, date pickers, file uploads, and more as structured JSON output (
clawlink_uitool calls). The companion package@claw-link/clom-rendererrenders that JSON as interactive React components on the client side. - Local structured storage — every form submission is stored in a local SQLite or PostgreSQL database, per session and customer, with full prefill and deduplication
Without CLOM your agent still works — text chat, FAQ, persona, webhook dispatch — but clawlink_ui interactions won't render for customers.
Rendering CLOM output in your UI? Use
@claw-link/clom-renderer— a standalone React library that takes any CLOM JSON output and renders the correct interactive component with zero config.
Requirements
- Node.js 18+
- OpenClaw running locally (self-hosted mode)
- A ClawLink account and Tenant ID
Install
npx @claw-link/clomThe installer will:
- Copy the CLOM workspace into
~/.openclaw/workspace-clom/ - Set up the local database (SQLite by default, PostgreSQL optional)
- Register CLOM as a sub-agent in your
openclaw.json - Prompt for your Supabase URL, Service Role Key, and Tenant ID
- Mark CLOM as active in your ClawLink dashboard
Then restart OpenClaw — CLOM will appear as the openclaw/clom agent.
How it works
CLOM operates in two phases:
Phase 1 — Configuration (admin time)
When you teach your agent a new capability via the ClawLink dashboard (Skills → Setup via Chat), CLOM:
- Receives an intent description from the parent agent (e.g. "collect delivery address")
- Calls
generateInteraction()to build the right UI spec for that intent - Persists the spec with
saveTemplate()— stored locally, ready to serve instantly
Phase 2 — Runtime (customer chat)
When a customer triggers a configured flow:
- CLOM checks existing session data (
querySubmissions) — never asks for info already collected - Retrieves the pre-built spec (
getTemplate) and merges any known customer profile data for prefill - Returns the spec to the parent agent as a
clawlink_uitool call — renders inline in the chat - Stores the submission (
insertSubmission) and optionally triggers post-submission workflows
Supported UI types
CLOM picks the right interaction type based on your intent:
| Intent | Renders as |
|--------|-----------|
| Collect address | address form with prefill |
| Book appointment | slot_picker |
| Show products/services | card_grid |
| Confirm an order | confirmation_card |
| Select a date | date_picker |
| Verify identity | otp |
| Upload document | file_upload |
| Rate experience | rating |
| Show order status | timeline |
| Display records | data_table |
| Multi-step process | stepper |
| Single choice | select |
| Multiple choices | multiselect |
| Custom fields | form |
Database
CLOM stores all data locally on the machine running OpenClaw.
SQLite (default) — zero config, stored at ~/.openclaw/clom/clom.db
PostgreSQL (optional) — set CLOM_DB_URL in ~/.openclaw/workspace-clom/.env:
CLOM_DB_URL=postgresql://user:password@localhost:5432/clomStatus & heartbeat
CLOM reports its status back to your ClawLink dashboard automatically:
- On install: marks
clom_active = truein your tenant record - While running: sends a heartbeat to Supabase every 10 minutes (fire-and-forget, never blocks the agent)
- From the dashboard: Skills → Check status does a live ping via your OpenClaw gateway
Environment variables
Set in ~/.openclaw/workspace-clom/.env (written by the installer):
| Variable | Description |
|----------|-------------|
| SUPABASE_URL | Your Supabase project URL |
| SUPABASE_SERVICE_KEY | Service Role key (for status reporting) |
| CLOM_TENANT_ID | Your ClawLink Tenant ID |
| CLOM_DB_PATH | SQLite path (default: ~/.openclaw/clom/clom.db) |
| CLOM_DB_URL | PostgreSQL connection string (overrides SQLite) |
Uninstalling
npx @claw-link/clom --uninstallThe uninstaller will prompt you through two confirmations:
- Keep or delete DB data — choose whether to remove
~/.openclaw/clom/(your SQLite database and any stored submissions). Choosing N keeps the data intact so you can reinstall later without losing history. - Proceed — final confirmation before anything is removed.
What gets removed:
| Item | Path | Notes |
|------|------|-------|
| Workspace files | ~/.openclaw/workspace-clom/ | Always removed |
| Agent directory | ~/.openclaw/agents/clom/ | Always removed |
| openclaw.json entries | agents.list, subagents.allowAgents, acp.allowedAgents | Always cleaned up |
| DB data | ~/.openclaw/clom/ | Only if you answer y to the first prompt |
After uninstalling, OpenClaw is restarted automatically (macOS via launchctl, Linux via systemctl --user). If auto-restart fails, a warning is shown and you can restart manually.
Updating
npx @claw-link/clomRe-running the installer updates the workspace files and re-registers the agent. Bump the version and npm publish to ship new versions.
License
MIT — see LICENSE
