Prerequisites
Before installing Haggle, ensure you have the following:Python 3.x
Required for the backend API service
Node.js & npm
Required for the Next.js frontend (v16.0.7+)
Supabase Account
For PostgreSQL database hosting
API Keys
xAI API key for Grok LLM
Installation
Install Backend Dependencies
Install Python dependencies using pip:This installs the following key dependencies:
- FastAPI (v0.115.0+) - Web framework
- Uvicorn (v0.30.0+) - ASGI server
- Supabase (v2.0.0+) - Database client
- xAI SDK (v0.1.0+) - Grok LLM integration
- httpx (v0.27.0+) - Async HTTP client
- Rich (v13.0.0+) - CLI interface
Install Frontend Dependencies
Navigate to the frontend directory and install Node.js dependencies:The frontend uses:
- Next.js (v16.0.7) - React framework
- React (v19.2.0) - UI library
- Tailwind CSS (v4.1.9) - Styling
- Radix UI - Component primitives
Set Up Supabase Database
Create the required database table in Supabase:
- Go to your Supabase Dashboard
- Select your project
- Navigate to SQL Editor
- Copy the contents of
supabase_migration.sqlfrom the repository - Paste and click Run
View SQL Migration Script
View SQL Migration Script
Verify Installation
Verify your installation by checking the database connection:This runs a demo workflow that tests:
- Database connectivity
- Grok LLM integration (or fallback mode)
- Provider search functionality
You should see output showing task inference, question generation, and provider search results.
Next Steps
Configuration
Set up environment variables and API keys
Running Locally
Start the development servers
Troubleshooting
Missing columns error
Missing columns error
If you encounter errors about missing database columns:
- Verify the
providerstable exists in Supabase - Run the migration script from Step 4
- Check that all column names match exactly (case-sensitive)
- If you have an old table, use
supabase_migration_update.sqlinstead
Permission errors in Supabase
Permission errors in Supabase
If you get permission or RLS errors:
- Check Row Level Security policies in your Supabase dashboard
- Ensure the development policy allows operations
- Verify your
SUPABASE_KEYis the anon/service_role key, not the project API key
Python version issues
Python version issues
Haggle requires Python 3.x. Check your version:If you have multiple Python versions, ensure you’re using the correct one throughout.