> ## Documentation Index
> Fetch the complete documentation index at: https://docs.videodb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw Monitoring

> CCTV for AI agents — record every session, watch runs live, and search agent activity with natural language

[OpenClaw Monitoring - CCTV for AI Agents](https://www.youtube.com/embed/dnGWaFeo2FA)

> [card] [OpenClaw Monitoring on GitHub](https://github.com/video-db/openclaw-monitoring)
>
> Complete source code, installation guide, and configuration examples

## What Is It?

Your AI agent just did something on a remote server. Do you know what?

Right now, most people running agents are doing this: Send task → Wait → Get "Success" in Slack → Hope for the best. That's not monitoring. That's faith.

And faith breaks down fast. Your agent could have:

* Gotten stuck on a CAPTCHA and retried 47 times
* Navigated to the wrong site and filled forms with test data
* Completed the task correctly but missed a validation step
* Encountered an error you'll never see because logs don't capture visual context

**VideoDB Monitoring** turns your OpenClaw agent into an observable, auditable worker. Every run becomes a live stream (watch in real-time), a replayable recording (shareable URL, not a dead video file), and a searchable archive (find "when did it open the spreadsheet?"). Think of it as a dashcam for your AI agent, or CCTV for computer-use agents.

> [!NOTE]
>
> **Platform Support**: OpenClaw Monitoring is platform-agnostic—it runs on any system that supports Node.js 18+ and TypeScript. Works on macOS, Windows, and Linux.

## Why Teams Need It

> [tab] Full Visibility
>
> ### See Everything
>
> * **Live stream** — watch your agent work in real-time
> * **Replayable recordings** — shareable URL, not a dead video file
> * **Full session capture** — screen and audio recorded continuously
> * Catch issues before they become incidents

> [tab] Searchable History
>
> ### Find Any Moment
>
> * **Searchable moments** — find "when did it open the spreadsheet?"
> * AI-generated summaries of agent sessions
> * Timestamped results with auto-generated clips
> * Full transcripts of audio content

> [tab] Compliance Ready
>
> ### Audit Everything
>
> * Complete visual audit trail of agent actions
> * **Webhook alerts** — get notified when something looks off
> * Replay failures to see exactly where things went wrong
> * Meet regulatory requirements with searchable evidence

> [!WARNING]
>
> **Why Logs Aren't Enough**
>
> Traditional logging captures what your code does. But autonomous agents interact with visual interfaces—browsers, desktop apps, forms—where the "ground truth" is what's on screen, not what's in a log file.
>
> You can log "clicked button #submit" but you can't log "the submit button was disabled because the CAPTCHA wasn't solved yet" unless you see the screen. Visual monitoring captures this reality, giving you the same view the agent had when it made decisions.

## How It Works

**1. Screen Capture**

A monitor daemon (`monitor.ts`) runs alongside your OpenClaw agent, continuously capturing the screen. Recordings stream directly to VideoDB.

**2. On-Demand Indexing**

Indexing is separate from recording — you only pay for it when needed. When triggered, VideoDB processes recordings with:

* **Visual indexing** — scene descriptions, active apps, URLs, and error detection
* **Transcript** — speech-to-text from system audio
* **Audio indexing** — semantic indexing of audio content

**3. Search & Summarize**

Query agent history using natural language. Get timestamped results, auto-generated clips, and session summaries. The agent can even use its own recordings — "summarize what you did in the last 2 hours."

**4. Two Setup Options**

**Option 1**: Install as an OpenClaw skill — the agent handles recording, indexing, and search automatically.
**Option 2**: Use VideoDB's indexing APIs directly for post-recording analysis, summaries, and search.

## CLI Commands

The `videodb.ts` CLI tool provides these commands:

| Command | What It Does |
| - | - |
| `start-indexing` | Start all indexing (visual + audio + transcript) |
| `stop-indexing` | Stop all indexing |
| `start-visual-index` | Start visual scene indexing |
| `stop-visual-index` | Stop visual scene indexing |
| `start-audio-index` | Start audio indexing |
| `stop-audio-index` | Stop audio indexing |
| `start-transcript` | Start transcript extraction |
| `stop-transcript` | Stop transcript extraction |
| `search` | Natural language search across indexed recordings |
| `summary` | Generate an AI summary of agent activity |
| `transcript` | Get full transcript of audio content |
| `stream` | Get a playable stream URL for a specific time range |

## Real-World Scenarios

> [accordion] Debugging Failed Runs
>
> An agent task failed overnight. Instead of digging through logs, search "when did the error first appear" and get a video clip of exactly what happened — the commands run, the error messages, and the state of the screen.

> [accordion] Compliance Auditing
>
> Need proof of what your AI agents did and when? OpenClaw Monitoring provides timestamped, searchable visual records that serve as a full audit trail of agent actions.

> [accordion] Security Monitoring
>
> Catch agents going off-script or accessing unexpected domains. Webhook alerts notify you when something looks off, giving you video evidence of unexpected behavior.

> [accordion] QA & Testing
>
> Review agent workflows before pushing to production. Record test sessions, then search for edge cases, errors, or unexpected behaviors. Share specific clips with your team.

> [accordion] Agent Self-Reporting
>
> Your agent can use its own recordings: "Summarize what you did in the last 2 hours", "Make a highlight video of today's work and post it to YouTube", or "Find the moment when you encountered the error."

## Tech Stack

> [card] TypeScript
>
> Monitor daemon and CLI tooling (`monitor.ts`, `videodb.ts`)

> [card] Python + Flask
>
> Backend server for session management and Cloudflare tunneling

> [card] VideoDB SDK
>
> Media streaming, AI indexing, and semantic search

> [card] OpenClaw
>
> Autonomous agent framework with skill system

## Getting Started

> [!NOTE]
>
> **Prerequisites**
>
> * [OpenClaw](https://openclaw.ai/) installed and running
> * Node.js 18+
> * [VideoDB API key](https://console.videodb.io/auth?utm_source=docs_videodb_io\&utm_medium=docs_link\&utm_campaign=console_auth\&utm_content=docs_link\&id=docs)

**1. Install the Skill**

Point your OpenClaw agent at the repo:

```text theme={null}
please install https://github.com/video-db/openclaw-monitoring skill and set it up
```

Or install manually:

```bash theme={null}
git clone https://github.com/video-db/openclaw-monitoring.git
mkdir -p ~/.openclaw/workspace/skills/videodb-monitoring
cp -r openclaw-monitoring/videodb-monitoring-skill/* ~/.openclaw/workspace/skills/videodb-monitoring/
cd ~/.openclaw/workspace/skills/videodb-monitoring
npm install
```

**2. Set Your API Key**

```bash theme={null}
openclaw config set skills.entries.videodb-monitoring.env.VIDEODB_API_KEY 'sk-xxx'
```

Get your API key at [console.videodb.io](https://console.videodb.io/auth?utm_source=docs_videodb_io\&utm_medium=docs_link\&utm_campaign=console_auth\&utm_content=docs_link\&id=docs).

**3. Start the Monitor**

```bash theme={null}
cd ~/.openclaw/workspace/skills/videodb-monitoring
nohup npx tsx monitor.ts > ~/.videodb/logs/monitor.log 2>&1 & disown
openclaw gateway restart
```

**4. Use It**

Ask your agent:

* "Do X on the browser and send me the recording"
* "What did I do in the last hour?"
* "Find when I opened the spreadsheet"

> [!WARNING]
>
> **Cost Note**: VideoDB ingestion is billed at **\$0.084 / hour** of captured content. Indexing is on-demand — you only pay for it when you trigger it. See the [Capture SDK overview](https://docs.videodb.io/pages/ingest/capture-sdks/overview.md) for details.

## Try Without Setup

Skip installation and try indexing against a hosted live OpenClaw session at [matrix.videodb.io](https://matrix.videodb.io):

```bash theme={null}
git clone https://github.com/video-db/openclaw-monitoring.git
cd openclaw-monitoring
echo "VIDEO_DB_API_KEY=your_api_key_here" > .env
uv run try_without_setup.py
```

This connects to the public agent's live streams, starts indexing, and prints events to your terminal. Press `Ctrl+C` to stop and search the indexed content.

## Privacy & Security

> [!TIP]
>
> **API Key Security** — Keys stored locally via OpenClaw config, never transmitted except to VideoDB

> [!TIP]
>
> **On-Demand Indexing** — AI processing runs only when you trigger it, keeping costs controlled

> [!TIP]
>
> **Visual Audit Trail** — Complete recordings provide verifiable evidence of agent activity

> [!TIP]
>
> **Secure Tunneling** — Cloudflare Tunnel for webhook delivery without exposing ports

***

> [card] [Complete Setup Guide on GitHub](https://github.com/video-db/openclaw-monitoring)
>
> Full installation instructions, advanced setup, and troubleshooting

## Related Tutorials

> [card] [Pair Programmer](https://docs.videodb.io/examples-and-tutorials/ai-copilots/pair-programmer.md)
>
> AI coding assistant with real-time screen and audio context

> [card] [FocusD](https://docs.videodb.io/examples-and-tutorials/ai-copilots/focusd.md)
>
> AI-powered productivity tracking with automatic time insights


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.