Inspiration
Every study app shows the backlog first. Forty cards due, three days missed, twelve percent complete. For many learners, and especially for people with ADHD, that number is where the tab gets closed—not from lack of care, but because the count turns learning into debt before a single card is answered.
Rich dashboards, knowledge graphs, and endless organization options have the same effect: they feel productive while pulling attention away from the one act that actually builds memory, retrieval. Rich media is not the problem. Uncontrolled novelty is.
NoteFlow is built around that distinction. The learner sees one adjustable rhythm, one deliberate retrieval, and one clear next action. Agent reasoning stays available but collapsed. Nothing is ever overdue, and no session starts without the learner's consent. It is not an attempt to make learning more stimulating. It is an attempt to make attention more intentional.
What it does
- Intake in the learner's own words. A goal, at least one messy note or stuck point, an optional target date, and roughly how many minutes a day. No quotas up front.
- One clarifying question, only when it matters. The Agent asks a single question if the answer would change the plan. Otherwise it proceeds.
- A rhythm, not a task list. The Agent infers a steady-to-sprint pace, a session-length range, a study-reminder frequency, an energy window, and the concrete themes it found in the notes. The learner reviews and can change any of it before anything starts. The server computes today's date and days-to-target and hands them to the model, so it never guesses the calendar.
- Retrieval cards from the evidence. Each card is a prompt that requires an attempt—recall, speak, solve, or design—with hints and a reference note on the back. The learner answers before the note is shown. Speak cards accept a spoken recording that stays in the browser.
- Feedback that changes the system. Attempt outcome, hint depth, reaction time, and memory change go back into the same Agent session. The Agent revises the rhythm and the next invitation, and the before/after is shown to the learner.
- No debt. Cards that don't appear return to the pool. Skipping is a scheduler action, not a failure. Missing a reminder creates no overdue work.
- Opt-in reminders. A calendar invitation (.ics) and a browser reminder, enabled only after the learner confirms a start time.
- The learner's own material counts. CSV, Anki text exports, and legacy
.apkgpackages import into the same pool as Agent-generated cards—.apkgfiles are parsed directly in the browser (zip + SQLite). Every card carries its origin. - English and Chinese, with generated content locked to the language of the run.
How we built it
Agent layer — built during the submission period
- Gemini 3.5 Flash through Vertex AI, orchestrated with Google ADK for TypeScript as one
LlmAgentwith two scoped function tools. persist_learning_modelwrites the knowledge model, plan settings, rhythm, and structured retrieval cards to Firestore as a mutablecurrentdocument plus an immutable version per revision. Every change the Agent makes is auditable.queue_deep_analysispublishes a digest—never raw notes—to Pub/Sub. A private Cloud Run worker runs longer analysis with Gemini and writes results back to Firestore after the learner's tab is closed.- The ADK API server runs on Cloud Run behind a bearer-token check. Persistence is enforced: a planning turn that returns a report without calling the tool is retried with tool choice forced.
Web layer
- Next.js / React / TypeScript on Vercel. A same-origin server route proxies to Cloud Run, rate-limits, sanitizes input, injects the date context, and issues HMAC-signed continuation tokens so a learner can answer a clarification or send feedback into their own session without ever holding the secret or the Cloud Run URL.
- The pre-existing NoteFlow retrieval workspace (note library, import, deterministic Flow Engine, memory feedback) is disclosed in
HACKATHON_DISCLOSURE.md. During the contest it was reworked so the engine accepts Agent-generated goals, themes, skills, and cards instead of hardcoded seed data.
Data sources
The learner's typed goal, notes, and stuck points; their real retrieval evidence during practice; and any CSV or Anki exports they already have. No third-party datasets. Pub/Sub messages carry a summarized digest only.
Challenges we ran into
- Structured output. Moving from one text prompt to an array of structured cards exposed the usual failure: the model occasionally omits a field or returns too few items, and a strict schema rejects the whole tool call. Fix: require only the essential fields, fill safe defaults on the client, give the model a literal JSON example, and force the tool call on retry.
- The seam. The original engine was built for a fixed set of interview topics. Every early bug—wrong skill attribution, old topics leaking into a new goal, one-card sessions—traced back to Agent output being pasted onto that foundation. Decoupling goal identity, deriving skills from the Agent's themes, and scoping browser storage per goal cleared them.
- Dates. Gemini has no clock; given a target eight days out it once called the timeline "nearly two years." The proxy now computes the day count server-side.
- Honest boundaries. The no-account judge path keeps retrieval state in the browser while Firestore holds the Agent's model, and Agent session state is currently instance-local (ADK's in-memory session service), so the deployment runs a single Cloud Run instance for the judging period. I labeled these boundaries in the UI and docs rather than imply continuity that doesn't exist yet; a persistent session service is the first post-contest change.
Accomplishments that we're proud of
- A real feedback loop, not a plan generator. Feedback from an actual retrieval attempt goes back into the same ADK session and produces a second, different, immutable version in Firestore. Judges can watch both documents appear.
- Nothing overdue, by construction. Skip, miss, and stop are all scheduler actions. No screen in the product shows a backlog, an overdue count, or a completion rate.
- Secrets never reach the browser. HMAC-signed continuation tokens let a no-account learner continue their own session while the Cloud Run URL and shared secret stay server-side.
- Persistence enforced, not hoped for. A planning turn that skips the tool call is retried with tool choice forced; the model can't return a plan that wasn't written.
- Full disclosure. Pre-existing work, seed data, and every browser-versus-cloud boundary are documented in the repo and labeled in the UI.
What we learned
Every visible number is a design decision, and the product got better each time I removed one. Clarifying questions have a cost: "ask only if the answer changes the plan" removed most of them and the plans got no worse. Immutable versions are cheap and paid for themselves the first time I had to debug the adaptation loop.
What's next for NoteFlow Agent
One knowledge pool, one small daily budget that never grows, and an Agent whose job is to decide what goes into that budget today. Every card carries its own forgetting timeline, so review and new material compete for the same few slots and learning never snowballs. After that: setup reduced to three questions, voice playback on language cards, then signed-in continuity across devices with server-side reminders that stay quiet unless asked for.
For judges — try these goals
No account needed: https://note-flow-agent-hackathon-2026.vercel.app
- Full loop (2 min). Goal: "Pass the IELTS speaking test in 4 weeks — target band 7", with notes about freezing on Part 2 and overusing "very". Review the rhythm, confirm, start learning, record a spoken answer on a speak card, end the session — your feedback produces a revised rhythm and a second immutable Firestore version.
- Clarifying-question branch. Goal: "Get better at statistics", notes: "I took a course once. Some of it stuck." The Agent asks exactly one question — only because the answer changes the plan.
- Sprint pacing. Goal: "Interview for a frontend role next Friday" with a 6-day target. The server computes days-to-target; the Agent picks a sprint rhythm.
- **Chinese-language run. **Use the language toggle in the top bar to switch the interface to Chinese, then enter this goal (or any goal) in Chinese — for example, a three-week SQL sprint covering window functions and CTEs for interview whiteboarding. Generated content locks to the language of the run: a Chinese run cannot silently reuse an English result, or vice versa.
- Import your own material. A CSV or Anki text export lands in the same pool as Agent-generated cards; every card carries its origin.
Note: the deployment intentionally runs a single Cloud Run instance for the judging period — see Honest boundaries above.
Built With
- cloud-run
- firestore
- gemini-3.5-flash
- google-adk
- next.js
- node.js
- pub/sub
- react
- typescript
- vercel
- vertex-ai
