title: Lichtblick German Assistant
emoji: π
colorFrom: red
colorTo: red
sdk: docker
app_port: 8501
tags:
- streamlit
pinned: false
short_description: Lichtblick helps you learn Germanβword by word
license: apache-2.0
thumbnail: >-
https://cdn-uploads.huggingface.co/production/uploads/60ef4a57fe56ad3fb7a22ce0/BXN_GpytquWBBzwvSGxoD.png
Lichtblick German Learning Assistant π©πͺππ‘
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.
π Live Demo
Try the app: lichtblick-german-assistant
β¨ Features
- 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
π οΈ Technology Stack
- Backend: Python, OpenAI Agents SDK, OpenAI API
- Frontend: Streamlit
- AI Architecture: Multi-agent system built with OpenAI Agents SDK
- Deployment: Hugging Face Spaces
πββοΈ Quick Start
Prerequisites
Python 3.12.10 (CPython)
pip
Installation
- 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!
π Usage
Getting Started
- 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
Learning Modes
Vocabulary Extraction
Perfect for single words or short phrases:
Input: "der Hund"
Output:
der (->) the
Hund (->) dog
Sentence Analysis
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)
Example Interactions
Vocabulary Help:
- "What does 'gemΓΌtlich' mean?"
- "Translate 'Bahnhof'"
Sentence Analysis:
- "Analyze this: 'Ich gehe zur Schule.'"
- "Break down: 'Der Mann liest ein Buch.'"
π§ AI Architecture
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
π Project Structure
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
π― Learning Benefits
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
π Configuration
Required Environment Variables
OPENAI_API_KEY=sk-your-openai-api-key-here
Optional Settings
- Modify agent instructions in
backend.py
- Customize UI elements in
app.py
- Adjust context window (currently uses last 5 message turns)
π License
This project is licensed under the Apache License 2.0
π Acknowledgments
- OpenAI for providing the language model APIs
- Streamlit for the web application framework
- OpenAI Agents SDK for the multi-agent architecture
π Contact
Ashish Soni - [email protected]
Project Link: Lichtblick
π Built For
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.
π― Inspiration & Background
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!
Evolution of Lichtblick:
- 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! β¨