ACTIVA is a Python project managed with uv. The Manim Community team also recommends uv β see their official guide at https://docs.manim.community/en/stable/installation/uv.html. The steps below cover the system dependencies Manim needs on Windows, macOS, and Linux, then how to sync this project.
uv is a fast Python package and project manager. It installs Python for you, creates the virtual environment, and resolves dependencies from uv.lock.
macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | shWindows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"After installation, restart your shell so uv is on your PATH, then verify:
uv --versionManim's Python build needs Cairo, Pango, and FFmpeg at the OS level. Install them once per machine.
Windows
The Manim Community Windows guide installs everything via Chocolatey or Scoop. With Chocolatey (run PowerShell as Administrator):
choco install manimceThis pulls in FFmpeg and the required C libraries. Alternatively, with Scoop:
scoop bucket add extras
scoop install ffmpegPango is bundled with the GTK runtime on Windows; the Chocolatey manimce package handles it. See the official Windows install guide for screenshots.
Linux
Install Cairo, Pango, FFmpeg, plus the build tools needed to compile pycairo/manimpango:
# Debian / Ubuntu
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
# Fedora
sudo dnf install python3-devel pkg-config cairo-devel pango-devel ffmpeg
# Arch
sudo pacman -Syu base-devel cairo pango ffmpegOnly required if you want Manim to render typeset formulas (MathTex, Tex). Plain Text works without LaTeX, so you can skip this step for most ACTIVA accounting prompts.
Windows
Install MiKTeX using their installer.
macOS
brew install --cask mactex-no-gui # large download (~4 GB)
# or for a minimal install:
brew install --cask basictexLinux
# Debian / Ubuntu
sudo apt install texlive texlive-latex-extra
# Fedora
sudo dnf install texlive-scheme-medium
# Arch
sudo pacman -Syu texlive-mostgit clone https://github.com/EdwardoSunny/ACTIVA
cd ACTIVA
uv syncuv sync creates .venv/, installs the pinned versions from uv.lock (Manim + LangGraph + the four LLM SDKs: openai, anthropic, google-genai, plus openai.AzureOpenAI), and registers the project itself in editable mode.
Verify Manim sees its system libraries:
uv run manim checkhealthPrefer plain
pip? You can still dopython -m venv .venv && source .venv/bin/activate && pip install -e .βuvis recommended but not required. If you go this route, drop theuv runprefix from the commands below (e.g.uv run python main.pyβpython main.py).
ACTIVA requires an API key from one of the supported LLM providers. You'll need to:
Get API Keys:
- OpenAI: Visit platform.openai.com and create an account
- Claude (Anthropic): Visit console.anthropic.com and sign up
- Gemini (Google): Visit aistudio.google.com and get an API key
- Azure OpenAI: Create a resource and deployment in the Azure Portal
Configure ACTIVA:
uv run python scripts/setup_config.pyChoose your preferred provider and enter your API key when prompted. For Azure, you'll also be asked for your endpoint and deployment name.
ACTIVA works directly with each provider's native SDK, so any model accessible to your API key/deployment is supported. Suggested defaults:
- OpenAI: GPT-4o (recommended), GPT-4-turbo, GPT-3.5-turbo
- Claude: Claude Opus 4.7 (recommended), Claude Sonnet 4.6, Claude 3.5 Sonnet
- Gemini: Gemini 1.5 Pro (recommended), Gemini 1.5 Flash, Gemini 2.0 Flash
- Azure OpenAI: any deployment you've created (use the deployment name as the model)
The interactive setup will guide you through model selection.
Frontend (Recommended):
uv run python scripts/run_frontend.pyThen open http://localhost:8000 in your browser.
Command Line:
uv run python main.pyπ See docs/FRONTEND_README.md for detailed frontend usage.
ACCOUNTING CONCEPTS TAUGHT INTERACTIVELY WITH VISUAL ANIMATIONS (ACTIVA) is an LLM-based animation tool that generates custom accounting visualizations from natural language prompts. It uses a multi-agent framework to automatically create Manim animations for accounting education, helping students understand complex accounting concepts through visual representations.
- Natural Language Input: Describe accounting concepts in plain English
- Multi-Agent System: Intelligent planning, coding, execution, and error recovery
- Multiple LLM Support: Works with OpenAI, Claude, and Gemini
- Error Recovery: Automatic debugging and code correction
- Cost-Effective: Much cheaper than manual animation production
- Accounting-Focused: Specialized for accounting education and concept visualization
ACTIVA talks to each provider through its native SDK (openai, anthropic, google-genai, and openai.AzureOpenAI):
- SDK:
openai(chat completions) - Models: GPT-4o, GPT-4-turbo, GPT-3.5-turbo, GPT-5.x
- Setup: Requires OpenAI API key (optional custom
base_urlfor OpenAI-compatible endpoints)
- SDK:
anthropic(messages API) - Models: Claude Opus 4.7, Claude Sonnet 4.6, Claude 3.5 Sonnet
- Setup: Requires Anthropic API key
- SDK:
google-genai(models.generate_content) - Models: Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini 2.0/3.x
- Setup: Requires Google API key
- SDK:
openai.AzureOpenAI(chat completions) - Models: any deployment in your Azure resource
- Setup: Requires API key, endpoint (
https://<resource>.openai.azure.com/), deployment name, and API version (default2024-10-21)
ACTIVA uses four specialized agents working together:
- Planning Agent: Analyzes your prompt and searches for implementation examples
- Code Writing Agent: Generates Manim Python code based on the task
- Execution Agent: Runs the animation and checks for success
- Error Search Agent: Finds fixes if execution fails
The system iterates until successful execution or reaches the maximum attempts.
VisualsGeneration/
βββ docs/ # π Documentation
β βββ README.md # Main project documentation (this file)
β βββ FRONTEND_README.md # Frontend usage guide
βββ scripts/ # π§ Utility Scripts
β βββ setup_config.py # LLM provider setup
β βββ run_frontend.py # Frontend launcher
βββ config/ # βοΈ Configuration
β βββ config.py # Configuration management
β βββ config.json # LLM provider settings (auto-created)
βββ .chainlit/ # π Chainlit Configuration
β βββ config.toml # Frontend timeout and server settings
βββ activa/ # π§ Core Agent System
β βββ agent/ # Multi-agent framework
β β βββ graph.py # Agent workflow definition
β β βββ nodes.py # Individual agent implementations
β β βββ state.py # State management
β βββ utils/ # Manim execution utilities
β βββ manim_tools.py # Code execution and error handling
βββ frontend.py # π Web interface (Chainlit)
βββ main.py # π₯οΈ Command line entry point
βββ chainlit.md # π Chainlit sidebar content
βββ pyproject.toml # π¦ Project dependencies
βββ LICENSE # π License information
βββ generated_code/ # π Generated animation files
- "Create an animation showing how to calculate depreciation expense using the straight-line method"
- "Visualize the accounting equation: Assets = Liabilities + Equity"
- "Show a cash flow statement with animated transitions between operating, investing, and financing activities"
- "Animate a journal entry showing the purchase of equipment on credit"
uv run python scripts/setup_config.pyEdit config/config.json. The provider must be one of openai, anthropic, google, or azure.
OpenAI / Anthropic / Google:
{
"provider": "openai",
"model": "gpt-4o",
"api_key": "your-api-key-here",
"base_url": null,
"max_tokens": 4000
}Azure OpenAI (the model field doubles as the deployment name):
{
"provider": "azure",
"model": "my-gpt4o-deployment",
"api_key": "your-azure-api-key",
"azure_endpoint": "https://my-resource.openai.azure.com/",
"azure_api_version": "2024-10-21",
"max_tokens": 4000
}export ACTIVA_PROVIDER="anthropic" # openai | anthropic | google | azure
export ACTIVA_MODEL="claude-opus-4-7"
export ACTIVA_API_KEY="your-api-key"
# Azure-only:
export ACTIVA_AZURE_ENDPOINT="https://my-resource.openai.azure.com/"
export ACTIVA_AZURE_API_VERSION="2024-10-21"The frontend includes extended timeout settings (5 minutes) for long-running operations:
- Agent Generation: Up to 5 minutes for code generation
- Animation Execution: Up to 5 minutes for Manim rendering
- Progress Updates: Real-time status during operations
# 1. Setup (one-time)
uv run python scripts/setup_config.py
# 2. Run frontend
uv run python scripts/run_frontend.py
# 3. Open browser to http://localhost:8000
# 4. Type: "Create an animation showing how to calculate accrued salaries expense"# Run the example in main.py (accounting salaries expense example)
uv run python main.py- Timeout Errors: The frontend is configured with 5-minute timeouts for long operations
- Connection Issues: Check your internet connection and API key validity
- Generation Failures: Try simpler prompts first, then increase complexity
- Server Won't Start: Run
uv run python scripts/run_frontend.pyfrom the project root - Timeout During Generation: The system automatically handles long operations
- Animation Execution Fails: Check the generated code in
generated_code/directory
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a Pull Request
- Open an issue on GitHub
- Check the documentation
- Review example implementations