Inspiration
Anything based on a true story — a biopic, a historical drama, a docudrama — lives or dies on getting the real details right. Screenwriters and story researchers routinely burn hours manually fact-checking every date, technical detail, and real-world reference in a scene: was that the right yield for that bomb test? Was that person actually in that room? We wanted an agent that does that legwork itself — not by regurgitating what a language model half-remembers from training, but by actually going and checking.
What it does
TrueScene is a Gemini agent for screenwriters. Paste a scene (or point it at a webpage about the real event you're adapting) and the agent:
- Reads the scene and decides for itself which claims are actually checkable — historical dates, technical/scientific details, geography, law, real institutions.
- Calls Parallel's Search API as its one tool, autonomously, as many times across as many turns as it judges necessary — this is not a fixed "search once per claim" pipeline, Gemini drives the loop itself via real multi-turn function calling.
- Returns a continuity report: one verdict per claim (accurate / inaccurate / unverifiable), a plain-English explanation, a suggested line-fix where relevant, and the real sources it actually used.
The full agent trace — every search it ran and why — is shown in the UI, so you can see the reasoning, not just trust the output.
We tested it against a made-up Oppenheimer/Trinity-test scene and it correctly caught that the feared yield was kilotons, not megatons (megaton-range weapons didn't exist in 1945), and that the atmospheric-ignition fear had already been calculated and dismissed by Teller's team years before Trinity — with real, checkable citations for both. On an Apollo 11 scene, it correctly caught that the astronauts were in the Lunar Module, not "the capsule" (that's the Command Module, which stayed in orbit), and that it was Aldrin, not Armstrong, calling out the fuel warning — again, cited.
How we built it
- Gemini 3.5 Flash via the Gemini Interactions API, Google's current function-calling surface, running a real multi-turn tool-call loop (not a hardcoded chain): the model itself decides when to call
search_weband when it has enough evidence to conclude. - Parallel's Search API (
parallel-webSDK) is the one tool the agent can call — every citation in the final report is a real Parallel search result, traceable back to the exact tool call that returned it. - A small Express/TypeScript backend and a single-page vanilla-JS frontend, with an optional URL-input mode (fetch + cheerio) for researching directly from a webpage about the real event being adapted.
- Deployed on Google Cloud Run.
Challenges we ran into
The most important bug we hit — and the one we're proudest of catching, not just fixing — was a silent grounding failure. Our first version called Parallel's search with a max_results parameter that the API actually rejects (422, extra_forbidden). The search calls were failing every time, but the agent didn't know that meant "no evidence" — it just answered from its own training data anyway, and even invented plausible-looking citation URLs for those answers. We caught it by checking the agent's own tool-call trace against its final report and finding the cited sources simply weren't there.
Fixing the API call was the easy part. The real fix was hardening the agent's instructions so that a failed or empty search forces a verdict of "unverifiable" with no sources — it is explicitly told never to fabricate a citation. We re-ran the same test afterward and confirmed every single URL in the final report now traces back to a real Parallel result from that exact run.
Accomplishments that we're proud of
Catching and fixing that fake-grounding failure mode before it shipped, rather than after. It's the difference between an agent that looks like it's citing sources and one that actually is.
What we learned
Giving a model a tool isn't enough — you have to design for what happens when the tool fails. An agent that quietly falls back to "answering anyway" on a tool failure is worse than one that has no tool at all, because it looks grounded when it isn't.
What's next
- Batch mode for a full screenplay, not just one scene at a time.
- Exporting the continuity report as annotated PDF notes a script supervisor could hand back to a writer.
Built With
- express.js
- function-calling
- gemini
- google-cloud-run
- node.js
- parallel-search-api
- typescript
Log in or sign up for Devpost to join the conversation.