Agnai: AI Agnostic, Self-hosted or Multi-tenant
AI Agnostic Chat
Based upon the early work of https://github.com/PygmalionAI/galatea-ui.
- Multiple AI adapters: Support for Kobold, Novel, AI Horde, Chai
- Group Conversations: Multiple users with one character/bot
- Multiple persona schema formats (W++, Square bracket format, Boostyle)
- Multi-tenancy:
- User authentication
- Individual user settings: Which adapter to use and their own adapter configuration
- Individual user generation settings (In progress)
- Chat overrides:
- Change the AI adapter for a specific chat
- Change the character for a specific chat
See the roadmap here.
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:
- Install Node.js
- Install MongoDB
- Clone the project:
git clone https://github.com/sceuick/agn-ai
or download it - From inside the project folder in your terminal/console:
npm install
npm build:all
npm start
- If you wish to run a public facing version:
npm run start:public
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
- Adapters: Transparently use a variety of AI models and services to converse with
- Initial adapters: Kobold, Kobold Horde, and Novel
- Implementing adapters should be low friction
- Lightweight to self-host
- Avoiding native dependencies and Docker to be easy for non-technical people to install and run
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
# Start the frontend, backend, and python service
> pnpm start
# Run MongoDB using Docker
> pnpm run up
# Start the public facing version:
> pnpm start:public
- 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