Code2Video: Code-Centric Educational Video Generator
Generate high-quality educational videos from knowledge points using executable code as the medium.
- Source repo
- showlab/Code2Video
- Stars
- ★ 2.1k
- Last updated
- 1mo ago
- License
- MIT
- Primary language
- Python
- FA score
- 31/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changes
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- Educational content creators: Automatically generate animated explainer videos for complex topics like Fourier series.
- Not a fit if
- Teams producing video content outside Manim-style math animation
- Users unwilling to set up Python and Manim dependencies
- Source review
- 31/100 · Major gaps 8 safety controls not found
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.
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/.
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 does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Code2Video: Code-Centric Educational Video Generator This agent | 31 · Major gaps | CLIFree + model costs | ★ 2.1k | 1mo ago | Python | — |
| FAROS AutoResearch Runtime | 48 · Major gaps | Self-hosted serviceFree + model costs | ★ 3k | 4d ago | Python | — |
| Pi Dynamic Workflows | 88 · Good | Agent plugin / skillFree + model costs | ★ 555 | 12d ago | TypeScript | — |
| Ordewell | 67 · Some gaps | CLIFree + model costs | ★ 202 | today | TypeScript | Codex · Claude Code · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
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.
- Not found in source: least-privilege scopingGrant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
- Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- Not found in source: data-flow disclosureWatch which external services it contacts (proxy or firewall logs) and keep sensitive data out until you know where it goes.
- Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- Not found in source: dependency securityPin versions and run a dependency audit (npm audit, pip-audit) before installing; prefer running it in a container.
- Not found in source: disclosed external effectsEstablish which external systems it writes to, sends to or changes, and verify with test accounts or repos before production.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- Not found in source: verifiable attributionInstall from the official repo or registry and check the publisher and URL to avoid look-alike packages.
- 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.