AI agent control, safety gates, and evals
Drive VideoFunnel programmatically via @ui-sdk/react/agent and WebMCP, protect checkouts with data-agent-confirm, and run the eval suite.
VideoFunnel is built on @ui-sdk/core and @ui-sdk/react so both human visitors and AI agents can inspect the active chapter, jump between branches, and verify every path cleanly.

The Creator & Agent panel on videofunnel.wynter.ai lets you trigger live snapshot() and act() commands and watch the branch graph highlight in real time.
Connecting the agent bridge
Create the bridge once in browser code with createVideoFunnelAgent from @videofunnel/react:
import { createVideoFunnelAgent } from "@videofunnel/react"
const bridge = createVideoFunnelAgent({
allow: (step) => (step.confirm ? window.confirm(step.confirm) : true),
enableWebMcp: true,
})
// Inspect every named control and action on the player
const components = bridge.snapshot()
// Drive the funnel programmatically
await bridge.act({
steps: [
{ ref: "VideoFunnel player: Branching VSL", action: "play" },
{ ref: "VideoFunnel player: Branching VSL", action: "seek", args: [12.5] },
{ ref: "Mine always tunnel", action: "press" },
],
})
When enableWebMcp: true is passed, VideoFunnel also registers snapshot, act, and query on document.modelContext for WebMCP-enabled browsers.
Human-in-the-loop confirmation (data-agent-confirm)
Navigation actions (play, pause, seek, choose, jumpToSegment, setTheme) run freely so an agent can guide a viewer or QA every branch. Irreversible actions—like clicking a checkout handoff CTA or submitting an email opt-in—carry data-agent-confirm, which pauses execution until your allow callback approves it.
Deterministic eval suite
The repository includes an automated eval runner (npm run eval) and Vitest suite (npm run test) covering four categories:
- Graph Integrity: Rejects cycles, dead ends, duplicate IDs, unreachable nodes, and out-of-bounds cue timestamps while confirming
walk()matches 100% ofenumeratePaths(). - Player Adapters: Verifies URL detection and embed normalization across HTML5 MP4, Voomly, YouTube, Vimeo, and Wistia.
- End-to-End Simulation & UI SDK Agent Tests: Walks every authored path to its final
vf_*handoff parameters and verifiesdata-agent-confirmblocks unapproved checkouts. - Theme Contrast & Copy Checks: Confirms all four built-in themes pass WCAG AA contrast (
>= 4.5:1).
Go back to Getting started with VideoFunnel or browse all product docs in the Wynter Product Guides Index.
Frequently Asked Questions
How does an AI agent control a VideoFunnel player?
Every interactive control uses @ui-sdk/core and @ui-sdk/react primitives, exposing snapshot(), query(), and act() through createVideoFunnelAgent() without fragile DOM scraping.
Can an AI agent accidentally submit a checkout or email form?
No. Checkout CTAs and lead submit buttons include data-agent-confirm by default, so createVideoFunnelAgent({ allow }) blocks those steps unless a human explicitly approves.
How do I test my custom funnel graph before publishing?
Run validateExperience(json) from @videofunnel/core or run npm run eval in the repository to check graph integrity, URL normalization, path simulation, and theme contrast.