Inspiration

Reaching out to a business about its website usually produces generic emails, because actually reviewing each site takes time. I wanted an AI agent that does the review with real evidence and hands back an editable draft, instead of a chatbot that writes confident text about a site it never opened.

What it does

You enter up to three businesses and their public website URLs (or click Load sample task). ChaosPilot then:

  1. Lets an NVIDIA Nemotron model on Nebius Token Factory decide which tool to call next.
  2. Runs those tools on the server: it fetches each homepage, extracts evidence (SEO tags, headings, calls to action, contact routes, images, links), and can open up to two linked pages per business.
  3. Streams every step to the browser as it happens, with its inputs, outputs, errors and timing.
  4. Drafts a proposal for each business in which every finding cites the exact value it is based on, for example metaDescription: null.
  5. Lets you edit the proposal, copy it, or download it as TXT, HTML or PDF.

Nothing is ever sent to the businesses. Proposals are drafts for review.

How we built it

  • Model: nvidia/nemotron-3-super-120b-a12b through the Nebius Token Factory OpenAI-compatible API, using native function calling. The model is the agent's decision-maker: it picks the tools, reads the real results, and writes the findings and email draft.
  • Backend: Cloudflare Pages Functions. A streaming /api/audit endpoint runs a bounded agent loop (turn and tool-call limits, cancellation) and sends progress as NDJSON.
  • Three allowlisted tools: inspect_website, inspect_page, save_proposal. The model refers to businesses only by server-assigned IDs, so it can only reach URLs the user submitted, plus pages linked from them.
  • Validation: every tool argument and every proposal is validated with Zod. When the model sends something invalid, the field-level error goes back to the model so it can fix its own call.
  • Safe fetching: public http(s) domains only, IP addresses and local hosts blocked, every redirect re-validated, plus timeouts, a 512 KB size cap, and a per-run request budget.
  • Frontend: React, Vite and TypeScript, with a live timeline, an evidence panel, editable proposals, and run history in localStorage.
  • Secrets: the API key exists only in server-side environment variables, never in the browser.

Challenges we ran into

Testing against the real model found problems that stubbed tests never showed:

  • Nebius returns tool_calls: null when the model answers in plain text. My strict response parser rejected it, so live runs failed on the second turn.
  • Reasoning models run out of tokens. My first output limit was 600 tokens, and proposals were cut off mid tool call. I raised the limit and now report truncation as an explicit error.
  • The model guessed page URLs like /contact and hit 404s. It can now only open pages that were actually linked from pages already fetched.
  • It sometimes wrote the proposal as plain text and claimed it had saved it, without calling the save tool. The server now reminds it (at most twice) and shows a warning if a proposal is still missing, instead of inventing one.
  • It sometimes sent a nested array as a JSON string, so I decode that one field before strict validation.
  • A small model occasionally flags non-problems, such as calling a 5 KB page heavy. Explicit rules in the system prompt reduced this, and showing the evidence next to every finding lets a reader spot weak claims.

Accomplishments that we're proud of

  • A deployed, working agent that runs end to end on Nebius Token Factory with an NVIDIA open model. A three-site audit finished in about 13 seconds over 7 model turns, including the real website fetches.
  • Proposals that can be checked. Every finding points to a value the server actually observed, and the raw tool input and output of each step is one click away.
  • Safety built in rather than bolted on: allowlisted tools, URL and redirect validation, size and time limits, Zod validation of everything the model sends, and no external actions without the user.
  • Honest failure handling. A failed fetch, a timeout, a truncated answer or a missing proposal shows up as a clear step or warning, never as invented content.
  • A test suite (41 tests) covering the agent loop, URL safety, fetching, evidence extraction, the streaming endpoint and the client state, plus fixes for real-model quirks that only showed up in live runs.

What we learned

  • An agent is only as trustworthy as its tool results. Making the model cite evidence from real fetches matters more than polishing the prose.
  • Validate everything the model sends, and return errors in a form the model can act on.
  • Test with the real model early. Provider response shapes and token limits are easy to get wrong when you only use mocks.
  • Small, fast open models are good enough for tool-driven workflows when the system prompt is explicit and the server checks the work.

What's next for ChaosPilot

  • Rendering JavaScript-heavy sites, which currently return little HTML and are flagged as limited evidence.
  • Performance and accessibility scores, and screenshots.
  • A larger Nemotron model for sharper judgement on findings.
  • More workflows built on the same controlled-agent runtime.

Try it: open the demo, click Load sample task, then Start run. The badge at the top of the results shows the live model name. The source code is MIT-licensed.

Built With

Share this project:

Updates

Submission history