Code2Video: Code-Centric Educational Video Generator

Generate high-quality educational videos from knowledge points using executable code as the medium.

Stars
★ 2.1k
Last updated
1mo ago
License
MIT
Primary language
Python

At a glance

How it runs
CLI
Works with
Portable with changes
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
PythonManim Community v0.19.0LLM API (e.g., Claude-4-Opus)VLM API (e.g., Gemini 2.5 Pro)IconFinder API (optional)Shell / CLINetwork accessLocal filesystem
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

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.

  1. Educational content creators: Automatically generate animated explainer videos for complex topics like Fourier series.
  2. Online course developers: Quickly produce consistent, high-quality video lessons for large course catalogs.
  3. Researchers: Generate reproducible visual explanations for papers or presentations.
  4. Developers: Integrate programmatic video generation into their own tools or pipelines.
  5. 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?

  1. Configure API credentials in api_config.json.
  2. For a single knowledge point: sh run_agent_single.sh --knowledge_point "Linear transformations and matrices"

For full benchmark: sh run_agent.sh.

  1. Generated videos appear in src/CASES/.

What are this agent's strengths and limitations?

Pros
  • 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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
31/ 100 5-point scale 1.6 / 5
Trust 0/29
Reliability 3/14
Adaptability 8/18
Convention 9/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust0 / 29 · 0.0/5

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.

Reliability3 / 14 · 1.1/5

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.

Adaptability8 / 18 · 2.2/5

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.

Convention9 / 18 · 2.5/5

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.

Effectiveness7 / 13 · 2.7/5

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.

Verifiability4 / 8 · 2.5/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision cf7fba33a6db New commits since this review; the score may not cover them
Review evidence README.mdLICENSE
See the full review method →

FAQ

How does Code2Video differ from text-to-video models like Veo?
Code2Video controls the exact content via executable code, ensuring accuracy for educational purposes, while pixel-based models may introduce visual inconsistencies.
What are the runtime costs?
You need API keys for LLM and VLM providers, which incur usage costs; durations vary based on topic complexity.
Can it handle languages other than English?
The README provides a Chinese version, suggesting multilingual support, but current examples are English.
Can I integrate it into my own AI agent workflow?
Yes, the CLI and API configuration allow programmatic invocation, but it's not a drop-in agent for existing frameworks.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents