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.5k
- Last updated
- 16d ago
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 43/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
- Website
- showlab.github.io/Code2Video ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-17+4.1 ★/day over 7 days
- Source review
- 43/100 · Major gaps 3 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.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install -r requirements.txt
- Config files
api_config.json
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/.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
- sensitive-data handling — Use dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.
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 | 43 · Major gaps | CLIFree + model costs | ★ 2.5k | 16d ago | Python | — |
| The Forge | 51 · Major gaps | — | ★ 13 | 1mo ago | Python | OpenAI API · Claude API |
| FAROS AutoResearch Runtime | 51 · Major gaps | Self-hosted serviceFree + model costs | ★ 3.1k | 1mo ago | Python | — |
| MyClaude Multi-Agent Workflow | 45 · Major gaps | CLIFree + model costs | ★ 2.8k | 7mo ago | Go | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The README says users configure LLM, VLM, and optional IconFinder API keys; the shown agent.py uses requests to generate an outline and tracks token usage. The packet does not explain secret protection, the data sent, or a complete external-call inventory, and it shows no user confirmation before generated-code execution, permission limits, or rollback. Source attribution earns 2 because the README identifies the paper, dataset, code foundations, and icon sources; the sample does not establish dependency security.
agent.py shows retries and clear errors for empty API responses and invalid formats, and saves the outline to a file. However, only part of the implementation is supplied, and the README's reproducibility and quality claims are not corroborated by code or results in this packet, limiting self-consistency and dependency-availability scores.
The README defines educational video generation from knowledge points, distinguishes single-topic from benchmark batch runs, and mentions a target-audience field. This supports ordinary scenarios and trigger clarity. Capability boundaries and environment compatibility are not well defined; installation guidance points to Manim documentation and a requirements.txt that is not included in the sample.
The README provides project organization, quick-start instructions, run modes, evaluation, and citation guidance; the LICENSE contains the full MIT terms. Updates and configuration parameters offer some maintenance and naming context, but there is no clear maintainer or support path, and limitations are sparse. The sample omits requirements.txt, so dependency versions cannot be checked.
The framework uses Manim code to produce educational videos and describes outline, storyboard, feedback, and icon-enhancement steps, giving the output a clear purpose and plausible educational value. Cost-benefit earns only 1: the README mentions token usage, runtime, and parallel batch execution but gives no concrete cost, resource requirements, or robust comparative quality evidence.
The README names a paper, dataset, evaluation dimensions, and run scripts; the shown agent.py provides partial evidence of outline generation, caching, and retries. Cross-checking between these sources is limited, and README quality and benchmark claims are not verified item by item by the supplied code excerpt. No code was executed.
- 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: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- The workflow requires external-service API keys; the packet does not describe secret protection, request data scope, or confirmation before generated code is executed.
- The README points to Manim installation guidance and requirements.txt, but the dependency list and complete source are outside this sample, so the full dependency set and runtime environment cannot be reviewed statically.
FAQ
How does Code2Video differ from text-to-video models like Veo?
What are the runtime costs?
Can it handle languages other than English?
Can I integrate it into my own AI agent workflow?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.