Downloader Agent
1.1K
A download orchestration agent that downloads files from 80+ platforms via 67 specialized tools.
Exposes Google A2A (JSON-RPC 2.0) and OpenAI-compatible /v1/chat/completions APIs over HTTPS.
Implements an agent using the ReAct (Reasoning + Acting) pattern for intelligent download orchestration.
YouTube, YouTube Playlist, Instagram, Instagram Stories, TikTok, Twitter/X, Vimeo, Dailymotion, Twitch (clips, VODs, live streams), Reddit, Facebook, Bilibili, Niconico, Weibo, LinkedIn, Crunchyroll, Funimation, ADN
SoundCloud, Bandcamp, Mixcloud
Pinterest, Flickr, Tumblr, DeviantArt, ArtStation, Pixiv, Instagram, Twitter/X, Reddit, Weibo, Patreon, Newgrounds
Danbooru, Gelbooru, e621, Rule34, Konachan, yande.re, Safebooru, nhentai
MangaDex, Webtoon
| Platform | Tool | Notes |
|---|---|---|
| Radiko (radiko.jp) | download_radio_radiko | Japanese radio, bypasses geo-restriction |
| HiAnime (hianime.to) | download_video_hianime | Anime streaming |
| MissAV (missav.com) | download_video_missav | |
| Jable.tv | download_video_jable | |
| 91porn.com | download_video_91porn | Cookies required |
| hanime.tv + 5 sites | download_video_hanime | hstream.moe, hentaihaven.com, oppai.stream, ohentai.org, hentaimama.io; Deno required |
| Apple Developer | download_video_apple_developer | WWDC sessions, tech talks |
| Brighteon | download_video_brighteon | Alternative video platform |
| ServusTV | download_video_servustv | Austrian public broadcaster |
| PMVHaven | download_video_pmvhaven | Music videos |
| Coomer (coomer.su) | download_content_coomer | OnlyFans/Fansly archive |
download_spotify — tracks, albums, playlists, artists via spotdl + YouTube Music.
Supports mp3/flac/ogg/opus/m4a/wav output, LRC lyrics, SponsorBlock.
download_telegram — files from channels and chats via tdl. Requires tdl login (run once).
download_social — 22 social platforms including YouTube, Instagram, TikTok, Twitter/X,
SoundCloud, Twitch, Vimeo, Dailymotion, Bilibili, Rutube, VK, ok.ru, and more.
| Tool | Backend | Use case |
|---|---|---|
download_file | aria2c | Direct URLs, FTP, multi-connection |
download_torrent | aria2c | Magnet links, .torrent files |
download_direct | curl | HTTP/HTTPS with custom headers |
download_video_generic | yt-dlp | Any site yt-dlp supports generically |
download_video_youget | you-get | Chinese video sites (Youku, iQiyi, Tencent) |
download_manga_generic | gallery-dl | Any gallery-dl supported site |
download_images_forum | gallery-dl | Forum attachments (4chan, XenForo) |
check_platform — given any URL or platform name, returns the recommended tool and its full
parameter list. Call this first for any unknown URL.
| Backend | Purpose | Install |
|---|---|---|
| yt-dlp | Video/audio from 1000+ sites | pip install yt-dlp |
| gallery-dl | Image galleries, imageboards | pip install gallery-dl |
| aria2c | Fast multi-connection file downloads | apt install aria2 |
| curl | Direct HTTP downloads | system |
| ffmpeg | Format conversion, muxing | apt install ffmpeg |
| you-get | Chinese video sites | pip install you-get |
| spotdl | Spotify via YouTube Music | pip install spotdl |
| pybalt | Cobalt API (22 social platforms) | pip install pybalt |
| tdl | Telegram files | GitHub releases |
| Plugin | Pip package | Platforms added |
|---|---|---|
| yt-dlp-rajiko | yt-dlp-rajiko | Radiko (Japanese radio) |
| hanime-plugin | hanime-plugin | hanime.tv and 5 hentai sites |
| yt-dlp-coomer | yt-dlp-coomer | Coomer.su/st |
| ytdlp-plugins | ytdlp-plugins | Brighteon, ServusTV, DTube, YouMaker |
| yt-dlp-hianime | GitHub zip | HiAnime |
| yt-dlp-plugin-yellow | GitHub zip | MissAV, Jable.tv, 91porn |
| yt-dlp-AppleDeveloper | GitHub zip | Apple Developer videos |
| yt-dlp-PMVHaven | GitHub zip | PMVHaven |
| Variable | Default | Description |
|---|---|---|
LLM_URL | https://api.openai.com/v1 | LLM API base URL |
LLM_API_KEY | "" | LLM API key |
LLM_MODEL | gpt-4o | Model name |
DOWNLOADS_DIR | /downloads | Output directory for downloaded files |
TRAJECTORY_DIR | (disabled) | Enable per-step trajectory recording |
AGENT_ACTIVITY_LOG | /tmp/agent-activity.log | Live agent action log |
API_KEY | "" | Optional bearer token for server auth |
PORT | 443 | HTTPS server port |
AGENT_URL | — | Public URL published in the AgentCard (e.g. https://my-agent.example.com/). Defaults to https://localhost:{PORT}/ |
When running as part of a multi-agent pipeline, the downloader agent can mount a shared S3 workspace (via rclone FUSE) so it can read artifacts from prior steps and write outputs for downstream agents. It also publishes its status to a shared blackboard.
When a workspace is active, downloaded files are placed in {WORKSPACE_MOUNT_PATH}/downloads/
instead of DOWNLOADS_DIR, making them immediately available to other agents in the pipeline.
| Variable | Default | Description |
|---|---|---|
WORKSPACE_ID | (disabled) | Workspace identifier (e.g. project-abc). Required to enable workspace features. |
WORKSPACE_MOUNT_PATH | /workspace | Local FUSE mount point for the S3 workspace |
S3_BUCKET | — | S3 bucket name |
S3_ENDPOINT_URL | — | Custom S3 endpoint (omit for AWS S3) |
S3_ACCESS_KEY_ID | — | S3 access key |
S3_SECRET_ACCESS_KEY | — | S3 secret key |
S3_REGION | us-east-1 | S3 region |
S3_PREFIX | "" | Optional key prefix before workspace_id in S3 |
AGENT_ID | downloader_agent | Unique agent name written to the blackboard |
pip install -e ".[server]"
# CLI backends
pip install yt-dlp gallery-dl you-get spotdl pybalt
brew install aria2 ffmpeg # macOS; use apt on Linux
# yt-dlp plugins
pip install yt-dlp-rajiko hanime-plugin yt-dlp-coomer ytdlp-plugins
pip install "https://github.com/pratikpatel8982/yt-dlp-hianime/archive/master.zip"
pip install "https://github.com/wmrussell8653/yt-dlp-plugin-yellow/archive/main.zip"
pip install "https://github.com/smvz/yt-dlp-AppleDeveloper/archive/main.zip"
pip install "https://github.com/Earthworm-Banana/yt-dlp-PMVHaven_com-plugin/archive/master.zip"
# tdl (Telegram downloader)
# Download binary from https://github.com/iyear/tdl/releases, place in PATH
tdl login # one-time interactive login
LLM_API_KEY=sk-... python3 -m app.server
docker build --build-context a2a_pkg=../../packages/a2a_agent -f Dockerfile.ubuntu -t downloader_agent .
docker run -d \
-p 443:443 \
-v /path/to/downloads:/downloads \
-e LLM_API_KEY=sk-... \
-e LLM_MODEL=gpt-4o \
downloader_agent
Telegram: to use
download_telegraminside Docker, mount your tdl session storage:docker run -d ... -v ~/.tdl:/root/.tdl downloader_agentRun
tdl loginon the host first, then mount the resulting~/.tdldirectory.
Open https://localhost:443/ in a browser to watch the agent activity log in real-time (xterm.js terminal, read-only).
curl -k https://localhost:443/health
curl -k https://localhost:443/.well-known/agent.json
curl -k -X POST https://localhost:443/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Download https://www.youtube.com/watch?v=dQw4w9WgXcQ at 1080p"}]}'
curl -k -X POST https://localhost:443/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Download the Daft Punk discography from Spotify as FLAC"}]}'
curl -k -X POST https://localhost:443/ \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tasks/send","params":{"message":{"role":"user","parts":[{"type":"text","text":"Download https://soundcloud.com/artist/track as FLAC"}]}}}'
# Streaming (SSE)
curl -k -X POST https://localhost:443/ \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tasks/sendSubscribe","params":{"message":{"role":"user","parts":[{"type":"text","text":"Download the top 50 images from danbooru tagged miku solo"}]}}}'
Install the auto-generated CA cert to trust the HTTPS connection permanently:
curl -k https://localhost:443/ca.crt -o downloader-agent-ca.crt
# macOS:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain downloader-agent-ca.crt
# Linux:
sudo cp downloader-agent-ca.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates
The agent image exposes an MCP (Model Context Protocol) server on the same port as A2A at /mcp. Any MCP client — Claude Desktop, Cursor, Windsurf, ChatGPT Connectors, OpenAI Agents SDK — can list and invoke these tools using the pod's API_KEY as Bearer.
In production, Core proxies https://downloader-agent.agents.forfetch.ai/mcp → the worker pod's /mcp.
| Tool (skill_id) | Description |
|---|---|
download_file | Download a file from a URL |
list_downloads | List current and completed downloads |
get_download_status | Get the status of a specific download |
Input schemas are authored in apps/agents_mcp/app/seed.py. Skills without an explicit schema advertise a single {task: str} freeform parameter.
Content type
Image
Digest
sha256:f54f21535…
Size
416.6 MB
Last updated
5 months ago
docker pull superbizon007/downloader-agent