Local Setup
Guide to setting up Reactive Agents locally for development
Prerequisites
- pnpm installed on your system
- PostgREST - Either use Supabase (which provides PostgREST) or set up PostgREST standalone
- AI provider API key (Google Gemini, xAI, Anthropic, etc.) - added via dashboard
- OpenAI API key (required for optimization features - added via dashboard)
Step 1: Install Reactive Agents
# Clone the repository
git clone https://github.com/idkhub-com/reactive-agents.git
cd reactive-agents
# Install dependencies
pnpm installStep 2: Set Up PostgREST
Reactive Agents requires a database accessible via PostgREST. You can use Supabase (which includes PostgREST) or set up PostgREST standalone:
Supabase includes PostgREST: You can use Supabase to provide PostgREST either:
- Cloud hosting: Create a project at supabase.com (recommended for most users)
- Local hosting: Use the Supabase CLI to run Supabase locally
For local Supabase: Ensure local Supabase is running, then in Step 3 set NODE_ENV=development in your .env file. You won't need to set POSTGREST_URL or POSTGREST_SERVICE_ROLE_KEY.
For cloud Supabase: You'll need your project's PostgREST URL and service role key for the next step.
Set up PostgREST directly: Set up your own PostgreSQL database with PostgREST. Follow the PostgREST documentation for setup instructions. You'll need:
- A PostgreSQL database with the Reactive Agents schema
- PostgREST configured to connect to your database
- The PostgREST URL and service role key for the next step
Step 3: Configure Environment
Create a .env file in your Reactive Agents directory:
Database Configuration: If you're using local Supabase with NODE_ENV=development, you can skip the POSTGREST_URL and POSTGREST_SERVICE_ROLE_KEY variables below. For cloud Supabase or standalone PostgREST, you'll need to set these values.
# Required for local Supabase to use defaults
NODE_ENV=development
# Database Configuration (required for cloud Supabase or standalone PostgREST)
POSTGREST_URL=your-postgrest-url
POSTGREST_SERVICE_ROLE_KEY=your-service-role-key
# Authentication (optional - not required for local development, but recommended for production)
BEARER_TOKEN=your-custom-token
ACCESS_PASSWORD=your-access-password
JWT_SECRET=your-jwt-secret
# Optional: OpenAI API Key (can also be added via dashboard)
OPENAI_API_KEY=your-openai-api-keyProduction Setup: For production deployments, it's recommended to set up authentication using BEARER_TOKEN, ACCESS_PASSWORD, and JWT_SECRET to secure your Reactive Agents instance. These are optional for local development but should be configured for production environments.
Step 4: Start Reactive Agents
pnpm run build
pnpm startYour Reactive Agents instance will be available at http://localhost:3000
Step 5: Access Dashboard
Open your browser and visit:
Local Setup Complete: Reactive Agents is now running and ready to use! You can start making API calls immediately. For optimization features, see the Configuration Steps section in the Getting Started guide.