How showlab/code2video works
Project type and purpose
• This is an open-source, full-pipeline tool for automated educational video generation (“Code2Video”), driven by a tri-agent architecture (Planner, Coder, Critic) that leverages LLMs and executable Manim code.
File structure
• Top-level directories:
• figures/ (static images for README)
• json_files/ (topic lists, mappings, quiz data)
• prompts/ (prompt templates and classes for each agent stage)
• src/ (core orchestration, utilities, configs, eval scripts, shell runners)
• Key files in src/:
• agent.py — orchestrates the pipeline
• gpt_request.py & api_config.json — handles LLM calls
• external_assets.py — IconFinder/VLM integrations
• scope_refine.py & utils.py — support functions
• run_agent.sh / run_agent_single.sh — entry-point scripts
• eval_AES.py, eval_TQ.py — evaluation modules
README for additional insights
• Tri-Agent Design:
1. Planner – Expands a knowledge point into a storyboard.
2. Coder – Synthesizes and debugs Manim code.
3. Critic – Refines layout using a VLM.
• Dependencies: Python, Manim, LLM API (e.g. Claude-4-Opus), VLM API (Gemini), IconFinder API