
A multi-agent system that writes school exercises and grades student answers, built to show exactly what every AI call costs and why it decided what it did.
My role: product design, interface and full-stack development, solo.
How it works: retrieval finds the matching skill in Brazil's national curriculum, a Writer drafts the question, a Solver answers it blind (it never sees the answer key), and a Judge compares the two answers before anything reaches a student. The same Judge grades student answers against a mandatory rubric. Independent verification instead of the model agreeing with itself.
What I built
A single LLM client that owns tokens, cost per request, caching, retries, timeouts and a hard spending cap, so any request can answer "how much did this cost?"
Lexical retrieval over Brazil's national curriculum (BNCC) to ground each question
An eval suite that compares prompt versions by accuracy, cost and latency
A mock provider, so tests and CI run with no API key and no cost
An animated Next.js panel that shows each agent working live, with the cost of every step
Measured: about 4.5 s and US$0.00014 to generate a verified question; 1.7 s to grade an answer.
Stack: Python, FastAPI, Pydantic, OpenAI, Next.js, Docker, GitHub Actions.
0 likes · 2 views · Nov 25, 2026
Multi-agent AI system that generates and grades school exercises, with cost, latency and spending cap tracked on every call.