Inspiration: Research briefings from a single LLM call look polished but cite sources that don't exist or don't say what they claim. We wanted a briefing tool that earns trust: one agent plans, one researches real sources, one writes — and a fourth, independent Verifier agent checks every citation against the live source before anything is delivered.
What it does: Enter any research topic and Briefing Agents runs a 4-agent pipeline: (1) Planner decomposes the topic into 3–5 focused research questions. (2) Researcher gathers real sources (Wikipedia REST API + Gemini synthesis), each with a real URL, title, and excerpt actually retrieved from that source. (3) Writer drafts a structured briefing — executive summary, sections per question, key findings — with inline citations. (4) Verifier independently fact-checks EVERY citation: it fetches the cited URL, confirms reachability, and confirms the claim is supported by the source text. Each citation gets a VERIFIED / FLAGGED verdict, and the briefing ships with a per-citation verification report and score. A live agent-trace panel shows each step as it happens. No API key is needed to see the full pipeline (demo mode runs a bundled sample briefing); users can also bring their own Gemini API key (stored only in their browser) or deploy with a server-side key via the included Cloudflare Pages Function proxy.
How we built it: Vanilla HTML/CSS/JS static site — no build step, no framework — deployed on Cloudflare Pages. Google Gemini API (gemini-4-hydrogen) for the four agent prompts; one shared callGemini helper with 429 retry + exponential backoff. Wikipedia REST API for real, citable sources (no key required). Cloudflare Pages Function (functions/api/generate.js) as an optional server-side proxy so the public demo can run without exposing a key. All core code, prompts, and creative work were written fresh during the sprint (Dec 1–7, 2026).
Challenges: Making the Verifier genuinely independent — it re-fetches sources itself instead of trusting the Writer's claims, and its programmatic check (URL fetch + quote presence) is authoritative over the model's judgement. Key handling for a public demo: the API key can never be embedded in client code, so the app supports three modes — server proxy, bring-your-own-key, and a no-key demo mode — and degrades gracefully between them. Keeping the pipeline robust when an LLM returns malformed JSON: defensive parsing with visible fallback instead of a failed run.
Accomplishments: End-to-end 4-agent pipeline with a visible, timestamped trace and a per-citation verification report. A live deployment anyone can try without an API key (demo mode). Clean, production-minded engineering: retries, backoff, explicit error states, no secrets in the repo.
What we learned: Verification is a product feature, not an afterthought: checking citations against live sources catches exactly the failure mode that makes people distrust AI research tools. Designing for 'no key' first forces a better architecture (proxy / BYOK / demo) than bolting key handling on afterwards.
What's next: More source providers (news APIs, academic search) behind the same Researcher/Verifier contract. PDF export of the verified briefing. Saved briefing history and shareable links.
Built With
- api
- cloudflare
- functions
- gemini
- javascript
- pages
- rest
- vanilla
- wikipedia