agent-animate
Version:
AI-powered cinematic animations from workflow transcripts - Jony Ive precision meets Hans Zimmer timing
283 lines (220 loc) ⢠8.54 kB
Markdown
# š¬ Agent Animate
**AI-powered cinematic animations from workflow transcripts**
Transform automation tutorials into stunning visualizations with Jony Ive precision and Hans Zimmer timing.
[](https://badge.fury.io/js/agent-animate)
[](https://opensource.org/licenses/MIT)
## ⨠Features
- **š¤ AI-Powered**: Uses OpenAI's advanced models to understand and visualize workflows
- **šÆ Zero Overlaps**: Physics-based layout algorithms ensure perfect component positioning
- **š¤ Human-in-the-Loop**: Quality assurance with human review at critical phases
- **šØ Cinematic Quality**: Jony Ive design principles + Hans Zimmer timing structure
- **ā” Developer-First**: Production-ready CLI with modern tooling
- **š§ Highly Configurable**: Flexible templates and configuration system
## š Quick Start
### CLI Installation
```bash
# Install globally
npm install -g agent-animate
# Or use with npx
npx agent-animate --help
```
### Basic CLI Usage
```bash
# Create a new project
agent-animate create my-animation-project
# Configure your OpenAI API key
agent-animate config
# Generate animation from transcript
agent-animate generate --input transcript.txt --output animation.html
# Start development server
agent-animate serve --open
```
### Web Development
```bash
# Start local development server
cd web
python3 -m http.server 8000
# Open http://localhost:8000
```
## šÆ Vision
Create smooth, professional animations that explain systems architecture and business logic with the precision of Jony Ive and the timing of Hans Zimmer.
## ā
Current Features
### Core Animation System
- **GSAP-powered animations** with smooth easing curves
- **SVG-based components** for crisp, scalable graphics
- **Responsive layout** that adapts to different screen sizes
- **Dark developer theme** with monospace fonts
### Component System
- **Auto-detection** of component types (clients, APIs, services, databases)
- **Smart positioning** using tier-based layout
- **Visual indicators** with type labels and status dots
- **Connection paths** with curved lines and arrows
### Timeline Controls
- **Play/Pause/Restart** with visual feedback
- **Progress tracking** with time display
- **Scene navigation** between animation phases
- **Duration controls** (10s, 15s, 20s, 30s)
### Architecture Parser
- **Natural language parsing** of technical descriptions
- **Pattern matching** for component identification
- **Relationship detection** between services
- **Default architectures** for common patterns
## šļø Project Structure
```
web/
āāā index.html # Main application interface
āāā debug.html # Debugging/testing interface
āāā test.html # Component visibility testing
āāā src/
ā āāā AgentAnimate.js # Main orchestrator class
ā āāā parsers/
ā ā āāā ArchitectureParser.js # Natural language ā architecture
ā āāā components/
ā ā āāā Component.js # SVG component creation/animation
ā ā āāā Connection.js # Connection lines between components
ā ā āāā DataPacket.js # Animated data flow particles
ā āāā animations/
ā ā āāā CinematicTimeline.js # GSAP timeline orchestration
ā ā āāā SceneManager.js # Scene creation and management
ā āāā utils/
ā āāā ResponsiveManager.js # Layout and responsive handling
āāā README.md # This file
```
## š Usage
### Architecture Visualizations
1. **Start the server:**
```bash
cd web
python3 -m http.server 8000
```
2. **Open browser:** http://localhost:8000
3. **Enter a prompt:**
- "oauth authentication with jwt tokens and session management"
- "microservices with API gateway and message queue"
- "e-commerce system with payment processing"
### Video Transcript Visualizations š¬ NEW!
1. **Open transcript interface:** http://localhost:8000/transcript.html
2. **Paste video transcript** describing workflows or automation processes
3. **Select parser mode:**
- **Workflow/Automation**: For automation platforms (Zapier, n8n, AppMixer)
- **System Architecture**: For technical system descriptions
- **Smart Detection**: Automatically detects the best parser
4. **Examples that work well:**
- AppMixer/Zapier/n8n tutorial transcripts
- Workflow automation demos
- Integration setup walkthroughs
- API connection tutorials
### Controls
- Space bar: Play/Pause
- R key: Restart
- Ctrl+Enter: Generate from transcript
- Timeline controls: Navigate scenes
## š¬ Animation Flows
### System Architecture Flow
1. **Scene Introduction** (15%)
- Animated title and subtitle
- System overview text
2. **Client Layer** (20%)
- Reveal user-facing applications
- Highlight client components
3. **API Layer** (20%)
- Show API gateways and load balancers
- Animate client ā API connections
4. **Service Layer** (20%)
- Display business logic services
- Connect APIs to services
5. **Complete System** (25%)
- Show full architecture
- Activate data flow animations
### Workflow Automation Flow š¬ NEW!
1. **Workflow Introduction** (20%)
- Extract title from transcript
- Show automation overview
2. **Platform Layer** (20%)
- Reveal automation platform (Zapier, n8n, etc.)
- Highlight workflow designer
3. **Service Integrations** (25%)
- Show connected services (Gmail, Notion, Slack)
- Color-coded by service type
4. **Data Flow** (35%)
- Animate workflow execution
- Show trigger ā action flow
- Demonstrate data mapping
## šØ Design Principles
### Visual Style
- **Monospace fonts** for technical authenticity
- **Black background** with white text/borders
- **Minimal, clean aesthetics** focused on clarity
- **Smooth transitions** with professional easing
### Animation Timing
- **Cinematic pacing** with proper scene holds
- **Staggered reveals** to guide viewer attention
- **Bounce effects** for satisfying feedback
- **Smooth curves** using cubic-bezier timing
### User Experience
- **Immediate feedback** from all interactions
- **Keyboard shortcuts** for power users
- **Responsive design** for all screen sizes
- **Clear visual hierarchy** in components
## š ļø Technical Details
### Dependencies
- **GSAP 3.12.2** - Animation engine
- **MotionPathPlugin** - Data packet animations
- **Modern browser** with SVG support
### Performance
- **60 FPS animations** with hardware acceleration
- **Efficient SVG rendering** for crisp graphics
- **Smart component batching** to minimize DOM operations
- **Responsive viewBox** scaling for all devices
### Browser Support
- Chrome/Edge 88+
- Firefox 85+
- Safari 14+
## š§ Development Notes
### Key Classes
- `AgentAnimate`: Main application controller
- `ArchitectureParser`: Converts prompts to architecture data
- `Component`: SVG component creation and animation
- `CinematicTimeline`: GSAP timeline orchestration
- `ResponsiveManager`: Layout and positioning
### Animation Strategy
- Components start hidden (`opacity: 0, scale: 0.3`)
- Timeline reveals them in logical groups
- Connections animate after components are visible
- Data packets flow along connection paths
### Debugging
- Console logging for all major operations
- Visual debugging in `debug.html` and `test.html`
- Component position and connection path verification
## š Next Improvements
### High Priority
1. **Enhanced Animation Quality**
- More sophisticated easing curves
- Better component entrance effects
- Improved connection drawing animations
2. **Smarter Parsing**
- Better entity recognition
- More relationship patterns
- Custom architecture templates
3. **Visual Variety**
- More component types (CDN, monitoring, etc.)
- Custom icons and visual indicators
- Color coding for different services
### Medium Priority
4. **Data Flow Animations**
- Realistic packet movement
- Different flow types (HTTP, WebSocket, etc.)
- Error states and retries
5. **Export Features**
- Video export (MP4/WebM)
- GIF generation
- High-resolution renders
### Future Enhancements
6. **Embed System**
- Shareable animation URLs
- Customizable embed sizes
- Social media integration
7. **Advanced Features**
- Custom component library
- Animation speed controls
- Voice narration sync