{"id":22281798,"url":"https://github.com/agnaistic/agnai","last_synced_at":"2025-05-14T13:06:24.111Z","repository":{"id":118483371,"uuid":"609727033","full_name":"agnaistic/agnai","owner":"agnaistic","description":"AI Agnostic (Multi-user and Multi-bot) Chat with Fictional Characters. Designed with scale in mind.","archived":false,"fork":false,"pushed_at":"2025-05-05T07:08:37.000Z","size":37067,"stargazers_count":594,"open_issues_count":104,"forks_count":107,"subscribers_count":17,"default_branch":"dev","last_synced_at":"2025-05-05T07:31:27.634Z","etag":null,"topics":["ai","chat","chatbot","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://agnai.chat","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agnaistic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"patreon":"Agnaistic"}},"created_at":"2023-03-05T03:26:17.000Z","updated_at":"2025-05-05T06:35:48.000Z","dependencies_parsed_at":"2024-02-04T12:41:48.461Z","dependency_job_id":"6cfd3a59-fb67-4fde-ae41-40a7cb540dc2","html_url":"https://github.com/agnaistic/agnai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnaistic%2Fagnai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnaistic%2Fagnai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnaistic%2Fagnai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agnaistic%2Fagnai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agnaistic","download_url":"https://codeload.github.com/agnaistic/agnai/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254149953,"owners_count":22022851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chat","chatbot","nodejs","typescript"],"created_at":"2024-12-03T16:22:12.651Z","updated_at":"2025-05-14T13:06:19.083Z","avatar_url":"https://github.com/agnaistic.png","language":"TypeScript","funding_links":["https://patreon.com/Agnaistic"],"categories":[],"sub_categories":[],"readme":"# Agnaistic\n\n\u003e AI Roleplay Chat with Personalized Characters using your favorite AI services.\n\n[Live Version](https://agnai.chat) | [Discord](https://discord.agnai.chat)\n\nVisit the live version at [Agnai.chat](https://agnai.chat).\n\nBased on the early work of [Galatea-UI by PygmalionAI](https://github.com/PygmalionAI/galatea-ui).\n\n---\n\n## Quick Start\n\n**Important!** _MongoDB and Redis are optional! Agnaistic will run in \"Guest Only\" mode if MongoDB is not available._\n\nAgnaistic is published as an NPM package and can be installed globally:\n\n```sh\n# Install or update:\nnpm install agnai -g\nagnai\n\n# View launch options:\nagnai help\n\n# Run with the Pipeline features\nagnai --pipeline\n\n\n```\n\nWhen using the NPM package, your images and JSON files will be stored in: `HOME_FOLDER/.agnai`.  \nExamples:\u003cbr\u003e\nLinux: `/home/sceuick/.agnai/`\u003cbr\u003e\nMac: `/Users/sceuick/.agnai`\u003cbr\u003e\nWindows: `C:\\Users\\sceuick\\.agnai`.\n\n## Features\n\n- **Group Conversations**: Multiple users with multiple bots\n- **Multiple AI services**: Support for Kobold, Novel, AI Horde, Goose, OpenAI, Claude, Replicate, OpenRouter, Mancer\n- Multiple persona schema formats: W++, Square bracket format (SBF), Boostyle, Plain text\n- Multi-tenancy:\n  - User authentication\n  - User settings: Which AI service to use and their own settings\n  - User generation presets\n- Subscriptions\n- Memory/Lore books\n- Generate characters with AI\n- Image generation using third-party services\n- **Optional pipeline features**\n  - Long-term memory\n  - Wikipedia Article and PDF embedding\n\n## Running Manually\n\n3. Install [Node.js](https://nodejs.org/en/download/)\n4. Install [MongoDB](https://www.mongodb.com/docs/manual/installation/) **Optional**\n   - The database is optional. Agnaistic will run in `anonymous-only` mode if there is no database available.\n   - `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.\n5. Download the project: `git clone https://github.com/agnaistic/agnai` or [download it](https://github.com/agnaistic/agnai/archive/refs/heads/dev.zip)\n6. From inside the cloned/unpacked folder in your terminal/console:\n   - `npm run deps`\n     - **Do this every time you update AgnAI, just in case.**\n     - This will install the dependencies using `pnpm v8`\n   - `npm run build:all`\n   - Build and run the project in watch mode:\n     - Mac/Linux: `npm run start`\n     - Windows: `npm run start:win`\n   - Build and run the project with Local Tunnel:\n     - Mac/Linux: `npm run start:public`\n     - Windows: `npm run start:public:win`\n\n## Running with Docker\n\n1. Clone the project\n2. With MongoDB: `docker compose -p agnai -f self-host.docker-compose.yml up -d`\n3. Without MongoDB: `docker run -dt --restart=always -p 3001:3001 ghcr.io/agnaistic/agnaistic:latest`\n   - `-dt` Run the container detached\n   - `--restart=always` Restart at start up or if the server crashes\n   - `-p 3001:3001` Expose port 3001. Access the app at `http://localhost:3001`\n\n## Self-Hosting Settings\n\nTo try and cater for the small tweaks and tuning that people need for their specific needs at an application level we have `settings.json`.  \nYou can create a file called `settings.json` at the root level to apply some changes across the entire application.  \nIf you have a specific need for your application, this is the place to ask to have it catered for.\n\nI will try and find a balance between catering to these requests and not having them get out of control in the codebase.\n\nExamples of requests that are suited for this:\n\n- I want a \"default memory book\" applied to all users.\n- I want to use a different set of end tokens than the ones provided.\n- I want to disable anonymous access\n\n### settings.json\n\nYou 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.\n\nCurrently supported custom settings:\n\n- `baseEndTokens`: Add extra response end tokens to the base set.\n\n## For Developers\n\n### Recommended Development Tooling\n\nI'd highly recommend using [VSCode](https://code.visualstudio.com/) with the following extensions:\n\n- `Prettier - Code formatter`: For auto-formatting\n- `Tailwind CSS Intellisense`: For auto-completion and intellisense with Tailwind CSS classes\n- And adding `\"editor.formatOnSave\": true` to your VSCode `settings.json` to auto-format with Prettier\n\nWhen using `pnpm start`, the Node.JS server is run using `--inspect`. This means you can use various [Inspector Clients](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients) for debugging.\n\n### Tech Stack\n\nThe important parts of the stack are:\n\n- [MongoDB](https://www.mongodb.com/docs/manual/installation/) for persistence\n- [Redis](https://redis.io) for distributed messaging for websockets.\n- [SolidJS](https://www.solidjs.com/) for interactivity\n- [TailwindCSS](https://tailwindcss.com/) for styling\n- [pnpm](https://pnpm.io/) for dependency management\n\n### Starting\n\n```bash\n# Install dependencies - Always run this after pulling changes\n\u003e npm run deps\n\n# Run MongoDB using Docker\n\u003e npm run up\n\n# Start the frontend, backend, and python service\n# Mac/Linux\n\u003e npm start\n\n# Windows\n\u003e npm run start:win\n\n# Install and run Pipeline API\n# If required, this will update the dependencies before running the API\n\u003e npm run model # Install poetry into a virtual environment\n\n# Run everything with a single command:\n\u003e npm run start:all # Linux and OSX\n\u003e npm run start:all:win # Windows\n```\n\nAt this point, you should be able to access http://localhost:3001 in your browser to see the UI.\n\nYou can also try to access the frontend with hot reloading at http://localhost:1234\n\n### Recommended Developer Tooling\n\n- Redux Dev Tools\n  - The front-end application state is wired up to the \"Redux Dev Tools\" Chrome extension.\n- NodeJS debugger\n  - The `pnpm start` script launches the NodeJS API using the `--inspect` flag\n  - Attach using the default launch task in VSCode (`F5`)\n  - Or go to the url `chrome://inspect` to use the debugger\n- Python dependency management using `Poetry` - https://python-poetry.org/docs/cli\n  - `.model/bin/poetry [...args]`\n\n### Format and Type Checking\n\nThe 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:\n\n```bash\n# auto-fixes any style problems\n$ pnpm run format:fix\n\n# runs the TypeScript compiler so any type errors will be shown\n$ pnpm run typecheck\n```\n\nThis project is tested with BrowserStack.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagnaistic%2Fagnai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagnaistic%2Fagnai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagnaistic%2Fagnai/lists"}