How openx-inc/flow works
Flow is an autonomous video-production system: a topic becomes a scripted shot list, generated scene clips, an assembled video, and optionally a published post. It also exposes a project-based editing agent through an HTTP API and MCP, with registered tools operating on persisted timelines. The graph preserves generation, editing, speech, publishing, and GPU deployment capabilities. Some feature implementations are unsampled; those links are omitted or shown as documented relationships rather than inferred calls.
Main entry points: pipeline.py Pipeline orchestration · store.py Project store · app.py Agent HTTP API · server.py MCP server
Components 28
Video production
- Schedule
src/flow/scheduler.py - Pipeline orchestration
src/flow/pipeline.py - Script and shot list
src/flow/writer.py - Scene schemas
src/flow/schemas.py
GPU generation
- Scene generation
src/flow/generator.py - Keyframe generation
src/flow/keyframes.py - Parallel generation
src/flow/parallel_generator.py - GPU backend API
src/gpu_backend/server.py - GPU inference
src/gpu_backend/modal_server.py - Backend deployment
src/flow/deploy/modal_deploy.py
Agent editing
- Agent HTTP API
src/flow/api/app.py - MCP server
src/flow/mcp_server/server.py - Agent loop
src/flow/agent/loop.py - LLM client
src/flow/agent/nvidia.py - Tool registry
src/flow/tools/registry.py - Editing tools
src/flow/tools/all.py - Tool dispatch
src/flow/tools/context.py - Generation service
src/flow/agent/generation.py
Project state
- Project timeline
src/flow/store/project.py - Project store
src/flow/store/store.py - Database
src/flow/store/db.py
Speech and publishing
- Video assembly
src/flow/postproduction.py - Narration providers
src/flow/tts/base.py - Platform publishing
src/flow/publisher.py - YouTube publisher
src/flow/publishers/youtube.py
Other components
- Topic input
- Creator or MCP client
- Social platforms
Connections 33
- Topic input → Pipeline orchestration: starts production
- Schedule → Pipeline orchestration: schedules runs
- Pipeline orchestration → Script and shot list: requests script
src/flow/pipeline.py - Pipeline orchestration → Scene generation: generates scenes
src/flow/pipeline.py - Pipeline orchestration → Keyframe generation: generates keyframes
src/flow/pipeline.py - Pipeline orchestration → Parallel generation: runs parallel pass
src/flow/pipeline.py - Pipeline orchestration → Video assembly: assembles clips
src/flow/pipeline.py - Pipeline orchestration → Platform publishing: optionally publishes
src/flow/pipeline.py - Scene generation → GPU backend API: posts generation jobs
src/gpu_backend/server.py - GPU backend API → GPU inference: runs inference
- Backend deployment → GPU backend API: deploys backend
- Script and shot list → Scene schemas: produces shot list
- Pipeline orchestration → Scene schemas: passes shot list
src/flow/pipeline.py - Video assembly → Narration providers: uses speech provider
src/flow/postproduction.py - Platform publishing → YouTube publisher: delegates upload
src/flow/publisher.py - Platform publishing → Social platforms: publishes videos
- Creator or MCP client → Agent HTTP API: sends chat
src/flow/api/app.py - Creator or MCP client → MCP server: calls MCP tools
src/flow/mcp_server/server.py - Agent HTTP API → Agent loop: streams agent run
src/flow/api/app.py - Agent HTTP API → Project store: loads project
src/flow/api/app.py - Agent loop → LLM client: requests completions
src/flow/agent/loop.py - Agent loop → Tool registry: dispatches registered tools
src/flow/agent/loop.py - Agent loop → Editing tools: loads tool set
src/flow/agent/loop.py - MCP server → Tool registry: exposes registered tools
src/flow/mcp_server/server.py - MCP server → Tool dispatch: dispatches tool calls
src/flow/mcp_server/server.py - MCP server → Project store: resolves project
src/flow/mcp_server/server.py - Agent HTTP API → Generation service: creates generation service
src/flow/api/app.py - Editing tools → Tool registry: registers tools
src/flow/tools/all.py - Tool dispatch → Tool registry: looks up tool specs
src/flow/tools/context.py - Tool dispatch → Project store: persists mutations
src/flow/tools/context.py - Tool dispatch → Project timeline: snapshots and updates
src/flow/tools/context.py - Project store → Database: uses database
src/flow/store/store.py - Project store → Project timeline: loads and saves
src/flow/store/store.py