Epic-Codirector Co-Director
v6 · agentic architecture · draft
Technical Explainer · Living Document

An agentic film crew,
wired as a graph.

Epic-Codirector Co-Director composes a feature-style production pipeline out of specialised agents — director, casting, sound, art, cinematographer — and binds them together with a monitoring layer, a shared vector memory, and a chain of human-in-the-loop checkpoints. This document walks through the structure phase by phase.

5phases
Intake → Editing
6HITL
Decision gates
6agents
Monitoring layer
9+roles
Specialised directors
01 / Overview

Five phases, one spine.

A user brief enters at the left; a finished cut leaves at the right. Between those two ends, five subgraphs run in sequence — each gated by a human review — with a monitoring layer above and a shared data layer below.

MONITORING LAYER Step Agent · Model Chooser · Scorer · Prev-step Review · Backpropagator · Guardrail __start__ Intake P1 · brief → manifest Story P2 · → final script Pre-production P3 · shot planning Production P4 · video gen Editing P5 · cut + grade __end__ HITL HITL 2× HITL HITL HITL VECTOR MEMORY (PG VECTOR) creator_profile · style_refs · char_bible · world_facts · 7-layer intent TOOLS file_uploader · script_formatter · script_save · browse · video_save A linear spine, but every node is a subgraph in its own right.
Simplified view. The full diagram is below — and lives on the Epic-Codirector Architecture Miro board.
02 / Full Diagram

The whole topology, in one view.

The complete Epic-Codirector Co-Director architecture — every subgraph, every monitoring agent, every tool wired together. Scroll horizontally to pan across all five phases, or click anywhere on the diagram to open it full-screen for detailed inspection.

v6 · Full Architecture · 3186 × 1255
100%
Epic-Codirector Co-Director full architecture diagram
Scroll to zoom · drag to pan · double-click to reset
Annotations Key Numbered callouts above correspond to these concepts.
1
Monitoring layer
Six observer agents (Step, Model Chooser, Scorer, Prev-step Review, Backpropagator, Guardrail) watch every active node and can route around failures.
2
Vector memory
PG Vector with five collections — creator_profile, style_refs, char_bible, world_facts, 7-layer intent. Written at intake; read across all downstream phases.
3
Script branch
The script_text? router takes one of two paths: user-provided script → format & lock; nothing → run Story Writer + 3-pass review.
4
3-pass review loop
Arc · scenes · coherence reviewed and then summarised. Failure routes back to the writer for revision before the next attempt.
5
Director fan-out
director_main delegates to specialised heads in parallel — Assistant Director, Casting, Sound, Legal/Compliance, plus the Art Department subgraph.
6
Per-shot loop
Production generates one shot at a time. Each shot passes through HITL approval before the planner advances to the next.
03 / Legend

Reading the notation.

Six visual primitives carry the diagram's semantics. Shape encodes role; colour encodes domain.

Agent / Process Node
A LangGraph node. Either an LLM call or deterministic code that mutates pipeline state.
HITL Decision Gate
Human-in-the-loop checkpoint. Auto-approves in AUTO mode; pauses for review otherwise.
Tool
Side-effectful capability invoked from inside a node — uploaders, savers, formatters, browsers.
Data Store
PG Vector + RDB. Five collections backing retrieval across the pipeline.
Subgraph
A phase rolled up as a single node in the parent graph; expands to its own internal flow.
Terminators
Graph entry (__start__) and exit (__end__). The pipeline may exit early on mode.
04 / Phases

The pipeline, unrolled.

Each phase is a self-contained subgraph. Pipeline state flows through them in order, with optional early exits controlled by state.mode.

Intake phase

P1 · intake_phase subgraph

Turns a raw user brief — text, references, optionally an uploaded screenplay — into a structured intake manifest that downstream phases can plan against.

Nodes

  • intake_orchestratorParses brief, populates creator profile, kicks off research.
  • HITL · concept_cardFirst human review — creator confirms the captured concept.
  • intake_finalFinalises the intake manifest and writes to memory.

Tools & Data

  • tool: File UploaderAccepts user references, scripts, mood boards.
  • tool: internet_browsingResearch the brief for context, references, prior art.
  • vector_db ← writePersists creator_profile + style_refs + 7-layer intent.
To be filled in Field-level shape of the intake manifest; the four sub-calls inside intake_orchestrator; the 7-layer intent schema; what AUTO mode does at the concept_card gate.
To be filled in The rejection edge wiring from review back to writer · how summarize_review consolidates the three review axes · whether the review passes run in parallel or sequence · script_save semantics (S3 vs Vector DB vs RDB).

Pre-production phase

P3 · Preproduction_phase SubGraph · Shot Planning

The most populous phase. A director-level fan-out delegates parallel work to specialised heads — sound, casting, art, legal — and converges on a Final Master Script Breakdown plus storyboard visuals.

Director Roles

  • director_mainOrchestrates the fan-out across specialised heads.
  • Director's AssistantCoordination and continuity glue.
  • Assistant DirectorShot breakdown and treatment notes.
  • Casting DirectorVoice profiles, identity, costume guidance.
  • Sound DirectorDialogue · SFX · music direction.
  • Legal & Compliance / CopyrightPre-production clearance gate.

Art Department (nested subgraph)

  • Art DirectorTop of the art-dept fan-out.
  • Set Design
  • Costume
  • Hair & Makeup

Outputs & Gates

  • HITL × 2One gate after fan-out, one before exit.
  • Final Master Script Breakdown + Storyboard visual
To be filled in The exact fan-out / fan-in topology between director_main and the specialised heads · whether the two HITLs gate different artefacts · how Legal & Compliance can reject and where rejection routes to · what triggers the storyboard visualisation pass.

Production phase

P4 · production_phase

Converts the locked breakdown into rendered video. A production-side director coordinates shot planning, cinematography decisions, prompt writing, and the actual video model API calls.

Nodes

  • production Director SubGraphManages the per-shot loop.
  • Shot plannerCURRENT and NEXT shot framing.
  • CinematographerCamera and look decisions.
  • prompt writerComposes the video-model prompt.
  • Video GeneratorVideo model API call + saving.
  • HITLPer-shot human approval before moving on.

Cinematographer's specs

Camera Config
shot_size (WS, OTS) · lens · shot_angle (LA, high angle) · camera pan
Look & Feel
color palette · lighting · mood (e.g. melancholic)
  • tool: Video SaverPersists shot videos.
To be filled in The per-shot loop semantics (does HITL loop back to shot_planner or to production_director?) · how the Video Generator handles rate limits and retries · whether CURRENT/NEXT framing implies look-ahead generation · which video model(s) are bound and where provider routing happens.

Editing phase

P5 · Editing Director SubGraph

Assembles approved shots into a finished cut. Colour grading and a final human review precede graph exit.

Nodes

  • editing_board / color_gradingTimeline assembly + grade.
  • ud4_final_reviewLast human gate before __end__.

Outputs

  • __end__Pipeline terminates; final film is returned.
To be filled in What sits inside editing_board as concrete operations · how colour grading interacts with Look & Feel decisions from P4 · whether ud4 rejection loops anywhere or just halts.
05 / Cross-cutting

The layers above and below.

Three concerns thread through every phase: a monitoring layer that observes, a vector memory that remembers, and a tool layer that does side-effectful work.

Monitoring Layer

Six agents · across all phases

A surveillance and self-correction band that observes every active node and can intervene when scoring drops or guardrails fire.

  • Step Agentoverall monitor
  • Model Chooserper-step
  • Scorer Agentper-active-agent
  • Prev-step Reviewretrospective
  • Backpropagatorerror flow
  • Guardrail Agentper-block

Vector Memory

PG Vector · 5 collections

Shared retrieval-augmented context. Intake writes; subsequent phases read against the user's accumulated profile and prior projects.

  • creator_profileidentity
  • style_refsaesthetic
  • char_biblecharacters
  • world_factssetting
  • 7-layer intentgoal model

Tools

Side-effectful capabilities

Invoked from inside nodes — uploads, formatting, persistence, web access, video saves. Multiple invocation sites for several of these.

  • File Uploaderintake
  • script_formatterstory
  • script_saveS3 + Vector
  • script_saveRDB + Vector
  • internet_browsing×2 sites
  • Video Saverproduction
To be filled in Concrete monitoring behaviours — what does Scorer Agent score against? Where does Backpropagator route errors? · The exact write boundaries for each Vector DB collection · Whether script_save's two flavours (S3 vs RDB) reflect intermediate vs final state, or different downstream consumers.
06 / HITL

Where the humans step in.

Six gates across the pipeline. In AUTO mode they pass through silently; in manual / review mode they pause the graph and wait for a creator decision.

HITL 01

concept_card

In intake. Confirms the captured concept before any generation begins.

HITL 02

full_script

In story. Locks the screenplay before pre-production.

HITL 03

preprod entry

In pre-production. Gates director fan-out — likely the treatment / breakdown approval.

HITL 04

master breakdown

In pre-production. Sign-off on the Final Master Script Breakdown + storyboard before production starts.

HITL 05

per-shot

In production. Approves each generated shot before the next one runs.

HITL 06

final_review

In editing. Final cut approval before graph exit.

07 / Dataflow

State as it travels.

How the pipeline state grows and gets shaped as it passes through each phase.

Section pending This section will document the shape of PipelineState at each phase boundary — which fields are written, which are required as inputs, and where the reducers append vs replace. To be authored in a follow-up.

The full diagram lives on Miro.

This document is a structured walkthrough — the live source of truth is the Epic-Codirector Architecture board, where the topology is editable and the latest revisions land first.

Open Epic-Codirector Architecture board