Skip to content

Commit e5cdef4

Browse files
Subhajit dasSubhajit das
authored andcommitted
feat(demo): Add terminal demo files for A3M router
New files: - demo.tape: Full VHS script with all scenes - demo-simple.tape: Simplified VHS script - demo-new.tape: Template from VHS new command - demo.html: Interactive HTML5 demo player (5 scenes, auto-advance) Demo structure (90s): 1. Without A3M - manual approach problems 2. With A3M - one line change, auto-routing 3. Failover - provider failure, graceful recovery 4. Cost comparison - real dollar savings 5. One command install CTA Note: VHS requires ttyd for GIF generation (pending brew install)
1 parent 90efcae commit e5cdef4

4 files changed

Lines changed: 1033 additions & 382 deletions

File tree

‎demo-new.tape‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# VHS documentation
2+
#
3+
# Output:
4+
# Output <path>.gif Create a GIF output at the given <path>
5+
# Output <path>.mp4 Create an MP4 output at the given <path>
6+
# Output <path>.webm Create a WebM output at the given <path>
7+
#
8+
# Require:
9+
# Require <string> Ensure a program is on the $PATH to proceed
10+
#
11+
# Settings:
12+
# Set FontSize <number> Set the font size of the terminal
13+
# Set FontFamily <string> Set the font family of the terminal
14+
# Set Height <number> Set the height of the terminal
15+
# Set Width <number> Set the width of the terminal
16+
# Set LetterSpacing <float> Set the font letter spacing (tracking)
17+
# Set LineHeight <float> Set the font line height
18+
# Set LoopOffset <float>% Set the starting frame offset for the GIF loop
19+
# Set Theme <json|string> Set the theme of the terminal
20+
# Set Padding <number> Set the padding of the terminal
21+
# Set Framerate <number> Set the framerate of the recording
22+
# Set PlaybackSpeed <float> Set the playback speed of the recording
23+
# Set MarginFill <file|#000000> Set the file or color the margin will be filled with.
24+
# Set Margin <number> Set the size of the margin. Has no effect if MarginFill isn't set.
25+
# Set BorderRadius <number> Set terminal border radius, in pixels.
26+
# Set WindowBar <string> Set window bar type. (one of: Rings, RingsRight, Colorful, ColorfulRight)
27+
# Set WindowBarSize <number> Set window bar size, in pixels. Default is 40.
28+
# Set TypingSpeed <time> Set the typing speed of the terminal. Default is 50ms.
29+
#
30+
# Sleep:
31+
# Sleep <time> Sleep for a set amount of <time> in seconds
32+
#
33+
# Type:
34+
# Type[@<time>] "<characters>" Type <characters> into the terminal with a
35+
# <time> delay between each character
36+
#
37+
# Keys:
38+
# Escape[@<time>] [number] Press the Escape key
39+
# Backspace[@<time>] [number] Press the Backspace key
40+
# Delete[@<time>] [number] Press the Delete key
41+
# Insert[@<time>] [number] Press the Insert key
42+
# Down[@<time>] [number] Press the Down key
43+
# Enter[@<time>] [number] Press the Enter key
44+
# Space[@<time>] [number] Press the Space key
45+
# Tab[@<time>] [number] Press the Tab key
46+
# Left[@<time>] [number] Press the Left Arrow key
47+
# Right[@<time>] [number] Press the Right Arrow key
48+
# Up[@<time>] [number] Press the Up Arrow key
49+
# Down[@<time>] [number] Press the Down Arrow key
50+
# PageUp[@<time>] [number] Press the Page Up key
51+
# PageDown[@<time>] [number] Press the Page Down key
52+
# Ctrl+<key> Press the Control key + <key> (e.g. Ctrl+C)
53+
#
54+
# Display:
55+
# Hide Hide the subsequent commands from the output
56+
# Show Show the subsequent commands in the output
57+
# ScrollUp[@<time>] [number] Scroll terminal viewport up by rows
58+
# ScrollDown[@<time>] [number] Scroll terminal viewport down by rows
59+
60+
Output demo-new.gif
61+
62+
Require echo
63+
64+
Set Shell "bash"
65+
Set FontSize 32
66+
Set Width 1200
67+
Set Height 600
68+
69+
Type "echo 'Welcome to VHS!'" Sleep 500ms Enter
70+
71+
Sleep 5s

‎demo-simple.tape‎

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# A3M Router VHS Demo - 90 Second Terminal Demo
2+
# This version works without ttyd - outputs to GIF directly
3+
# Target: 60-90 seconds
4+
5+
# =============================================================================
6+
# SETUP - Works with just image output
7+
# =============================================================================
8+
9+
Output a3m-demo.gif
10+
Set FontSize 16
11+
Set Width 1200
12+
Set Height 675
13+
Set TypingSpeed 30ms
14+
15+
# =============================================================================
16+
# SCENE 1: THE PROBLEM (0-15s)
17+
# =============================================================================
18+
19+
Type "#!/bin/bash"
20+
Enter
21+
22+
Type "# Your LLM app today — costs $0.015 per request, no fallback"
23+
Enter
24+
25+
Type "cat << 'EOF'"
26+
Enter
27+
Type "// Without A3M: you manage everything manually"
28+
Enter
29+
Type "const response = await openai.chat.completions.create({"
30+
Enter
31+
Type " model: \"gpt-4o\", // Always expensive"
32+
Enter
33+
Type " messages: [{ role: \"user\", content: \"Explain quantum entanglement\" }]"
34+
Enter
35+
Type "});"
36+
Enter
37+
Type "// If OpenAI goes down → your app crashes"
38+
Enter
39+
Type "// You pay $0.015 per request forever"
40+
Enter
41+
Type "EOF"
42+
Enter
43+
44+
Sleep 1s
45+
Type "echo \"❌ Problem: $0.015/req, no fallback, manual management\""
46+
Enter
47+
48+
Sleep 2s
49+
50+
# =============================================================================
51+
# SCENE 2: WITH A3M - ONE LINE CHANGE (15-35s)
52+
# =============================================================================
53+
54+
Ctrl+L
55+
56+
Type "# With A3M: one line change, infinite benefits"
57+
Enter
58+
59+
Type "cat << 'EOF'"
60+
Enter
61+
Type "// Same request with A3M router"
62+
Enter
63+
Type "const response = await fetch(\"http://localhost:8787/v1/chat/completions\", {"
64+
Enter
65+
Type " method: \"POST\","
66+
Enter
67+
Type " headers: { \"Content-Type\": \"application/json\" },"
68+
Enter
69+
Type " body: JSON.stringify({"
70+
Enter
71+
Type " model: \"auto\", // ← A3M picks the best model"
72+
Enter
73+
Type " messages: [{ role: \"user\", content: \"Explain quantum entanglement\" }]"
74+
Enter
75+
Type " })"
76+
Enter
77+
Type "});"
78+
Enter
79+
Type "EOF"
80+
Enter
81+
82+
Sleep 1s
83+
84+
Type "# A3M analyzes and decides:"
85+
Enter
86+
Type "echo \"📊 Task: explanation → Complexity: simple → Budget: minimize\""
87+
Enter
88+
Type "echo \"✅ Routed to: Groq (FREE, 847ms)\""
89+
Enter
90+
Type "echo \" Cost: $0.00 | Quality: 94%\""
91+
Enter
92+
93+
Sleep 2s
94+
95+
# =============================================================================
96+
# SCENE 3: FAILURE RECOVERY (35-55s)
97+
# =============================================================================
98+
99+
Ctrl+L
100+
101+
Type "# A3M gracefully handles provider failures..."
102+
Enter
103+
Sleep 1s
104+
105+
Type "echo \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\""
106+
Enter
107+
Type "echo \" [Groq] — Attempting connection...\""
108+
Enter
109+
Sleep 1s
110+
Type "echo \" [Groq] — ✗ FAILED — 503 Service Unavailable\""
111+
Enter
112+
Sleep 500ms
113+
Type "echo \" [Circuit Breaker] — Tripped after 3 failures\""
114+
Enter
115+
Sleep 500ms
116+
Type "echo \" [DeepSeek] — HEALTHY — Switching...\""
117+
Enter
118+
Sleep 1s
119+
Type "echo \"\""
120+
Enter
121+
Type "echo \"✅ Response delivered via DeepSeek fallback\""
122+
Enter
123+
Type "echo \" Your app: never knew there was a problem\""
124+
Enter
125+
Type "echo \"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\""
126+
Enter
127+
128+
Sleep 2s
129+
130+
# =============================================================================
131+
# SCENE 4: COST SAVINGS (55-70s)
132+
# =============================================================================
133+
134+
Ctrl+L
135+
136+
Type "# Same query. Dramatically different costs."
137+
Enter
138+
139+
Type "echo \"\""
140+
Enter
141+
Type "echo \" WITHOUT A3M WITH A3M\""
142+
Enter
143+
Type "echo \" ───────────────── ────────────────\""
144+
Enter
145+
Type "echo \" GPT-4o @ $3.00/1K Groq @ $0.00/1K\""
146+
Enter
147+
Type "echo \" 500 tokens = $0.0015 500 tokens = $0.00\""
148+
Enter
149+
Sleep 1s
150+
Type "echo \"\""
151+
Enter
152+
Type "echo \"💰 SAVINGS: 100% per query\""
153+
Enter
154+
Type "echo \" At 1000 queries/day → $1.50 saved daily\""
155+
Enter
156+
Type "echo \" At 1000 queries/day → $547 saved yearly\""
157+
Enter
158+
159+
Sleep 2s
160+
161+
# =============================================================================
162+
# SCENE 5: ONE COMMAND (70-90s)
163+
# =============================================================================
164+
165+
Ctrl+L
166+
167+
Type "echo \"\""
168+
Enter
169+
Type "echo \"╔═══════════════════════════════════════════════════╗\""
170+
Enter
171+
Type "echo \"║ Get started in 10 seconds: ║\""
172+
Enter
173+
Type "echo \"╚═══════════════════════════════════════════════════╝\""
174+
Enter
175+
Sleep 500ms
176+
Type "echo \"\""
177+
Enter
178+
Type "echo \" npm install -g adaptive-memory-multi-model-router\""
179+
Enter
180+
Sleep 300ms
181+
Type "echo \"\""
182+
Enter
183+
Type "echo \" # Auto-detects your API keys, zero config\""
184+
Enter
185+
Type "echo \" npx a3m-router serve\""
186+
Enter
187+
Sleep 500ms
188+
Type "echo \"\""
189+
Enter
190+
Type "echo \" # Change: model: 'gpt-4o' → model: 'auto'\""
191+
Enter
192+
Sleep 500ms
193+
Type "echo \"\""
194+
Enter
195+
Type "echo \" GitHub: github.com/Das-rebel/adaptive-memory-multi-model-router\""
196+
Enter
197+
Type "echo \" npm: npmjs.com/package/adaptive-memory-multi-model-router\""
198+
Enter
199+
Sleep 1s
200+
Type "echo \"\""
201+
Enter
202+
Type "echo \"✨ One prompt in. The right model out. ✨\""
203+
Enter
204+
205+
Sleep 2s

0 commit comments

Comments
 (0)