How georgiebognalbal/mystiquerouter works
Mystique is a terminal-based multi-AI assistant. A user prompt enters the main loop, is added to conversation history, and is routed by src/router.py: Groq classifies the latest prompt, the router formats history and tries category-specific providers in order, and the response is displayed and saved. The README also describes memory, provider fallback, and terminal customization; these are represented alongside the primary workflow. Relationships reflect the sampled source and README; external provider calls are shown where client code makes them.
Main entry points: main.py Interactive loop · router.py Category router · memoryManager.py Memory manager · groq_client.py Groq client
Components 16
Terminal interface
- Interactive loop
main.py - Thinking indicator
src/Utils/terminal.py - Response display
src/Utils/responseFormatter.py
Request orchestration
- Category router
src/router.py - Message formatter
src/Memory/Formatter.py
Conversation memory
- Memory manager
src/Memory/memoryManager.py - Conversation file
src/Memory/temp.json
AI providers
- Groq client
src/Providers/groq_client.py - OpenAI client
src/Providers/openai_client.py - Gemini client
src/Providers/gemini_client.py - OpenRouter client
src/Providers/openrouter_client.py
Other components
- User
- Groq API
- OpenAI API
- Gemini API
- OpenRouter API
Connections 18
- User → Interactive loop: enters prompt
main.py - Interactive loop → Memory manager: loads history
main.py - Memory manager → Conversation file: reads or writes
src/Memory/memoryManager.py - Interactive loop → Thinking indicator: starts indicator
main.py - Interactive loop → Category router: routes history
main.py - Category router → Groq client: classifies prompt
src/router.py - Category router → Message formatter: formats history
src/router.py - Category router → Groq client: tries provider
src/router.py - Category router → OpenAI client: tries provider
src/router.py - Category router → Gemini client: tries provider
src/router.py - Category router → OpenRouter client: tries provider
src/router.py - Groq client → Groq API: sends requests
src/Providers/groq_client.py - OpenAI client → OpenAI API: sends requests
src/Providers/openai_client.py - Gemini client → Gemini API: sends requests
src/Providers/gemini_client.py - OpenRouter client → OpenRouter API: sends requests
src/Providers/openrouter_client.py - Interactive loop → Response display: shows response
main.py - Interactive loop → Memory manager: saves history
main.py - Interactive loop → User: presents answer
main.py