IAMV Consulting
Back to case studiesAI Agents

AI Language Tutor: Multi-Agent Language Tutor on Telegram

Autonomous language tutor available 24/7 with voice, text, and CEFR assessment, without a line of backend.

Practice availability
24/7
CEFR assessment range covered
A1-C2
Debounce window for consolidating messages
15s

The challenge

Personalized language teaching does not scale. Independent teachers trade hours for lessons and cannot meet the demand for practice between sessions. Language schools need a practice tool available 24 hours, but building a conversational backend with voice, level assessment, and pedagogical correction is an engineering project that most cannot afford. Meanwhile, students are left without interlocutors during the interval between classes: this is precisely where fluency stagnates.

There was also a tricky technical problem: students send messages in bursts. Without treatment, each fragment triggers an AI response, and the conversation becomes noise.

The solution

A fully autonomous language tutor running as an n8n workflow on Telegram, without any line of backend code. The core is Professor PolyAI, a LangChain orchestrating agent powered by GPT-4o-mini, which interprets the student's intent and delegates to the appropriate specialist sub-agent. The CEFR Assessment Specialist conducts a light placement, estimates the student's range (A1 to C2), and stores the result for future turns. The Conversation Tutoring Specialist leads practice dialogues and roleplay with scaffolding, inline correction, and positive reinforcement.

The orchestrator applies pedagogical formatting rules: short responses of 3 to 8 lines, structured correction templates, and commands such as /quiz, /drill, /dialogue, and /level. To address the burst message problem, a debounce buffer in Redis stacks each message indexed by the user's Telegram ID, waits 15 seconds, and silently discards outdated entries. The result is a single coherent response per burst, without duplicates.

How it works

The student sends a message on Telegram, in text or audio. An entry router detects the type: voice notes are downloaded and transcribed via OpenAI Whisper before entering the main flow; unsupported types are diverted. After the debounce, Professor PolyAI reads the complete context of the conversation, chooses the sub-agent, and generates the pedagogical response.

On output, a conditional node checks if the original input was voice. If it was, the Markdown is removed, the text goes to OpenAI TTS, and the student receives the response as a voice note on Telegram. This completes a fully spoken conversation cycle, essential for practicing listening and pronunciation.

All customization occurs through parameters: the variable lingua_ensino defines the target language (English, Spanish, French, or any language supported by GPT-4o-mini and Whisper), and the system prompt controls persona, tone, and commands. New specialist sub-agents, such as a grammar checker or vocabulary trainer, can be added by duplicating the agentTool pattern and connecting to the orchestrator.

Results

  • Tutor available 24/7 on Telegram, with input via voice and text and CEFR level assessment from A1 to C2
  • Zero backend code: all logic resides in n8n nodes, parameters, and system prompts, and can be replicated by non-programmers
  • 15s debounce in Redis eliminates duplicate responses in sequentially sent messages
  • Adaptable to any language and curriculum by changing a configuration variable and the persona prompt
  • CEFR level estimation maintained per student and reused between sessions, personalizing scaffolding at each turn

The lesson from the project lies in the architecture. The pedagogical gain came from orchestration, not from a larger model: separating level assessment and conversation tutoring into distinct sub-agents is what allows a generic chatbot to function as a tutor.