Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ print(f"Job started: {job['job_id']}")
| [quickstart/live_digest.py](quickstart/live_digest.py) | Stream summarization |
| [webhook-server/](webhook-server/) | FastAPI webhook receiver |
| [mcp/](mcp/) | AI agent integration (Claude, GPT) |
| [openclaw/](openclaw/) | OpenClaw skill — smart camera alerts via chat |

## Installation

Expand Down
87 changes: 87 additions & 0 deletions openclaw/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Trio + OpenClaw Integration

Use Trio directly from your [OpenClaw](https://openclaw.ai) AI agent. Ask questions about live video streams, set up smart alerts, and get periodic summaries — all in natural language through your chat.

## Install

From [ClawHub](https://clawhub.ai):

```bash
clawhub install trio-vision
```

Or from GitHub:

```bash
git clone https://github.com/drandrewlaw/trio-openclaw-skill.git ~/.openclaw/skills/trio-vision
```

## Setup

1. Get your API key at [console.machinefi.com](https://console.machinefi.com) (100 free credits on signup)
2. Set the environment variable:
```bash
export TRIO_API_KEY="your_key_here"
```
3. Restart your OpenClaw gateway:
```bash
openclaw gateway restart
```
4. Verify the skill is ready:
```bash
openclaw skills list
```

## Usage

Once installed, just chat with your agent naturally:

| What You Say | What Happens | Cost |
|-------------|-------------|------|
| "Is anyone at my front door?" | Instant answer with VLM explanation | $0.01 |
| "Alert me when a package is delivered" | Continuous monitoring, notifies on match | $0.02/min |
| "Summarize this stream every 10 minutes" | Periodic narrative digests | $0.02/min |

### Quick Check

Ask a yes/no question about any live stream:

> "Check this stream and tell me if there are people visible: https://www.youtube.com/live/STREAM_ID"

### Smart Alerts

Set up monitoring with natural-language conditions:

> "Watch my front door camera and tell me when a person (not a cat) approaches: rtsp://192.168.1.100/stream"

### Periodic Summaries

Get narrative digests at regular intervals:

> "Summarize what's happening on this construction site every 15 minutes: https://www.youtube.com/live/STREAM_ID"

## Supported Streams

- YouTube Live
- Twitch
- RTSP/RTSPS cameras
- HLS streams

## How It Works

The skill gives your OpenClaw agent instructions to call the Trio API using `curl`. When you ask about a video stream, the agent:

1. Sends the stream URL and your question to Trio's `/check-once` endpoint
2. Trio extracts frames from the stream and analyzes them with a Vision LLM
3. Returns a `triggered` (yes/no) result and an `explanation` of what it sees
4. Your agent delivers the answer in your chat

For monitoring, the agent creates a background job via `/live-monitor` that checks at regular intervals and alerts you when the condition is met.

## Links

- [Trio API Docs](https://docs.machinefi.com)
- [Trio Console](https://console.machinefi.com)
- [OpenClaw](https://openclaw.ai)
- [ClawHub](https://clawhub.ai)
- [Skill Source (GitHub)](https://github.com/drandrewlaw/trio-openclaw-skill)