Mwalimu
AI Educational Tutoring Chatbot
Intelligent tutoring system for Kenyan students delivering personalized educational content via Telegram with LangGraph multi-agent architecture.

- LangGraph
- LangChain
- Python Telegram Bot
- Pydantic
- OpenAI API
- Groq API
- OpenRouter API
- Instructor (Structured LLM Outputs)
- Twilio (WhatsApp Integration)
- Uvicorn
- Python-dotenv
Status: pilot
Delivered on: 2024-11-15
My Role: AI Engineer & Full-Stack Developer
About.
Mwalimu (meaning 'teacher' in Swahili) is an AI-powered educational chatbot designed specifically for Kenyan students. It provides interactive tutoring, practice problems, and personalized feedback across subjects like Mathematics, Sciences, Languages, and Social Studies. The system uses a sophisticated multi-agent architecture to deliver grade-appropriate content for both primary (Class 1-8) and secondary (Form 1-4) school students.
Problem Statement.
Many Kenyan students lack access to personalized tutoring and struggle with understanding complex subjects without individual guidance. Traditional educational apps often lack cultural relevance and don't adapt to local curriculum requirements.
Solution.
Multi-agent LangGraph architecture with intelligent routing and specialized tutoring agentsCultural localization with Swahili greetings and Kenyan curriculum alignmentGrade-appropriate content delivery for primary (Class 1-8) and secondary (Form 1-4) studentsInteractive Q&A system with practice problems and instant feedbackConversation state persistence for continuous learning across sessionsMulti-platform support (Telegram and WhatsApp) for accessibility
Results.
- Successfully deployed Telegram bot with webhook integration
- Multi-agent system handles complex educational conversations with context awareness
- Structured conversation flow with proper state management and persistence
- Cultural localization with Swahili integration and Kenyan curriculum focus
- Scalable architecture supporting multiple concurrent student sessions
Challenges.
- Implementing secure API token management and webhook configuration
- Designing intuitive conversation flows for different educational scenarios
- Ensuring consistent state management across complex multi-agent interactions
- Balancing educational content depth with chat interface limitations
- Creating culturally appropriate responses while maintaining educational standards
Lessons Learned.
- LangGraph provides excellent workflow orchestration for complex conversational AI
- Structured LLM outputs with Pydantic models significantly improve response quality
- Cultural localization is crucial for educational technology adoption
- Multi-agent architectures require careful state management and error handling
- Webhook-based chatbot deployment requires robust error handling and logging
Future Improvements.
- Add multimedia content support (images, diagrams, videos)
- Implement progress tracking and learning analytics dashboard
- Add spaced repetition algorithms for better knowledge retention
- Create admin dashboard for content management and student monitoring
- Integrate with Kenyan education databases for curriculum alignment
- Add voice message support for accessibility
- Implement A/B testing for different teaching approaches