Getting Started
Everything you need to install, configure, and start using Omega AI locally or in production.
Prerequisites
Before installing Omega AI, ensure your environment meets the following requirements:
- Name
PHP- Type
- >= 8.2
- Description
With extensions: BCMath, Ctype, cURL, DOM, Fileinfo, JSON, Mbstring, OpenSSL, PCRE, PDO, Tokenizer, XML
- Name
Composer- Type
- 2
- Description
PHP dependency manager
- Name
Node.js- Type
- >= 18
- Description
With npm, for frontend asset compilation via Vite
- Name
MySQL- Type
- 8.0+
- Description
Primary database engine
- Name
Stripe Account- Type
- required
- Description
For subscription billing -- test keys available for development
- Name
Laravel Herd or Sail- Type
- recommended
- Description
Local development server -- Herd recommended, Sail as Docker alternative
Installation
Follow these steps to get Omega AI running locally.
Clone the repository
Download the project source code.
git clone <repository-url> omega-ai && cd omega-ai
Install PHP dependencies
Install all backend packages defined in composer.json.
composer install
Install Node.js dependencies
Install all frontend packages defined in package.json.
npm install
Configure environment
Copy the example environment file and generate the application encryption key. Then edit .env to set database credentials, Stripe keys, and AI endpoint URL.
cp .env.example .env && php artisan key:generate
Set up the database
Run all database migrations and seed initial data (products, roles, permissions, etc.).
php artisan migrate --seed
Build frontend assets
Compile CSS and JavaScript for production. Use npm run dev instead for hot-reloading during development.
npm run build
Access the application
With Laravel Herd the site is automatically available at https://omega-ai.test. With Laravel Sail run ./vendor/bin/sail up -d and visit http://localhost.
Configuration
Essential .env variables to configure after installation, grouped by service.
Database
- Name
DB_CONNECTION- Type
- string
- Description
Database driver. Default:
mysql
- Name
DB_HOST- Type
- string
- Description
Database server hostname. Default:
127.0.0.1
- Name
DB_DATABASE- Type
- string
- Description
Database name. Default:
omega_ai
- Name
DB_USERNAME- Type
- string
- Description
Database user. Default:
root
- Name
DB_PASSWORD- Type
- string
- Description
Database password.
Stripe Billing
- Name
STRIPE_KEY- Type
- string
- Description
Stripe publishable key for client-side payment forms. Use
pk_test_...for development.
- Name
STRIPE_SECRET- Type
- string
- Description
Stripe secret key for server-side API calls. Use
sk_test_...for development.
- Name
STRIPE_WEBHOOK_SECRET- Type
- string
- Description
Stripe webhook signing secret for verifying webhook payloads. Format:
whsec_...
AI Service
- Name
AI_ENDPOINT- Type
- string
- Description
Full URL or path to the AI completion API. Default:
http://localhost:8080/api/generate
- Name
AI_ENDPOINT_TYPE- Type
- string
- Description
Type of AI endpoint:
urlfor full URL,pathfor relative path appended to AI_BASE_URL. Default:url
- Name
AI_BASE_URL- Type
- string
- Description
Base URL for path-type AI endpoints. Default:
http://localhost:8080
- Name
AI_TIMEOUT- Type
- integer
- Description
Timeout in seconds for AI API requests. Default:
60
- Name
AI_DEFAULT_MODEL- Type
- string
- Description
Fallback model name when assistant has no model configured. Default:
default
Error Tracking (optional)
- Name
SENTRY_LARAVEL_DSN- Type
- string
- Description
Sentry DSN for server-side error tracking.
- Name
VITE_SENTRY_DSN_PUBLIC- Type
- string
- Description
Sentry DSN for client-side error tracking.
For production, set APP_ENV=production and APP_DEBUG=false. Configure MAIL_* variables for email delivery and run php artisan config:cache to cache configuration.
Verification
After installation, verify everything is working correctly.
php artisan test --compact
Basic Usage Flow
Once the application is running, follow this workflow to deploy your first AI assistant:
- Register an account and subscribe to a plan via the landing page
- Access the admin dashboard at
/app - Create an AI assistant with a name, system prompt, and behavior configuration
- Add knowledge base entries to train the assistant with your business content
- Generate an API key with optional domain restrictions
- Copy the embed code from Widget Instructions and paste it into your website
- The chat widget connects to your assistant and responds to visitor messages using your knowledge base
- Monitor conversations, usage, and system health through the admin dashboard
API Examples
Send a chat message
POST /api/chat -- Send a message to an assistant with API key authentication, assistant slug, message content, and optional session_id for conversation continuity.
- Name
api_key- Type
- string
- Description
Your API key starting with
oak_.
- Name
assistant- Type
- string
- Description
The assistant's URL-friendly slug.
- Name
message- Type
- string
- Description
The message content to send.
- Name
session_id- Type
- string
- Description
Optional session UUID for conversation continuity.
curl -X POST https://your-domain.com/api/chat \
-H "Content-Type: application/json" \
-d '{
"api_key": "oak_your_api_key_here",
"assistant": "my-assistant-slug",
"message": "What are your business hours?",
"session_id": "optional-session-uuid"
}'
Get assistant info
POST /api/chat/assistant -- Retrieve assistant configuration for widget initialization.
- Name
api_key- Type
- string
- Description
Your API key starting with
oak_.
- Name
assistant- Type
- string
- Description
The assistant's URL-friendly slug.
curl -X POST https://your-domain.com/api/chat/assistant \
-H "Content-Type: application/json" \
-d '{
"api_key": "oak_your_api_key_here",
"assistant": "my-assistant-slug"
}'
Retrieve conversation history
POST /api/chat/history -- Fetch messages for an existing session.
- Name
api_key- Type
- string
- Description
Your API key starting with
oak_.
- Name
session_id- Type
- string
- Description
The session UUID from a previous chat response.
curl -X POST https://your-domain.com/api/chat/history \
-H "Content-Type: application/json" \
-d '{
"api_key": "oak_your_api_key_here",
"session_id": "existing-session-uuid"
}'