# Kintsugi

- **Event:** [The Harness Engineering & Model Wrangling #SFTechWeek Hackathon](https://cerebralvalley.ai/e/mongodb-sftw-hackathon)
- **When:** Sun, Oct 11 at 9:00 AM – 10:00 PM (PDT)
- **Where:** San Francisco, CA
- **Team:** [Thomas Cantuti](https://cerebralvalley.ai/u/tucci)
- **GitHub:** https://github.com/ThomasCantuti/kintsugi
- **Demo video:** https://youtu.be/EXEMmH2XXq4
- **Gallery:** https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/31

Kintsugi: an agent that gets stronger where it breaks
Project demo: https://tsugi-production.up.railway.app/#stage

Tsugi is an always-on personal agent on Telegram that does real tasks (calendar, notes, reminders, contacts, email) on data stored in MongoDB Atlas. Kintsugi is its harness, and the harness improves itself: every mistake becomes a lesson that edits Tsugi's own rules, context policies, guardrails or tool access.

The problem. Always-on agents now remember your corrections. But a remembered correction is an untested change to the agent. It can quietly break something that used to work. A poisoned one, like a stranger's fake "new rule" or a prompt injection, is hard to find and remove.

The idea. Kintsugi treats every lesson like code:
- Tested: a gate replays the conversation that failed with the new lesson, and re-runs past cases that used to pass. The lesson ships only if it fixes the mistake and nothing breaks. Every live failure it fixes becomes a test for later lessons.
- Traceable: each lesson is a gold seam on Tsugi, linked back to the 👎, test case or alert it came from.
- Undoable: one click revokes a lesson and everything built on it.
- Safe from strangers: lessons taught by strangers wait for the owner's approval, then still go through the gate.

Mistakes are caught three ways: the owner's 👎 and correction, hand-written test cases, and Raindrop. Raindrop flags failures nobody reported: it flagged a private-notes leak within 32 s, and Kintsugi turned it into a tested lesson.

Results, on 12 hidden tasks with 3 trials each: a cheap model (Nemotron Super) went from 47% to 86% as the harness taught itself. That beats Claude Sonnet without lessons (67%) at about 1/9 the cost per task. Red-team attacks blocked went from 10/33 to 30/33. The learned harness also carries over to a model it never trained on: Nemotron Lightning went from 42% to 81%. Honest caveat: Sonnet with every correction pasted into its prompt scores 100% here. Memory works, but it can't test, trace or undo a lesson.

MongoDB Atlas is both the operational and the vector database:
- Transactions commit each lesson atomically.
- Change streams hot-swap the agent live.
- $graphLookup drives revoke.
- Vector Search picks which lessons the small model sees and catches duplicate failures.

## More from The Harness Engineering & Model Wrangling #SFTechWeek Hackathon

- [aperture](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/28)
- [Donna](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/29)
- [59.4](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/30)
- [Saw_the_bay_bridge_while_working_NICE](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/32)
- [Dabo](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/33)
- [TeamBrain](https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/34)

---

Markdown version of https://cerebralvalley.ai/e/mongodb-sftw-hackathon/hackathon/gallery/31. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
