Inspiration
My child is in Grade 5, studying the ICSE syllabus. Most evenings, there were homework questions I couldn't sit down and explain, and when I wasn't around, a chatbot was the fallback — which meant answers full of Markdown symbols, math written in ways a 10-year-old can't read, and total amnesia by the next week. So I built Aryhant: one assistant that lives where we already are — Slack, email, a small web page — remembers my child, knows the actual syllabus chapter by chapter, and runs on open NVIDIA models instead of a closed product. It quickly became more than a tutor: the whole family uses it for quick research or deliberation on any topic, and because it lives in Slack, it's reachable from any phone. If one of us is at a workstation, we can use it from there. At the end, useful bidirectional email communication for quick audit/health check.
What it does
Aryhant is the assistant our family uses every day, from wherever we happen to be:
- Slack, from the phone. This is where most of it happens. My child talks to it like a person: plain-text answers with clean math, practice questions from the stored ICSE Grade 5 syllabus, photos of worksheet pages explained, and handwritten-style notes PDFs on any topic.
- Web, from the desktop. The same assistant in a browser — a responsive workspace with 3-tier WebMCP compatibility, local document ingestion (<2MB PDF/DOCX/MD) via in-browser WASM and BM25 search, session chat history persistence in browser IndexedDB, and publication-ready session PDF export. Behind an Auth0 PKCE gate and rate-limited API for focused, sit-down study and family deliberation sessions.
- Email, for a quick check. Aryhant has its own inbox. I send a short question about how the system is doing — usage, errors, data cleanup — and it replies with a brief report. Mail from anyone not on the allowlist is dropped before a single token is spent.
It isn't only for homework, either — it's the family's everyday assistant for questions, planning, and writing, and it remembers us: long-term memory in Turso, the last 20 turns of conversation in Redis.
It also takes on bigger jobs: a research mode (/research or /deliberate) that reads across four search sources and produces a PDF whitepaper (and can resume a day later if it crashes), and a self-maintenance routine that prunes old data and watches its own telemetry.
How we built it
All the real thinking runs on NVIDIA Nemotron models served by Nebius Token Factory. The big one, Nemotron-3.5-Super-VL, does the everyday work: conversation, looking at worksheet photos, deciding which tools to call. The small one, Nemotron Nano 30B, writes the practice questions and the email reports — for structured output, it's fast, cheap, and easily good enough. A larger nemotron-3-super-120b sits behind it as backup. Since Token Factory serves all three through one OpenAI-compatible endpoint, moving a job between model sizes is a settings change, not a code change. Gemini and OpenAI exist in the code only as last-resort fallbacks. Behind them sits a Python/FastAPI backend with four agent roles — companion, question generator, research, admin auditor — all behind one common ModelRunner interface.
Tavily usage
Tavily is woven into this codebase at four complementary layers, all built around a keyless-first, always-failover strategy. On the backend, it powers the agent's search_web tool inside a weighted multi-provider pool (tool_factory.py): requests first hit api.tavily.com/search without any key using the X-Tavily-Access-Mode: keyless header, then fallback to a TAVILY_API_KEY, and finally hand off cleanly to DuckDuckGo, Exa, Firecrawl, or Serper if Tavily rate-limits or fails(To keep web search cost-effective, I designed a resilient multi-provider strategy). The same keyless-first contract drives structured content extraction via /extract, while tavily_research_tool.py invokes Tavily's async Mini-Research API with polling and date-stamped queries for cited, time-grounded answers. In the browser, Tavily is exposed to visiting AI agents through the 3-tier WebMCP bridge (window.modelContext, declarative DOM forms, and JSON-RPC postMessage): the search_web WebMCP tool runs keyless Tavily search with automatic DuckDuckGo fallback, so any Chrome extension or agent can search live.
The whole thing sleeps when idle, saving 100% of idle server resources. We built an asynchronous Cloudflare → QStash → Cloud Run event pipeline:
- Cloudflare Worker Edge Ingress: Incoming webhooks from Slack (Events API) and email (AgentMail) hit an edge worker (
cloudflare-slack-ack.js) that verifies signatures, drops unauthorized senders before a single token or compute cycle is spent, and immediately returns an HTTP 200 ACK in <50ms (effortlessly beating Slack's strict 3-second timeout). - QStash Durable Queuing: The edge worker forwards payloads into Upstash QStash with signed webhook headers and 5 automatic retries, buffering sudden bursts and decoupling ingestion from processing.
- Scale-to-Zero Cloud Run: Google Cloud Run runs with
min-instances: 0. The container sleeps completely when there is no activity—costing nothing during idle time—and wakes only when QStash delivers a task, executes the agent lifecycle, and spins back down.
But it increases latency; that is the trade-off for the frugal design.
Throughout the agent's workflows, we integrated JEV (Joint Expected Value) decision models via TypeSafe AI (system_one Noul probability scoring) rather than relying on unvetted LLM generations:
- Pedagogical Hint & Question Evaluation: In the question generator, Nemotron Nano generates candidate question-and-hint pairs, which are scored by JEV decision models (
typesafe_integrator.py). JEV evaluates pedagogical quality, age-appropriateness (process-focused, Grade 5 level, never spoiling the answer), and selects only the highest-scoring items for the student. - Autonomous Research Synthesis Gating: In the deep research pipeline, a dedicated JEV validator (
jev_validator.py) evaluates drafts across 5 distinct dimensions: user criteria fulfillment, article depth, structural clarity, reference grounding, and human readability. If the composite score falls below 0.75, the JEV engine returns targeted critique vectors that guide iterative self-refinement passes before final PDF compilation. - Docs: Run locally with docs7 dev docs --port 3333 at http://localhost:3333.
Redis holds the recent conversation; Turso holds long-term memory and the syllabus. 224 tests run without a single real API key.
Challenges we ran into
Slack requires webhook acknowledgment within three seconds, and incoming email webhooks fail if the receiver lags. With Google Cloud Run configured to scale down to zero to save idle compute costs, a cold start takes 4 to 8 seconds—which would cause dropped messages and duplicate webhook storms. Decoupling ingestion with the Cloudflare → QStash → Cloud Run architecture solved both constraints: Cloudflare edge acks in <50ms while QStash reliably holds and delivers the payload once Cloud Run warms up. Another major challenge was output quality: raw LLMs either spoiled answers or hallucinated incomplete whitepapers. Integrating JEV decision models throughout provided rigorous, probabilistic quality gates that reject subpar hints and steer research revisions automatically. Latency is still an issue, a possible tradeoff for frugality.
Accomplishments that we're proud of
It isn't a demo — the family uses it daily, and the monthly infrastructure bill is negligible. The Cloudflare → QStash → Cloud Run pipeline saves 100% of idle-time compute resources, waking the container only on demand. The agent reads and answers its own email, and mail from strangers never costs a token. Objective JEV decision models govern pedagogical hints and research papers, ensuring real educational rigor. And one Token Factory endpoint quietly serves three different Nemotron sizes.
What we learned
Reliability came from boring things — checkpoints, idempotency, retries — not from prompt tuning. A small Nemotron model is enough when the output is structured. Free tiers, pooled properly, are a legitimate architecture rather than a hack. And teaching a child forced product honesty — every feature had to survive a 10-year-old user.
What's next for Aryhant
Voice for read-aloud practice, a separate profile and memory per child, weekly revision packs built from the topics she got wrong, and taking it beyond ICSE Grade 5 to other curricula. Improving latency throughout.
Built With
- agentmail
- auth0
- cloudflare
- cloudrun
- duckduckgo
- exa
- jev
- nebius
- nemotron
- python
- qstash
- react
- redis
- serpapi
- slack
- tavily
- webmcp

Log in or sign up for Devpost to join the conversation.