MCPcopy Index your code
hub / github.com/Tanzania-AI-Community/twiga

github.com/Tanzania-AI-Community/twiga @v0.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.1 ↗ · + Follow
898 symbols 3,769 edges 122 files 271 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DALL·E Twiga Discord

🦒 Twiga: empowering Tanzanian education with AI 🦒

GitHub License Discord GitHub Issues or Pull Requests All Contributors Static Badge

Twiga is a WhatsApp chatbot designed specifically for Tanzanian teachers, and is being built by the Tanzania AI Community and open-source contributors. It aims to enhance the educational experience for educators by providing them with access to generative AI. Using retrieval-augmented generation (RAG), Twiga can communicate with teachers in a natural way yet combine the adaptive capabilities of LLMs with the knowledge provided in the curriculum and textbooks of the Tanzanian Institute of Education (TIE). We aim to build the bot to be used for a multitude of educational applications such as generating exams, writing lesson plans, searching for textbook info, and more.

This project was awarded the Meta Llama Impact Grant Innovation Award 2024 for its use of Llama open source LLMs for social good. Read our roadmap for further details on our development plans.

🩷 Sponsors

We would like to thank those who are sponsoring this project.

Meta Meta Sponsoring us through the LLaMA Impact Grant Innovation Award, allowing us to build LLM tools for social good. Neon Neon Providing database infrastructure that helps us maintain high performance.
Modal Modal Providing cloud computing resources for LLM and OCR inference. KTH AI Society KTH AI Society KTH students' organization that leads some development areas in Twiga.

📱 Demo

Here are a couple of screenshots. Alternatively, you can take a look at our brief demo.

End of onboarding Question generation

🤝 Get involved

We encourage you to contribute to Twiga! There is plenty of documentation describing the current architecture of Twiga, how to contribute, and how to get started in the docs/ folder.

For further support you can join our Discord to discuss directly with the community and stay up to date on what's happening, or you can contact us more formally using GitHub Discussions.

Thank you to all the people that have contributed to Twiga so far!

Victor Oldensand Victor Oldensand 🚇 💻 🐛 📖 🎨 💡 📋 🔍 🤔 🚧 🧑‍🏫 📆 💬 👀 🔬 📢 📓 EssaMohamedali EssaMohamedali 💼 🖋 📋 💵 🔍 🤔 📆 📣 📢 Annagrace1704 Annagrace1704 🖋 🎨 📣 Fredy Mgimba Fredy Mgimba 💻 🚇 Álvaro Mazcuñán Herreros Álvaro Mazcuñán Herreros 💻 📖 ⚠️ Wang Junwei Wang Junwei 💻 Robert Robert 💻 🤔 🧑‍🏫 📆 💬
Ben-Temming Ben-Temming 💻 📖 ⚠️ JohanJohanJohan JohanJohanJohan 💻 🎨 🤔 Silvia Mosca Silvia Mosca 🔊 💻 🤔 Erik Boustedt Erik Boustedt 💻 🖋 🔣 🤔 💵 Bhargavvvvvv Bhargavvvvvv 💻 MommeAbbas MommeAbbas 💻 adricalm adricalm 💻
SimonProjekt SimonProjekt 🐛 💻 🔣

📈 Monitoring

  • The FastAPI service now exposes GET /metrics, backed by prometheus-fastapi-instrumentator and custom counters for WhatsApp webhooks, LLM calls, rate limiting, and generated messages.
  • Launch the local Prometheus + Grafana stack with docker compose -f monitoring/docker-compose.monitoring.yml up; Prometheus listens on :9090 and Grafana on :4000.
  • Prometheus scrapes the Twiga app at host.docker.internal:8000/metrics by default—if you run the API elsewhere, edit monitoring/prometheus/prometheus.yml accordingly.
  • Grafana auto-provisions a Prometheus datasource plus three dashboards (FastAPI Overview, LLM Performance, Redis Overview) from monitoring/grafana/provisioning.
  • Example alerts (5xx rate, slow latency) ship in monitoring/prometheus/alerts.yml.

📜 License

MIT License, Copyright 2024-present, Victor Olde

Core symbols most depended-on inside this repo

Shape

Function 513
Method 262
Class 112
Route 11

Languages

Python100%

Modules by API surface

app/tools/tool_code/generate_necta_style_exam/exam_generator.py32 symbols
app/services/flows/handlers/subjects_classes_flow_handler.py28 symbols
tests/services/test_flow_service.py27 symbols
app/services/messaging_service.py26 symbols
app/services/exam_rendering/latex_exam_pdf_rendering.py25 symbols
app/services/exam_rendering/reportlab_rendering.py24 symbols
app/database/db.py24 symbols
app/utils/whatsapp_utils.py23 symbols
scripts/exam_generation_alpha/generate_exam_pdf.py22 symbols
tests/test_reembedding_scripts.py21 symbols
app/models/message_models.py21 symbols
app/services/flows/flow_service.py20 symbols

Datastores touched

dbDatabase · 1 repos
twigaDatabase · 1 repos

For agents

$ claude mcp add twiga \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page