Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

English · 简体中文

Video2Agent — give your agent video retrieval and understanding across YouTube, Bilibili, Douyin, and local videos

CI License: Apache-2.0 Python 3.11+ MCP compatible DSH plugin Local-first

Give your agent video retrieval and understanding.

Turn YouTube, Bilibili, Douyin, and local videos into a searchable agent knowledge base — run as a standard MCP server for Claude, Cursor, Windsurf, Cline, Codex & Cherry Studio, as a native DSH plugin, or from the CLI. Inspect long videos, compare 1–10 clips, and verify every claim with exact source-frame evidence (Video-MME 87.8%, ~99% fewer tokens). Local-first; optional cloud ASR/OCR and optional platform logins.

MCP Quick Start · Settings UI · Benchmarks · What It Does · DSH & CLI · How It Works · Docs

Video2Agent demo: paste a video link, index locally, answer with source-frame evidence
Real recording; waiting sections compressed.

1 Connect → 2 Index locally → 3 Ask with timecoded proof


Quick Start: MCP Server (Claude / Cursor / Codex / Cherry Studio)

Use uvx video2agent mcp for a zero-install quick start with subtitles and, if configured, cloud speech recognition and OCR. Add this to your MCP client configuration (claude_desktop_config.json, .cursor/mcp.json, or the equivalent for your client). The server shares the local video library with the CLI and DSH plugin.

Install in Cursor (direct link) · Install in VS Code

{
  "mcpServers": {
    "video2agent": {
      "command": "uvx",
      "args": ["video2agent", "mcp"]
    }
  }
}

For Claude Code:

claude mcp add video2agent -- uvx video2agent mcp

For a persistent install, run uv tool install video2agent or pip install video2agent. Run video2agent mcp --print-config to get a ready-to-paste configuration. With either install, video2agent ui offers one-click setup for local speech recognition, local OCR, and the browser component for Douyin login. To install offline speech recognition and OCR together, run uv tool install "video2agent[asr,ocr]" or pip install "video2agent[asr,ocr]", then download a speech model in Settings.

Make Agents Trigger Video Tools Proactively

Many MCP clients lazy-load tool schemas until prompted. Install the companion Agent Skill so Claude Code, Codex, Antigravity, and DSH recognize video links, YouTube/Bilibili/Douyin mentions, and video-oriented questions automatically:

video2agent setup --target all        # or claude / codex / antigravity / dsh

Search routing defaults to auto (English queries search YouTube with a quick automatic fallback to Bilibili if unreachable; Chinese queries search Bilibili). Switch the Default Search Platform anytime in video2agent ui or DSH Settings.

Built-in Settings UI

Need to configure a cloud API key, download a local Whisper speech model, switch OCR, check FFmpeg, or scan a Bilibili/Douyin QR code? Run:

video2agent ui

In a connected MCP client, use the open-settings prompt or ask “Open Video2Agent settings.” The bilingual settings page opens in your browser so API keys stay on your machine and outside chat logs.


Why Video2Agent

Comparison Caption-only summarizers Single-grid viewers Video2Agent
Video sources Single links only Single links only YouTube + Bilibili + Douyin + local files
Client support Web / single app Single app Any MCP client + DSH plugin + CLI
Batch comparison Not supported Not supported Compare 1–10 videos for consensus & conflicts
Source-frame proof No visual context No library-wide search Search text & timecodes first, then verify exact frames
Local & token budget Text only Heavy per-query image calls Local-first index, ~99% fewer tokens (Video-MME 87.8%)

Turn Videos & Favorites Into Knowledge

Online talks, tutorials, demos, and saved playlists pile up fast. Video2Agent reads the video first—captions or ASR transcript, on-screen text (OCR), scene cuts, and key frames—into your own local searchable library. Then your agent can answer:

  • “What does this 45-minute talk cover?” → timestamped outline + 3×3 contact sheet in seconds;
  • “What did that slide/chart at 12:10 say?” → exact source frame paired with the text on that same frame;
  • “Which of these tutorials is worth watching?” → compare 1–10 videos side-by-side for agreements, gaps, and conflicts.

Faster, Broader, Cheaper

One video: 2m09s to produce an 8-row cheat sheet + 6 source frames (4 source types vs 1 for text-only, and ~99% fewer tokens than sending video frames directly to a multimodal model).

Faster, broader, cheaper

Video-MME Leaderboard

On the llm-stats Video-MME board (2026-11, 2,700 questions), the orange row is Video2Agent* 87.8 (4.1 Flash Max), alongside frontier models; * marks a 90-question subset.

Video-MME full leaderboard and Video2Agent's 90-question subset

What It Does

1. Works across YouTube, Bilibili, Douyin, and local files

  • YouTube (youtube.com, youtu.be, Shorts, Live): works out of the box with no login required; smart single-track caption selection avoids rate limits and automatically cleans up rolling auto-caption duplicates before indexing. Search YouTube directly with video_discover(platform="youtube") or video2agent discover "..." --platform youtube.
  • Bilibili (bilibili.com, BV/av, b23.tv) & Douyin (douyin.com, v.douyin.com): metadata preview, full ingest, cross-platform search, and optional account logins.
  • Local files (.mp4, .mkv, .webm, .mov, etc.): indexed directly from disk without copying media unnecessarily; optional sidecar .srt/.vtt subtitles supported.

2. Built for MCP Agents & DSH Sessions

  • Text-first, pixels on request: search transcripts and on-screen text first (video_search), browse contact sheets (video_digest), read transcript ranges (video_read), and pull raw frames + matching frame OCR (video_evidence / video_frames) only for the moments that need visual verification.
  • 11 focused MCP tools: video_ingest, video_digest, video_read, video_search, video_evidence, video_frames, video_perceive, video_discover, video_library, video_account, and video_settings.
  • Inline visual results: contact sheets, evidence frames, and Bilibili login QR codes return natively as images inside supporting MCP clients.

3. Batch comparison & motion analysis

  • 1–10 videos side-by-side: compare courses, reviews, interviews, or product demos for consensus, contradictions, and unique points.
  • Motion, cuts & UI recordings (video_perceive): measure shot boundaries, motion peaks, and looping cadence cleanly without flooding context.

4. Honest about gaps

  • Every answer carries timecodes (HH:MM:SS). Unread OCR stays explicitly unknown rather than guessing zero, out-of-range timestamps return clear errors, and caption quality checks fall back to speech recognition if a subtitle track mismatches the audio.

Local, Cloud & Accounts

  • Subtitles first. When a linked video has usable captions, MCP's default media="auto" reads them immediately and defers the video download until you request frames or visual evidence. Without usable captions, speech recognition can provide a transcript.
  • Offline recognition is optional. Run pip install "video2agent[asr]" or choose Enable local speech (「启用本地识别」) in DSH Settings or video2agent ui. Download your preferred speech model in Settings when you're ready (small is about 464 MB). Local OCR is also optional (pip install "video2agent[ocr]").
  • Cloud is optional. Connect any OpenAI-compatible ASR/OCR provider (SiliconFlow preset included with a free tier) in video2agent ui or via SILICONFLOW_API_KEY. Only requested audio or explicit evidence frames are sent. API keys are stored via Windows DPAPI, macOS Keychain, or a 0600 secret file on Linux—never in plain JSON configs or chat logs.
  • Logins are optional. YouTube and local files require no login. Optional Bilibili QR login unlocks CC/AI subtitles and read-only favorites/history; optional Douyin browser login (pip install "video2agent[browser]") reads your profile, works, favorites, and liked lists.

Quick Start: DSH Plugin & CLI

Requirements · Python 3.11+. The core install downloads about 24 MB and uses under 100 MB of disk space, without OpenCV or Whisper bundled. Video2Agent sets up FFmpeg and FFprobe on demand when media processing first needs them. You can also install them yourself.

# Install CLI + MCP server
pip install video2agent

# Open the visual Settings UI (Environment check, API keys, models, accounts)
video2agent ui

# Or install as a native DSH plugin
dsh plugin --profile web add dsh-video2agent

Install from source

git clone https://github.com/Harm0ny-AI/Video2Agent.git
cd Video2Agent

python -m venv .venv
# Windows: .venv\Scripts\activate    macOS/Linux: source .venv/bin/activate
pip install -e .

video2agent doctor
video2agent ui --no-open
video2agent ingest "https://youtu.be/jNQXAC9IVRw"
video2agent search "elephants"

How It Works

How Video2Agent works

  • Text first, pixels on request. Search hits text and OCR first; images load only when checking visual details.
  • Shared state across surfaces. CLI commands, MCP servers, video2agent ui, and the DSH plugin share the exact same local index and credentials under ~/.video2agent.
  • Bounded context. Compact digests, capped frame sheets, and cached reads keep multi-video investigations fast and token-efficient.

Screenshots

Detailed analysis of a single video

Detailed analysis of a single video

Account login cards

Bilibili and Douyin login cards

Dark social cards and marketplace assets live in docs/assets/.

Docs

DSH Marketplace

Also available as a native DSH plugin (dsh-video2agent, category vision) on the DSH Plugin Marketplace.

Contributing

Issues and PRs are welcome. Start with CONTRIBUTING.md; before opening a PR, run:

python -m unittest discover -s tests -q
ruff check src tests --select E,F,I --ignore E501
node tests/test_plugin_card.mjs
node tests/test_plugin_manifest.mjs
node tests/test_plugin_host_settings.mjs
node tests/test_plugin_campaign.mjs
node tests/test_plugin_dock_state.mjs

License

Apache-2.0. Third-party notices are in THIRD_PARTY_LICENSES.md.

If Video2Agent saved you from scrubbing another timeline, a ⭐ helps more agents discover it.

Metadata

Release files for video2agent 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for video2agent 0.4.0
File Size Uploaded Provenance Actions
video2agent-0.4.0.tar.gz 564.0 kB With provenance Details for video2agent-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for video2agent 0.4.0
File Interpreter ABI Platform Actions
video2agent-0.4.0-py3-none-any.whl Python 3 none any Details for video2agent-0.4.0-py3-none-any.whl

Total release size: 929.7 kB

Release files / video2agent-0.4.0.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL video2agent-0.4.0.tar.gz
Size 564.0 kB
Tags Source
SHA-256 checksum
How to use checksums
639928ef6a8692e3549009d41a307ab40ba44df3bd54ccbbf022e0b0848e857e
BLAKE2b-256 checksum
How to use checksums
d54f948e5d6170a48d7cdd61cc14ca7aa93627a28ac018a02bf8fb9053a9bbe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / video2agent-0.4.0-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL video2agent-0.4.0-py3-none-any.whl
Size 365.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdd0a58b88c93e1a14ed11e778238f669b625206bc5da94cf4b455b351087be7
BLAKE2b-256 checksum
How to use checksums
8b2e29e29ac5e1d74745e66967c19a6ad0e1a94ec9aba1039b4e17c37fc8b5ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for video2agent 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for video2agent-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page