# calesthio/openmontage architecture

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

- Interactive diagram: https://gitdiagram.com/calesthio/openmontage
- Repository: https://github.com/calesthio/openmontage
- Video tour (about a minute): https://gitdiagram.com/calesthio/openmontage/video

## Overview

OpenMontage is an agentic video-production system: a user describes a video or supplies a reference, then an agent plans production, acquires or generates media, edits and composes a finished video. The map preserves the documented reference-analysis, stock-footage, generation, audio, and composition capabilities. Source excerpts and the index establish several internal calls; other workflow links are documented at product level in the README, so those edges cite it. Some subsystems are represented by their exact enclosing directories because their implementation details were not sampled.

Main entry points: [`lib/pipeline_loader.py`](https://github.com/calesthio/openmontage/blob/main/lib/pipeline_loader.py) (Pipeline manifests), [`remotion-composer/src/Root.tsx`](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/Root.tsx) (Composition catalog), [`tools/base_tool.py`](https://github.com/calesthio/openmontage/blob/main/tools/base_tool.py) (Tool contract), [`tools/video`](https://github.com/calesthio/openmontage/tree/main/tools/video) (Video generation and editing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Planning and review"]
  node_pipeline["Pipeline manifests<br/>[pipeline_loader.py]"]
  node_reference["Reference analysis<br/>[video_analyzer.py]"]
  node_media_review["Source media review"]
end

subgraph group_tools["Tool runtime"]
  node_registry["Tool registry<br/>[tool_registry.py]"]
  node_base_tool["Tool contract<br/>[base_tool.py]"]
  node_events["Tool events<br/>[events.py]"]
  node_asset_cache[("Asset cache<br/>[asset_cache.py]")]
end

subgraph group_media["Media production"]
  node_stock["Stock footage search"]
  node_video_tools["Video generation and editing"]
  node_image_tools["Image generation"]
  node_audio_tools["Audio and narration"]
  node_subtitle["Subtitle generation<br/>[subtitle_gen.py]"]
  node_character["Character animation"]
  node_export["Export bundle<br/>[export_bundle.py]"]
end

subgraph group_render["Composition and render"]
  node_composer_root["Composition catalog<br/>[Root.tsx]"]
  node_cinematic["Cinematic renderer"]
  node_explainer["Explainer renderer<br/>[Explainer.tsx]"]
  node_collage["Collage renderer<br/>[CollageBurst.tsx]"]
  node_caption["Caption overlay<br/>[CaptionOverlay.tsx]"]
  node_particle["Particle overlay"]
  node_asset_resolver["Render asset resolver<br/>[resolveAsset.ts]"]
end

subgraph group_backlot["Production monitoring"]
  node_backlot_server["Backlot board server<br/>[server.py]"]
  node_backlot_state["Project state<br/>[state.py]"]
end

node_user(("User / agent"))

node_user -->|"analyzes reference"| node_reference
node_user -->|"requests production"| node_pipeline
node_pipeline -.->|"plans footage search"| node_stock
node_pipeline -.->|"plans video work"| node_video_tools
node_pipeline -.->|"plans image work"| node_image_tools
node_pipeline -.->|"plans audio work"| node_audio_tools
node_pipeline -.->|"plans captions"| node_subtitle
node_pipeline -.->|"plans animation"| node_character
node_pipeline -.->|"plans delivery"| node_export
node_reference -->|"grounds production plan"| node_user
node_media_review -->|"uses analysis tools"| node_registry
node_registry -.->|"discovers tools"| node_base_tool
node_base_tool -->|"caches results"| node_asset_cache
node_base_tool -->|"emits events"| node_events
node_stock -->|"acquires motion clips"| node_user
node_video_tools -->|"generates or edits video"| node_user
node_audio_tools -->|"supplies soundtrack or narration"| node_user
node_subtitle -->|"supplies captions"| node_user
node_character -.->|"creates animation artifacts"| node_user
node_export -.->|"delivers production"| node_user
node_composer_root -->|"registers renderer"| node_cinematic
node_composer_root -->|"registers renderer"| node_explainer
node_composer_root -->|"registers renderer"| node_collage
node_composer_root -->|"registers overlay"| node_caption
node_explainer -->|"renders overlay"| node_caption
node_explainer -->|"resolves media"| node_asset_resolver
node_cinematic -->|"composes finished video"| node_user
node_video_tools -->|"provides edited media"| node_composer_root
node_audio_tools -->|"provides audio"| node_composer_root
node_subtitle -.->|"provides captions"| node_composer_root
node_backlot_server -->|"serves project state"| node_backlot_state
node_backlot_state -->|"reads events"| node_events

click node_pipeline "https://github.com/calesthio/openmontage/blob/main/lib/pipeline_loader.py"
click node_reference "https://github.com/calesthio/openmontage/blob/main/tools/analysis/video_analyzer.py"
click node_media_review "https://github.com/calesthio/openmontage/blob/main/lib/source_media_review.py"
click node_registry "https://github.com/calesthio/openmontage/blob/main/tools/tool_registry.py"
click node_base_tool "https://github.com/calesthio/openmontage/blob/main/tools/base_tool.py"
click node_events "https://github.com/calesthio/openmontage/blob/main/lib/events.py"
click node_asset_cache "https://github.com/calesthio/openmontage/blob/main/lib/asset_cache.py"
click node_stock "https://github.com/calesthio/openmontage/blob/main/tools/video/direct_clip_search.py"
click node_video_tools "https://github.com/calesthio/openmontage/tree/main/tools/video"
click node_image_tools "https://github.com/calesthio/openmontage/tree/main/tools/graphics"
click node_audio_tools "https://github.com/calesthio/openmontage/tree/main/tools/audio"
click node_subtitle "https://github.com/calesthio/openmontage/blob/main/tools/subtitle/subtitle_gen.py"
click node_character "https://github.com/calesthio/openmontage/blob/main/tools/character/character_animation.py"
click node_export "https://github.com/calesthio/openmontage/blob/main/tools/publishers/export_bundle.py"
click node_composer_root "https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/Root.tsx"
click node_cinematic "https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/CinematicRenderer.tsx"
click node_explainer "https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/Explainer.tsx"
click node_collage "https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/CollageBurst.tsx"
click node_caption "https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/components/CaptionOverlay.tsx"
click node_particle "https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/components/ParticleOverlay.tsx"
click node_asset_resolver "https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/lib/resolveAsset.ts"
click node_backlot_server "https://github.com/calesthio/openmontage/blob/main/backlot/server.py"
click node_backlot_state "https://github.com/calesthio/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_pipeline,node_reference,node_media_review,node_user toneBlue
class node_registry,node_base_tool,node_events,node_asset_cache toneAmber
class node_stock,node_video_tools,node_image_tools,node_audio_tools,node_subtitle,node_character,node_export toneMint
class node_composer_root,node_cinematic,node_explainer,node_collage,node_caption,node_particle,node_asset_resolver toneRose
class node_backlot_server,node_backlot_state toneIndigo
```

## Components

### Planning and review

- [Pipeline manifests](https://github.com/calesthio/openmontage/blob/main/lib/pipeline_loader.py): `lib/pipeline_loader.py`
- [Reference analysis](https://github.com/calesthio/openmontage/blob/main/tools/analysis/video_analyzer.py): `tools/analysis/video_analyzer.py`
- [Source media review](https://github.com/calesthio/openmontage/blob/main/lib/source_media_review.py): `lib/source_media_review.py`

### Tool runtime

- [Tool registry](https://github.com/calesthio/openmontage/blob/main/tools/tool_registry.py): `tools/tool_registry.py`
- [Tool contract](https://github.com/calesthio/openmontage/blob/main/tools/base_tool.py): `tools/base_tool.py`
- [Tool events](https://github.com/calesthio/openmontage/blob/main/lib/events.py): `lib/events.py`
- [Asset cache](https://github.com/calesthio/openmontage/blob/main/lib/asset_cache.py): `lib/asset_cache.py`

### Media production

- [Stock footage search](https://github.com/calesthio/openmontage/blob/main/tools/video/direct_clip_search.py): `tools/video/direct_clip_search.py`
- [Video generation and editing](https://github.com/calesthio/openmontage/tree/main/tools/video): `tools/video`
- [Image generation](https://github.com/calesthio/openmontage/tree/main/tools/graphics): `tools/graphics`
- [Audio and narration](https://github.com/calesthio/openmontage/tree/main/tools/audio): `tools/audio`
- [Subtitle generation](https://github.com/calesthio/openmontage/blob/main/tools/subtitle/subtitle_gen.py): `tools/subtitle/subtitle_gen.py`
- [Character animation](https://github.com/calesthio/openmontage/blob/main/tools/character/character_animation.py): `tools/character/character_animation.py`
- [Export bundle](https://github.com/calesthio/openmontage/blob/main/tools/publishers/export_bundle.py): `tools/publishers/export_bundle.py`

### Composition and render

- [Composition catalog](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/Root.tsx): `remotion-composer/src/Root.tsx`
- [Cinematic renderer](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/CinematicRenderer.tsx): `remotion-composer/src/CinematicRenderer.tsx`
- [Explainer renderer](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/Explainer.tsx): `remotion-composer/src/Explainer.tsx`
- [Collage renderer](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/CollageBurst.tsx): `remotion-composer/src/CollageBurst.tsx`
- [Caption overlay](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/components/CaptionOverlay.tsx): `remotion-composer/src/components/CaptionOverlay.tsx`
- [Particle overlay](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/components/ParticleOverlay.tsx): `remotion-composer/src/components/ParticleOverlay.tsx`
- [Render asset resolver](https://github.com/calesthio/openmontage/blob/main/remotion-composer/src/lib/resolveAsset.ts): `remotion-composer/src/lib/resolveAsset.ts`

### Production monitoring

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

### Other components

- **User / agent**

## Connections

- User / agent → Reference analysis: analyzes reference
- User / agent → Pipeline manifests: requests production
- Pipeline manifests → Stock footage search: plans footage search
- Pipeline manifests → Video generation and editing: plans video work
- Pipeline manifests → Image generation: plans image work
- Pipeline manifests → Audio and narration: plans audio work
- Pipeline manifests → Subtitle generation: plans captions
- Pipeline manifests → Character animation: plans animation
- Pipeline manifests → Export bundle: plans delivery
- Reference analysis → User / agent: grounds production plan
- Source media review → Tool registry: uses analysis tools (evidence: `lib/source_media_review.py`)
- Tool registry → Tool contract: discovers tools
- Tool contract → Asset cache: caches results (evidence: `tools/base_tool.py`)
- Tool contract → Tool events: emits events (evidence: `tools/base_tool.py`)
- Stock footage search → User / agent: acquires motion clips
- Video generation and editing → User / agent: generates or edits video
- Audio and narration → User / agent: supplies soundtrack or narration
- Subtitle generation → User / agent: supplies captions
- Character animation → User / agent: creates animation artifacts
- Export bundle → User / agent: delivers production
- Composition catalog → Cinematic renderer: registers renderer (evidence: `remotion-composer/src/Root.tsx`)
- Composition catalog → Explainer renderer: registers renderer (evidence: `remotion-composer/src/Root.tsx`)
- Composition catalog → Collage renderer: registers renderer (evidence: `remotion-composer/src/Root.tsx`)
- Composition catalog → Caption overlay: registers overlay (evidence: `remotion-composer/src/Root.tsx`)
- Explainer renderer → Caption overlay: renders overlay (evidence: `remotion-composer/src/Explainer.tsx`)
- Explainer renderer → Render asset resolver: resolves media (evidence: `remotion-composer/src/Explainer.tsx`)
- Cinematic renderer → User / agent: composes finished video
- Video generation and editing → Composition catalog: provides edited media
- Audio and narration → Composition catalog: provides audio
- Subtitle generation → Composition catalog: provides captions
- Backlot board server → Project state: serves project state (evidence: `backlot/server.py`)
- Project state → Tool events: reads events (evidence: `backlot/state.py`)
