Add YouTube Downloads to OpenClaw, Hermes Agent, Manus and Other AI Agents

9 min read Summarize with Claude ChatGPT Gemini Perplexity
Add a YouTube download tool to OpenClaw, Hermes Agent, Manus and other AI agents

Which method fits your agent

What each agent documents, as of November 2026:

AgentWhere it runsMCP serverSkill (SKILL.md)
OpenClawYour machine or serverYes, openclaw mcp addYes
Hermes AgentYour machine or serverYes, ~/.hermes/config.yamlYes
NanoClawYour machine, agents in containersYes, ncl groups config add-mcp-serverNot for custom tools
Manus and Manus DesktopManus cloud, plus your computer with "My Computer"Custom connectors exist, fields not documentedYes, upload in the Skills tab
Zentor (formerly MoClaw)Zentor's cloud computerSupported, setup not documentedYes, "a SKILL.md and script"
PerisclawManaged service inside WhatsAppNot documentedNot documented

Both methods call the same two endpoints: POST /api/start-download to start a job and GET /api/download-status to collect the link. You need a VideoDL API key from your dashboard. The free trial includes 100 videos.

Why your agent can't just run yt-dlp

These agents run on a server, a container or a cloud computer. YouTube trusts data-centre IP addresses far less than home connections, so a yt-dlp call from an agent usually ends in "Sign in to confirm you're not a bot", a 403 or a 429. The usual workaround, handing the agent your browser cookies, puts your Google account inside an autonomous loop. We cover the details in a YouTube download API for AI agents. A download API keeps your account out of it: the agent sends a URL and gets back a link or a clear error code.

Option 1: the MCP server (OpenClaw, Hermes Agent, NanoClaw)

Use the tested server from our YouTube download MCP server guide. Install its two dependencies and save it as videodl_mcp.py somewhere permanent:

bash
python3 -m pip install mcp requests

It gives the agent two tools: download_youtube_video, with options for resolution, H.264, audio only and captions, and check_youtube_download for long downloads. Then register it with your agent.

OpenClaw

bash
openclaw mcp add videodl \
  --command python3 \
  --arg /full/path/to/videodl_mcp.py \
  --env VIDEODL_API_KEY=your_api_key
openclaw mcp doctor videodl --probe

openclaw mcp add refuses to run while the Gateway is running unless you add --no-probe, and a running Gateway needs a reload or restart to pick up the new server. OpenClaw's docs recommend storing keys through its supported secret mechanisms rather than as literal config values; openclaw mcp doctor flags literal keys so you can move them.

Hermes Agent

Put the key in ~/.hermes/.env as VIDEODL_API_KEY=your_api_key, then add the server to ~/.hermes/config.yaml:

YAML
mcp_servers:
  videodl:
    command: "python3"
    args: ["/full/path/to/videodl_mcp.py"]
    env:
      VIDEODL_API_KEY: "${env:VIDEODL_API_KEY}"

Run /reload-mcp in Hermes. It lists the server's tools on startup and adds them to its tool registry, prefixed with the server name.

NanoClaw

bash
ncl groups config add-mcp-server \
  --id <group-id> \
  --name videodl \
  --command python3 \
  --args '["/full/path/to/videodl_mcp.py"]'
ncl groups restart --id <group-id>

NanoClaw runs each group's agent in a container, so the command runs inside that container: the script must be in a folder the container can see, with Python, mcp and requests installed there. NanoClaw's docs advise against putting raw keys in --env and recommend its gateway vault for credentials. Changes apply on the next container start, which ncl groups restart triggers.

Option 2: a skill (Manus, Zentor, OpenClaw, Hermes Agent)

A skill is a folder with a SKILL.md that tells the agent when and how to use it, plus any scripts it needs. Create this folder:

text
videodl-youtube/
  SKILL.md
  scripts/
    videodl.py

SKILL.md:

Markdown
---
name: videodl-youtube
description: Download a public YouTube video, its audio as MP3, or its captions through the VideoDL API, and return a temporary download link. Use when the user asks to download, save, archive or transcribe a YouTube video.
metadata: {"openclaw": {"requires": {"env": ["VIDEODL_API_KEY"], "bins": ["python3"]}, "primaryEnv": "VIDEODL_API_KEY"}}
---

# Download YouTube videos with VideoDL

Run the script in this skill's `scripts` folder. It prints one JSON object.

- Video: `python3 scripts/videodl.py download "<YouTube URL>" --resolution 1080`
- Audio only (MP3, for transcription): add `--audio`
- Captions as well: add `--captions`
- Most compatible MP4 (H.264, up to 1080p): add `--h264`
- If the result says `still_running`, run `python3 scripts/videodl.py status <worker_id>` later.

Rules:
- Give the user the `download_url` and say it expires (see `expires_in`, in seconds).
- On `"status": "error"`, report `error_label` and stop. Do not retry private, deleted, geo-blocked or members-only videos (codes 1-4, 6-8, 11, 60).
- Never print, log or ask for the API key. It comes from the `VIDEODL_API_KEY` environment variable.
- Only download videos the user owns, has permission for, or is otherwise allowed to use.

scripts/videodl.py uses only Python's standard library, so it runs in sandboxes where you can't install packages. It starts the job, retries once the rate limit clears, waits using the API's retry_after, and prints a short JSON result. We tested it against every response the API returns: success, still running, rate limited, private video, missing key and wrong key.

Python
#!/usr/bin/env python3
"""Download a YouTube video through the VideoDL API and print the result as JSON.

Usage:
  videodl.py download URL [--resolution 1080] [--audio] [--captions] [--h264] [--wait 300]
  videodl.py status WORKER_ID
Needs the VIDEODL_API_KEY environment variable. Uses only the Python standard library.
"""
import argparse
import json
import os
import sys
import time
import urllib.error
import urllib.request

API = os.environ.get("VIDEODL_API_BASE", "https://api.videodl.app")


def call(method, path, body=None):
    key = os.environ.get("VIDEODL_API_KEY")
    if not key:
        return 0, {"status": "error", "error": "VIDEODL_API_KEY is not set"}
    data = json.dumps(body).encode() if body is not None else None
    req = urllib.request.Request(API + path, data=data, method=method,
                                 headers={"X-API-Key": key, "Content-Type": "application/json"})
    try:
        with urllib.request.urlopen(req, timeout=30) as r:
            return r.status, json.loads(r.read() or b"{}")
    except urllib.error.HTTPError as e:
        try:
            return e.code, json.loads(e.read() or b"{}")
        except ValueError:
            return e.code, {"error": e.reason}


def summarize(job):
    if job.get("status") == "downloaded":
        keep = ("status", "title", "download_url", "expires_in", "resolution", "codecs", "size_human", "extras")
        return {k: job[k] for k in keep if k in job}
    if job.get("status") == "error":
        keep = ("status", "error_code", "error_label", "error")
        return {k: job[k] for k in keep if k in job}
    return {"status": job.get("status"), "worker_id": job.get("worker_id"),
            "percent": (job.get("progress") or {}).get("percent")}


def status(worker_id):
    code, job = call("GET", "/api/download-status?worker_id=" + urllib.request.quote(worker_id))
    if code != 200:
        job.setdefault("status", "error")
    job.setdefault("worker_id", worker_id)
    return job


def download(args):
    body = {"url": args.url}
    if args.audio:
        body.update({"audio_only": True, "audio_format": "mp3"})
    else:
        body["resolution"] = args.resolution
        if args.h264:
            body["video_codec"] = ["avc1", "any"]
    if args.captions:
        body["captions"] = True
    for _ in range(5):
        code, data = call("POST", "/api/start-download", body)
        if code == 202:
            break
        if data.get("error_code") == 55:  # too many requests: wait, then retry the same video
            time.sleep(min(int(data.get("retry_after", 60)), 120))
            continue
        return {"status": "error", "http_status": code, "error_code": data.get("error_code"),
                "error_label": data.get("error_label"), "error": data.get("error")}
    else:
        return {"status": "error", "error": "still rate limited, try again later"}
    worker_id = data["worker_id"]
    deadline = time.time() + args.wait
    while True:
        job = status(worker_id)
        if job.get("status") in ("downloaded", "error"):
            return summarize(job)
        if time.time() >= deadline:
            return {"status": "still_running", "worker_id": worker_id,
                    "next_step": "run: videodl.py status " + worker_id}
        time.sleep(max(1, min(int(job.get("retry_after", 5)), 30)))


def main():
    p = argparse.ArgumentParser(description="VideoDL YouTube downloader")
    sub = p.add_subparsers(dest="cmd", required=True)
    d = sub.add_parser("download")
    d.add_argument("url")
    d.add_argument("--resolution", default="1080")
    d.add_argument("--audio", action="store_true")
    d.add_argument("--captions", action="store_true")
    d.add_argument("--h264", action="store_true")
    d.add_argument("--wait", type=int, default=300)
    s = sub.add_parser("status")
    s.add_argument("worker_id")
    a = p.parse_args()
    result = download(a) if a.cmd == "download" else summarize(status(a.worker_id))
    print(json.dumps(result, indent=2))
    sys.exit(0 if result.get("status") != "error" else 1)


if __name__ == "__main__":
    main()

Manus and Manus Desktop

  1. Zip the videodl-youtube folder.
  2. In Manus, open the Skills tab in the left menu, click + Add and choose Upload a skill. You can also choose Import from GitHub if the folder is a public repo with SKILL.md at its root.
  3. Call it in a task with /, or ask Manus to download a YouTube video.

Manus doesn't document how skills receive secrets. Don't paste your key into a task. If your Manus setup offers environment variables or secrets, use those. Otherwise, with Manus Desktop's "My Computer" feature, which runs commands in your own terminal, set VIDEODL_API_KEY on your computer.

Zentor (formerly MoClaw)

MoClaw's site now redirects to Zentor. Zentor lists "Skill" as a way to extend its agent ("Drop in a SKILL.md and script") and says you can connect your own tools over MCP. It doesn't publish the exact steps, so add the folder from the agent's skills or integrations settings, or ask Zentor's support where custom skills and secrets go.

OpenClaw

Copy the folder into ~/.openclaw/skills/. The metadata line in SKILL.md tells OpenClaw the skill needs VIDEODL_API_KEY and python3, and OpenClaw only loads it when both are available. You can set the key in ~/.openclaw/openclaw.json under skills.entries.videodl-youtube.env; per OpenClaw's docs, that applies to runs on the host, not inside a sandbox.

Hermes Agent

Copy the folder into ~/.hermes/skills/, the directory Hermes scans for skills, and make sure VIDEODL_API_KEY is set in the environment Hermes runs commands in.

Perisclaw

Perisclaw is a managed executive assistant that lives in WhatsApp: it reads the chats you allow, tracks commitments and manages your calendar and email. As of November 2026 it doesn't document a way to add your own tools, skills or MCP servers, so you can't give it a YouTube download tool. If you need YouTube downloads in a WhatsApp-style assistant, OpenClaw and Hermes Agent both connect to messaging apps and support the methods above.

Which method to choose

  • MCP server if your agent runs on your machine or server. Tools are typed, the agent sees each option, and long downloads hand back a job ID.
  • Skill if your agent runs in the cloud, or you want one folder you can reuse across agents. It needs nothing installed beyond Python.
  • Neither for a one-off list of thousands of videos. Paste it into the dashboard or use the bulk download service, which is cheaper per video.

Keep your API key safe

  • Keep the key in an environment variable or the agent's secret store, never in a prompt or a chat message. Agents can repeat what's in their context.
  • Use a separate key for each agent so you can revoke one without breaking the others.
  • If a key ever lands in a chat log or a shared config file, rotate it in the dashboard.
  • Download links expire after about an hour. For files you want to keep, connect S3, Google Cloud Storage, R2 or Google Drive in the dashboard so they land there directly.

Use it on content you're allowed to use

An agent can download a lot very quickly. The API only fetches publicly available videos, and our acceptable use policy applies to agents the same as to people: use videos you own, have permission for, or are licensed to use.

FAQ

Can OpenClaw download YouTube videos?

Yes, with a tool. Add an MCP server with openclaw mcp add, or install a SKILL.md skill that calls a download API. Running yt-dlp from a server often hits YouTube's bot check, so a download API is more reliable.

How do I add an MCP server to Hermes Agent?

Add it under mcp_servers in ~/.hermes/config.yaml with a command, args and env, keep the key in ~/.hermes/.env, then run /reload-mcp. Hermes adds the server's tools to its tool list.

Does Manus support custom MCP servers?

Manus documents custom MCP connectors, but not the fields they accept. Its skills are documented: upload a folder or .zip with a SKILL.md from the Skills tab, so a skill is the simplest way to add YouTube downloads to Manus.

What happened to MoClaw?

MoClaw's website now redirects to Zentor. Zentor says it supports MCP servers and custom skills (a SKILL.md and a script), so the skill in this guide is the route to try.

Can I add tools to Perisclaw?

Perisclaw is a managed executive assistant that works inside WhatsApp. As of November 2026 it doesn't document a way to add your own tools or MCP servers. Use an agent that does, such as OpenClaw or Hermes Agent.

Give your agent a YouTube tool that works

One API key, no cookies, no bot checks. Video, audio, captions and metadata from $12/month, starting with 100 free videos.