Skip to main content
Running KaireonAI yourself is an Enterprise offering under a commercial license. Source and image access is provisioned as part of an Enterprise agreement — this is not a free or open download. Contact sales. To evaluate the platform at no cost, use the hosted Playground.

Prerequisites

Install PostgreSQL

Install Redis (Optional)

KaireonAI uses Redis for enrichment data caching and API rate limiting. Without it, the platform runs fine but skips these features.

Platform Setup

1

Clone and install

2

Create .env file

Edit .env:
3

Initialize the database

The seed script creates the default tenant and an admin user:
  • Email: admin@kaireonai.com
  • Password: admin123
prisma db push is safe only on a fresh database. On a populated database it drops any table not defined in schema.prisma — including the runtime-created ds_* customer-schema tables and _flow_* pipeline staging tables — which means data loss. Once you have real data, evolve the schema with the numbered files in prisma/manual-sql/ applied via psql, not db push.
4

Start the development server

Open http://localhost:3000 and sign in with the admin credentials.

ML Worker Setup (Optional)

The ML Worker provides scikit-learn-based analysis for AI features. It’s optional — all AI features fall back to LLM-based analysis without it.
1

Set up environment

Edit ml-worker/.env to match your local database:
2

Install Python dependencies

3

Start the ML Worker

4

Connect the platform

Add to platform/.env:
Restart the Next.js dev server. The AI > Insights page should show “ML Worker Connected”.

Docker Compose (Full Stack)

Run the entire stack with Docker Compose instead of installing each dependency. The docker-compose.yml lives at the repository root:
This starts PostgreSQL, PgBouncer, Redis, the API, the background worker, and optionally the ML Worker, with the app served on http://localhost:3000. The API entrypoint waits for the database, runs npx prisma db push --skip-generate to sync the schema, then starts the server.
The Compose api and worker services run with NODE_ENV=production, so the platform’s startup validation requires a full set of production security secrets. The shipped docker-compose.yml now provides working dev-only defaults for all of them (via ${VAR:-default} substitutions in a shared x-app-secrets block), so docker compose up starts cleanly with no configuration.The required variables are NEXTAUTH_SECRET, JWT_SIGNING_SECRET, CONNECTOR_ENCRYPTION_KEY, WEBHOOK_SIGNING_SECRET, API_KEY_PEPPER, and a non-wildcard CORS_ALLOWED_ORIGINS. The baked-in defaults are not secret — anyone can read them in the repo — so before exposing the stack to anyone else, override each one (plus POSTGRES_PASSWORD). Because they use ${VAR:-...} substitution, Compose interpolates any value you export in your shell or set in .env, so you no longer need to edit the Compose file:
CORS_ALLOWED_ORIGINS must be set and must not be *. Generate strong secrets with openssl rand -hex 32. See the environment variable reference for details.
The ML Worker includes a health check (/health on port 8000) that Docker runs on a schedule. Check its reported status — healthy, unhealthy, or starting — with docker compose ps.

Verify Installation

After signing in, check the home dashboard — you should see cards for Decision Flows, Offers, Channels, etc. all at zero counts. To load demo content, go to Settings → Sample Data and load the Retail Rewards dataset. This will populate the platform with schemas, offers, channels, models, and creatives.

Running Tests

Troubleshooting

Prisma 7 moved the connection URL out of schema.prisma and into prisma.config.ts. If you see this error, remove the url = env("DATABASE_URL") line from prisma/schema.prisma. The datasource block should only contain provider = "postgresql". The connection URL is configured in prisma.config.ts.
Another process is using port 3000. Find and stop it:
Alternatively, start on a different port:
Redis is optional for local development. If Redis is not running, the platform skips enrichment caching, rate limiting, and circuit breaker features but otherwise works normally. To suppress connection warnings, remove REDIS_URL from your .env file. To install Redis, see the Install Redis section above.
Ensure you are running commands from the platform/ directory (not the repo root). The Prisma 7 config expects prisma.config.ts in the working directory:
The platform warns if NEXTAUTH_SECRET is not set in development. Auth features (login, session management) will not work correctly without it. Add any random string to your .env:

Next Steps

Platform Walkthrough

Build a complete decisioning setup step by step.

Cloud Deployment

Ready for production? Deploy to AWS App Runner.

Kubernetes

Deploy to any Kubernetes cluster using the Helm chart.

ML Worker

Add the Python ML Worker for AI-powered analysis.