/agn-ai

AI Agnostic Chat

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

AgnAIstic

Agnai: AI Agnostic, Self-hosted or Multi-tenant

AI Agnostic Chat

Based upon the early work of https://github.com/PygmalionAI/galatea-ui.

Features

  • 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

Roadmap

See the roadmap here.

Quick Start for Users

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:

  1. Install Node.js
  2. Install MongoDB
  3. Clone the project: git clone https://github.com/sceuick/agn-ai or download it
  4. From inside the project folder in your terminal/console:
    • npm install
    • npm build:all
    • npm start
  5. If you wish to run a public facing version:
    • npm run start:public

Design Goals

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

For Developers

Tech Stack

The important parts of the stack are:

Quick Start

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

Developer Tooling

  • 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

Format and Type Checking

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