senclaw/video-flow

app Xưởng sản xuất video AI (port từ Flow Kit): multi-agent DAG biến ý tưởng / kịch bản thành video hoàn chỉnh, điều khiển Google Flow (Veo3 / Imagen) qua Chrome extension bridge. Quản lý project → video → scene → character, sinh ảnh tham chiếu, ảnh khung hình, video từng cảnh (dọc + ngang độc lập), upscale, lồng tiếng narration bằng TTS của SenClaw (VieNeu-TTS tiếng Việt / MMS-VITS / macOS Speech), ghép cảnh bằng ffmpeg. Toàn bộ LLM chạy qua LLM chung của SenClaw daemon

Install

senclaw app install senclaw/video-flow

Verifies sha512 and SenClaw’s signature before writing to disk.

Documentation

Video Flow — SenClaw Space App

Flow Kit ported as a SenClaw Space App. An AI video production factory: a multi-agent DAG turns a raw concept or a finished screenplay into a complete video — driving Google Flow (Veo3 video / Imagen images) through a Chrome extension bridge. Rust + axum backend, React dashboard, all LLM calls routed through the SenClaw daemon's shared LLM bridge (no provider keys of its own).

Projects → videos → scenes → characters, with reference images, per-scene frame images, per-scene Veo3 clips (vertical + horizontal state fully independent), 4K upscales and ffmpeg concat. Every sub-agent (director, screenwriter, shot design, image/video gen, critic, …) has its own editable prompt in souls/.

Architecture

┌────────────────────┐   WS ws://127.0.0.1:9222   ┌───────────────────────┐
│  Chrome            │◄──────────────────────────►│  video-flow app :4460 │
│  extension/        │                            │  (axum)               │
│  (Video Flow bridge)│─ HTTP /api/ext/callback ─►│   ├─ DAG engine       │
│  flow.google tab:  │                            │   ├─ request worker   │
│  batchexecute RPC  │                            │   ├─ REST /api/*      │
│  + reCAPTCHA       │                            │   ├─ MCP /api/mcp/sse │
└────────────────────┘                            │   └─ React UI (/)     │
        ▲ runs inside the signed-in Flow tab      └──────────┬────────────┘
        │ (Veo3 / Imagen)                                    │
                                                             │ LLM bridge
                                                             ▼
                                                  ┌───────────────────────┐
                                                  │ SenClaw daemon :18788 │
                                                  │ (shared LLM + agents) │
                                                  └───────────────────────┘
  • The extension runs in the browser because Google Flow signs every call with the user's session cookie plus a per-page at token, and a generate also carries a single-use reCAPTCHA — none of which can be replayed from outside the tab. Since Google moved Flow to flow.google.com (September 2026) the old ya29.* bearer no longer exists; the extension runs Flow's batchexecute RPCs inside the signed-in tab. The aisandbox-pa.googleapis.com REST proxy is kept as the legacy path only.
  • The app never talks to an LLM provider directly — src/llm.rs bridges to the SenClaw daemon (SENCLAW_BASE_URL, default http://127.0.0.1:18788).
  • Two pollers over SQLite: the DAG engine (multi-agent pipeline, 500ms tick, max 5 concurrent) and the request worker (video/upscale queue via the extension).

Dev run

# backend (from the repo root; serves UI + API on :4460, ext WS :9222)
cargo run

# web UI dev server (hot reload)
cd web && npm install && npm run dev

The SenClaw daemon must be running (LLM bridge on :18788). Health check: curl http://127.0.0.1:4460/api/status.

Install as a Space App

  • Dev / from source: register the app dir directly with the daemon (register-local) so it starts ./video-flow per senclaw-manifest.json.
  • Packaged: scripts/pack.sh builds web + release binary and stages a flat release/video-flow/ (binary, manifest, skills/, personas/, souls/, playbooks/, extension/, web_dist/), zipped as video-flow-app.zip — install that zip via SenClaw's install-zip flow. The manifest auto-registers the MCP server video-flow-mcp at /api/mcp/sse.

Chrome extension setup (required for any image/video generation)

  1. chrome://extensions → Developer mode → Load unpacked → select the app's extension/ folder.
  2. Open flow.google.com and sign in, and leave the tab open — every generate runs inside it. The extension connects to the app WS on :9222.
  3. Verify: the popup shows three green dots (app WS / app HTTP / Flow tab), and vf_status (or GET /api/status) shows extension_connected: true.

If SenClaw assigns the app a port other than 4460, set it in the popup under Kết nối · cổng của app — the ports live in chrome.storage.local, so no rebuild is needed. See EXTENSION_SETUP.md.

Planning/parsing stages (pure LLM) work without the extension; image and video stages require it, plus an open, signed-in flow.google.com project tab — every generate runs inside that tab and is scoped to that project. The extension reports the project's uuid to the app automatically.

Not available on the current Flow transport (their payloads do not appear in the new frontend's traffic, so there is nothing to call):

  • 4K upscale — the clip still renders; only the upsample step is gone.
  • Start+end frame chaining — a scene with an end frame renders as plain image-to-video, and the dropped frame is named in the log.
  • Project creation from the app — create the project once in the Flow UI.

Environment variables

VarDefaultMeaning
PORT4460App HTTP port (injected by the daemon)
FLOWKIT_WS_PORT9222Extension WebSocket port
FLOWKIT_WORKER1Enable the video/upscale request worker
FLOWKIT_WORKER_POLL_SEC5Worker queue poll interval
FLOWKIT_WORKER_GEN_TIMEOUT_SEC300Per-generation timeout
FLOWKIT_WORKER_VIDEO_POLL_SEC10Video render poll interval
FLOWKIT_WORKER_VIDEO_POLL_TIMEOUT_SEC420Video render poll timeout
FLOWKIT_USE_BATCH_RPC1Use Flow's batchexecute transport. 0 falls back to the retired REST path
FLOWKIT_IMAGE_MODELNANO_BANANA_PROImage model on the batch path (NANO_BANANA_PRO / NANO_BANANA_2)
GOOGLE_FLOW_APIhttps://aisandbox-pa.googleapis.comREST base — legacy path only
GOOGLE_API_KEY(empty)Optional key for the legacy REST path
FLOWKIT_ORIENTATIONVERTICALDefault orientation when unspecified
FLOWKIT_EXEC_ALLOWLISTffmpeg,ffprobeCommands the exec tool may run
FLOWKIT_EXEC_TIMEOUT_SEC300Exec tool timeout
FLOWKIT_TOOL_HTTP_ALLOW_PRIVATE0Allow http tools to hit private IPs
FLOWKIT_DATA_DIR~/.senclaw/space-app-data/<app_id>App data root — outside the install dir, since installing a zip wipes it
FLOWKIT_DB_PATH<data>/app.sqliteSQLite path
FLOWKIT_MEDIA_DIR<data>/mediaDownloaded/uploaded media
FLOWKIT_SOULS_DIRsouls/Sub-agent prompt files
FLOWKIT_SKILLS_DIRplaybooks/Internal prompt playbooks
SENCLAW_BASE_URLhttp://127.0.0.1:18788SenClaw daemon LLM bridge
SENCLAW_SPACE_APP_IDvideo-flowApp id sent to the bridge

Chi tiết cài extension + đổi cổng: EXTENSION_SETUP.md.

MCP tools (video-flow-mcp, full names mcp__video-flow-mcp__vf_*)

ToolWhat it does
vf_project_create/list/get/update/deleteProject CRUD; get includes videos (+scene counts) and linked characters with reference-image readiness
vf_character_create/list/updateCharacters/locations/assets (single-outfit base look), optional project link
vf_video_create/listVideos — where orientation (VERTICAL/HORIZONTAL) is fixed
vf_scene_list/get/create/update/deleteScenes — compact progress list, full row, prompt edits (cascade-aware)
vf_pipeline_createCreate + start the DAG (production / full / custom modes)
vf_pipeline_statusParent + per-task status, by pipeline_id or project_id
vf_pipeline_controlstart / pause / cancel / retry_task
vf_generate_imageReference image (character_id), scene frame (scene_id), or all missing refs (all_refs); spawns, returns immediately
vf_generate_videoVeo3 clip for a scene+orientation (needs completed image); async
vf_upscale_video4K upscale (needs completed video; TIER_TWO); async
vf_generate_narrationTTS voice-over per scene via SenClaw's TTS (no extension needed); async
vf_media_localizeDownload still-remote Flow assets into local media and repoint the DB (Flow URLs expire)
vf_tts_statusInstalled TTS models + active model/voice/language/speed
vf_requests_statusGeneration queue: counts by status/type + recent rows with errors
vf_agents_listThe 17 built-ins + skill agents, with soul excerpts
vf_soul_get / vf_soul_setRead / overwrite one sub-agent's system prompt
vf_statusHealth: extension connected, worker, LLM profile, entity counts

Data location (survives reinstall)

Installing a Space App zip runs remove_dir_all(<app_dir>) before extracting, so anything stored next to the binary is destroyed on every update. The DB and downloaded media therefore live in **~/.senclaw/space-app-data/<app_id>/** (override with FLOWKIT_DATA_DIR). On first boot the app migrates a DB left in the old in-app-dir location — including the -wal/-shm sidecars and media/ — so upgrading from an older build keeps existing projects.

Local media & request lifecycle

Google Flow serves generated assets from short-lived signed URLs, so every successful generation is mirrored into media/ immediately and the DB stores /api/media/{id}/file. Downloads dedupe on original_url, and a download failure never loses the asset — the remote URL is kept and the generation still counts as done.

  • Repair an older project whose thumbnails went blank: POST /api/media/localize {"project_id": "..."} or MCP vf_media_localize.
  • A request row in PROCESSING cannot survive a restart, so at boot the app reconciles leftovers: if the asset it was producing exists the row becomes COMPLETED, otherwise FAILED with an explicit reason. Image requests are closed out by the image agent (video/upscale by the worker) — nothing stays spinning.

Prompt sent to Google Flow

scene.video_prompt / scene.image_prompt are a working representation: the director_frame bridge is wrapped in [DIRECTOR_FRAME_BRIDGE] markers so it can be re-applied idempotently, and continuity constraints come back from the LLM phrased as "No X". src/veo_prompt.rs renders that into what Veo3/Imagen actually receive — it unwraps the markers, drops the previous shot's size/movement from the continuity cue (the model read it as a second, contradictory camera instruction), rewrites the negatives positively, balances truncated quotes, and caps the prompt at 1200 characters on a sentence boundary. Edit the stored prompt in the UI; the rendering step is applied at send time.

Two project fields feed it:

  • material — the visual-style preset. Its scene_prefix now leads every scene image and clip prompt, and its style_instruction + lighting replace the "photorealistic" claim in reference-image prompts.
  • allow_voice — off means the clip prompt carries no spoken dialogue at all, so Veo3's native audio can't double up on the TTS narration track (and won't burn captions into the frame). On, the prompt says the line is audio only.

Souls editing

Each pipeline stage's behaviour is its soul — a markdown file in souls/ (e.g. director.md, image-gen.md, critic.md), frontmatter stripped at load. Edit via the UI, PUT /api/agents/{type}/soul, or the MCP pair vf_soul_get / vf_soul_set; changes apply on the agent's next execution. playbooks/ holds the internal prompt playbooks used by DB-backed skill agents (ReAct tool loop) — not to be confused with the SenClaw skills in skills/.

Credits

Port of Flow Agent Video ("Flow Kit") — the original Go backend, React dashboard and Chrome extension — onto the SenClaw Space App runtime (shared daemon LLM, MCP, skills and personas).

Release

CI (.github/workflows/build.yml) builds and tests linux-x64, darwin-arm64 and windows-x64, and publishes to senclaw.bacnd.com on a push to main, a v* tag, or a manual run with publish ticked. It needs the SENCLAW_HUB_TOKEN secret (scope publish, from https://senclaw.bacnd.com/settings/tokens).

A v* tag also creates a GitHub release carrying one zip per platform plus video-flow-chrome-extension.zip (unzip, then Load unpacked).

Versions on the hub are immutable: bump version in senclaw-hub.json to ship a change. A push that did not bump it gets 409 from the hub and CI skips it.

app-space-sdk comes from SenClaw/senclaw (branch = "main"); Cargo.lock pins the exact commit.

Declared permissions

{
  "network": [
    "127.0.0.1"
  ],
  "exec": [
    "./video-flow"
  ]
}

Declared by the publisher, not enforced by SenClaw. The CLI compares this against what you already have installed and asks before anything widens.

Published by

@senclawtrusted
benji
51 packages · 49 downloads · member since 2026-07 · GitHub since 2015-06

The checkmark means SenClaw confirmed who this publisher is. It says nothing about whether their packages are safe.

About

Owner@senclaw
Latest1.1.0
Downloads0
Repositorygithub.com/NortonBen/senclaw-app ↗

Versions

VersionTagsArtifactsPublished
1.1.0latestdarwin-arm64, linux-x64, win32-x642026-10-22
1.0.1darwin-arm64, linux-x64, win32-x642026-08-09
1.0.0darwin-arm64, linux-x64, win32-x642026-08-07

Artifacts · 1.1.0

PlatformFormatSignatureFileSize
darwin-arm64zipunsignedvideo-flow-app.zip4199 KB
linux-x64zipunsignedvideo-flow-app.zip4664 KB
win32-x64zipunsignedvideo-flow-app.zip4779 KB

Unsigned builds require sign-in to download and are not distributed to the auto-updater, because unsigned executables from a new domain get flagged as unsafe. Sign and notarize (macOS) or Authenticode-sign (Windows) to distribute publicly.

Auto-update endpoints

For a Tauri app — add to tauri.conf.json:

"endpoints": ["https://senclaw.bacnd.com/api/v1/updates/tauri/senclaw/video-flow/{{target}}/{{arch}}/{{current_version}}"]

For an electron-updater app — generic provider URL:

https://senclaw.bacnd.com/updates/senclaw/video-flow/stable

Only signed/notarized artifacts are offered as updates — a client fetches the update without credentials, and unsigned binaries are not publicly downloadable.

Something wrong with this package?

Report this package

Report this package

Tell us what is wrong and a moderator will look at it. Be specific — a report that names a version and a behaviour can be checked in minutes; one that says “looks sketchy” cannot be acted on at all.

Not about this package? Contact us instead. What happens to a report is described in reporting and moderation.

API: GET https://senclaw.bacnd.com/api/v1/packages/senclaw/video-flow