# prezbo-wire/openmontage architecture

> Architecture diagram of the GitHub repository prezbo-wire/openmontage, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prezbo-wire/openmontage
- Repository: https://github.com/prezbo-wire/openmontage

## Overview

OpenMontage is an agentic video-production system: a user describes or supplies a video, and an agent coordinates research, scripting, media acquisition or generation, editing, and final composition. Its Python runtime exposes a discoverable tool contract and pipeline-manifest helpers; Remotion supplies composition templates, while Backlot provides a live project board. The README documents the broader production workflow, but several stage implementations were not sampled, so those links are documented at a high level rather than inferred from filenames.

Main entry points: [`remotion-composer/src/Root.tsx`](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/Root.tsx) (Remotion compositions), [`remotion-composer/src/Explainer.tsx`](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/Explainer.tsx) (Explainer renderer), [`tools/tool_registry.py`](https://github.com/prezbo-wire/openmontage/blob/main/tools/tool_registry.py) (Tool registry), [`tools/analysis/video_analyzer.py`](https://github.com/prezbo-wire/openmontage/blob/main/tools/analysis/video_analyzer.py) (Video analyzer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Production workflow"]
  node_agent["Production agent"]
  node_pipelines["Pipeline manifests<br/>[pipeline_loader.py]"]
  node_research["Research and analysis"]
  node_source_review["Source media review"]
end

subgraph group_tools["Tool runtime"]
  node_tool_registry["Tool registry<br/>[tool_registry.py]"]
  node_base_tool["Tool contract<br/>[base_tool.py]"]
  node_tool_events["Execution events<br/>[events.py]"]
end

subgraph group_media["Media capabilities"]
  node_assets["Asset acquisition"]
  node_generation["Media generation"]
  node_audio["Audio production"]
  node_video_analysis["Video analyzer<br/>[video_analyzer.py]"]
  node_video_download["Video downloader"]
  node_video_helpers["Video helpers<br/>[_shared.py]"]
  node_kling_client["Kling API client<br/>[client.py]"]
  node_kling_schemas["Kling schemas<br/>[schemas.py]"]
end

subgraph group_render["Composition and render"]
  node_composition["Remotion compositions<br/>[Root.tsx]"]
  node_explainer["Explainer renderer<br/>[Explainer.tsx]"]
  node_cinematic["Cinematic renderer"]
  node_collage["Collage renderer<br/>[CollageBurst.tsx]"]
  node_caption["Caption overlay<br/>[CaptionOverlay.tsx]"]
  node_hero["Hero title<br/>[HeroTitle.tsx]"]
  node_particle["Particle overlay"]
  node_screenshot["Screenshot scene"]
  node_asset_resolver["Asset resolver<br/>[resolveAsset.ts]"]
end

subgraph group_board["Project board"]
  node_backlot["Backlot board<br/>[server.py]"]
  node_board_state["Project state<br/>[state.py]"]
end

node_user(("Creator"))

node_user -->|"describes video"| node_agent
node_agent -->|"researches subject"| node_research
node_agent -->|"acquires media"| node_assets
node_agent -->|"generates assets"| node_generation
node_agent -->|"creates soundtrack"| node_audio
node_agent -->|"composes video"| node_composition
node_agent -.->|"uses workflows"| node_pipelines
node_pipelines -.->|"lists tools"| node_tool_registry
node_tool_registry -->|"registers tools"| node_base_tool
node_base_tool -->|"emits events"| node_tool_events
node_video_analysis -->|"downloads source"| node_video_download
node_video_analysis -->|"analyzes footage"| node_research
node_source_review -->|"uses registered tools"| node_tool_registry
node_kling_client -->|"uses schemas"| node_kling_schemas
node_composition -->|"selects composition"| node_explainer
node_composition -->|"selects composition"| node_cinematic
node_composition -->|"selects composition"| node_collage
node_explainer -->|"renders overlay"| node_caption
node_explainer -->|"renders overlay"| node_hero
node_explainer -->|"renders scene"| node_screenshot
node_screenshot -->|"resolves media"| node_asset_resolver
node_backlot -->|"serves project state"| node_board_state
node_board_state -->|"subscribes to events"| node_tool_events

click node_pipelines "https://github.com/prezbo-wire/openmontage/blob/main/lib/pipeline_loader.py"
click node_research "https://github.com/prezbo-wire/openmontage/tree/main/tools/analysis"
click node_source_review "https://github.com/prezbo-wire/openmontage/blob/main/lib/source_media_review.py"
click node_assets "https://github.com/prezbo-wire/openmontage/blob/main/tools/video/direct_clip_search.py"
click node_generation "https://github.com/prezbo-wire/openmontage/tree/main/tools"
click node_audio "https://github.com/prezbo-wire/openmontage/tree/main/tools/audio"
click node_tool_registry "https://github.com/prezbo-wire/openmontage/blob/main/tools/tool_registry.py"
click node_base_tool "https://github.com/prezbo-wire/openmontage/blob/main/tools/base_tool.py"
click node_tool_events "https://github.com/prezbo-wire/openmontage/blob/main/lib/events.py"
click node_video_analysis "https://github.com/prezbo-wire/openmontage/blob/main/tools/analysis/video_analyzer.py"
click node_video_download "https://github.com/prezbo-wire/openmontage/blob/main/tools/analysis/video_downloader.py"
click node_video_helpers "https://github.com/prezbo-wire/openmontage/blob/main/tools/video/_shared.py"
click node_kling_client "https://github.com/prezbo-wire/openmontage/blob/main/tools/_kling/client.py"
click node_kling_schemas "https://github.com/prezbo-wire/openmontage/blob/main/tools/_kling/schemas.py"
click node_composition "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/Root.tsx"
click node_explainer "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/Explainer.tsx"
click node_cinematic "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/CinematicRenderer.tsx"
click node_collage "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/CollageBurst.tsx"
click node_caption "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/CaptionOverlay.tsx"
click node_hero "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/HeroTitle.tsx"
click node_particle "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/ParticleOverlay.tsx"
click node_screenshot "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/ScreenshotScene.tsx"
click node_asset_resolver "https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/lib/resolveAsset.ts"
click node_backlot "https://github.com/prezbo-wire/openmontage/blob/main/backlot/server.py"
click node_board_state "https://github.com/prezbo-wire/openmontage/blob/main/backlot/state.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_agent,node_pipelines,node_research,node_source_review toneBlue
class node_tool_registry,node_base_tool,node_tool_events toneAmber
class node_assets,node_generation,node_audio,node_video_analysis,node_video_download,node_video_helpers,node_kling_client,node_kling_schemas toneMint
class node_composition,node_explainer,node_cinematic,node_collage,node_caption,node_hero,node_particle,node_screenshot,node_asset_resolver toneRose
class node_backlot,node_board_state,node_user toneIndigo
```

## Components

### Production workflow

- **Production agent**
- [Pipeline manifests](https://github.com/prezbo-wire/openmontage/blob/main/lib/pipeline_loader.py): `lib/pipeline_loader.py`
- [Research and analysis](https://github.com/prezbo-wire/openmontage/tree/main/tools/analysis): `tools/analysis`
- [Source media review](https://github.com/prezbo-wire/openmontage/blob/main/lib/source_media_review.py): `lib/source_media_review.py`

### Tool runtime

- [Tool registry](https://github.com/prezbo-wire/openmontage/blob/main/tools/tool_registry.py): `tools/tool_registry.py`
- [Tool contract](https://github.com/prezbo-wire/openmontage/blob/main/tools/base_tool.py): `tools/base_tool.py`
- [Execution events](https://github.com/prezbo-wire/openmontage/blob/main/lib/events.py): `lib/events.py`

### Media capabilities

- [Asset acquisition](https://github.com/prezbo-wire/openmontage/blob/main/tools/video/direct_clip_search.py): `tools/video/direct_clip_search.py`
- [Media generation](https://github.com/prezbo-wire/openmontage/tree/main/tools): `tools`
- [Audio production](https://github.com/prezbo-wire/openmontage/tree/main/tools/audio): `tools/audio`
- [Video analyzer](https://github.com/prezbo-wire/openmontage/blob/main/tools/analysis/video_analyzer.py): `tools/analysis/video_analyzer.py`
- [Video downloader](https://github.com/prezbo-wire/openmontage/blob/main/tools/analysis/video_downloader.py): `tools/analysis/video_downloader.py`
- [Video helpers](https://github.com/prezbo-wire/openmontage/blob/main/tools/video/_shared.py): `tools/video/_shared.py`
- [Kling API client](https://github.com/prezbo-wire/openmontage/blob/main/tools/_kling/client.py): `tools/_kling/client.py`
- [Kling schemas](https://github.com/prezbo-wire/openmontage/blob/main/tools/_kling/schemas.py): `tools/_kling/schemas.py`

### Composition and render

- [Remotion compositions](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/Root.tsx): `remotion-composer/src/Root.tsx`
- [Explainer renderer](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/Explainer.tsx): `remotion-composer/src/Explainer.tsx`
- [Cinematic renderer](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/CinematicRenderer.tsx): `remotion-composer/src/CinematicRenderer.tsx`
- [Collage renderer](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/CollageBurst.tsx): `remotion-composer/src/CollageBurst.tsx`
- [Caption overlay](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/CaptionOverlay.tsx): `remotion-composer/src/components/CaptionOverlay.tsx`
- [Hero title](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/HeroTitle.tsx): `remotion-composer/src/components/HeroTitle.tsx`
- [Particle overlay](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/ParticleOverlay.tsx): `remotion-composer/src/components/ParticleOverlay.tsx`
- [Screenshot scene](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/components/ScreenshotScene.tsx): `remotion-composer/src/components/ScreenshotScene.tsx`
- [Asset resolver](https://github.com/prezbo-wire/openmontage/blob/main/remotion-composer/src/lib/resolveAsset.ts): `remotion-composer/src/lib/resolveAsset.ts`

### Project board

- [Backlot board](https://github.com/prezbo-wire/openmontage/blob/main/backlot/server.py): `backlot/server.py`
- [Project state](https://github.com/prezbo-wire/openmontage/blob/main/backlot/state.py): `backlot/state.py`

### Other components

- **Creator**

## Connections

- Creator → Production agent: describes video (evidence: `README.md`)
- Production agent → Research and analysis: researches subject (evidence: `README.md`)
- Production agent → Asset acquisition: acquires media (evidence: `README.md`)
- Production agent → Media generation: generates assets (evidence: `README.md`)
- Production agent → Audio production: creates soundtrack (evidence: `README.md`)
- Production agent → Remotion compositions: composes video (evidence: `README.md`)
- Production agent → Pipeline manifests: uses workflows
- Pipeline manifests → Tool registry: lists tools
- Tool registry → Tool contract: registers tools (evidence: `tools/tool_registry.py`)
- Tool contract → Execution events: emits events (evidence: `tools/base_tool.py`)
- Video analyzer → Video downloader: downloads source (evidence: `tools/analysis/video_analyzer.py`)
- Video analyzer → Research and analysis: analyzes footage (evidence: `tools/analysis/video_analyzer.py`)
- Source media review → Tool registry: uses registered tools (evidence: `lib/source_media_review.py`)
- Kling API client → Kling schemas: uses schemas (evidence: `tools/_kling/client.py`)
- Remotion compositions → Explainer renderer: selects composition (evidence: `remotion-composer/src/Root.tsx`)
- Remotion compositions → Cinematic renderer: selects composition (evidence: `remotion-composer/src/Root.tsx`)
- Remotion compositions → Collage renderer: selects composition (evidence: `remotion-composer/src/Root.tsx`)
- Explainer renderer → Caption overlay: renders overlay (evidence: `remotion-composer/src/Explainer.tsx`)
- Explainer renderer → Hero title: renders overlay (evidence: `remotion-composer/src/Explainer.tsx`)
- Explainer renderer → Screenshot scene: renders scene (evidence: `remotion-composer/src/Explainer.tsx`)
- Screenshot scene → Asset resolver: resolves media (evidence: `remotion-composer/src/components/ScreenshotScene.tsx`)
- Backlot board → Project state: serves project state (evidence: `backlot/server.py`)
- Project state → Execution events: subscribes to events (evidence: `backlot/state.py`)
