I built ReActReel for the kind of search that starts with half a memory. You remember a scene, a performer, or a phrase. The agent has to turn that description into something you can watch.

Remembering Star Wars is one thing. Landing on the line you wanted is another. ReActReel has separate movie and music modes, with tool calls visible beside the result so I can follow the search. A convincing title and a valid YouTube link can still leave you scrubbing through the wrong part of a video.

From a remembered line to playback

The recording on the ReActReel Agents page follows two searches from remembered lines in the dark interface. The movie query is "I find your lack of faith disturbing." The music query asks for "Such a lovely place." Neither supplies a title, actor, or artist. The agent identifies Star Wars: Episode IV - A New Hope and the Eagles' Hotel California.

Both searches use the full workflow with Quick mode turned off. The agent searches YouTube, calls get_timestamp_from_text, and passes the returned time to process_video. The movie result starts at 1:47 in the Darth Vader scene. The music result starts at 1:52 in the Eagles' official 1977 live performance.

Follow the movie request through those steps. Identifying A New Hope narrows the search to a work. Choosing a YouTube result narrows it to a particular upload. Returning 107 seconds makes a further claim: this is where that upload contains the line. Playback lets us check that last claim against the dialogue.

The recording shows both searches and playback inside the app, with tool calls on the left. English narration pauses so the dialogue and music are audible. Both searches run at their original speed, with the two takes joined into one video. In the music search, the trace also shows a failed timestamp response before a later lookup succeeds. The final result preserves the success; the visible error helps explain the work it took to get there.

A valid link can point to the wrong moment

To locate the Vader line, get_timestamp_from_text needs the selected video and the remembered phrase. Despite its name, the inspected implementation does not scrape captions or search a local transcript. It sends the YouTube URL and the requested phrase to Gemini's video-understanding interface. The response schema asks for:

{ "start_seconds": 107, "end_seconds": 122, "confidence": 0.9, "matched_text": "Description of the located passage" }

This is an illustrative response shape, not an additional measured result. The tool returns the model's proposed interval and description. Its prompt explicitly distinguishes 1:35 from 135 seconds: minutes must be multiplied by 60 before adding seconds. Small representation mistakes can move an otherwise correct identification to the wrong scene.

The exception path returns a zero-confidence result with an error and a default interval. Downstream code must read those fields. Treating every object with start_seconds as a successful match would turn a failed lookup into a video that confidently starts at zero.

process_video then constructs a watch URL from the video ID and start time. It does not download, cut, or render a new media file. A simplified form of that operation is:

start = int(float(start_time)) clip_url = f"https://www.youtube.com/watch?v={video_id}&t={start}s"

The implementation catches conversion errors by falling back to zero. Neither converting a number nor building a URL checks whether the requested words occur there. The link can open perfectly and still start at the wrong moment. That is why the recording includes playback: we can hear whether the search delivered what was asked for.

Keeping the search inspectable

The Next.js interface sends a query to a FastAPI backend, which runs the shared reactreel-core agent. Its tools cover web search, YouTube search, timestamp lookup, and clip URL construction. After each tool returns an observation, the model chooses its next action. The browser embeds the final YouTube URL.

That sequence gives the trace a practical use. If the wrong scene plays, I can check whether the agent selected the wrong upload, received a bad timestamp, or mishandled the result. A plausible title alone tells me none of that. YouTube availability and embedding permissions can also change, so a returned link and working embedded playback remain separate checks. Keeping the tool results visible preserves the search evidence when an embed fails.

Quick mode asks the agent to stop at video identification and skip timestamp lookup. In the backend, this is an instruction added to the query; timestamp tools remain available to the dispatcher. I would check the actual calls before crediting Quick mode with a shorter or cheaper search. The two recorded examples have Quick mode off and exercise the longer path.

The loop also distinguishes the model's finish action from exhaustion of its iteration limit, exposed as reached_max_iterations in the final event. Dispatch checks for each tool's required argument object and returns an error observation when it is missing. These distinctions matter when judging a run: a final URL should not hide the errors or the exit condition that preceded it.

How the trace reaches the browser

The backend constructs an agent for each domain at startup; each request calls agent.run(query), which yields events. POST /api/run/stream accepts the query, a movie or music domain, and a Quick-mode flag. The FastAPI handler iterates over agent events and emits each as JSON in a Server-Sent Events stream:

data: {"type":"tool.started","tool":"youtube_search",...} data: {"type":"tool.completed","tool":"youtube_search",...} data: {"type":"loop.finished","final_url":"...",...}

The excerpt omits payload fields for readability. In the application, iterations, tool arguments, results, and timing events support the trace panel. The backend also archives run events. That gives a reviewer something more durable than the pixels in a screen recording.

The handler checks a session identifier and usage budgets before starting a run. Mid-stream failures become a loop.errored event because an HTTP status alone can no longer explain a request whose response has already begun. The browser needs to distinguish a completed result from an interrupted stream.

The implementation points are reactreel_core/agent.py, skills/transcript_search.py, skills/youtube_manager.py, and the web backend's routers/run.py. The ReAct loop explainer develops the orchestration pattern behind this project.

Measuring the two tasks separately

The two recorded searches demonstrate successful examples. They are too few to establish an accuracy rate. For a broader evaluation I would keep a fixed set of remembered descriptions with expected works, accepted video IDs, and manually checked intervals where timestamp localization is possible.

Identification accuracy asks whether the returned video contains the intended work. Localization error asks how far the returned start lies from the checked passage, conditional on finding the correct video. Reporting localization only on successful searches without also reporting identification failures would hide part of the task.

I would also record tool failures, iteration-limit exits, latency, token usage, and embedded playback availability. The model's confidence field can be compared with those outcomes, but it is not a calibrated probability just because the schema calls it confidence.

The two searches complete the path from a remembered line to audible playback. To judge the next search, I would ask two questions separately: did it find the intended work, and did it locate the requested passage in that specific upload? Keeping those answers separate makes a mistake diagnosable and a successful result worth trusting.