DEV Community

Ankit Thakur
Ankit Thakur

Posted on

LinguaPal

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

LinguaPal is a multi-agent AI English tutor for ESL learners. It trains Reading, Pronunciation, Listening, Writing, and Spelling in one web app, and adapts to each learner's level on the CEFR scale (A1 to C2).

An Orchestrator Agent runs a 6-question placement test, adjusts difficulty from rolling session scores, and generates a 10-minute daily plan built around the learner's weakest skills. Five specialist agents handle the practice, each with its own system prompt and structured output:

  • Reading: level-appropriate passages, 5 comprehension questions with a rationale for every answer, CEFR-tagged vocabulary, and tap-to-translate on any word (IPA, definition, and mother-tongue translation)
  • Pronunciation: the learner records their voice in the browser and gets a score out of 100, mispronounced words, IPA contrasts, and articulator tips
  • Listening: generated two-speaker dialogues, playback at 0.75x, 1.0x, or 1.25x, and a "Listen & Type" dictation mode with word-level diffing
  • Writing: grammar fixes with the exact replacement and the rule, vocabulary upgrades, tone evaluation, a polished rewrite, and a CEFR estimate
  • Spelling: orthographic rule explanations, mnemonics, and mini-quizzes built from the learner's own logged mistakes

A spaced repetition engine (SQLite, SM-2 algorithm) resurfaces words and errors right before the learner would forget them. A mascot owl, Pal, encourages learners out loud, and streaks and XP keep them coming back. Mother-tongue help covers 12 languages.

How it gets people off the screen: the daily plan is capped at 10 minutes, so it fits into a routine instead of eating an evening. Pronunciation drills get learners speaking out loud, and the dialogues train them to listen, so the practice carries into real conversations.

Who it's for: ESL learners at any level who want daily, personalized practice without a tutor.

Demo

📹 Watch the demo video

Code

🔗 ThakuraAnki/English_Learning_Agents

How I Built It

LinguaPal uses an Orchestrator + Specialist Agent architecture. Each agent has a dedicated system prompt, a distinct teaching goal, and structured output, so the app can render scores, quizzes, and feedback reliably.

Layer Technologies
Frontend React 19, Vite, Tailwind CSS
Backend Node.js (ESM), Express 4, Multer for audio uploads
AI engine Google Gemini API via the @google/genai SDK (gemini-2.5-flash)
Audio Browser MediaRecorder for capture, Web Speech API (SpeechSynthesis) for spoken playback
Database SQLite via better-sqlite3 (WAL mode)
Memory SuperMemo SM-2 spaced repetition

Pronunciation scoring sends the learner's recording to Gemini's multimodal audio analysis. Every agent is exposed as its own REST endpoint group, which keeps the model layer separate from the rest of the app.

The model layer is the one part that depends on a hosted API, and I'm upfront about that. Everything around it is open: the agent architecture, the SM-2 memory engine, SQLite, and the application code. With no API key set, the app falls back to a built-in Demo Mode with curated drills, so anyone can clone the repo and try it right away.

Why Does Open Innovation Matter?

Language learning is a space where cost and access decide who gets help. A paid tutor is out of reach for many ESL learners, and a tutor that depends on a metered closed API is only as affordable and available as that provider allows.

Open innovation matters here for three reasons:

  • Cost and access: open-weight models can run locally or on cheap hardware, which makes free tutoring possible for learners and schools.
  • Privacy: learners' voice recordings and writing are personal. Local inference keeps them on the learner's device.
  • Adaptability: an open model can be tuned for specific first languages, accents, and common error patterns, which a closed API doesn't allow.

This project currently relies on Gemini, a closed API. I kept the agents as separate, swappable components so the provider can be replaced, and I published the code so others can take it further, including moving it to open-weight models.

Top comments (0)