uberseek

UberSeek: design

UberSeek is a harness for video work: one reusable environment that brings together what an agent needs to work with video. It does not have an agent loop of its own. It runs inside an existing agent harness, such as Pydantic AI or Hermes, which drives the model and calls UberSeek; that is also how it is tested end to end.

It has two layers:

It is built in iterations. The first iteration is the base plus the selection module. Later iterations add carrying out edits, reviewing the result and handling revisions (section 9).

This is the one maintained document. Everything earlier (the research reports, the activity-prior notes, previous designs) is frozen in archive/ and is cited here by file name where a number comes from it.

1. Why moments come first

Picking has three levels:

Level Question Research so far
Locate Where in the footage is what I need? Heavily studied (SAVE, ForeSeek, T*, VideoTree)
Choose Of several candidates, which is best for this purpose? Benchmarked: picking one clip among candidates (VEBench), selected ranges by several professionals (MEDit-Bench)
Trim Exactly where does it start and end? Studied as cut-point prediction (Pardo et al., Huang et al., 2021) and as highlight and deletion spans (RoughCut-Bench)

Choose and trim have public work and labels (section 8). What none of it tests is an agent that decides what to look at under a stated budget, compares several takes of the same content, sets in and out points to sub-second error, and gives a reason for each boundary. That is the gap this iteration aims at. Comparing candidates is not new in itself (VEBench does it in one model pass, and the best model picks the right clip 44% of the time and localises it at 0.11 overlap); the untested part is the agent controlling its own looking.

Editing is partly taste, not all of it

An editor’s harder problem is often not seeing the footage but deciding what it means for the result wanted. That judgment has three layers, and treating all of it as taste makes the problem harder than it is:

Layer Examples How it can be judged
Technical Is a word clipped? Is the caption legible? Does it fit the duration? Mostly by code
Convention Does the cut feel abrupt? Is the speech clear? Does the reaction get enough time? People largely agree on what is clearly bad; cut placement has been learned from edited film (section 8)
Taste, intention, audience Dramatic or understated opening? Keep the pause? Only relative to a brief, its context and whose preference it is

So a moment has no quality score of its own. Its value is conditional: on the brief, on what surrounds it in the cut, and on the preferences of the editor or audience. A two-second silence is a fact; whether it is dead air or the strongest moment in the interview depends on what the piece is for.

2. The base: exploring video

Three things that vary independently

  What it is
Extent How much time is under consideration
Fidelity How finely it is shown: how many frames, at what size, with or without sound
Objective What the agent is trying to find out

The width of a span does not decide what should be shown. A 45-second passage may need only its sound (“is the dialogue clear?”); a 3-second moment may need dense frames (“who takes the document?”); one frame can settle a question about a 90-minute video. So the agent states an extent and an objective, and the harness chooses the fidelity.

The interface: code, plus a way to look

Video is far larger than what the next decision needs. So the agent does not call one inspection tool at a time and read every result. It writes a short program against a typed video API; the program runs in a sandbox; intermediate data (transcripts, timings, signals, a hundred candidates) stays there; only a compact result comes back. This is Cloudflare’s Code Mode idea applied to video.

Three primitives:

Primitive Does
discover Returns the parts of the API relevant to the task, so the whole API never sits in context
execute(program) Runs a bounded program against the API and returns its result
observe(spans, focus) Delivers images of the footage to the model as an observation, by artifact id
const source = await video.open("interview.mp4");
const hits = await source.transcript.search("company almost failed");
const candidates = await Promise.all(hits.map(async h => {
  const span = h.span.expand({ before: 5, after: 8 });
  return { span,
           words: await source.transcript.get(span),
           pauses: await source.signals.pauses(span),
           shots: await source.shots.in(span) };
}));
return candidates.filter(c => c.words.length > 0);

(Illustrative; the API does not exist yet.) The model then decides which of the returned candidates need to be seen or heard, and asks for that with observe.

Code computes; only the model perceives. A program can search, measure, filter and rank on timings, words and signals. It cannot judge framing, expression or whether a cut lands. Any decision of that kind needs an observe, and only what observe delivered counts as something the model saw.

observe delivers images only (decided). Frames, contact sheets and crops, returned by artifact id. Images are what every host and model can take in a tool result; sound and video clips are not. Sound reaches the model in two indirect forms: as measurements (words with timings, pauses, loudness) and drawn as a picture (a waveform or loudness strip with the words marked on it). The model does not hear anything in this iteration. So what depends on hearing (hesitation, tone, clarity under music, the rhythm of a cut) is decided from signals, recorded as not heard, and left for the editor to confirm. Real sound in observe is a later capability (section 9).

Memory as part of the API

VIVID keeps every look outside the model’s context, pinned to the file version it came from, and lets the agent search it with one retrieve tool (research-editing.md). UberSeek keeps the same store, and makes it an object in the API, so a program can query and reuse past observations like any other data:

const seen = await video.observations.where({ source, focus: "visual" });

// Coverage: what has not been looked at closely yet?
const gaps = source.span.minus(seen.filter(o => o.gap < 2).spans());

// Show an earlier look again by id, without decoding the footage again
await video.observe({ ids: [best.obsId] });

// Notes are searchable, but they are the model's interpretation, not ground truth
const mentions = await video.observations.search("hands over the document");
Operation Does
observations.where(...) Filters past looks by source, version, span, focus, time or relation
observations.coverage(span) Says what was looked at, how densely, and what was not looked at at all
observations.search(text) Searches the model’s notes on past looks
observe({ ids }) Shows a past look again, from its stored images
observations.across(versions) Pairs looks at the same moment in two versions of a file or render

The simple actions remain, as a library. zoom(span, focus), back, find(text) and done are functions built on the same API, and can be exposed as plain tools for a model that does better with a small vocabulary. Whether code beats those tools is an experiment (E6), not an assumption: writing and debugging programs costs output tokens, and Code Mode’s published savings are for very large tool catalogues, not for a handful of video tools.

focus says what a look is for:

Focus observe delivers
visual (default) Frames, by the ladder below
speech The words with timings as text, and the sound drawn as a waveform strip; few or no frames
motion Dense consecutive frames over a short stretch
delivery Frames of the speaker, with the sound drawn as a strip and its measured pauses and loudness
boundary Consecutive frames around one instant, with the waveform and word boundaries marked

The ladder: the default for visual

Level Span What is shown
Map The whole source One strip: a frame per section, the sound wave, where speech, silence and cuts are
Section Minutes One frame per shot, with the gist of what is said
Passage 10–60 s A frame every second or two, with the words
Moment 1–8 s A dense run of frames, with the sound drawn as a strip
Frame One instant Full resolution, or a crop

The ladder is a default way to show a span, a policy the harness applies. It is not the definition of exploring, and it is not a fixed route: the agent can jump between sources, revisit, and look at spans that do not nest.

What the harness decides and enforces

Built once per source: signals

By code, cached by the file’s content hash. A signal is a measurement over time, kept with where it came from:

Family Examples Useful for What it cannot tell
Speech Word timings, pauses, repetitions, speech rate Dialogue selects and trimming Whether the delivery is good
Sound Loudness, clipping, silence, onsets Clear speech, emphasis, rhythm Loud is not important
Motion Cuts, camera and subject motion Action timing Still moments can be the strongest
Picture Faces, framing, text legibility Whether a shot is usable Style
File Bitrate, keyframes Cheap hints of change Mostly encoder behaviour

Rules for signals:

For speech footage the transcript is part of this. On speech-heavy video it carries most of the locating (on Video-MME long with a 7B model, subtitles score 65.4 and frames 52.0, research-validation.md), so find is the first move there. Cold-start cost is reported separately from the cost of each task.

3. The selection module

The module turns exploring into an editorial decision: which moment, among the usable ones, for this purpose.

The brief and the profile

A selection is always made for something. The module takes:

class EditorialProfile(BaseModel):
    intent: str                  # what the cut should communicate
    audience: str | None
    style: dict[str, str] = {}   # pacing, emotional intensity, how much explanation, tolerance for silence
    constraints: list[str] = []  # duration, required content, source or brand rules
    examples: list[str] = []     # preferred and rejected choices, with reasons
    inferred: dict[str, str] = {}   # preferences guessed from behaviour, kept apart from stated ones

Stated preferences and inferred ones are separate. An editor accepting one dramatic cut does not mean they always want drama. Engagement (watch time, retention) is an objective only when the brief asks for it; it is not the definition of quality.

Candidates are the working artifact

What persists between steps is not a summary of the video. It is the candidate set: the moments under consideration for each purpose, what is known about each (signals, observations, the agent’s assessment), and what is still unknown.

The default decision loop

  1. Name the competing candidates for the purpose.
  2. Ask what evidence could reverse their order (“the second one’s delivery has not been heard”).
  3. Get the cheapest missing evidence, through the base.
  4. Compare again.
  5. Stop when more looking is unlikely to change the choice, or the budget is spent. Abstaining is allowed.

This is a habit the prompt and the candidate set make easy, not a numeric optimiser. Estimating the value of a look in numbers needs a calibrated model of editorial utility, which nobody has; the archive’s research-rres.md covers why one-step value estimates are weak. Whether this loop beats plain range exploration is experiment E4.

Two functions on top of the base, callable from a program or as tools.

compare: choosing between candidates

compare(candidates, purpose) shows two or more candidates in a matched way, so they can be judged against each other and not one at a time.

Finding a relevant passage is retrieval. Choosing between two usable ones is a comparative judgment, and the ladder does not solve it. This action is the main research target of the iteration (section 6).

mark: selecting, with boundaries compared

mark(span, purpose, why) records a selection. Its in and out points are not just “seen up close”; they are chosen among alternatives:

What comes out

class Selection(BaseModel):
    source: str                  # content hash of the file
    start: Time                  # in point, in the source's own timebase
    end: Time                    # out point
    purpose: str                 # free text, optionally tied to a line of the brief
    signals: dict[str, Signal]   # measurements, each with its provenance
    assessment: Assessment       # the agent's judgment: strengths, weaknesses, why; separate from signals
    start_status: Literal["rough", "compared", "not_heard"]    # not_heard: sound-dependent, decided from signals
    end_status: Literal["rough", "compared", "not_heard"]
    observations: list[str]      # the observations it rests on

class Preference(BaseModel):     # one comparison, kept with its context
    preferred: str               # candidate id
    over: list[str]
    purpose: str
    profile: str                 # which brief and profile it was made under
    context: str | None          # what surrounds it in the cut, if known
    reason: str
    by: Literal["agent", "editor"]
    order_shown: list[str]

A preference is conditional: it holds for that purpose, profile and context, and does not make a universal ranking. Preferences are stored as they were made. No preference model is trained from them until there are enough independent, repeated judgments to test one; editorial preferences can be cyclic and differ between people.

Selections export as JSON, a cut list (EDL), or an UberScene file. In the first iteration another tool carries out the edit.

4. State

Everything lives outside the model’s context, in the project folder, so a task survives a full context or a new session and can continue with another model.

Time. Positions are kept as presentation timestamps in the media’s own timebase (a rational number), not as floating-point seconds, so variable frame rate and audio alignment do not move a cut.

The log proves what the model was shown, not that it read it correctly. Correctness is only measured against labels or checked by something independent (research-validation.md).

5. The harness

Kept thin until the method has shown a gain. The first build is the pieces below, hosted by an existing harness, not a framework. A harness is an engineered environment in which the model can make and check useful decisions, not a bigger orchestration layer:

Mechanism In UberSeek
Context kept small Media and large outputs stay outside the model’s context; only what the next decision needs is loaded
Durable state Observations, candidates, selections and preferences persist across calls and sessions
A small surface Three primitives (discover, execute, observe); the simple actions as a library on top
Checks before “done” By code: selections play, source versions and timestamps are valid, constraints of the brief are met
Recovery A long exploration resumes from the log
Delegation, only where isolation helps Indexing and retrieval can run apart from the deciding model
Change by measurement Harness changes are compared on held-out footage

Safe execution. Programs written by a model run in a real isolation boundary (a separate restricted process, container or isolate), never in the same process as the media services. A restricted exec() is not a sandbox.

Boundary Enforced by
Files Read only registered sources and the project’s own artifacts
Network Off, unless switched on for a named service
Media processing Only through the API; FFmpeg is called by host services, never by a generated shell command
Resources Caps on decoded frames, pixels, seconds of sound, CPU time and parallel jobs
Output Caps on returned text and media
Persistence Selected results and metadata are kept; unbounded intermediate data is not
Reproducibility Source identity, exact parameters, artifacts and outcome are recorded for every run
uberseek/
  media/        # host-side media services; FFmpeg reference, uberscene-codec optional
  ingest/       # content hash, shots, sound, transcript, signals
  api/          # the typed video API the model programs against
  exec/         # the sandboxed executor and its limits
  observe/      # the observe gateway: focus, ladder defaults, caps, rendering, delivery
  state/        # observation log, executions, cost
  actions/      # zoom, back, find, done as a library and as plain tools
  select/       # the selection module: compare, mark, selections, export
  host/         # the adapter for the chosen host harness (Pydantic AI or Hermes); model contracts
bench/          # tasks, scoring, cost report

6. Proof

The research question. Can an agent make better editorial decisions by selectively acquiring visual evidence and comparing alternatives against an editorial objective, than by retrieving and ranking candidates one by one?

The question is not whether the agent finds the most relevant moment. It is whether it can tell why one relevant moment is editorially better than another, and what further look would help it decide. SAVE settles how to locate; if this fails, the ladder may still be a useful interface, but there is no new method.

  Experiment Compared Primary measure Dropped when
E0 Does adaptive exploration help locate? Full-video inference; a static index; SAVE, reproduced faithfully; UberSeek Localization accuracy at equal total cost It does not beat SAVE; then SAVE’s loop is the base
E1 Do signals improve selection? Excerpts alone vs excerpts plus selected speech, motion and semantic signals Blind editor preference; observation cost Signals improve neither
E2 Does direct comparison beat independent ranking? Absolute scores; pairwise comparison with compare; ranking several at once; same candidates, context and budget, order randomised Blind editor preference Comparison is no better, or its verdicts flip with order
E3 Does the brief change which moments are right? General relevance ranking vs ranking conditioned on the brief, same footage under several briefs Agreement with editors working to each brief Conditioning adds nothing over relevance
E4 Does decision-led looking beat the alternatives? Free inspection (VIVID-style); SAVE; the ladder; the decision loop of section 3 Editor preference, missed alternatives, cost, share of looks that changed a decision It is no better than plain range exploration
E6 Does code beat plain tools? A: plain tools (find, zoom, compare, mark); B: the API through execute only; C: execute plus observe Accuracy on locate, choose and trim; tokens in and out; round trips; wall time; failed or invalid programs The model spends more writing and fixing programs than it saves; then plain tools are the surface
E5 Does boundary comparison improve trimming? Transcript boundaries; silence boundaries; boundary comparison Blind preference between boundaries; speech left intact It does no better than the simple boundaries

Rules for all of them:

Data. Locate has public sets with labelled moments. For choose and trim, two public sets are candidates, licences permitting: VEBench’s task of picking footage among four candidates and then localising it (with sound), and RoughCut-Bench’s highlight boundaries and transcript deletion spans (its media is redistributed; no raw sound). MEDit-Bench was labelled with sound ignored on purpose, so it cannot test the sound level. No public set was found with several takes of the same line or action and a preferred take, or with hand-marked acceptable cut ranges on raw footage. That is the small set to label ourselves, with several annotators. Footage is interviews plus action-heavy material.

Size. Small sets only show large effects: 20 tasks with 5 runs each detect about 17 points, 56 tasks with 5 runs about 10 (arithmetic under worst-case run noise, research-validation.md). The first run is a pilot that measures the real variance.

Other parts with a drop rule

Part Dropped or simplified when
focus Views chosen by focus do no better than the ladder’s defaults
Looking, on speech footage Transcript only matches it; looking becomes an escalation
File signals (bitrate, keyframes) A plain map does as well
The profile’s style fields Free-text intent alone does as well
video.observations Agents rarely query it, or tasks go as well without it; keep the log for audit and drop it from the API

7. Milestones

One vertical experiment before a broad harness.

  1. M0, the observation contract. FFmpeg-backed media services: frames, sound signals, timestamps. The simplest persistent log. Proof that an observation can be reproduced exactly. Choose the host harness (Pydantic AI or Hermes) and confirm it returns images in tool results. Decide the API language and the sandbox.
  2. M1, the environment and a minimal explorer. The typed API, the bounded executor, observe and video.observations (where, coverage, search, re-show by id), wired into the host harness and run end to end through it. SAVE’s loop reproduced twice on the same core, once with plain tools and once as code, which is experiment E6 and settles the surface early. No separate orchestration framework.
  3. M2, candidate comparison. The brief and profile, the candidate set, the cheap measured signals, and compare with matched frames, sound strips and context. Preferences recorded with their context.
  4. M3, boundary comparison. mark with alternative cut points shown as dense frames with the sound strip.
  5. M4, controlled experiments. E0 to E5 of section 6: whether each added capability improves locating, choosing or trimming over its simpler baseline. E2 first, since it carries the research question.

Only after a gain is shown: robust adapters for many models, the second media backend, richer views of the state, wide benchmark coverage.

8. What is new and what is not

The ladder is an engineering choice. The claim is about comparison, and it stands only if section 6 shows it.

9. Later iterations

The same base, more modules. Research on each is in archive/; research-validation.md there says where the evidence stands.

Iteration Capability What the research says so far
1 (this document) The base for exploring video, and the selection module Sections 1 and 8
2 Carrying out edits inside the harness, through UberScene (FFmpeg for what UberScene cannot do) Typed, undoable timelines for agents exist (Cassette-Editor); whether typed actions beat editing the file as text is untested
3 Reviewing the result by watching and hearing the render No one has compared a watching critic with a reading one; model judges are reliable on checkable items and weak on craft
4 Revisions: keeping approved material intact across notes A code gate with rollback is the mechanism with evidence
Hearing Real sound, and short clips, in observe, for models and hosts that can take them Agents judging from stills and transcripts cannot assess delivery or rhythm; this is the known cost of images only
Other modules Question answering, search, compliance review (which needs evidence of absence), action analysis The base serves them without change; each needs its own module
Later Live streams; a fast decision model; training on the harness’s own traces In the archive

Each is added only after the one before it has shown its value in an experiment.

10. Open questions, with the current recommendation

Question Recommendation
Which host harness? Pydantic AI or Hermes. Decide in M0 on which returns images in tool results cleanly and is easiest to run tests through
Which language does the model write? TypeScript in an isolate, as Code Mode does, or Python in a restricted process. Decide in M0 on which is easier to isolate and which the models write more reliably
Which models first? Two strong models that take images and tool calls, from different providers, to see whether results hold across models
Which footage? Interviews and action-heavy material. Reuse labelled editing sets where licences allow; label a small set of candidate pairs and boundaries ourselves
Very long sources One cheap map to start, refined in parts and cached. Measure where it fails before adding more
How is purpose given? Free text, with an optional link to a line of a brief. No fixed taxonomy yet
Who are the editors for blind preference? Open. Without them, choose and trim have only code-scored measures