Luciano Castillo 8db30f1f12 fix(monitor): improve subagent spawn inference and minimap sizing (#22)
* refactor(clawdbot): update spawn inference logic

- Replaced parent session activity tracking with a pending spawns array to record Task tool calls.
- Adjusted the spawn inference window to 10 seconds, ensuring accurate tracking of recent Task calls.
- Enhanced the inferSpawnedBy function to utilize the new pending spawns structure for improved session mapping.
- Removed obsolete parent session activity tracking code for cleaner implementation.

* fix(clawdbot): normalize tool name handling in action tracking

- Updated the action tracking logic to convert tool names to lowercase for consistent comparison, ensuring accurate detection of 'Task' tool calls in both addAction and hydrateFromServer functions.
- Enhanced event parsing to process tool events more effectively, improving overall event handling and session state management.

* refactor(clawdbot): enhance spawn inference with parent session activity tracking

- Introduced a new Map to track recent parent session activity, providing a fallback for spawn inference when Task tool calls are not available.
- Updated the recordPendingSpawn and inferSpawnedBy functions to utilize this new tracking mechanism, improving the accuracy of session mapping.
- Enhanced the addAction and hydrateFromServer functions to incorporate parent session activity tracking, ensuring comprehensive spawn history management.
- Cleared parent session activity during collection resets to maintain data integrity.

* refactor(clawdbot): improve parent session action tracking for spawn inference

- Replaced the previous parent session activity tracking with a new structure to maintain a history of recent actions, allowing for more precise spawn inference.
- Updated the trackParentAction function to log actions with timestamps and manage a maximum history length.
- Modified the inferSpawnedBy function to utilize the new action history for better accuracy in linking subagents to their parent sessions.
- Adjusted the addAction and hydrateFromServer functions to reflect the new tracking mechanism, ensuring comprehensive session mapping.
- Cleared the action history during collection resets to maintain data integrity.

* style(monitor): adjust ActionGraph component dimensions

- Updated the ActionGraphInner component to include width and height styles, enhancing the layout and visual consistency of the graph representation.
2026-01-29 21:22:47 -05:00
2026-01-26 14:55:04 -05:00
2026-01-26 20:25:12 -05:00
2026-01-25 17:47:27 -05:00
2026-01-25 17:47:27 -05:00
2026-01-26 15:13:31 -05:00
2026-01-28 18:04:22 -05:00
2026-01-28 18:04:22 -05:00
2026-01-25 17:47:27 -05:00

🦀 Crabwalk

Real-time companion monitor for Moltbot (Clawdbot) agents by @luccasveg.

Watch your AI agents work across WhatsApp, Telegram, Discord, and Slack in a live node graph. See thinking states, tool calls, and response chains as they happen.

Crabwalk Home

Crabwalk Monitor

Features

  • Live activity graph - ReactFlow visualization of agent sessions and action chains
  • Multi-platform - Monitor agents across all messaging platforms simultaneously
  • Real-time streaming - WebSocket connection to clawdbot gateway
  • Action tracing - Expand nodes to inspect tool args and payloads
  • Session filtering - Filter by platform, search by recipient

Installation

docker run -d \
  -p 3000:3000 \
  -e CLAWDBOT_API_TOKEN=your-token \
  -e CLAWDBOT_URL=ws://host.docker.internal:18789 \
  ghcr.io/luccast/crabwalk:latest

Note: When running Crabwalk in Docker, the Moltbot gateway typically runs on the host. Use CLAWDBOT_URL=ws://host.docker.internal:18789 so the container can connect. If you're running Moltbot with bind: loopback and tailscale serve for secure tailnet-only access, you'll need to run the crabwalk container with host networking - replace p:3000:3000 with --network host This allows the container to reach 127.0.0.1:18789 while maintaining the security benefits of loopback-only binding.

Or with docker-compose:

curl -O https://raw.githubusercontent.com/luccast/crabwalk/master/docker-compose.yml
CLAWDBOT_API_TOKEN=your-token CLAWDBOT_URL=ws://host.docker.internal:18789 docker-compose up -d

If gateway is bind: loopback only, you will need to edit the docker-compose.yml to add network_mode: host

From source

git clone https://github.com/luccast/crabwalk.git
cd crabwalk
npm install
CLAWDBOT_API_TOKEN=your-token npm run dev

Open http://localhost:3000/monitor

Configuration

Requires clawdbot gateway running on the same machine.

Gateway Token

Find your token in the clawdbot config file:

# Look for gateway.auth.token
cat ~/.clawdbot/clawdbot.json | rg "gateway\.auth\.token"

Or with jq:

jq '.gateway.auth.token' ~/.clawdbot/clawdbot.json

Or copy it directly:

export CLAWDBOT_API_TOKEN=$(python3 -c "import json,os; print(json.load(open(os.path.expanduser('~/.clawdbot/clawdbot.json')))['gateway']['auth']['token'])")

Accessing from a remote host

If you are running this on a remote server and accessing it through a non-local browser, the default allowedHosts behaviour will prevent access to the web UI.

If running in docker, you can pass the environment variable ALLOWED_HOSTS with a comma-separated list of hosts you wish to allow access to the crabwalk UI.

If running from source, you can either pass ALLOWED_HOSTS as an env var at the command line, or use a .env file.

Stack

TanStack Start, ReactFlow, Framer Motion, tRPC, TanStack DB

S
Description
No description provided
Readme MIT
5.4 MiB
Languages
TypeScript 94.4%
CSS 3.3%
Shell 2.2%
Dockerfile 0.1%