kumarabhirup 23172896af
Web app: fix chat stream in standalone builds and add tests
- Fix spawnAgentProcess path resolution: walk up to find package root
  instead of assuming 2 levels up from apps/web (breaks in standalone
  where cwd is deep inside .next/standalone/); use openclaw.mjs in
  production since scripts/run-node.mjs isn't shipped in the package
- Add missing readline error handlers in active-runs.ts and
  agent-runner.ts to prevent "Unhandled 'error' event" crashes when
  the child process fails to start
- Pass OPENCLAW_ROOT env var from gateway to standalone server so the
  web app can reliably find the CLI entry point
- Add 32 tests covering path resolution, SSE streaming, error handling,
  run lifecycle, replay, and abort

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 20:28:05 -08:00
2026-02-11 11:12:04 -06:00
2026-01-31 23:41:43 -08:00
2026-01-21 19:58:19 +00:00
2026-01-30 03:16:21 +01:00
2026-01-08 02:29:20 +00:00
2026-01-31 21:13:13 +09:00
2025-11-24 11:16:47 +01:00
2026-02-08 22:21:20 -08:00
2026-01-30 03:16:21 +01:00
2026-01-31 21:13:13 +09:00

Ironclaw

AI-powered CRM platform with multi-channel agent gateway, DuckDB workspace, and knowledge management.

npm version MIT License


Ironclaw is a personal AI assistant and CRM toolkit that runs on your own devices. It connects to your existing messaging channels (WhatsApp, Telegram, Slack, Discord, Google Chat, Signal, iMessage, Microsoft Teams, and more), manages structured data through a DuckDB-powered workspace, and provides a rich web interface for knowledge management and reporting.

Built on OpenClaw with Vercel AI SDK v6 as the default LLM orchestration layer.

Features

  • Multi-channel inbox -- WhatsApp, Telegram, Slack, Discord, Google Chat, Signal, iMessage, Microsoft Teams, Matrix, WebChat, and more.
  • DuckDB workspace -- Structured data objects, file management, full-text search, and bulk operations through a local DuckDB-backed store.
  • Web UI (Dench) -- Modern chat interface with chain-of-thought reasoning, report cards, media viewer, and a database explorer. Supports light and dark themes.
  • Agent gateway -- Local-first WebSocket control plane for sessions, channels, tools, and events. Routes agent execution through lane-based concurrency.
  • Vercel AI SDK v6 -- Default LLM engine with support for Anthropic, OpenAI, Google, Groq, Mistral, xAI, OpenRouter, and Azure. Full extended thinking/reasoning support.
  • Knowledge management -- File tree, search index, workspace objects with custom fields, and entry-level detail views.
  • TanStack data tables -- Sortable, filterable, bulk-selectable tables for workspace objects powered by @tanstack/react-table.
  • Companion apps -- macOS menu bar app, iOS/Android nodes with voice, camera, and canvas capabilities.
  • Skills platform -- Bundled, managed, and workspace-scoped skills with install gating.

Install

Runtime: Node 22+

From npm

npm install -g ironclaw@latest

ironclaw onboard --install-daemon

From source

git clone https://github.com/kumarabhirup/openclaw-ai-sdk.git
cd openclaw-ai-sdk

pnpm install
pnpm build

pnpm dev onboard --install-daemon

Quick start

# Start the gateway
ironclaw gateway --port 18789 --verbose

# Send a message
ironclaw message send --to +1234567890 --message "Hello from Ironclaw"

# Talk to the agent
ironclaw agent --message "Summarize today's tasks" --thinking high

Web UI

The web application lives in apps/web/ and is built with Next.js. It provides:

  • Chat panel with streaming responses, chain-of-thought display, and markdown rendering (via react-markdown + remark-gfm).
  • Workspace sidebar with a file manager tree, knowledge tree, and database viewer.
  • Object tables with sorting, filtering, row selection, and bulk delete.
  • Entry detail modals with field editing and media previews.
  • Report cards with chart panels and filter bars.
  • Media viewer supporting images, video, audio, and PDFs.

To run the web UI in development:

cd apps/web
pnpm install
pnpm dev

Configuration

Ironclaw stores its config at ~/.openclaw/openclaw.json. Minimal example:

{
  agent: {
    model: "anthropic/claude-opus-4-6",
  },
}

Supported providers

Provider Environment Variable Models
Anthropic ANTHROPIC_API_KEY Claude 4/3.x, Opus, Sonnet, Haiku
OpenAI OPENAI_API_KEY GPT-4o, GPT-4, o1, o3
Google GOOGLE_GENERATIVE_AI_API_KEY Gemini 2.x, 1.5 Pro
OpenRouter OPENROUTER_API_KEY 100+ models
Groq GROQ_API_KEY Llama, Mixtral
Mistral MISTRAL_API_KEY Mistral models
xAI XAI_API_KEY Grok models
Azure AZURE_OPENAI_API_KEY Azure OpenAI models

Thinking / reasoning

# Set thinking level (maps to AI SDK budgetTokens)
ironclaw agent --message "Complex analysis" --thinking high

# Levels: off, minimal, low, medium, high, xhigh

Channel setup

Each channel is configured in ~/.openclaw/openclaw.json under channels.*:

  • WhatsApp -- Link via ironclaw channels login. Set channels.whatsapp.allowFrom.
  • Telegram -- Set TELEGRAM_BOT_TOKEN or channels.telegram.botToken.
  • Slack -- Set SLACK_BOT_TOKEN + SLACK_APP_TOKEN.
  • Discord -- Set DISCORD_BOT_TOKEN or channels.discord.token.
  • Signal -- Requires signal-cli + channels.signal config.
  • iMessage -- Via BlueBubbles (recommended) or legacy macOS-only integration.
  • Microsoft Teams -- Configure a Teams app + Bot Framework.
  • WebChat -- Uses the Gateway WebSocket directly, no extra config.

Chat commands

Send these in any connected channel:

Command Description
/status Session status (model + tokens)
/new or /reset Reset the session
/compact Compact session context
/think <level> Set thinking level
/verbose on|off Toggle verbose output
/usage off|tokens|full Per-response usage footer
/restart Restart the gateway
/activation mention|always Group activation toggle

Architecture

WhatsApp / Telegram / Slack / Discord / Signal / iMessage / Teams / WebChat
               |
               v
  +----------------------------+
  |          Gateway           |
  |     (control plane)        |
  |   ws://127.0.0.1:18789    |
  +-------------+--------------+
                |
                +-- Vercel AI SDK v6 engine
                +-- CLI (ironclaw ...)
                +-- Web UI (Dench)
                +-- macOS app
                +-- iOS / Android nodes

Project structure

src/              Core CLI, commands, gateway, agent, media pipeline
apps/web/         Next.js web UI (Dench)
apps/ios/         iOS companion node
apps/android/     Android companion node
apps/macos/       macOS menu bar app
extensions/       Channel plugins (MS Teams, Matrix, Zalo, voice-call)
docs/             Documentation
scripts/          Build, deploy, and utility scripts
skills/           Workspace skills

Development

pnpm install          # Install deps
pnpm build            # Type-check + build
pnpm check            # Lint + format check
pnpm test             # Run tests (vitest)
pnpm test:coverage    # Tests with coverage
pnpm dev              # Dev mode (auto-reload)

Security

  • DM pairing is enabled by default -- unknown senders receive a pairing code.
  • Approve senders with ironclaw pairing approve <channel> <code>.
  • Non-main sessions can be sandboxed in Docker (agents.defaults.sandbox.mode: "non-main").
  • Run ironclaw doctor to surface risky or misconfigured DM policies.

Upstream

Ironclaw is a fork of OpenClaw. To sync with upstream:

git remote add upstream https://github.com/openclaw/openclaw.git
git fetch upstream
git merge upstream/main

License

MIT

Description
Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞
Readme MIT 2.2 GiB
Languages
TypeScript 73.8%
JavaScript 17.1%
Swift 6.1%
Kotlin 1.4%
Shell 0.9%
Other 0.6%