OpenClaw¶
OpenClaw is a self-hosted AI gateway that powers the AI Butler inside cli_debrid. It handles session memory, AI provider routing, and can be used standalone via Telegram, Discord, WhatsApp, and other messaging platforms.
- GitHub: github.com/openclaw/openclaw
- Docs: docs.openclaw.ai
- Default port:
18789 - API: OpenAI-compatible (
POST /v1/chat/completions)
Requirements¶
- Docker (recommended) or Node.js 22.16+
- Minimum 2 GB RAM
- An API key from an AI provider (Anthropic, OpenAI, Google, or a self-hosted model via Ollama/vLLM)
Paid AI API recommended
Works best with a paid API (OpenAI, Anthropic, Gemini). Free tier models may lack the context window or tool-calling capability needed for reliable responses.
Installation¶
Or using the pre-built image:
- Go to Community Apps and search for
openclaw - Install the template
- Set the config path to your preferred appdata location
- Start the container
Onboarding¶
After installation, run the onboarding wizard to configure your AI provider, port, and auth:
The wizard walks you through:
- Selecting an AI provider and entering your API key
- Setting the gateway port (default
18789) - Choosing an authentication mode (token recommended)
- Installing as a background daemon
Access the dashboard:
Then open http://127.0.0.1:18789/ in your browser.
Enable required HTTP endpoints¶
Required step
Before cli_debrid can communicate with OpenClaw, two HTTP endpoints must be enabled. Without these the connection will fail silently.
- Open the OpenClaw dashboard (
http://your-openclaw-url/) - Go to Settings → Infrastructure → Gateway HTTP API → Gateway HTTP Endpoints
- Enable Chat Completions
- Enable Responses
- Save the changes
These expose the OpenAI-compatible API that cli_debrid uses to send and receive messages.
Connecting to cli_debrid¶
- Open the AI Butler settings — click the ⚙ cog in the chat header, or go to Settings → Additional Settings → AI Assistant
- Set OpenClaw URL to the URL OpenClaw is listening on (must be reachable from inside the cli_debrid container)
- Set Bearer Token to match the token configured in OpenClaw. Leave blank if no auth is configured.
- Set Agent ID to
main(or the ID of the agent you configured) - Set Display Name to your agent's name (found in its
IDENTITY.mdfile in the workspace) - Click Save — the status dot will turn green if the connection succeeds
Container networking
The OpenClaw URL must be reachable from inside the cli_debrid Docker container, not just from your browser. If you use a reverse proxy or Tailscale, use the internal/container-reachable address.
Skill file (Tool API)¶
The skill file tells OpenClaw how to call back into cli_debrid's tool API so the AI can check queue status, search your library, trigger tasks, and more — from any connected messaging platform (Telegram, Discord, etc.).
Install the skill¶
- Go to Settings → Additional Settings → AI Assistant
- Click Download OpenClaw Skill File
- Drop the downloaded
cli_debrid_skill.mdinto your OpenClaw workspace directory:- Default:
~/.openclaw/workspace/ - Docker: the
workspace/folder in your Docker volume
- Default:
- Reload OpenClaw and assign the skill to your agent
The skill file is pre-filled with your cli_debrid URL and bearer token.
Security note
This skill requires cli_debrid to be publicly accessible — it cannot work via an internal IP only. Exposing cli_debrid publicly means anyone with your token can control it, so User Management must be enabled before downloading. For best security, use OIDC/SSO (e.g. Authentik) rather than local accounts.
Available tools¶
Once the skill is installed, your OpenClaw agent can:
| Tool | Description |
|---|---|
| queue_status | Get current queue counts and whether the program is running |
| library_stats | Total movies/shows/episodes, wanted, blacklisted, collected in last 24h |
| recently_collected | List the most recently downloaded items (default 20, max 50) |
| search_library | Search your library by title — check if something is collected |
| add_to_library | Add a movie or TV show to the wanted list |
| send_notification | Send a message via your configured notification channels (Discord, Telegram, etc.) |
Example prompts¶
What is currently downloading?
How many items are in the queue?
Is Breaking Bad in my library?
What was recently collected?
How many movies do I have?
Add The Bear (2022) to my library
Is the program running?
Send me a notification about the current queue status
Authentication¶
The skill authenticates to cli_debrid via a query parameter (?token=<value>) rather than an Authorization header, for compatibility with clients that cannot set custom headers.
The token is the same value set in Settings → AI Assistant → OpenClaw Token — it is the token OpenClaw uses to authenticate to cli_debrid, not a separate password.
Troubleshooting¶
Status dot is red
- Check OpenClaw is running:
curl http://your-openclaw-url/healthz - Verify the URL is reachable from inside the cli_debrid container (not just your browser)
- Confirm the bearer token matches what OpenClaw expects
Connection fails silently
- Make sure Chat Completions and Responses endpoints are enabled in the OpenClaw dashboard (see Enable required HTTP endpoints)