1.0.271 • Published 1 day ago

agnai v1.0.271

Weekly downloads
-
License
AGPL-3.0
Repository
-
Last release
1 day ago

Agnaistic

AI Roleplay Chat with Personalised Characters with your favorite AI services.

Live Version | Discord

You can visit the live version at Agnai.chat

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

Quick Start

Important! MongoDB and Redis are optional! Agnaistic will run in "Guest Only" mode if MongoDB is not available.

Agnaistic is published as an NPM package and can be installed globally:

# Install or update:
> npm install agnai -g
> agnai

# View launch options:
> agnai help

# Run with the Pipeline features
> agnai --pipeline

When using the NPM package, your images and JSON files will be stored in: HOME_FOLDER/.agnai.
E.g. Linux: /home/sceuick/.agnai/ Mac: /Users/sceuick/.agnai Windows: C:\Users\sceuick\.agnai.

Features

  • Group Conversations: Multiple users with multiple bots
  • Multiple AI services: Support for Kobold, Novel, AI Horde, Goose, OpenAI, Claude, Replicate, OpenRouter, Mancer
  • Multiple persona schema formats: W++, Square bracket format (SBF), Boostyle, Plain text
  • Multi-tenancy:
    • User authentication
    • User settings: Which AI service to use and their own settings
    • User generation presets
  • Subscriptions
  • Memory/Lore books
  • Generate characters with AI
  • Image generation using third-party services
  • Optional pipeline features
    • Long-term memory
    • Wikipedia Article and PDF embedding

Running Manually

  1. Install Node.js
  2. Install MongoDB Optional
    • The database is optional. Agnaistic will run in anonymous-only mode if there is no database available.
    • Anonymous users have their data saved to the browser's local storage. Your data will "persist", but not be shareable between devices or other browsers. Clearing your browser's application data/cookies will delete this data.
  3. Download the project: git clone https://github.com/agnaistic/agnai or download it
  4. From inside the cloned/unpacked folder in your terminal/console:
    • npm run deps
      • Do this every time you update AgnAI, just in case.
      • This will install the dependencies using pnpm v8
    • npm run build:all
    • Build and run the project in watch mode:
      • Mac/Linux: npm run start
      • Windows: npm run start:win
    • Build and run the project with Local Tunnel:
      • Mac/Linux: npm run start:public
      • Windows: npm run start:public:win

Running with Docker

  1. Clone the project
  2. With MongoDB: docker compose -p agnai -f self-host.docker-compose.yml up -d
  3. Without MongoDB: docker run -dt --restart=always -p 3001:3001 ghcr.io/agnaistic/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 at http://localhost:3001

Self-Hosting Settings

To try and cater for the small tweaks and tuning that people need for their specific needs at an application level we have settings.json.
You can create a file called settings.json at the root level to apply some changes across the entire application.
If you have a specific need for your application, this is the place to ask to have it catered for.

I will try and find a balance between catering to these requests and not having them get out of control in the codebase.

Examples of requests that are suited for this:

  • I want a "default memory book" applied to all users.
  • I want to use a different set of end tokens than the ones provided.
  • I want to disable anonymous access

settings.json

You can copy or look at template.settings.json for an example of all of the available settings. You will need to restart Agnai for changes to take effect.

Currently supported custom settings:

  • baseEndTokens: Add extra response end tokens to the base set.

For Developers

Recommended Development Tooling

I'd highly recommend using VSCode with the following extensions:

  • Prettier - Code formatter: For auto-formatting
  • Tailwind CSS Intellisense: For auto-completion and intellisense with Tailwind CSS classes
  • And adding "editor.formatOnSave": true to your VSCode settings.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.

Tech Stack

The important parts of the stack are:

Starting

# Install dependencies - Always run this after pulling changes
> npm run deps

# Run MongoDB using Docker
> npm run up

# Start the frontend, backend, and python service
# Mac/Linux
> npm start

# Windows
> npm run start:win

# Install and run Pipeline API
# If required, this will update the dependencies before running the API
> npm run model # Install poetry into a virtual environment

# Run everything with a single commmand:
> npm run start:all # Linux and OSX
> npm run start:all:win # Windows

At this point, you should be able to access http://localhost:3001 in your browser to see the UI.

You can also try to access the frontend with hot reloading at http://localhost:1234

Recommended Developer Tooling

  • Redux Dev Tools
    • The front-end application state is wired up to the "Redux Dev Tools" Chrome extension.
  • NodeJS debugger
    • The pnpm start script launchs the NodeJS API using the --inspect flag
    • Attach using the default launch task in VSCode (F5)
    • Or go to the url chrome://inspect to use the debugger
  • Python dependency management using Poetry - https://python-poetry.org/docs/cli
    • .model/bin/poetry [...args]

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
1.0.271

1 day ago

1.0.270

4 days ago

1.0.269

6 days ago

1.0.268

10 days ago

1.0.266

12 days ago

1.0.267

12 days ago

1.0.265

13 days ago

1.0.264

14 days ago

1.0.263

14 days ago

1.0.260

15 days ago

1.0.262

14 days ago

1.0.261

14 days ago

1.0.259

15 days ago

1.0.258

20 days ago

1.0.257

25 days ago

1.0.256

26 days ago

1.0.255

1 month ago

1.0.254

1 month ago

1.0.253

1 month ago

1.0.252

1 month ago

1.0.251

2 months ago

1.0.250

2 months ago

1.0.249

2 months ago

1.0.246

2 months ago

1.0.248

2 months ago

1.0.247

2 months ago

1.0.245

2 months ago

1.0.244

2 months ago

1.0.243

2 months ago

1.0.242

2 months ago

1.0.241

2 months ago

1.0.240

3 months ago

1.0.239

3 months ago

1.0.238

3 months ago

1.0.237

3 months ago

1.0.236

4 months ago

1.0.235

4 months ago

1.0.234

4 months ago

1.0.233

4 months ago

1.0.228

4 months ago

1.0.229

4 months ago

1.0.231

4 months ago

1.0.230

4 months ago

1.0.232

4 months ago

1.0.227

5 months ago

1.0.226

5 months ago

1.0.222

5 months ago

1.0.224

5 months ago

1.0.223

5 months ago

1.0.225

5 months ago

1.0.221

5 months ago

1.0.220

5 months ago

1.0.200

6 months ago

1.0.206

6 months ago

1.0.205

6 months ago

1.0.208

6 months ago

1.0.207

6 months ago

1.0.202

6 months ago

1.0.201

6 months ago

1.0.204

6 months ago

1.0.203

6 months ago

1.0.187

7 months ago

1.0.186

7 months ago

1.0.189

7 months ago

1.0.188

7 months ago

1.0.183

7 months ago

1.0.182

7 months ago

1.0.185

7 months ago

1.0.184

7 months ago

1.0.181

7 months ago

1.0.180

7 months ago

1.0.176

7 months ago

1.0.175

7 months ago

1.0.178

7 months ago

1.0.177

7 months ago

1.0.172

8 months ago

1.0.171

8 months ago

1.0.174

7 months ago

1.0.173

8 months ago

1.0.179

7 months ago

1.0.170

8 months ago

1.0.80

10 months ago

1.0.84

10 months ago

1.0.83

10 months ago

1.0.82

10 months ago

1.0.81

10 months ago

1.0.88

10 months ago

1.0.87

10 months ago

1.0.86

10 months ago

1.0.85

10 months ago

1.0.89

10 months ago

1.0.198

6 months ago

1.0.197

6 months ago

1.0.199

6 months ago

1.0.194

6 months ago

1.0.193

6 months ago

1.0.196

6 months ago

1.0.195

6 months ago

1.0.91

10 months ago

1.0.90

10 months ago

1.0.95

10 months ago

1.0.94

10 months ago

1.0.93

10 months ago

1.0.92

10 months ago

1.0.190

7 months ago

1.0.99

10 months ago

1.0.98

10 months ago

1.0.192

6 months ago

1.0.97

10 months ago

1.0.191

7 months ago

1.0.96

10 months ago

1.0.143

9 months ago

1.0.142

9 months ago

1.0.145

9 months ago

1.0.144

9 months ago

1.0.141

9 months ago

1.0.140

9 months ago

1.0.147

8 months ago

1.0.146

9 months ago

1.0.149

8 months ago

1.0.148

8 months ago

1.0.66

10 months ago

1.0.69

10 months ago

1.0.68

10 months ago

1.0.67

10 months ago

1.0.132

9 months ago

1.0.131

9 months ago

1.0.134

9 months ago

1.0.133

9 months ago

1.0.130

9 months ago

1.0.139

9 months ago

1.0.136

9 months ago

1.0.135

9 months ago

1.0.138

9 months ago

1.0.137

9 months ago

1.0.73

10 months ago

1.0.72

10 months ago

1.0.71

10 months ago

1.0.70

10 months ago

1.0.77

10 months ago

1.0.76

10 months ago

1.0.75

10 months ago

1.0.74

10 months ago

1.0.79

10 months ago

1.0.78

10 months ago

1.0.165

8 months ago

1.0.164

8 months ago

1.0.167

8 months ago

1.0.166

8 months ago

1.0.161

8 months ago

1.0.160

8 months ago

1.0.163

8 months ago

1.0.162

8 months ago

1.0.169

8 months ago

1.0.168

8 months ago

1.0.154

8 months ago

1.0.153

8 months ago

1.0.156

8 months ago

1.0.155

8 months ago

1.0.150

8 months ago

1.0.152

8 months ago

1.0.151

8 months ago

1.0.158

8 months ago

1.0.157

8 months ago

1.0.159

8 months ago

1.0.101

10 months ago

1.0.100

10 months ago

1.0.107

10 months ago

1.0.106

10 months ago

1.0.109

10 months ago

1.0.108

10 months ago

1.0.103

10 months ago

1.0.102

10 months ago

1.0.105

10 months ago

1.0.104

10 months ago

1.0.211

6 months ago

1.0.210

6 months ago

1.0.217

5 months ago

1.0.216

5 months ago

1.0.219

5 months ago

1.0.218

5 months ago

1.0.213

5 months ago

1.0.212

5 months ago

1.0.215

5 months ago

1.0.214

5 months ago

1.0.209

6 months ago

1.0.121

9 months ago

1.0.120

9 months ago

1.0.123

9 months ago

1.0.122

9 months ago

1.0.129

9 months ago

1.0.128

9 months ago

1.0.125

9 months ago

1.0.124

9 months ago

1.0.127

9 months ago

1.0.126

9 months ago

1.0.110

10 months ago

1.0.112

10 months ago

1.0.111

10 months ago

1.0.118

9 months ago

1.0.117

9 months ago

1.0.119

9 months ago

1.0.114

10 months ago

1.0.113

10 months ago

1.0.116

10 months ago

1.0.115

10 months ago

1.0.62

10 months ago

1.0.61

10 months ago

1.0.60

10 months ago

1.0.65

10 months ago

1.0.64

10 months ago

1.0.63

10 months ago

1.0.40

10 months ago

1.0.44

10 months ago

1.0.43

10 months ago

1.0.42

10 months ago

1.0.41

10 months ago

1.0.48

10 months ago

1.0.47

10 months ago

1.0.46

10 months ago

1.0.45

10 months ago

1.0.49

10 months ago

1.0.51

10 months ago

1.0.50

10 months ago

1.0.55

10 months ago

1.0.54

10 months ago

1.0.53

10 months ago

1.0.52

10 months ago

1.0.59

10 months ago

1.0.58

10 months ago

1.0.57

10 months ago

1.0.56

10 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.0

11 months ago

1.0.16

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.3

11 months ago

1.0.22

11 months ago

1.0.21

11 months ago

1.0.20

11 months ago

1.0.26

10 months ago

1.0.25

11 months ago

1.0.24

11 months ago

1.0.23

11 months ago

1.0.29

10 months ago

1.0.28

10 months ago

1.0.27

10 months ago

1.0.33

10 months ago

1.0.32

10 months ago

1.0.31

10 months ago

1.0.30

10 months ago

1.0.37

10 months ago

1.0.36

10 months ago

1.0.35

10 months ago

1.0.34

10 months ago

1.0.39

10 months ago

1.0.38

10 months ago

0.1.0-alpha-20

12 months ago

0.1.0-alpha-21

12 months ago

0.1.0-alpha-24

12 months ago

0.1.0-alpha-26

12 months ago

0.1.0-alpha-25

12 months ago

0.1.0-alpha-28

11 months ago

0.1.0-alpha-27

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

0.1.0-alpha-17

1 year ago

0.1.0-alpha-19

1 year ago

0.1.0-alpha-18

1 year ago

0.1.0-alpha-16

1 year ago

0.1.0-alpha-15

1 year ago

0.1.0-alpha-14

1 year ago

0.1.0-alpha-12

1 year ago

0.1.0-alpha-11

1 year ago

0.1.0-alpha-10

1 year ago

0.1.0-alpha-9

1 year ago

0.1.0-alpha-8

1 year ago

0.1.0-alpha-7

1 year ago

0.1.0-alpha-6

1 year ago