snowbrain-AGUI
snowbrain-AGUI copied to clipboard
snowbrain - AI-Driven Insights with Snowflake
trafficstars
snowBrain Generative UI Demo
SnowBrain is an open-source prototype that serves as your personal data analyst.
Features
- Next.js App Router + React Server Components
- Vercel AI SDK 3.0 for Generative UI
- OpenAI Tools/Function Calling
- shadcn/ui
- RAG - Retrieval Augmented Generation Supabase
- Charts using Tremor
- Real time data retrieval using Snowflake deployed on Modal
Deploy Your Own
You can deploy your own version of the demo to Vercel with one click:
Running locally
You will need to use the environment variables defined in .env.example to run Next.js AI Chatbot. It's recommended you use Vercel Environment Variables for this, but a .env file is all that is necessary.
Note: You should not commit your
.envfile or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.
- Install Vercel CLI:
npm i -g vercel - Link local instance with Vercel and GitHub accounts (creates
.verceldirectory):vercel link - Download your environment variables:
vercel env pull - Deploy the modal code on modal/main.py using the following command:
modal deploy
bun install
bun run dev
Your app should now be running on localhost:3000.
Example Queries
snowBrain is designed to make complex data querying simple. Here are some example queries you can try:
- Total revenue per product category: "Show me the total revenue for each product category."
- Top customers by sales: "Who are the top 10 customers by sales?"
- Average order value per region: "What is the average order value for each region?"
- Order volume: "How many orders were placed last week?"
- Product price listing: "Display the list of products with their prices."