How masteryodaa/sql-agent works
Project type and purpose
• This is a lightweight, full‑stack Streamlit application (“app.py”) augmented by an AI agent (“agent.py”) for querying or augmenting data in a local SQLite database (Chinook.db).
• The app is packaged for reproducible local development using a VS Code devcontainer (.devcontainer/) and holds secrets in .streamlit/secrets.toml.
File structure
• Top‑level files
– app.py → Streamlit entry‑point (presentation + orchestration)
– agent.py → AI/LLM logic module (business logic)
– Chinook.db → SQLite database (data layer)
– requirements.txt → Python dependency list
– readme.md → install instructions + screenshots
• Config directories
– .devcontainer/ → dev environment (Docker + VS Code)
– .streamlit/ → Streamlit config & secrets (e.g. API keys)
• Supporting assets
– screenshots/ → UI examples
Detail
• Don’t lump agent.py and app.py together—keep business logic and presentation distinct.
• Flow of secrets from .streamlit/secrets.toml into both the UI and agent modules.