How kaarthik108/snowchat works
snowChat is a Streamlit application for asking natural-language questions about Snowflake data. Its main workflow accepts a chat prompt, invokes a model-backed LangGraph agent, and displays the streamed response; the agent can retrieve schema context and search the web. A separate ingestion workflow embeds Markdown schema documents into Supabase. Snowflake query execution and Cloudflare caching are implemented in helper code, but the active agent does not register the SQL executor tool, and the UI notes data retrieval is disabled. The README also describes conversational memory and self-healing SQL; the current excerpts show memory, but not a working repair flow.
Main entry points: agent.py Agent graph · main.py Streamlit app · ingest.py Document ingestion · tools.py Schema retriever
Components 17
Chat interface
- Streamlit app
main.py - Chat rendering
utils/snowchat_ui.py - DDL browser
utils/snowddl.py
Agent runtime
- Agent graph
agent.py - Conversation memory
agent.py - Chat model
Schema knowledge
- Schema retriever
tools.py - Web search
tools.py - Document ingestion
ingest.py - Schema documents
docs
Data integrations
- Supabase
- OpenAI embeddings
- SQL executor tool
tools.py - Snowflake connection
utils/snow_connect.py - Snowflake
- Cloudflare KV
Other components
- User
Connections 16
- User → Streamlit app: asks
README.md - Streamlit app → Agent graph: invokes
main.py - Streamlit app → Chat rendering: renders
main.py - Streamlit app → DDL browser: loads
main.py - Agent graph → Chat model: calls
agent.py - Agent graph → Conversation memory: checkpoints
agent.py - Agent graph → Schema retriever: dispatches
agent.py - Agent graph → Web search: dispatches
agent.py - Schema retriever → Supabase: retrieves from
tools.py - Schema retriever → OpenAI embeddings: embeds with
tools.py - Document ingestion → Schema documents: loads
ingest.py - Document ingestion → Supabase: stores vectors
ingest.py - Document ingestion → OpenAI embeddings: embeds with
ingest.py - SQL executor tool → Snowflake connection: executes through
tools.py - Snowflake connection → Snowflake: queries
utils/snow_connect.py - Snowflake connection → Cloudflare KV: reads and writes
utils/snow_connect.py