OpenTutorAI-CE (Community Edition) is an open-source project designed to provide an educational and collaborative AI-powered platform. This public edition is the foundation for a proprietary Enterprise Edition (EE) and is built to encourage community contributions.
[!TIP]
Looking for a Support? β Speak with our support Team Today!
Get enhanced capabilities, including custom theming and branding, Service Level Agreement (SLA) support, Long-Term Support (LTS) versions, and more!
For more information, be sure to check out our Open TutorAI Documentation.
β Key Features of Open TutorAI
Open TutorAI-CE is packed with powerful features designed for educational and collaborative AI experiences. Here's what makes it stand out:
-
π Effortless Setup with Docker Set up your environment in minutes using Docker with support for
:ollamaand:cudatagged images, ensuring a streamlined and hassle-free deployment. -
π€ Ollama & OpenAI API Compatibility Easily integrate OpenAI-compatible APIs for flexible conversations. Customize the API endpoint to connect with services like LMStudio, GroqCloud, Mistral, OpenRouter, and moreβalongside local Ollama models.
-
π‘οΈ Granular Permissions & User Groups Admins can define detailed roles and permissions, allowing for secure, customized user experiences while promoting accountability and collaboration.
-
π§βπ» Responsive & Mobile-Optimized Design Enjoy a smooth user experience across desktops, laptops, and mobile devices with a fully responsive interface.
-
π± Progressive Web App (PWA) Support Install Open TutorAI on your mobile device for an app-like experience, including offline mode on localhost and full access to core functionality.
-
π€πΉ Voice, Video & Avatar Discussion Mode Interact hands-free using integrated voice and video calls, or dive into an engaging experience with our avatar-powered discussion modeβa lifelike conversational interface that brings your AI to life.
-
π§βπ« Personalized Learning Experience Open TutorAI is purpose-built for education:
- π Customize learning support to meet individual learner needs.
- π§ Generate a personalized LLM, optionally paired with a user-selected avatar, tailored to each learner's style, personality, or curriculum.
-
π οΈ Model Builder: Easily create Ollama models. Create and add custom characters/agents, customize chat elements, and import models effortlessly.
-
π Local RAG Integration for Educational Content Empower learners and educators with Retrieval-Augmented Generation (RAG) tailored for education. Seamlessly integrate textbooks, lecture notes, assignments, and research papers into the chat experience. Students can load documents directly into the conversation or access classroom resources from their document library using the
#commandβenabling context-aware tutoring, assignment help, and in-depth discussion of study material. -
π Educational Web Search for RAG Enhance learning with real-time web search integration. Students and educators can perform targeted research using providers like
Google PSE,SearXNG,Brave,DuckDuckGo, and moreβright from the chat. The search results are automatically injected into the conversation, enabling fact-checking, discovery of up-to-date information, and exploration of external academic resources without leaving the tutoring environment. -
π Web Browsing Capability: Seamlessly integrate websites into your chat experience using the
#command followed by a URL. This feature allows you to incorporate web content directly into your conversations, enhancing the richness and depth of your interactions. -
π¨ Image Generation Integration: Seamlessly incorporate image generation capabilities using options such as AUTOMATIC1111 API or ComfyUI (local), and OpenAI's DALL-E (external), enriching your chat experience with dynamic visual content.
-
βοΈ Many Models Conversations: Effortlessly engage with various models simultaneously, harnessing their unique strengths for optimal responses. Enhance your experience by leveraging a diverse set of models in parallel.
-
π Role-Based Access Control (RBAC): Ensure secure access with restricted permissions; only authorized individuals can access your Ollama, and exclusive model creation/pulling rights are reserved for administrators.
-
ππ Multilingual Support: Experience Open TutorAI in your preferred language with our internationalization (i18n) support. Join us in expanding our supported languages! We're actively seeking contributors!
-
π Continuous Updates: We are committed to improving Open TutorAI with regular updates, fixes, and new features.
Want to learn more about Open TutorAI's features? Check out our Open TutorAI documentation for a comprehensive overview!
π Also Check Out Open TutorAI Community!
Don't forget to explore our sibling project, Open TutorAI Community, where you can discover, download, and explore customized Modelfiles. Open TutorAI Community offers a wide range of exciting possibilities for enhancing your chat interactions with Open TutorAI! π
ποΈ Project Structure
open-tutor-ai-CE/
βββ main.py β Python entry point (uvicorn)
β
βββ ββ Application Domains βββββββββββββββββββββββββββββββββββββββββββββββ
βββ accounts/ β Auth, users, roles, permissions
βββ learning/ β Learners, teachers, classrooms, courses
β βββ sessions/ β Chat sessions, tags, sharing, search
β βββ supports/ β Personalized tutoring supports
βββ ai/ β LLM, providers, RAG, media, memory, tools
β βββ llm/ β LLM schemas, service, transports
β βββ model_catalog/ β Model overlays/catalog
β βββ providers/ β OpenAI-compatible + Ollama providers
β βββ retrieval/ β RAG pipeline and knowledge bases
β βββ media/ β Audio (TTS/STT) + image generation
βββ content/ β Files, uploads, learning resources
β βββ files/ β User-owned files and extracted content
β βββ resources/ β Learning resources not tied to RAG
βββ governance/ β HITL governance and LLM response evaluation
β βββ self_regulation/ β Self-regulation feedback domain
βββ system/ β App-level configs and bootstrap services
β βββ configs/ β Runtime app configuration store
β βββ app/ β App info/bootstrap services
β
βββ ββ Gateway & Infrastructure ββββββββββββββββββββββββββββββββββββββββββ
βββ gateway/ β Transport layer
β βββ http/ β FastAPI app, dependencies, routers/
β βββ realtime/ β Socket.IO ASGI (/realtime/socket.io)
βββ data/ β ORM models, DB engine, base repository
βββ config/ β App settings & constants
βββ common/ β Shared utilities (exceptions, logging)
βββ tests/ β Pytest suite
β
βββ ββ Frontend ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββ ui/ β SvelteKit application
β βββ src/lib/apis/ β API clients (one folder per domain)
β βββ src/lib/components/ β Reusable Svelte components
β βββ src/lib/i18n/ β Translations (AR / FR / EN)
β βββ src/routes/ β File-based routing
β βββ static/ β Assets (avatars, images, audio)
β βββ cypress/ β E2E tests
β
βββ ββ DevOps ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββ devops/
β βββ docker/ β Dockerfiles + Docker Compose overlays
β βββ scripts/ β Dev & ops shell scripts
β
βββ ββ Project βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββ docs/ β Documentation
βββ kubernetes/ β Helm charts
βββ .github/workflows/ β CI/CD
βββ var/ β Runtime only, gitignored (DB, uploads, vector_db)
Full structure with annotations: MIGRATION.md
OpenWebUI and Hermes are used as design references only. OpenTutorAI keeps its own domain names and has no runtime dependency on either project.
How to Install π
Below is a list of essential steps and resources to help you get started, manage, and develop with Open TutorAI.
π οΈ Setup Guide β Local Development (without Docker)
Use this path when you want hot-reload for active development or contribution.
Requirements: Python 3.11β3.12 Β· Node.js 18.13β22.x
-
Fork and Clone the Repository
- Go to GitHub Repository
- Click on Fork, then clone your forked repo:
git clone https://github.com/YOUR_USERNAME/open-tutor-ai-CE.git cd open-tutor-ai-CE
-
Python Application Setup
-
Create and activate a Python environment (conda or venv):
# conda conda create -n tutorai-env python=3.11 conda activate tutorai-env # or plain venv python3 -m venv .venv && source .venv/bin/activate -
Install the required packages:
pip install -r requirements.txt -
Copy and configure environment variables:
cp .env.example .env # The defaults in .env.example work for local dev (DEBUG=true). # No changes needed unless you use an external API or want production mode. -
Start the Python API with hot-reload (available at http://localhost:8080):
uvicorn main:app --reload --port 8080Or use the provided convenience script:
chmod +x devops/scripts/dev.sh && ./devops/scripts/dev.sh -
Interactive API docs: http://localhost:8080/docs
-
-
Frontend Setup (in a second terminal)
- Navigate to the
ui/folder:cd ui npm install npm run dev # dev server with hot-reload at http://localhost:5173
- Navigate to the
-
Ollama (optional β for local models)
- Install from ollama.com, then:
ollama pull llama3.2 - Verify
OLLAMA_BASE_URL=http://localhost:11434is set in your.env.
- Install from ollama.com, then:
-
First login
- Open http://localhost:5173 and create an account.
- The first account registered becomes the administrator.
-
Run tests (no external services required)
pytest -q
π³ Docker & Docker Compose Setup (Recommended)
For a hassle-free setup without installing Python or Node.js, use Docker. A single container serves both the Python API and the built frontend.
Prerequisites
- Docker + Docker Compose from docker.com
- Git for cloning
- At least 8 GB RAM recommended for AI models
Step 1: Clone the Repository
git clone https://github.com/Open-TutorAi/open-tutor-ai-CE.git
cd open-tutor-ai-CE
Step 2: Set Up Environment Variables
cp .env.example .env
For production, replace the placeholder SECRET_KEY in your .env with a randomly generated value:
# macOS / Linux β replaces the existing SECRET_KEY line in-place
sed -i.bak "s/^SECRET_KEY=.*/SECRET_KEY=$(openssl rand -hex 32)/" .env && rm .env.bak
For local development, the defaults in .env.example work as-is (DEBUG=true bypasses the key check).
Step 3: Start the Stack
With Ollama bundled (recommended for local models):
docker compose --env-file .env -f devops/docker/docker-compose.yaml up --build
This starts:
open-tutoraiβ Python API + frontend at http://localhost:8080ollamaβ local model server at http://localhost:11434
Without Ollama (use an external OpenAI-compatible API):
docker compose --env-file .env -f devops/docker/docker-compose.yaml up --build open-tutorai
Set OPENAI_API_BASE_URL and OPENAI_API_KEY in .env.
Then in another terminal, you can also start Ollama separately:
chmod +x devops/scripts/run-ollama-docker.sh
./devops/scripts/run-ollama-docker.sh
Step 4: Download AI Models (if using Ollama)
docker exec -it ollama ollama pull llama3.2
Verify the model is installed:
docker exec -it ollama ollama list
If the Python API was already running before the model was pulled, restart it:
docker compose --env-file .env -f devops/docker/docker-compose.yaml restart open-tutorai
Step 5: Access the Application
Open http://localhost:8080 in your browser. The first account created becomes the administrator.
Stopping the Services
docker compose --env-file .env -f devops/docker/docker-compose.yaml down
# Full reset (removes all data volumes)
docker compose --env-file .env -f devops/docker/docker-compose.yaml down -v
GPU Support
# NVIDIA GPU
docker compose --env-file .env -f devops/docker/docker-compose.yaml -f devops/docker/docker-compose.gpu.yaml up --build
# AMD GPU
docker compose --env-file .env -f devops/docker/docker-compose.yaml -f devops/docker/docker-compose.amdgpu.yaml up --build
βοΈ Environment Variables Reference
| Variable | Default | Description |
|---|---|---|
DEBUG |
true |
Set to false in production. Enables SECRET_KEY strength check. |
SECRET_KEY |
(dev placeholder) | JWT signing key. Required in production (openssl rand -hex 32). |
DATABASE_URL |
sqlite:///./var/tutorai.db |
SQLAlchemy URL. SQLite for dev, PostgreSQL for production. |
OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama server. Use http://ollama:11434 inside Docker Compose. |
OPENAI_API_BASE_URL |
(empty) | OpenAI-compatible API (LMStudio, GroqCloud, Mistralβ¦). |
OPENAI_API_KEY |
(empty) | API key for the OpenAI-compatible provider. |
GEMINI_API_KEY |
(empty) | Google Gemini API key. |
CORS_ALLOW_ORIGIN |
http://localhost:3000,http://localhost:5173 |
Comma-separated allowed CORS origins. |
UPLOAD_DIR |
./var/uploads |
Directory for uploaded files. |
MAX_UPLOAD_SIZE_MB |
100 |
Maximum upload size in MB. |
VECTOR_DB_PATH |
./var/vector_db |
ChromaDB storage path for RAG. |
EMBEDDING_MODEL |
sentence-transformers/all-MiniLM-L6-v2 |
Default embedding model for RAG. |
AUDIO_TTS_ENGINE |
(empty) | TTS engine (e.g. openai). Configure via Admin > Settings > Audio. |
AUDIO_STT_ENGINE |
(empty) | STT engine. Configure via Admin > Settings > Audio. |
IMAGES_ENGINE |
(empty) | Image generation engine (e.g. openai). Configure via Admin > Settings > Images. |
GLOBAL_LOG_LEVEL |
INFO |
Log level: DEBUG, INFO, WARNING, ERROR. |
Troubleshooting
Encountering connection issues? See TROUBLESHOOTING.md for common fixes, or visit our Open TutorAI Documentation. For further assistance, join the Open TutorAI Discord.
π What's Next?
Discover upcoming features on our roadmap in the Open TutorAI Documentation.
π License
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details. π
π¬ Support
If you have any questions, suggestions, or need assistance, please open an issue or join our Open TutorAI Discord community to connect with us! π€
Star History
Founded by Mohamed El Hajji and built by the community - Let's make Open TutorAI even more amazing together! πͺ