An AI-powered German language learning assistant that provides intelligent sentence analysis, vocabulary extraction, and grammatical explanations. Built with Streamlit and OpenAI's language models using an agents-as-tools architecture.
Try the app: lichtblick-german-assistant
- Intelligent Sentence Analysis: Get detailed word-by-word breakdowns with grammatical explanations
- Vocabulary Extraction: Extract German words with accurate English translations
- Smart Agent Routing: Automatically determines the best analysis approach for your input
- Interactive Chat Interface: Streamlit-powered conversational learning experience
- Backend: Python, OpenAI Agents SDK, OpenAI API
- Frontend: Streamlit
- AI Architecture: Multi-agent system built with OpenAI Agents SDK
- Deployment: Hugging Face Spaces
Python 3.12.10 (CPython)
pip- Clone the repository:
git clone https://github.com/Ashish-Soni08/Lichtblick.git
cd Lichtblick- Install dependencies:
pip install -r requirements.txt-
Configure API Key: Enter your OpenAI API key in the app's sidebar when it loads
-
Run the application:
streamlit run app.py- Open your browser and navigate to
http://localhost:8501
For Hugging Face Spaces: Simply visit the live demo link above - no local setup required!
- Enter API Key: Add your OpenAI API key in the sidebar
- Ask Questions: Type German words, phrases, or sentences in the chat
- Get Analysis: Receive intelligent breakdowns and explanations
Perfect for single words or short phrases:
Input: "der Hund"
Output:
der (->) the
Hund (->) dog
Detailed grammatical breakdown for full sentences:
Input: "Die Katze liegt auf dem Sofa."
Output:
The cat is lying on the sofa.
Die (->) the (feminine nominative singular definite article)
Katze (->) cat (feminine noun, nominative case)
liegt (->) is lying (third-person singular present tense of "liegen")
auf (->) on (preposition taking the dative case)
dem (->) the (masculine/neuter dative singular definite article)
Sofa (->) sofa (neuter noun, dative case)
Vocabulary Help:
- "What does 'gemΓΌtlich' mean?"
- "Translate 'Bahnhof'"
Sentence Analysis:
- "Analyze this: 'Ich gehe zur Schule.'"
- "Break down: 'Der Mann liest ein Buch.'"
This app uses a multi-agent system with specialized capabilities:
- Lichtblick Agent: Main coordinator that routes requests to specialized agents
- Vocabulary Agent: Extracts German words and provides translations
- Sentence Analysis Agent: Performs detailed grammatical analysis and translations
- Agent Framework: OpenAI Agents SDK handles streaming responses and tool orchestration
lichtblick/
βββ .trae/ # Trae IDE configuration
βββ backend/ # Backend agent logic
β βββ __pycache__/ # Python cache files
β βββ .german-ai-assistant/ # German AI assistant modules
β βββ __init__.py # Package initialization
β βββ lichtblick.py # Main agent implementation
βββ frontend/ # Frontend interface
βββ assets/ # Static assets
β βββ lichtblick_mascot.png # App mascot image
β βββ logo.png # App logo
βββ app.py # Main Streamlit application
βββ setup.py # Package setup configuration
βββ requirements.txt # Python dependencies
βββ LICENSE # Project license
βββ README.md # Project documentation
βββ .env # Environment variables
βββ .python-version # Python version (3.12.10)
βββ .gitignore # Git ignore rules
βββ vibe_coding_context/ # LLM context files
For German Beginners:
- Clarity: Word-by-word breakdowns make complex sentences understandable
- Grammar Support: Detailed explanations of cases, verb forms, and sentence structure
- Interactive Learning: Conversational interface encourages exploration
- Personalized Help: AI adapts responses based on your specific questions
OPENAI_API_KEY=sk-your-openai-api-key-here- Modify agent instructions in
backend.py - Customize UI elements in
app.py - Adjust context window (currently uses last 5 message turns)
This project is licensed under the Apache License 2.0
- OpenAI for providing the language model APIs
- Streamlit for the web application framework
- OpenAI Agents SDK for the multi-agent architecture
Ashish Soni - ashish.soni2091@gmail.com
Project Link: Lichtblick
This project was created for the Trae AI IDE Agent Hackathon - a challenge to design custom agents using Trae's powerful MCP (Model Context Protocol) server capabilities. The hackathon encouraged developers to combine prompts, tools, and advanced agent architectures to create innovative AI applications.
This project was inspired by Andrej Karpathy's insightful video "How I use LLMs" (specifically the section from 1:59:00 - 2:04:40 where he discusses using custom GPTs for language learning). Following his approach, I created a specialized AI assistant for German language learning!
- Custom GPT Version: Originally created as a Custom GPT with specialized prompts
- Multi-Agent Implementation: Enhanced with OpenAI Agents SDK for more sophisticated tool routing
- Streamlit App: Deployed as a full web application on Hugging Face Spaces
Lichtblick means "a glimmer of hope" or "ray of light" in German - representing the clarity this assistant brings to German language learning! β¨

