> ## 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

<iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/dnGWaFeo2FA" title="OpenClaw Monitoring - CCTV for AI Agents" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

<Card title="OpenClaw Monitoring on GitHub" icon="github" href="https://github.com/video-db/openclaw-monitoring">
  Complete source code, installation guide, and configuration examples
</Card>

## 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.

<Info>
  **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.
</Info>

## Why Teams Need It

<Tabs>
  <Tab title="Full Visibility" icon="eye">
    ### 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>

  <Tab title="Searchable History" icon="search">
    ### 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>

  <Tab title="Compliance Ready" icon="shield">
    ### 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
  </Tab>
</Tabs>

<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.
</Warning>

## How It Works

<Steps>
  <Step title="Screen Capture">
    A monitor daemon (`monitor.ts`) runs alongside your OpenClaw agent, continuously capturing the screen. Recordings stream directly to VideoDB.
  </Step>

  <Step title="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
  </Step>

  <Step title="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."
  </Step>

  <Step title="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.
  </Step>
</Steps>

## 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

<AccordionGroup>
  <Accordion title="Debugging Failed Runs" icon="bug">
    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>

  <Accordion title="Compliance Auditing" icon="clipboard-check">
    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>

  <Accordion title="Security Monitoring" icon="shield-alert">
    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>

  <Accordion title="QA & Testing" icon="test-tubes">
    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>

  <Accordion title="Agent Self-Reporting" icon="chart-line">
    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."
  </Accordion>
</AccordionGroup>

## Tech Stack

<Columns cols={2}>
  <Card title="TypeScript" icon="code">
    Monitor daemon and CLI tooling (`monitor.ts`, `videodb.ts`)
  </Card>

  <Card title="Python + Flask" icon="braces">
    Backend server for session management and Cloudflare tunneling
  </Card>

  <Card title="VideoDB SDK" icon="zap">
    Media streaming, AI indexing, and semantic search
  </Card>

  <Card title="OpenClaw" icon="bot">
    Autonomous agent framework with skill system
  </Card>
</Columns>

## Getting Started

<Info>
  **Prerequisites**

  * [OpenClaw](https://openclaw.ai/) installed and running
  * Node.js 18+
  * [VideoDB API key](https://console.videodb.io)
</Info>

<Steps>
  <Step title="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
    ```
  </Step>

  <Step title="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).
  </Step>

  <Step title="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
    ```
  </Step>

  <Step title="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"
  </Step>
</Steps>

<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](/pages/ingest/capture-sdks/overview) for details.
</Warning>

## 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

<Check>**API Key Security** — Keys stored locally via OpenClaw config, never transmitted except to VideoDB</Check>
<Check>**On-Demand Indexing** — AI processing runs only when you trigger it, keeping costs controlled</Check>
<Check>**Visual Audit Trail** — Complete recordings provide verifiable evidence of agent activity</Check>
<Check>**Secure Tunneling** — Cloudflare Tunnel for webhook delivery without exposing ports</Check>

***

<Card title="Complete Setup Guide on GitHub" icon="github" href="https://github.com/video-db/openclaw-monitoring">
  Full installation instructions, advanced setup, and troubleshooting
</Card>

## Related Tutorials

<CardGroup cols={2}>
  <Card title="Pair Programmer" icon="code" href="/examples-and-tutorials/ai-copilots/pair-programmer">
    AI coding assistant with real-time screen and audio context
  </Card>

  <Card title="FocusD" icon="target" href="/examples-and-tutorials/ai-copilots/focusd">
    AI-powered productivity tracking with automatic time insights
  </Card>
</CardGroup>
