FastAPI service that ingests an in-game screenshot plus a voice question, runs the coach model, and replies with audio advice. Uses LangChain wrappers with flexible coach provider (Gemini or Grok, configurable via COACH_PROVIDER and COACH_MODEL env vars) for analysis, OpenAI Whisper for transcription, and OpenAI TTS for speech generation.

Visit us at sensii.gg

- app/routes: FastAPI endpoints (- assistant.py)

- app/assistant: Coach logic, prompts, draft agent, TTS

- app/lib: Shared LangChain clients (- langchain.py)

- app/config.py: Settings loaded from- .env

- data/: Champion XML inputs

cd sensii

cp .env.example .env # fill in API keys- OPENAI_API_KEY- For Whisper transcription + TTS

- COACH_PROVIDER- Choose your coach provider:- gemini(default) or- grok

- COACH_MODEL- Model name for the selected provider (e.g.,- gemini-flash-lite-latestor- grok-3)

- GOOGLE_API_KEY- Required if- COACH_PROVIDER=gemini

- GROK_API_KEY- Required if- COACH_PROVIDER=grok

To use Gemini (default):

COACH_PROVIDER=gemini

COACH_MODEL=gemini-flash-lite-latestTo use Grok:

COACH_PROVIDER=grok

COACH_MODEL=grok-3Just change COACH_PROVIDER and COACH_MODEL in .env - no code changes needed!

docker-compose up -d --build

# API at http://localhost:8000Run the test suite in a clean container build:

docker-compose run --rm --build sensei-api testpython3 -m venv venv

source venv/bin/activate

pip install -r requirements-dev.txt

uvicorn app.main:app --reload- Health: GET /api/v1/health

- Ready: GET /api/v1/ready

- Coach: POST /api/v1/assistant/coach(audio file, image file, game_stats JSON, optional language)

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Copyright 2025 Sorena AI

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.