# ALabs

- **Event:** [Agents in Context Toronto: a MongoDB Hackathon](https://cerebralvalley.ai/e/mongodb-toronto-hackathon)
- **When:** Sat, Nov 14 at 9:00 AM – 9:00 PM (EST)
- **Where:** Toronto, Canada
- **Team:** [Dmytro Polishchuk](https://cerebralvalley.ai/u/DiPs)
- **GitHub:** https://github.com/polisdi/MongoDB-Hackathon
- **Demo video:** https://youtu.be/wZxd0-Kw01s
- **Gallery:** https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery/11

Scoped Memory Agent: agent memory you can govern and prove

AI agents that remember are a liability unless someone can answer for that memory. If a bookkeeping firm’s agent remembers one client’s approval rules, that memory must never leak to another client. It has to expire when it’s stale, be correctable when it’s wrong, and be erasable on request. And today nobody can show whether a memory actually changed what the agent did, or just padded the prompt.

We built an invoice-handling agent that solves this with MongoDB Atlas as the governance layer. Every memory is scoped to a client: Atlas Vector Search pre-filters on client, status and expiry, and $jsonSchema validation rejects any memory without a client. Corrections create a new version in a multi-document transaction and keep the old one as history. Forgetting removes the text and embedding, leaving only an audit stub. Every access is logged.

To prove memory drives behaviour, an ablation runner replays the same decision with one memory hidden. Hiding the client’s $5,000 approval rule drops escalation from 100% to 0% (n=5), while hiding an irrelevant memory has no effect.

Built with MongoDB Atlas, Vector Search, LangGraph, FastAPI and Pydantic.

## More from Agents in Context Toronto: a MongoDB Hackathon

- [MongoDB Larpers](https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery/8)
- [Sepi](https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery/9)
- [Retcon](https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery/10)
- [Wilco ATC](https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery/12)
- [ERS](https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery/13)
- [Readback](https://cerebralvalley.ai/e/mongodb-toronto-hackathon/hackathon/gallery/14)

---

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