Get started with Haggle
This guide will get you from zero to running Haggle in under 10 minutes.Prerequisites
Python 3.x
Required for backend service
Node.js 16+
Required for frontend (optional)
xAI API Key
Get from xAI Console
Supabase Account
Free tier available at supabase.com
Quick Start with CLI
The fastest way to see Haggle in action is using the CLI demo mode:Quick Start with API
To run the full API server:Test the API
Create a new job:You’ll receive a response with:
job_id- Unique identifier for this jobtask- Inferred service type (e.g., “plumber”)questions- Array of clarifying questions
Quick Start with Full Stack
To run both frontend and backend:Enable Voice Calling (Optional)
To enable automated voice negotiation with service providers:Get Twilio credentials
Sign up at twilio.com and get:
- Account SID
- Auth Token
- Phone Number
Verify Installation
Check that everything is working:Check API health
Check API health
{"status": "healthy"}Test task inference
Test task inference
Inferred task: plumberCheck database connection
Check database connection
What’s Next?
How It Works
Learn about the complete workflow from query to negotiation
API Reference
Explore all available API endpoints
Configuration
Customize Haggle for your needs
Architecture
Understand the system architecture
Troubleshooting
ImportError: No module named 'xai_sdk'
ImportError: No module named 'xai_sdk'
Make sure you’ve installed all dependencies:
Supabase connection error
Supabase connection error
Verify your Supabase credentials in
config.py:- Check that SUPABASE_URL starts with
https:// - Ensure SUPABASE_KEY is the anon/public key
- Verify the
providerstable exists
API key errors
API key errors
Ensure all required API keys are set:
XAI_API_KEY- From console.x.aiOPENAI_API_KEY- From platform.openai.comSUPABASE_URLandSUPABASE_KEY- From your Supabase project
Port already in use
Port already in use
If port 8000 is already in use, specify a different port:
Need Help? Check out the setup guide for detailed installation instructions or open an issue on GitHub.