Code2Video: Code-Centric Educational Video Generator
Generate high-quality educational videos from knowledge points using executable code as the medium.
Evidence shows: The repository provides no documentation on permission management, user confirmation, data flow transparency, sensitive data handling, dependency security, external effects, rollback, or source attribution. Deductions: These aspects are entirely absent from the files, making assessment impossible.
Evidence shows: README and code structure are consistent, but no error handling or failure message documentation is provided. Deductions: Dependency availability is partially supported by requirements.txt and installation guide, but not verified; failure messages are not mentioned.
Evidence shows: README clearly identifies target users (educational video generation) and scenarios (single query and benchmark modes), but capability boundaries and trigger conditions are limited. Deductions: Environment fit only mentions Manim and API configuration, without detailed system requirements.
Evidence shows: README provides clear directory structure, installation steps, and examples, but lacks version changelog and maintenance responsibility. Deductions: Naming stability is not explicit, and known limitations are not listed.
Evidence shows: Output is executable Manim code and videos, with clear utility, but cost-benefit is not quantified. Deductions: Cost-benefit only mentions token usage and runtime, without specific data.
Evidence shows: README references paper and dataset, but no reproducible evaluation details are provided. Deductions: Cross-source corroboration is limited, and facts vs. inferences are not clearly separated.
- The repository lacks any security or permission management documentation; users must assess risks themselves.
- Dependency security is unverified; it is recommended to check dependency versions in requirements.txt.
- API key configuration involves sensitive information and should be handled with care.
What does this agent do, and when should you use it?
Code2Video is an agentic, code-centric framework that generates educational videos from knowledge points. It leverages executable Manim code to ensure clarity, coherence, and reproducibility, contrasting with pixel-based text-to-video models. The framework features a modular tri-agent design: Planner (storyboard expansion), Coder (debuggable code synthesis), and Critic (layout refinement with anchors). It introduces the MMMC benchmark, covering 117 curated learning topics inspired by 3Blue1Brown. Evaluation spans knowledge transfer, aesthetic and structural quality, and efficiency.
Code2Video takes a user-specified knowledge point (e.g., 'Linear transformations and matrices') and orchestrates three agents: Planner uses an LLM to expand the storyboard, Coder writes Manim code (Python), and Critic uses a VLM to refine layout and aesthetics. The final Manim code is executed to render the video. The process is driven by shell scripts run_agent_single.sh or run_agent.sh, requiring LLM API keys (e.g., Claude-4-Opus) and VLM API keys (e.g., Gemini 2.5 Pro). Output videos are saved in the specified folder.
- Educational content creators: Automatically generate animated explainer videos for complex topics like Fourier series.
- Online course developers: Quickly produce consistent, high-quality video lessons for large course catalogs.
- Researchers: Generate reproducible visual explanations for papers or presentations.
- Developers: Integrate programmatic video generation into their own tools or pipelines.
- Educational institutions: Provide custom visual learning materials to students to improve comprehension.
What are this agent's strengths and limitations?
- Code-centric paradigm ensures precise, reproducible content.
- Tri-agent design provides structured control over generation.
- Includes MMMC benchmark and evaluation scripts for multi-dimensional assessment.
- Flexible for custom knowledge points.
- Relies on external paid LLM/VLM APIs for operation.
- Limited to Manim code generation; may not suit all content types.
- Video quality depends on LLM code quality and VLM aesthetic judgment.
- Setup involves Python environment and Manim dependencies.
How do you install or deploy this agent?
Clone the repository and install dependencies: cd src/ then pip install -r requirements.txt. Additionally, install Manim Community v0.19.0 following the official guide. Prepare API keys for an LLM provider (e.g., Claude) and a VLM provider (e.g., Gemini), plus an optional IconFinder API key for visual assets.
How do you use this agent?
- Configure API credentials in
api_config.json. - For a single knowledge point:
sh run_agent_single.sh --knowledge_point "Linear transformations and matrices"
For full benchmark: sh run_agent.sh.
- Generated videos appear in
src/CASES/.