StateWeaver: Multi-Agent Story-State Control for Long Video

StateWeaver (`arXiv:2611.34290`) is a multi-agent orchestration framework for long-horizon video generation that resolves cross-shot character and object state drift. By combining Active States—which map review discrepancies to targeted asset reference updates—with Hierarchical Collaboration that isolates context by task, clip, and repair round, StateWeaver outperforms MovieAgent, StoryEngine, and ViMax on ViMax-Bench.
StateWeaver: Multi-Agent Story-State Control for Long Video: StateWeaver (`arXiv:2611.34290`) is a multi-agent orchestration framework for long-horizon video generation that resolves cross-shot character and object state drift. By combining Active States—which map review discrepancies to targeted asset reference updates—with Hierarchical Collaboration that isolates context by task, clip, and repair round, StateWeaver outperforms MovieAgent, StoryEngine, and ViMax on ViMax-Bench. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- Active States Tracking (`a, tau, x, p, E`): Binds every asset's identity, story timestamp, visual state, prompt spec, and verified generation evidence to explicit state trees.
- Identity-Preserving Surgical Repair: Translates review discrepancies into concrete reference crop updates (`Validate(Prepare(R_i, N_i | O_i))`), fixing broken attributes without erasing valid continuity.
- Hierarchical Context Isolation: Separates agent execution context by task, clip, and repair round so multi-shot feedback loops never overflow or pollute downstream shot prompts.
- Cross-Shot State Inheritance: Achieves 0.686 overall on ViMax-Bench (0.600 character consistency vs 0.412 for MovieAgent) and 0.648 visual AQ on ST-Bench.
import { createAgent } from '@smoke-monkey/harness';const directorAgent = createAgent({agentId: 'stateweaver-shot-coordinator',provider: 'custom',baseUrl: 'http://127.0.0.1:8000/v1',model: 'qwen3.8:27b',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'allow',run_command: 'ask',},mcpServers: {videoStudio: {command: 'npx',args: ['-y', '@smoke-monkey/mcp-video-state', '--store', './story-state.json'],},},});async function renderConsistentSequence() {const result = await directorAgent.run('Validate shot-04 against Active State tau_4, crop and repair the jacket color discrepancy in reference v4.1, then dispatch shot-05 inheriting verified assets.');console.log('Storyboard State Graph:', result.summary);}renderConsistentSequence().catch(console.error);
Watch: Related Video Guides
How to Make Long AI Videos with Consistent Characters (2026)
This new Gemini Omni trick solves AI character consistency and multi angle long video
What Is StateWeaver? Active States & Hierarchical Collaboration
StateWeaver (arXiv:2611.34290) is a multi-agent coordination architecture that maintains character, prop, and environmental continuity across long multi-shot AI videos. Rather than stuffing an entire multi-minute repair history into one monolithic agent context, it pairs Active States—versioned records linking story time to visual references—with Hierarchical Collaboration that isolates context per task, clip, and repair round.
Each Active State tuple s = (a, tau, x, p, E) tracks the asset identifier a, story time tau, visual attributes x, prompt representation p, and validated evidence E. When a clip review flags an error (for instance, a character's coat changing color after entering a room), StateWeaver updates and validates the reference image R_i^(t+1) via targeted reference crops before regenerating the shot.
StateWeaver Benchmarks on ST-Bench & ViMax-Bench
Across both predefined and autonomously planned storyboards, StateWeaver improves visual quality (AQ) and long-range character consistency over existing agentic video pipelines.
| Framework | ViMax-Bench Overall | ViMax Char. Consistency | ViMax AQ | ST-Bench AQ | ST-Bench Cross-Shot (All) |
|---|---|---|---|---|---|
MovieAgent | 0.619 | 0.412 | 0.588 | 0.632 | 0.548 |
StoryEngine | 0.656 | 0.474 | 0.586 | 0.642 | 0.546 |
ATAS | 0.669 | 0.563 | 0.570 | 0.636 | 0.571 |
ViMax | 0.685 | 0.563 | 0.590 | 0.630 | 0.524 |
| StateWeaver | 0.686 | 0.600 | 0.598 | 0.648 | 0.558 |
On ViMax-Bench, StateWeaver lifts character consistency to 0.600 (+3.7 points over ViMax/ATAS and +18.8 points over MovieAgent) while preserving environment continuity (0.875) and top visual aesthetic quality (0.598 on ViMax-Bench, 0.648 on ST-Bench).
Prevent Context Bloat in Multi-Round Repairs
Never pass full multi-round repair transcripts to downstream shot generators. Isolate each repair loop in its own context and promote only the final verified state tuple and reference crop to Hierarchical Story Memory.
Dependency-Driven Parallel Generation & Reference Versioning
Because StateWeaver tracks explicit story-time dependencies across shots, independent clips in parallel scene sets render concurrently, while causally dependent shots wait only for confirmed upstream asset states E.
# Fetch StateWeaver paper and inspect dependency-driven state schema
curl -sL https://arxiv.org/pdf/2611.34290 -o stateweaver-2611.34290.pdf
# Example Active State JSON ledger entry per shot transition
cat <<'EOF' > active_state_tau4.json
{"asset_id": "protagonist_01", "story_time": 4, "ref_version": "v4.1", "verified": true}
EOFImplementing Hierarchical Context Isolation in Smoke Monkey
Smoke Monkey Harness and Smoke Monkey Canvas mirror StateWeaver's exact isolation pattern: parent orchestrators maintain a lightweight state ledger while spawning scoped worker subagents per clip or repair pass, guaranteeing clean visual continuity across multi-scene video productions without prompt drift.
Frequently Asked Questions
Q:What problem does StateWeaver solve in multi-shot AI video generation?
Standard video agents accumulate bloated prompts during iterative repairs and fail to propagate event-driven state changes (like wet clothes or broken props) across shots. StateWeaver solves this with Active States and Hierarchical Collaboration.
Q:What are Active States in StateWeaver?
Active States are structured records `s = (a, tau, x, p, E)` linking each asset `a` and story timestamp `tau` to its current attributes, prompt spec, and verified reference images for reuse in downstream shots.
Q:How does Hierarchical Collaboration prevent agent context overflow?
It isolates execution contexts by task, individual clip, and repair round, storing only validated state transitions and reference versions in hierarchical story and asset memory.
Q:How did StateWeaver perform against ViMax and MovieAgent?
On ViMax-Bench, StateWeaver achieved the highest overall score (0.686), top visual aesthetic quality (0.598), and top character consistency (0.600 vs 0.563 for ViMax and 0.412 for MovieAgent).
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.