mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
.. | ||
agents.py | ||
code_generator.py | ||
knowledge_base.py | ||
llm_providers.py | ||
main.py | ||
manim_animation_agent.ipynb | ||
README.md | ||
requirements.txt |
Animation Agent
An AI-powered system for creating mathematical animations using the Manim library.
Project Structure
animation-agent/
├── knowledge_base.py # Contains animation capabilities and patterns
├── agents.py # Core agent implementations
├── main.py # Main orchestration logic
└── requirements.txt # Project dependencies
Components
-
Knowledge Base
- Animation capabilities
- Mathematical visualization patterns
- Object properties and uses
- Common narrative structures
-
Agents
- ContentPlanningAgent: Plans the educational content
- NarrativeDesignAgent: Designs the story flow
- VisualPlanningAgent: Plans the visual elements
-
Main System
- Orchestrates agent interactions
- Manages the animation creation process
- Provides the main interface
Setup
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
# Create .env file with: OPENAI_API_KEY=your_api_key_here
Usage
Run the main script:
python main.py
Example code:
from main import AnimationSystem
system = AnimationSystem()
animation_plan = system.create_animation(
concept="derivative_introduction",
audience_level="high_school"
)
Development
- The system uses a modular design for easy extension
- Each agent can be enhanced independently
- Knowledge base can be expanded with new patterns
Future Enhancements
- Add more mathematical patterns
- Implement feedback loops
- Add quality checking
- Integrate voice-over generation
- Add more animation templates