The Vision & Architecture
Creating historical documentary videos traditionally requires hours of chronological research, script writing, professional voiceover recording, visual asset curation, and precise video-audio timing synchronization in non-linear editing software.
Loreframe automates this entire production pipeline from end to end. Given a simple natural language prompt (e.g. "The Fall of Constantinople in 1453" or "The Apollo 11 Moon Landing"), Loreframe orchestrates a graph of specialized AI agents that collaborate to research, write, synthesize voice narration, generate styled visual art scenes, and assemble a broadcast-ready MP4 documentary video.
Core System Architecture
-
One-Prompt Generation: Converts simple text input directly into an MP4 documentary.
-
Local & Offline Privacy: Driven by Ollama, Kokoro TTS, and ComfyUI.
-
Resilient Fallback Engines: Zero-failure fallback to Sharp vector posters & PCM audio buffers.
-
Real-Time Telemetry: WebSockets status stream into Next.js 19 Studio UI.
Autonomous Multi-Agent Pipeline
LangGraph state machine orchestrating 5 continuous execution nodes.
Director / Research
Deconstructs historical topics, builds chronological context, and structures multi-chapter timeline schemas.
ScriptWriter
Generates narrator voiceover scripts and detailed scene prompts using local LLMs (Ollama / Gemini).
TTS Voiceover
Synthesizes audio narration WAV/MP3 files via Kokoro TTS with exact time duration tracking.
ImageGenerator
Renders 16:9 historical scene visuals using ComfyUI (SD 1.5/SDXL + LoRAs) or dynamic Sharp vector posters.
Video Assembler
FFmpeg static engine handles audio-visual synchronization, motion panning/zooming, and MP4 video rendering.
Engineering & Resilience Highlights
Technology Stack
Architected with clean decoupling across agent nodes, resilient queue workers, and real-time state synchronization.
Quick Setup Commands
# 1. Install Ollama & Pull Model
# Download Ollama from https://ollama.com/
ollama pull llama3.1:8b
# 2. Clone & Start Loreframe
git clone https://github.com/bibinantony1998/Loreframe.git
cd Loreframe
cp .env.example .env
npm start
# Note: npm start installs all dependencies, sets up the database,
# and launches the UI, Server, Kokoro TTS, and ComfyUI all at once.
# You can update the LLM model name in the generated .env file.
Explore the Loreframe Repository
Loreframe is completely open source. Check out the unified repository containing the backend agent orchestration server and the Next.js studio control interface on GitHub.