Klippy is ready for the internet. The agent has no public address, every model call is labelled and the check probe is cached by key, a per-user limit and a daily budget hold (every call is charged before it's made), each turn logs its shape, a test proves a fooled model can't write or send data out, and CI can deploy main and preview pull requests. Name the tag, take the tour, and then deploy it yourself: bits checks your live web app.
Verified agents 0.33.0@cloudflare/ai-chat 0.12.2ai 7.0.162wrangler 4.157.0remix 3.1.0
Start from f-07 on GitHub. Starting here, or behind? Get the code at that tag:
git clone https://github.com/ryanyogan/klippy cd klippy git checkout f-07
1. Name the tag
In apps/agent/src/check.ts (and test/check.spec.ts):
Run pnpm typecheck && pnpm test: ours was 25 agent test files, 111 tests passed.
2. The tour
Locally, with pnpm dev:web (the Workers AI fallback answered, not Claude). The check, through the web app:
Signed out, / sends you to /login. Signed in (a test cookie for GitHub id 1), a file goes in through the web app and search finds it:
Then the chat, in a browser. "What time does my Lisbon flight leave? Check my notes." got this (the tool card, then the reply):
Then "Save a note: pack the passport for Lisbon". The tool card said saveNote Failed, and that's correct: the retrieval cut from course E locks every writing tool for the rest of a chat once saved content has been read, and this chat had searched. The fallback model told the user it couldn't save "due to a technical issue". It wasn't. The tool card is the truth, not the model's story about it. Start a new chat to save a note.
3. Deploy it yourself
We haven't deployed the reference Klippy, so there's no recorded live run. Our dry runs printed a total upload of 4081.04 KiB (783.59 KiB gzipped) for the agent and 991.10 KiB (197.85 KiB gzipped) for the web app. Here's the order for yours, once:
Your id only. In
apps/web/wrangler.jsonc, setALLOWED_GITHUB_IDSto your own GitHub id (gh api user --jq .id) andAPP_ORIGINto your web app's address. Point your GitHub OAuth app's callback at<that address>/auth/github/callback.The Workers' secrets, as in lesson 6:
KLIPPY_TOKENon the agent, and the four on the web app. They go in before any deploy.The database. Apply the migrations to the live D1 before the code that needs them:
cd apps/agent && pnpm exec wrangler d1 migrations apply DB --remote.The agent, then the web app.
pnpm deploy, thenpnpm deploy:web, from the repo root. Or add the twoCLOUDFLARE_*repository secrets and push tomain: CI does steps 3 and 4 in that order.Check the side door.
curl -i https://klippy.<subdomain>.workers.dev/should no longer reach your Worker. The web app should still work, signed in.Set the brakes: a spend limit on the gateway (lesson 2), and the two saved queries (lesson 4) once a few turns have run.
No Anthropic key on your gateway? Klippy still works on the Workers AI fallback, as in every recording here. Add the key (AI Gateway → default → provider keys) to get Claude.
4. Let bits check it
Paste your web app's address: klippy-web.<subdomain>.workers.dev, or your own domain. Not the agent's: it has none now. bits calls /klippy/check there, which reaches your agent over the service binding, and looks for this checkpoint's tag.
A pass proves a web app at that address reaches an agent that answers the way this lesson asks. It doesn't prove who wrote it.
That's Klippy in production. Your code matches tag f-08 (changes from f-07).