AI Agnostic Chat, Self-hosted or Multi-tenant
AI Agnostic Chat
Based upon the early work of https://github.com/PygmalionAI/galatea-ui.
- Group Conversations: Multiple users with one character/bot
- Multiple AI services: Support for Kobold, Novel, AI Horde, Chai, LuminAI, OpenAI
- Multiple persona schema formats (W++, Square bracket format, Boostyle)
- Multi-tenancy:
- User authentication
- Individual user settings: Which AI service to use and their own service configuration
- Individual user generation settings
- Chat specific overrides:
- Choose the AI service for a specific chat
- Personalise the character for a specific chat
- Customise the generation preset/settings for a specific chat
- Image generation (IN PROGRESS)
See the roadmap here.
You can visit the hosted version at agnai.chat
CAUTION: This project is in an early stage of development. You may experience breaking changes between updates.
If you're only looking to run AgnAI without contributing:
- Clone the project
- With MongoDB:
docker compose -p agnai -f self-host.docker-compose.yml up -d
- Without MongoDB:
docker run -dt --restart=always -p 3001:3001 agnaistic:latest
-dt
Run the container detached--restart=always
Restart at start up or if the server crashes-p 3001:3001
Expose port 3001. Access the app athttp://localhost:3001
- Install Node.js
- Install MongoDB Optional
- The database is optional. Agnaistic will run in
anonymous-only
mode if there is no database available.
- The database is optional. Agnaistic will run in
- Download the project:
git clone https://github.com/luminai-companion/agn-ai
or download it - From inside the cloned/unpacked folder in your terminal/console:
npm install
- Build and run the project in watch mode:
- Mac/Linux:
npm run start
- Windows:
npm run start:win
- Mac/Linux:
- Build and run the project with Local Tunnel:
- Mac/Linux:
npm run start:public
- Windows:
npm run start:public:win
- Mac/Linux:
This project quickly deviated from the upstream project. This project is not intended to be a SaaS nor be centered around the Pygmalion model.
Ultimately the design goals for this project are my own.
- High quality codebase
- AI Services: Transparently use a variety of AI models and services to converse with
- Initial AI services: Kobold, AI Horde, and Novel
- Supporting additional AI services should be low friction
- Lightweight to self-host
- Avoiding native dependencies and Docker to be easy for non-technical people to install and run
I'd highly recommend using VSCode with the following extensions:
Prettier - Code formatter
: For auto-formattingTailwind CSS Intellisense
: For auto-completion and intellisense with Tailwind CSS classes- And adding
"editor.formatOnSave": true
to your VSCodesettings.json
to auto-format with Prettier
When using pnpm start
, the Node.JS server is run using --inspect
. This means you can use various Inspector Clients for debugging.
The important parts of the stack are:
- MongoDB for persistence
- SolidJS for interactivity
- TailwindCSS for styling
- pnpm for dependency management
If you have Node and pnpm
installed and working, you can start the development server with:
# Install dependencies
> pnpm install --lockfile
# Run MongoDB using Docker
> pnpm run up
# Start the frontend, backend, and python service
# Mac/Linux
> pnpm start
# Windows
> pnpm start:win
- Redux Dev Tools
- The front-end application state is wired up to the Redux Dev Tools chrome extension.
- NodeJS debugger
- The
start
script launchs the NodeJS API using the--inspect
flag - Go to the url
chrome://inspect
to use the debugger
- The
The project uses ESLint for linting, Prettier for enforcing code style and TypeScript to check for type errors. When opening a PR, please make sure you're not introducing any new errors in any of these checks by running:
# auto-fixes any style problems
$ pnpm run format:fix
# runs the TypeScript compiler so any type errors will be shown
$ pnpm run typecheck