From 19b4c683bc331cdc4a0d5f1b77263fa05060d56c Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Sat, 7 Mar 2026 15:59:06 +0500 Subject: [PATCH 1/9] Add Oracle database connector with node-oracledb thin mode --- README.md | 2 + extras/build.txt | 21 ++ extras/oracle-support.md | 260 ++++++++++++++++++ frontend/src/models/system.js | 4 +- .../SQLConnectorSelection/DBConnection.jsx | 3 + .../SQLConnectionModal.jsx | 7 + .../SQLConnectorSelection/icons/oracle.png | Bin 0 -> 1148 bytes server/package.json | 1 + .../plugins/sql-agent/SQLConnectors/Oracle.js | 105 +++++++ .../plugins/sql-agent/SQLConnectors/index.js | 9 +- 10 files changed, 407 insertions(+), 5 deletions(-) create mode 100644 extras/build.txt create mode 100644 extras/oracle-support.md create mode 100644 frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png create mode 100644 server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js diff --git a/README.md b/README.md index 42c7db916d9..a694f2ab87d 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,8 @@ _These are apps that are not maintained by Mintplex Labs, but are compatible wit - [Midori AI Subsystem Manager](https://io.midori-ai.xyz/subsystem/anythingllm/) - A streamlined and efficient way to deploy AI systems using Docker container technology. - [Coolify](https://coolify.io/docs/services/anythingllm/) - Deploy AnythingLLM with a single click. - [GPTLocalhost for Microsoft Word](https://gptlocalhost.com/demo/) - A local Word Add-in for you to use AnythingLLM in Microsoft Word. +## ✨ Added Features +- **Oracle Database support** for the SQL Agent. See [Oracle Integration](extras/oracle-support.md) for details. ## Telemetry & Privacy diff --git a/extras/build.txt b/extras/build.txt new file mode 100644 index 00000000000..3f050afbd1d --- /dev/null +++ b/extras/build.txt @@ -0,0 +1,21 @@ +docker build -t anythingllm:orathin -f docker/Dockerfile . + +# 1️⃣ Set the storage location to E:\anythingllm +$env:STORAGE_LOCATION="E:\anythingllm" + +# 2️⃣ Create the directory if it doesn't exist +If (!(Test-Path $env:STORAGE_LOCATION)) { + New-Item $env:STORAGE_LOCATION -ItemType Directory +} + +# 3️⃣ Create the .env file if missing +If (!(Test-Path "$env:STORAGE_LOCATION\.env")) { + New-Item "$env:STORAGE_LOCATION\.env" -ItemType File +} + +docker run -d --name anythingllm -p 3001:3001 --network ai_net --cap-add SYS_ADMIN -v "$($env:STORAGE_LOCATION):/app/server/storage" -v "$($env:STORAGE_LOCATION)\.env:/app/server/.env" -e STORAGE_DIR="/app/server/storage" anythingllm:oracle + + +docker run -d --name chromadb -p 8000:8000 --network anythingllm-net -v "$($env:STORAGE_LOCATION):/chroma/chroma" chromadb/chroma + +docker load -i image_filename.tar diff --git a/extras/oracle-support.md b/extras/oracle-support.md new file mode 100644 index 00000000000..ae784fcc864 --- /dev/null +++ b/extras/oracle-support.md @@ -0,0 +1,260 @@ +# Oracle Database Support Integration -- AnythingLLM (Docker + +## Overview + +This document summarizes the complete implementation required to add +\*\*Oracle Database support\*\* to AnythingLLM's SQL Agent using the +existing class-based connector architecture located at: +server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/ +The implementation follows the same design pattern used by: + +- MySQLConnector +- PostgresSQLConnector +- MSSQLConnector + \ + Oracle is integrated as a first-class SQL engine without modifying the + core SQL Agent logic.\ + \ + \-\--\ + \ + +## Objective + +\ +Enable SQL Agent support for the following connection format: +oracle://username:password@host:1521/SERVICENAME +Using: + +- \`oracledb\` (Thin mode) +- Class-based connector pattern +- Existing \`ConnectionStringParser +- Existing validation and execution flow + +## 1. Frontend Modifications + +### 1.1 Add Oracle to Engine Enum + +\*\*File:\*\* +frontend/src/models/system.js +Update engine type:\ +\`\`\`js\ +(\'postgresql\'\|\'mysql\'\|\'sql-server\') +To: +(\'postgresql\'\|\'mysql\'\|\'sql-server\'\|\'oracle\') + +**1.2 Add Oracle to SQL Engine Selector UI** + +**Files Modified:** + +- frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx +- frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx + Add: + \ + Also include Oracle icon: + frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png + **1.3 Update Connection String Builder** + Ensure the generated format is: + oracle://user:password@host:1521/SERVICENAME + Where: +- SERVICENAME = Oracle Service Name +- Do not use SID unless custom connectString handling is implemented + +## 2. Backend Integration + +**2.1 Update SQL Engine Typedef** +**File:** +server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js +Update: +\@typedef {(\'postgresql\'\|\'mysql\'\|\'sql-server\')} SQLEngine + +To: +\@typedef {(\'postgresql\'\|\'mysql\'\|\'sql-server\'\|\'oracle\')} +SQLEngine + +**2.2 Create Oracle Connector** +**File Created:** +server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js +**Required Class Structure** +class OracleConnector {\ +constructor({ connectionString })\ +async runQuery(queryString)\ +async validateConnection()\ +getTablesSql()\ +getTableSchemaSql(table_name)\ +} +The class must follow the same structural contract as: + +- MySQLConnector +- PostgresSQLConnector +- MSSQLConnector + +**2.3 Use ConnectionStringParser** +const parser = new ConnectionStringParser({ scheme: \"oracle\" }); +Important:\ +The scheme must match the frontend engine name exactly. + +**2.4 Validation Query** +Oracle requires: +SELECT 1 FROM DUAL; +Not: +SELECT 1; + +**2.5 Table Metadata Queries** +**List Tables** + +SELECT table_name FROM user_tables; +**Get Table Schema** + +SELECT column_name, data_type\ +FROM user_tab_columns\ +WHERE table_name = UPPER(\'TABLE_NAME\'); + +**2.6 Register Oracle Connector** + +**File:** +server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js +Inside getDBClient(): +case \"oracle\":\ +const { OracleConnector } = require(\"./Oracle\");\ +return new OracleConnector(connectionConfig); + +**3. Install Oracle Driver** +Inside: +server/ +Install: +npm install oracledb +Or add to server/package.json: +\"oracledb\": \"\^6.0.0\" + +**4. Docker Considerations** +Running inside Docker requires **no Oracle Instant Client**. +Not required: + +- Oracle Instant Client +- Native libraries +- LD_LIBRARY_PATH +- initOracleClient() + +Reason: + +- oracledb defaults to Thin mode +- Thin mode uses pure TCP +- Compatible with Node Alpine images + Rebuild image: + docker build -t anythingllm-custom . + Modified Docker file: + docker/dockerfile + +**5. Execution Flow After Integration** +**Connection Validation** +Frontend\ +↓\ +POST /system/validate-sql-connection\ +↓\ +validateConnection()\ +↓\ +getDBClient(\"oracle\")\ +↓\ +new OracleConnector()\ +↓\ +validateConnection() + +**Agent Query Execution** +Agent\ +↓\ +getDBClient()\ +↓\ +connector.runQuery() + +No core SQL Agent logic modifications are required. + +**6. Oracle vs MySQL Differences** + +--- + +**MySQL** **Oracle** + +--- + +SELECT 1 SELECT 1 FROM DUAL + +information_schema user_tables + +SHOW COLUMNS user_tab_columns + +.end() .close() + +? binds :1 binds + +Database name Service name + +--- + +All database-specific behavior is encapsulated inside OracleConnector. + +**7. Architectural Outcome** + +After implementation: + +- Oracle becomes a first-class SQL engine +- Polymorphism is preserved +- SQL Agent remains database-agnostic +- No conditional hacks in core logic +- Fully aligned with project design + +**8. Maintenance Note** + +This implementation creates a custom fork. + +Future upstream updates may require manual merging of: + +- SQLConnectors/index.js + +- SQLConnectors/ + +- Frontend engine enum changes + +**9. Complete File Changes** + +**Frontend** + +1. frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png + +2. frontend/src/models/system.js + +3. frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx + +4. frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx + +**Backend** + +5. server/utils/agents/aibitat/plugins/sql-agent/SQLConnector/utils.js + +6. server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js + +7. server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js + +8. server/package.json +9. build.txt (Build Guide) +10. oracle-support.md (Support Document) + +**Docker** + +9. docker/dockerfile + +**Final Minimal Checklist** + +1. Add Oracle to frontend engine list + +2. Create OracleConnector class + +3. Register in getDBClient() + +4. Install oracledb + +5. Rebuild Docker image + +6. Test with SELECT 1 FROM DUAL + +Oracle support is now fully integrated using the native connector +architecture with no impact on existing SQL engines. diff --git a/frontend/src/models/system.js b/frontend/src/models/system.js index 28783744b6d..266ad4d505b 100644 --- a/frontend/src/models/system.js +++ b/frontend/src/models/system.js @@ -33,7 +33,7 @@ const System = { .catch(() => 0); }, - /** + /*** * Checks if the onboarding is complete. * @returns {Promise} */ @@ -849,7 +849,7 @@ const System = { /** * Validates a SQL connection string. - * @param {'postgresql'|'mysql'|'sql-server'} engine - the database engine identifier + * @param {'postgresql'|'mysql'|'sql-server'|'oracle'} engine - the database engine identifier * @param {string} connectionString - the connection string to validate * @returns {Promise<{success: boolean, error: string | null}>} */ diff --git a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx index 59842082477..c2c8a363b9a 100644 --- a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx +++ b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx @@ -1,6 +1,8 @@ import PostgreSQLLogo from "./icons/postgresql.png"; import MySQLLogo from "./icons/mysql.png"; import MSSQLLogo from "./icons/mssql.png"; +import OracleLogo from "./icons/oracle.png"; + import { PencilSimple, X } from "@phosphor-icons/react"; import { useModal } from "@/hooks/useModal"; import EditSQLConnection from "./SQLConnectionModal"; @@ -9,6 +11,7 @@ export const DB_LOGOS = { postgresql: PostgreSQLLogo, mysql: MySQLLogo, "sql-server": MSSQLLogo, + oracle: OracleLogo, }; export default function DBConnection({ diff --git a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx index d038543ce69..001a9017330 100644 --- a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx +++ b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx @@ -52,6 +52,8 @@ function assembleConnectionString({ return `mysql://${username}:${password}@${host}:${port}/${database}`; case "sql-server": return `mssql://${username}:${password}@${host}:${port}/${database}?encrypt=${encrypt}`; + case "oracle": + return `oracle://${username}:${password}@${host}:${port}/${database}`; default: return null; } @@ -316,6 +318,11 @@ export default function SQLConnectionModal({ active={engine === "sql-server"} onClick={() => setEngine("sql-server")} /> + setEngine("oracle")} + /> diff --git a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png new file mode 100644 index 0000000000000000000000000000000000000000..2d381cd81be9d66e5b101a6896245d259fb58171 GIT binary patch literal 1148 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|Sem zr;B4q#hkY{Zg$Irim*T6lA7*$-ZHqS-VPfH@g|K9u3ry6DJW@i{Nn#1A`lWF zSW_V3^5LK?tDvj=oe4IY$0XvXOi++$?dW1_?(Df-n}0OWBu{twuWw6&F5eB_E`0F7 z`{t&`b-U+OzYCkJ0(1yIaC~Xmw28{KH#Wa3)Y)HsE$?sPn)>QXf9HMO`YomG=YlG> zsnH)N{JWsIcd_UGy1cdLWnb$Z-<7O*K6>@uc!AV;rS~@0yp8xDu~xtD%iLONvpG@k z>z{mR-Sktr;=o zH6=ef1K*cj`oiR$=kkC4YqgV{&A;TWf8+(_m#k@*I`03eBJ#uWnKMiKo~{;naC~l9 zU8=dKpVSo(AXyT8S-g6hdD6bnNjQR zo-(tV)*5&7&9oT|Hs|MvvaPcHWm~(oCf{rQwwt+}A5`Q^C#U%SjdlMOu%h_71+)C+ z|BR{6oOdo?EWL&Ad()KJ$*0AZY`>mfX=ruOY;j5T(s${HKkY4covX6@?e?b4 z*~yPBUa?H5$xFSp_RXIkY@XBB6kOS~GS72Od(KZ&-UDp+C+2Z8|9rOLyUc0nzc=G; zC+KFD2}X#_T=ONlH@CBF-Hk92>EnhT2i7OgnZMWhhlcQmYk5+Kg&t_!&)Hn@!PjFN z*F3xG4+>9a=NPQs{QpCKQG7&c|KEP058iJc=*u7KD^0JJ&p)+pQsVu)Ryqvks^(uO z%iP;4x_Ry7W#WAN9^0>^*TU&Q+?d=Mu*7f&3mQY!6=ii$-Qi~mT zs+;^u{c5*IYB#Utw4=X%8fq|{uk!p+x8cnGgl3C1_nMw;diCb}n)3b~r}pi?BY%nA z`R{zb-ADhHw{JM}HMu*l;QyO9ExdIWBKtq+T<6)%dvmU346pp#`Zbo5rq5zYxPJbh z&&M_Mb-L!5t>8WWDX#XL^(nc6HS4~$SeMsDKb86w>v6{KcYut#;A549M5Xxm5!Pmf zr}__=*eb8O*z~Db=CpZWb;QjXHks^&ml;kuaxuS&zopr E0Q3+QR{#J2 literal 0 HcmV?d00001 diff --git a/server/package.json b/server/package.json index 53235acf081..ea5d95447df 100644 --- a/server/package.json +++ b/server/package.json @@ -70,6 +70,7 @@ "mysql2": "^3.9.8", "ollama": "^0.6.3", "openai": "4.95.1", + "oracledb": "^6.10.0", "pg": "^8.11.5", "pinecone-client": "^1.1.0", "pluralize": "^8.0.0", diff --git a/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js new file mode 100644 index 00000000000..e741d6fdb0a --- /dev/null +++ b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js @@ -0,0 +1,105 @@ +const oracledb = require("oracledb"); + +const { ConnectionStringParser } = require("./utils"); + +// -- oracledb.initOracleClient({libDir: "/opt/oracle/instantclient_23_26",}); +// Thin mode: DO NOT call initOracleClient() + +console.log("Oracle driver thin mode:", oracledb.thin); + +oracledb.outFormat = oracledb.OUT_FORMAT_OBJECT; + +class OracleConnector { + #connected = false; + database_id = ""; + + constructor( + config = { + connectionString: null, + } + ) { + this.className = "OracleConnector"; + this.connectionString = config.connectionString; + this._client = null; + this.database_id = this.#parseDatabase(); + } + + #parseDatabase() { + const connectionParser = new ConnectionStringParser({ scheme: "oracle" }); + const parsed = connectionParser.parse(this.connectionString); + return parsed?.endpoint; // service name + } + + async connect() { + const connectionParser = new ConnectionStringParser({ scheme: "oracle" }); + const parsed = connectionParser.parse(this.connectionString); + + const host = parsed.hosts[0]?.host; + const port = parsed.hosts[0]?.port || 1521; + const service = parsed.endpoint; + + this._client = await oracledb.getConnection({ + user: parsed.username, + password: parsed.password, + connectString: `${host}:${port}/${service}`, + }); + + this.#connected = true; + return this._client; + } + + /** + * @param {string} queryString + * @returns {Promise} + */ + async runQuery(queryString = "") { + const result = { rows: [], count: 0, error: null }; + + try { + if (!this.#connected) await this.connect(); + + const query = await this._client.execute(queryString, [], { + autoCommit: true, + }); + + result.rows = query.rows || []; + result.count = query.rows ? query.rows.length : 0; + } catch (err) { + console.log(this.className, err); + result.error = err.message; + } finally { + if (this._client) { + await this._client.close(); + this.#connected = false; + } + } + + return result; + } + + async validateConnection() { + try { + const result = await this.runQuery("SELECT 1 FROM DUAL"); + return { success: !result.error, error: result.error }; + } catch (error) { + return { success: false, error: error.message }; + } + } + + getTablesSql() { + return ` + SELECT table_name + FROM user_tables + `; + } + + getTableSchemaSql(table_name) { + return ` + SELECT column_name, data_type + FROM user_tab_columns + WHERE table_name = UPPER('${table_name}') + `; + } +} + +module.exports.OracleConnector = OracleConnector; diff --git a/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js index 252ce54167f..a8fb712134e 100644 --- a/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js +++ b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js @@ -2,7 +2,7 @@ const { SystemSettings } = require("../../../../../../models/systemSettings"); const { safeJsonParse } = require("../../../../../http"); /** - * @typedef {('postgresql'|'mysql'|'sql-server')} SQLEngine + * @typedef {('postgresql'|'mysql'|'sql-server'|'oracle')} SQLEngine */ /** @@ -36,6 +36,9 @@ function getDBClient(identifier = "", connectionConfig = {}) { case "sql-server": const { MSSQLConnector } = require("./MSSQL"); return new MSSQLConnector(connectionConfig); + case "oracle": + const { OracleConnector } = require("./Oracle"); + return new OracleConnector(connectionConfig); default: throw new Error( `There is no supported database connector for ${identifier}` @@ -64,8 +67,8 @@ async function validateConnection(identifier = "", connectionConfig = {}) { try { const client = getDBClient(identifier, connectionConfig); return await client.validateConnection(); - } catch { - console.log(`Failed to connect to ${identifier} database.`); + } catch (error) { + console.log(`Failed to connect to ${identifier} database.`, error); return { success: false, error: `Unable to connect to ${identifier}. Please verify your connection details.`, From 7a067ea63f9007d7a3f6687a92f046baa71c1a38 Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 20:17:32 +0500 Subject: [PATCH 2/9] Delete extras/build.txt --- extras/build.txt | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 extras/build.txt diff --git a/extras/build.txt b/extras/build.txt deleted file mode 100644 index 3f050afbd1d..00000000000 --- a/extras/build.txt +++ /dev/null @@ -1,21 +0,0 @@ -docker build -t anythingllm:orathin -f docker/Dockerfile . - -# 1️⃣ Set the storage location to E:\anythingllm -$env:STORAGE_LOCATION="E:\anythingllm" - -# 2️⃣ Create the directory if it doesn't exist -If (!(Test-Path $env:STORAGE_LOCATION)) { - New-Item $env:STORAGE_LOCATION -ItemType Directory -} - -# 3️⃣ Create the .env file if missing -If (!(Test-Path "$env:STORAGE_LOCATION\.env")) { - New-Item "$env:STORAGE_LOCATION\.env" -ItemType File -} - -docker run -d --name anythingllm -p 3001:3001 --network ai_net --cap-add SYS_ADMIN -v "$($env:STORAGE_LOCATION):/app/server/storage" -v "$($env:STORAGE_LOCATION)\.env:/app/server/.env" -e STORAGE_DIR="/app/server/storage" anythingllm:oracle - - -docker run -d --name chromadb -p 8000:8000 --network anythingllm-net -v "$($env:STORAGE_LOCATION):/chroma/chroma" chromadb/chroma - -docker load -i image_filename.tar From cc72fe31e17a9522c5f2713e99107d2489760624 Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 20:18:39 +0500 Subject: [PATCH 3/9] Delete extras/oracle-support.md --- extras/oracle-support.md | 260 --------------------------------------- 1 file changed, 260 deletions(-) delete mode 100644 extras/oracle-support.md diff --git a/extras/oracle-support.md b/extras/oracle-support.md deleted file mode 100644 index ae784fcc864..00000000000 --- a/extras/oracle-support.md +++ /dev/null @@ -1,260 +0,0 @@ -# Oracle Database Support Integration -- AnythingLLM (Docker - -## Overview - -This document summarizes the complete implementation required to add -\*\*Oracle Database support\*\* to AnythingLLM's SQL Agent using the -existing class-based connector architecture located at: -server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/ -The implementation follows the same design pattern used by: - -- MySQLConnector -- PostgresSQLConnector -- MSSQLConnector - \ - Oracle is integrated as a first-class SQL engine without modifying the - core SQL Agent logic.\ - \ - \-\--\ - \ - -## Objective - -\ -Enable SQL Agent support for the following connection format: -oracle://username:password@host:1521/SERVICENAME -Using: - -- \`oracledb\` (Thin mode) -- Class-based connector pattern -- Existing \`ConnectionStringParser -- Existing validation and execution flow - -## 1. Frontend Modifications - -### 1.1 Add Oracle to Engine Enum - -\*\*File:\*\* -frontend/src/models/system.js -Update engine type:\ -\`\`\`js\ -(\'postgresql\'\|\'mysql\'\|\'sql-server\') -To: -(\'postgresql\'\|\'mysql\'\|\'sql-server\'\|\'oracle\') - -**1.2 Add Oracle to SQL Engine Selector UI** - -**Files Modified:** - -- frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx -- frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx - Add: - \ - Also include Oracle icon: - frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png - **1.3 Update Connection String Builder** - Ensure the generated format is: - oracle://user:password@host:1521/SERVICENAME - Where: -- SERVICENAME = Oracle Service Name -- Do not use SID unless custom connectString handling is implemented - -## 2. Backend Integration - -**2.1 Update SQL Engine Typedef** -**File:** -server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js -Update: -\@typedef {(\'postgresql\'\|\'mysql\'\|\'sql-server\')} SQLEngine - -To: -\@typedef {(\'postgresql\'\|\'mysql\'\|\'sql-server\'\|\'oracle\')} -SQLEngine - -**2.2 Create Oracle Connector** -**File Created:** -server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js -**Required Class Structure** -class OracleConnector {\ -constructor({ connectionString })\ -async runQuery(queryString)\ -async validateConnection()\ -getTablesSql()\ -getTableSchemaSql(table_name)\ -} -The class must follow the same structural contract as: - -- MySQLConnector -- PostgresSQLConnector -- MSSQLConnector - -**2.3 Use ConnectionStringParser** -const parser = new ConnectionStringParser({ scheme: \"oracle\" }); -Important:\ -The scheme must match the frontend engine name exactly. - -**2.4 Validation Query** -Oracle requires: -SELECT 1 FROM DUAL; -Not: -SELECT 1; - -**2.5 Table Metadata Queries** -**List Tables** - -SELECT table_name FROM user_tables; -**Get Table Schema** - -SELECT column_name, data_type\ -FROM user_tab_columns\ -WHERE table_name = UPPER(\'TABLE_NAME\'); - -**2.6 Register Oracle Connector** - -**File:** -server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js -Inside getDBClient(): -case \"oracle\":\ -const { OracleConnector } = require(\"./Oracle\");\ -return new OracleConnector(connectionConfig); - -**3. Install Oracle Driver** -Inside: -server/ -Install: -npm install oracledb -Or add to server/package.json: -\"oracledb\": \"\^6.0.0\" - -**4. Docker Considerations** -Running inside Docker requires **no Oracle Instant Client**. -Not required: - -- Oracle Instant Client -- Native libraries -- LD_LIBRARY_PATH -- initOracleClient() - -Reason: - -- oracledb defaults to Thin mode -- Thin mode uses pure TCP -- Compatible with Node Alpine images - Rebuild image: - docker build -t anythingllm-custom . - Modified Docker file: - docker/dockerfile - -**5. Execution Flow After Integration** -**Connection Validation** -Frontend\ -↓\ -POST /system/validate-sql-connection\ -↓\ -validateConnection()\ -↓\ -getDBClient(\"oracle\")\ -↓\ -new OracleConnector()\ -↓\ -validateConnection() - -**Agent Query Execution** -Agent\ -↓\ -getDBClient()\ -↓\ -connector.runQuery() - -No core SQL Agent logic modifications are required. - -**6. Oracle vs MySQL Differences** - ---- - -**MySQL** **Oracle** - ---- - -SELECT 1 SELECT 1 FROM DUAL - -information_schema user_tables - -SHOW COLUMNS user_tab_columns - -.end() .close() - -? binds :1 binds - -Database name Service name - ---- - -All database-specific behavior is encapsulated inside OracleConnector. - -**7. Architectural Outcome** - -After implementation: - -- Oracle becomes a first-class SQL engine -- Polymorphism is preserved -- SQL Agent remains database-agnostic -- No conditional hacks in core logic -- Fully aligned with project design - -**8. Maintenance Note** - -This implementation creates a custom fork. - -Future upstream updates may require manual merging of: - -- SQLConnectors/index.js - -- SQLConnectors/ - -- Frontend engine enum changes - -**9. Complete File Changes** - -**Frontend** - -1. frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png - -2. frontend/src/models/system.js - -3. frontend/src/pages/Admin/Agents/SQLConnectorSelection/DBConnection.jsx - -4. frontend/src/pages/Admin/Agents/SQLConnectorSelection/SQLConnectionModal.jsx - -**Backend** - -5. server/utils/agents/aibitat/plugins/sql-agent/SQLConnector/utils.js - -6. server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js - -7. server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js - -8. server/package.json -9. build.txt (Build Guide) -10. oracle-support.md (Support Document) - -**Docker** - -9. docker/dockerfile - -**Final Minimal Checklist** - -1. Add Oracle to frontend engine list - -2. Create OracleConnector class - -3. Register in getDBClient() - -4. Install oracledb - -5. Rebuild Docker image - -6. Test with SELECT 1 FROM DUAL - -Oracle support is now fully integrated using the native connector -architecture with no impact on existing SQL engines. From b7244e2c6b9cce4cd856749c1e262f20344e2d8e Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 20:21:44 +0500 Subject: [PATCH 4/9] Clean up comments in system.js Removed unnecessary comment block above isOnboardingComplete function. --- frontend/src/models/system.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/models/system.js b/frontend/src/models/system.js index 266ad4d505b..3fc2ce7d685 100644 --- a/frontend/src/models/system.js +++ b/frontend/src/models/system.js @@ -33,7 +33,7 @@ const System = { .catch(() => 0); }, - /*** + /** * Checks if the onboarding is complete. * @returns {Promise} */ From d2b25621269bb2d817fb21bfad34023aa594126e Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 20:32:26 +0500 Subject: [PATCH 5/9] Delete frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png --- .../SQLConnectorSelection/icons/oracle.png | Bin 1148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png diff --git a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.png deleted file mode 100644 index 2d381cd81be9d66e5b101a6896245d259fb58171..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1148 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGooCO|{#S9GG!XV7ZFl&wk0|Sem zr;B4q#hkY{Zg$Irim*T6lA7*$-ZHqS-VPfH@g|K9u3ry6DJW@i{Nn#1A`lWF zSW_V3^5LK?tDvj=oe4IY$0XvXOi++$?dW1_?(Df-n}0OWBu{twuWw6&F5eB_E`0F7 z`{t&`b-U+OzYCkJ0(1yIaC~Xmw28{KH#Wa3)Y)HsE$?sPn)>QXf9HMO`YomG=YlG> zsnH)N{JWsIcd_UGy1cdLWnb$Z-<7O*K6>@uc!AV;rS~@0yp8xDu~xtD%iLONvpG@k z>z{mR-Sktr;=o zH6=ef1K*cj`oiR$=kkC4YqgV{&A;TWf8+(_m#k@*I`03eBJ#uWnKMiKo~{;naC~l9 zU8=dKpVSo(AXyT8S-g6hdD6bnNjQR zo-(tV)*5&7&9oT|Hs|MvvaPcHWm~(oCf{rQwwt+}A5`Q^C#U%SjdlMOu%h_71+)C+ z|BR{6oOdo?EWL&Ad()KJ$*0AZY`>mfX=ruOY;j5T(s${HKkY4covX6@?e?b4 z*~yPBUa?H5$xFSp_RXIkY@XBB6kOS~GS72Od(KZ&-UDp+C+2Z8|9rOLyUc0nzc=G; zC+KFD2}X#_T=ONlH@CBF-Hk92>EnhT2i7OgnZMWhhlcQmYk5+Kg&t_!&)Hn@!PjFN z*F3xG4+>9a=NPQs{QpCKQG7&c|KEP058iJc=*u7KD^0JJ&p)+pQsVu)Ryqvks^(uO z%iP;4x_Ry7W#WAN9^0>^*TU&Q+?d=Mu*7f&3mQY!6=ii$-Qi~mT zs+;^u{c5*IYB#Utw4=X%8fq|{uk!p+x8cnGgl3C1_nMw;diCb}n)3b~r}pi?BY%nA z`R{zb-ADhHw{JM}HMu*l;QyO9ExdIWBKtq+T<6)%dvmU346pp#`Zbo5rq5zYxPJbh z&&M_Mb-L!5t>8WWDX#XL^(nc6HS4~$SeMsDKb86w>v6{KcYut#;A549M5Xxm5!Pmf zr}__=*eb8O*z~Db=CpZWb;QjXHks^&ml;kuaxuS&zopr E0Q3+QR{#J2 From ff966d184def86c6d3113f6ee5e344e0a16b6208 Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 20:34:01 +0500 Subject: [PATCH 6/9] Uploaded Resized 330x330 Oracle Logo Uploaded Resized 330x330 Oracle Logo , in place of the previous small sized logo --- .../SQLConnectorSelection/icons/oracle.jpg | Bin 0 -> 10222 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.jpg diff --git a/frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.jpg b/frontend/src/pages/Admin/Agents/SQLConnectorSelection/icons/oracle.jpg new file mode 100644 index 0000000000000000000000000000000000000000..71f5acdc09ea6e9e86187c5dde1e4bd837985149 GIT binary patch literal 10222 zcmeHsc{r49|Mw+Z2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DRc&Gah8FB|wP8;udl0T2C$ELmwV zE>mr;s4A6$5mSS}WSKkK3dJV7WQd??z?{5cPW_kGW!70gZJqs? z@>J;5_dt~?_tlGyX{Il}Osxi_MASVhC@^SJ*Sa*HMm`@Pg(FA!Vku0t%xyNsSmu#C zXK3}u1M|E7KnaRO4Fy_Uh|n_mbs>^y?C*-%qA|~Z#`Q_}5H!8=mIzI4dQCf}_|JIZ z-|M&0fzRRSrqP3C-h=hx(K|s*&-Wsu6ZF18EE&Aj;C1U4d+JmN?Qs_%#t3g7qmIG@ z={KwjCK7XnzqUpYhk`WI)^e3*xL++G*x#xCD>kX~uWyDvGQk^sNnbZS6NB(p4$Pyq zaJOLsVdCP!CsRTGY@ROHYP1(APfeD9J#=dn2;(1k@orvE<8j$v$YQUP=6y-kjQ385sg%1Tq9 zV3RVw%;J6T*0^h`lfcOvqiAKZS1cmm@jZkYm45A%DyT@e3n6QIcH=LDAH}9Ct{7YLlaJEn?G=p^Zq}_fX8tbfV>(baMnZ^Ag9wk`QMz6($nbA vzm`7qy-ybo+@on3Y=8gNKR^F@{4WFjvBV!s{5xCz1jC?boTA literal 0 HcmV?d00001 From 3d3d3fb28ebfcba3c90b7d454c8212aecdea2b2d Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 20:46:37 +0500 Subject: [PATCH 7/9] Refactor Oracle connector to load driver on demand Load the Oracle driver on demand in the constructor and log thin mode status. Set global output format for each instance created. --- .../plugins/sql-agent/SQLConnectors/Oracle.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js index e741d6fdb0a..852870e53a9 100644 --- a/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js +++ b/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/Oracle.js @@ -1,13 +1,13 @@ -const oracledb = require("oracledb"); + const { ConnectionStringParser } = require("./utils"); // -- oracledb.initOracleClient({libDir: "/opt/oracle/instantclient_23_26",}); // Thin mode: DO NOT call initOracleClient() -console.log("Oracle driver thin mode:", oracledb.thin); -oracledb.outFormat = oracledb.OUT_FORMAT_OBJECT; + + class OracleConnector { #connected = false; @@ -18,6 +18,16 @@ class OracleConnector { connectionString: null, } ) { + // Load the Oracle driver on demand when this constructor is called + this.oracledb = require("oracledb"); + + // Set global output format once (will be set each time an instance is created, + // but that's harmless due to caching) + this.oracledb.outFormat = this.oracledb.OUT_FORMAT_OBJECT; + + // Log thin mode status when an instance is created + console.log("Oracle driver thin mode:", oracledb.thin); + this.className = "OracleConnector"; this.connectionString = config.connectionString; this._client = null; From 93d6e2d7bfd390854b5285e4a815e4b4c80a4ee6 Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 20:50:09 +0500 Subject: [PATCH 8/9] Delete README.md --- README.md | 301 ------------------------------------------------------ 1 file changed, 301 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index a694f2ab87d..00000000000 --- a/README.md +++ /dev/null @@ -1,301 +0,0 @@ - - -

- AnythingLLM logo -

- -
-Mintplex-Labs%2Fanything-llm | Trendshift -
- -

- AnythingLLM: The all-in-one AI app you were looking for.
- Chat with your docs, use AI Agents, hyper-configurable, multi-user, & no frustrating setup required. -

- -

- - Discord - | - - License - | - - Docs - | - - Hosted Instance - -

- -

- English · 简体中文 · 日本語 -

- -

-👉 AnythingLLM for desktop (Mac, Windows, & Linux)! Download Now -

- -A full-stack application that enables you to turn any document, resource, or piece of content into context that any LLM can use as a reference during chatting. This application allows you to pick and choose which LLM or Vector Database you want to use as well as supporting multi-user management and permissions. - -![Chatting](https://github.com/Mintplex-Labs/anything-llm/assets/16845892/cfc5f47c-bd91-4067-986c-f3f49621a859) - -
-Watch the demo! - -[![Watch the video](/images/youtube.png)](https://youtu.be/f95rGD9trL0) - -
- -### Product Overview - -AnythingLLM is a full-stack application where you can use commercial off-the-shelf LLMs or popular open source LLMs and vectorDB solutions to build a private ChatGPT with no compromises that you can run locally as well as host remotely and be able to chat intelligently with any documents you provide it. - -AnythingLLM divides your documents into objects called `workspaces`. A Workspace functions a lot like a thread, but with the addition of containerization of your documents. Workspaces can share documents, but they do not talk to each other so you can keep your context for each workspace clean. - -## Cool features of AnythingLLM - -- 🆕 [**Full MCP-compatibility**](https://docs.anythingllm.com/mcp-compatibility/overview) -- 🆕 [**No-code AI Agent builder**](https://docs.anythingllm.com/agent-flows/overview) -- 🖼️ **Multi-modal support (both closed and open-source LLMs!)** -- [**Custom AI Agents**](https://docs.anythingllm.com/agent/custom/introduction) -- 👤 Multi-user instance support and permissioning _Docker version only_ -- 🦾 Agents inside your workspace (browse the web, etc) -- 💬 [Custom Embeddable Chat widget for your website](https://github.com/Mintplex-Labs/anythingllm-embed/blob/main/README.md) _Docker version only_ -- 📖 Multiple document type support (PDF, TXT, DOCX, etc) -- Simple chat UI with Drag-n-Drop functionality and clear citations. -- 100% Cloud deployment ready. -- Works with all popular [closed and open-source LLM providers](#supported-llms-embedder-models-speech-models-and-vector-databases). -- Built-in cost & time-saving measures for managing very large documents compared to any other chat UI. -- Full Developer API for custom integrations! -- Much more...install and find out! - -### Supported LLMs, Embedder Models, Speech models, and Vector Databases - -**Large Language Models (LLMs):** - -- [Any open-source llama.cpp compatible model](/server/storage/models/README.md#text-generation-llm-selection) -- [OpenAI](https://openai.com) -- [OpenAI (Generic)](https://openai.com) -- [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service) -- [AWS Bedrock](https://aws.amazon.com/bedrock/) -- [Anthropic](https://www.anthropic.com/) -- [NVIDIA NIM (chat models)](https://build.nvidia.com/explore/discover) -- [Google Gemini Pro](https://ai.google.dev/) -- [Hugging Face (chat models)](https://huggingface.co/) -- [Ollama (chat models)](https://ollama.ai/) -- [LM Studio (all models)](https://lmstudio.ai) -- [LocalAI (all models)](https://localai.io/) -- [Together AI (chat models)](https://www.together.ai/) -- [Fireworks AI (chat models)](https://fireworks.ai/) -- [Perplexity (chat models)](https://www.perplexity.ai/) -- [OpenRouter (chat models)](https://openrouter.ai/) -- [DeepSeek (chat models)](https://deepseek.com/) -- [Mistral](https://mistral.ai/) -- [Groq](https://groq.com/) -- [Cohere](https://cohere.com/) -- [KoboldCPP](https://github.com/LostRuins/koboldcpp) -- [LiteLLM](https://github.com/BerriAI/litellm) -- [Text Generation Web UI](https://github.com/oobabooga/text-generation-webui) -- [Apipie](https://apipie.ai/) -- [xAI](https://x.ai/) -- [Z.AI (chat models)](https://z.ai/model-api) -- [Novita AI (chat models)](https://novita.ai/model-api/product/llm-api?utm_source=github_anything-llm&utm_medium=github_readme&utm_campaign=link) -- [PPIO](https://ppinfra.com?utm_source=github_anything-llm) -- [Gitee AI](https://ai.gitee.com/) -- [Moonshot AI](https://www.moonshot.ai/) -- [Microsoft Foundry Local](https://github.com/microsoft/Foundry-Local) -- [CometAPI (chat models)](https://api.cometapi.com/) -- [Docker Model Runner](https://docs.docker.com/ai/model-runner/) -- [PrivateModeAI (chat models)](https://privatemode.ai/) -- [SambaNova Cloud (chat models)](https://cloud.sambanova.ai/) -- [Lemonade by AMD](https://lemonade-server.ai) - -**Embedder models:** - -- [AnythingLLM Native Embedder](/server/storage/models/README.md) (default) -- [OpenAI](https://openai.com) -- [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service) -- [LocalAI (all)](https://localai.io/) -- [Ollama (all)](https://ollama.ai/) -- [LM Studio (all)](https://lmstudio.ai) -- [Cohere](https://cohere.com/) - -**Audio Transcription models:** - -- [AnythingLLM Built-in](https://github.com/Mintplex-Labs/anything-llm/tree/master/server/storage/models#audiovideo-transcription) (default) -- [OpenAI](https://openai.com/) - -**TTS (text-to-speech) support:** - -- Native Browser Built-in (default) -- [PiperTTSLocal - runs in browser](https://github.com/rhasspy/piper) -- [OpenAI TTS](https://platform.openai.com/docs/guides/text-to-speech/voice-options) -- [ElevenLabs](https://elevenlabs.io/) -- Any OpenAI Compatible TTS service. - -**STT (speech-to-text) support:** - -- Native Browser Built-in (default) - -**Vector Databases:** - -- [LanceDB](https://github.com/lancedb/lancedb) (default) -- [PGVector](https://github.com/pgvector/pgvector) -- [Astra DB](https://www.datastax.com/products/datastax-astra) -- [Pinecone](https://pinecone.io) -- [Chroma & ChromaCloud](https://trychroma.com) -- [Weaviate](https://weaviate.io) -- [Qdrant](https://qdrant.tech) -- [Milvus](https://milvus.io) -- [Zilliz](https://zilliz.com) - -### Technical Overview - -This monorepo consists of six main sections: - -- `frontend`: A viteJS + React frontend that you can run to easily create and manage all your content the LLM can use. -- `server`: A NodeJS express server to handle all the interactions and do all the vectorDB management and LLM interactions. -- `collector`: NodeJS express server that processes and parses documents from the UI. -- `docker`: Docker instructions and build process + information for building from source. -- `embed`: Submodule for generation & creation of the [web embed widget](https://github.com/Mintplex-Labs/anythingllm-embed). -- `browser-extension`: Submodule for the [chrome browser extension](https://github.com/Mintplex-Labs/anythingllm-extension). - -## 🛳 Self-Hosting - -Mintplex Labs & the community maintain a number of deployment methods, scripts, and templates that you can use to run AnythingLLM locally. Refer to the table below to read how to deploy on your preferred environment or to automatically deploy. -| Docker | AWS | GCP | Digital Ocean | Render.com | -|----------------------------------------|----|-----|---------------|------------| -| [![Deploy on Docker][docker-btn]][docker-deploy] | [![Deploy on AWS][aws-btn]][aws-deploy] | [![Deploy on GCP][gcp-btn]][gcp-deploy] | [![Deploy on DigitalOcean][do-btn]][do-deploy] | [![Deploy on Render.com][render-btn]][render-deploy] | - -| Railway | RepoCloud | Elestio | Northflank | -| --------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------ | -| [![Deploy on Railway][railway-btn]][railway-deploy] | [![Deploy on RepoCloud][repocloud-btn]][repocloud-deploy] | [![Deploy on Elestio][elestio-btn]][elestio-deploy] | [![Deploy on Northflank][northflank-btn]][northflank-deploy] | - -[or set up a production AnythingLLM instance without Docker →](./BARE_METAL.md) - -## How to setup for development - -- `yarn setup` To fill in the required `.env` files you'll need in each of the application sections (from root of repo). - - Go fill those out before proceeding. Ensure `server/.env.development` is filled or else things won't work right. -- `yarn dev:server` To boot the server locally (from root of repo). -- `yarn dev:frontend` To boot the frontend locally (from root of repo). -- `yarn dev:collector` To then run the document collector (from root of repo). - -[Learn about documents](./server/storage/documents/DOCUMENTS.md) - -[Learn about vector caching](./server/storage/vector-cache/VECTOR_CACHE.md) - -## External Apps & Integrations - -_These are apps that are not maintained by Mintplex Labs, but are compatible with AnythingLLM. A listing here is not an endorsement._ - -- [Midori AI Subsystem Manager](https://io.midori-ai.xyz/subsystem/anythingllm/) - A streamlined and efficient way to deploy AI systems using Docker container technology. -- [Coolify](https://coolify.io/docs/services/anythingllm/) - Deploy AnythingLLM with a single click. -- [GPTLocalhost for Microsoft Word](https://gptlocalhost.com/demo/) - A local Word Add-in for you to use AnythingLLM in Microsoft Word. -## ✨ Added Features -- **Oracle Database support** for the SQL Agent. See [Oracle Integration](extras/oracle-support.md) for details. - -## Telemetry & Privacy - -AnythingLLM by Mintplex Labs Inc contains a telemetry feature that collects anonymous usage information. - -
-More about Telemetry & Privacy for AnythingLLM - -### Why? - -We use this information to help us understand how AnythingLLM is used, to help us prioritize work on new features and bug fixes, and to help us improve AnythingLLM's performance and stability. - -### Opting out - -Set `DISABLE_TELEMETRY` in your server or docker .env settings to "true" to opt out of telemetry. You can also do this in-app by going to the sidebar > `Privacy` and disabling telemetry. - -### What do you explicitly track? - -We will only track usage details that help us make product and roadmap decisions, specifically: - -- Type of your installation (Docker or Desktop) - -- When a document is added or removed. No information _about_ the document. Just that the event occurred. This gives us an idea of use. - -- Type of vector database in use. This helps us prioritize changes when updates arrive for that provider. - -- Type of LLM provider & model tag in use. This helps us prioritize changes when updates arrive for that provider or model, or combination thereof. eg: reasoning vs regular, multi-modal models, etc. - -- When a chat is sent. This is the most regular "event" and gives us an idea of the daily-activity of this project across all installations. Again, only the **event** is sent - we have no information on the nature or content of the chat itself. - -You can verify these claims by finding all locations `Telemetry.sendTelemetry` is called. Additionally these events are written to the output log so you can also see the specific data which was sent - if enabled. **No IP or other identifying information is collected**. The Telemetry provider is [PostHog](https://posthog.com/) - an open-source telemetry collection service. - -We take privacy very seriously, and we hope you understand that we want to learn how our tool is used, without using annoying popup surveys, so we can build something worth using. The anonymous data is _never_ shared with third parties, ever. - -[View all telemetry events in source code](https://github.com/search?q=repo%3AMintplex-Labs%2Fanything-llm%20.sendTelemetry(&type=code) - -
- -## 👋 Contributing - -- [Contributing to AnythingLLM](./CONTRIBUTING.md) - How to contribute to AnythingLLM. - -## 💖 Sponsors - -### Premium Sponsors - - - - User avatar: DCS DIGITAL - - - -### All Sponsors - -User avatar: JaschaUser avatar: KickAssUser avatar: ShadowArcanistUser avatar: AtlasUser avatar: Predrag StojadinovićUser avatar: Diego SpinolaUser avatar: KyleUser avatar: Giulio De PasqualeUser avatar: User avatar: MacStadiumUser avatar: User avatar: User avatar: User avatar: User avatar: DennisUser avatar: Michael Hamilton, Ph.D.User avatar: User avatar: TernaryLabsUser avatar: Daniel CelaUser avatar: AlessoUser avatar: Rune MathisenUser avatar: User avatar: User avatar: AlanUser avatar: Damien PetersUser avatar: DCS DigitalUser avatar: Paul McilreavyUser avatar: Til WolfUser avatar: Leopoldo Crhistian Riverin GomezUser avatar: AJEsauUser avatar: Steven VanOmmerenUser avatar: Casey BoettcherUser avatar: User avatar: AvineetUser avatar: ChrisUser avatar: mirkoUser avatar: Tim ChampUser avatar: Peter MathisenUser avatar: Ed di GirolamoUser avatar: Wojciech MiłkowskiUser avatar: ADS FundUser avatar: arc46 GmbHUser avatar: Li YinUser avatar: SylphAI - -## 🌟 Contributors - -[![anythingllm contributors](https://contrib.rocks/image?repo=mintplex-labs/anything-llm)](https://github.com/mintplex-labs/anything-llm/graphs/contributors) - -[![Star History Chart](https://api.star-history.com/svg?repos=mintplex-labs/anything-llm&type=Timeline)](https://star-history.com/#mintplex-labs/anything-llm&Date) - -## 🔗 More Products - -- **[VectorAdmin][vector-admin]:** An all-in-one GUI & tool-suite for managing vector databases. -- **[OpenAI Assistant Swarm][assistant-swarm]:** Turn your entire library of OpenAI assistants into one single army commanded from a single agent. - -
- -[![][back-to-top]](#readme-top) - -
- ---- - -Copyright © 2026 [Mintplex Labs][profile-link].
-This project is [MIT](./LICENSE) licensed. - - - -[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-222628?style=flat-square -[profile-link]: https://github.com/mintplex-labs -[vector-admin]: https://github.com/mintplex-labs/vector-admin -[assistant-swarm]: https://github.com/Mintplex-Labs/openai-assistant-swarm -[docker-btn]: ./images/deployBtns/docker.png -[docker-deploy]: ./docker/HOW_TO_USE_DOCKER.md -[aws-btn]: ./images/deployBtns/aws.png -[aws-deploy]: ./cloud-deployments/aws/cloudformation/DEPLOY.md -[gcp-btn]: https://deploy.cloud.run/button.svg -[gcp-deploy]: ./cloud-deployments/gcp/deployment/DEPLOY.md -[do-btn]: https://www.deploytodo.com/do-btn-blue.svg -[do-deploy]: ./cloud-deployments/digitalocean/terraform/DEPLOY.md -[render-btn]: https://render.com/images/deploy-to-render-button.svg -[render-deploy]: https://render.com/deploy?repo=https://github.com/Mintplex-Labs/anything-llm&branch=render -[render-btn]: https://render.com/images/deploy-to-render-button.svg -[render-deploy]: https://render.com/deploy?repo=https://github.com/Mintplex-Labs/anything-llm&branch=render -[railway-btn]: https://railway.app/button.svg -[railway-deploy]: https://railway.app/template/HNSCS1?referralCode=WFgJkn -[repocloud-btn]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg -[repocloud-deploy]: https://repocloud.io/details/?app_id=276 -[elestio-btn]: https://elest.io/images/logos/deploy-to-elestio-btn.png -[elestio-deploy]: https://elest.io/open-source/anythingllm -[northflank-btn]: https://assets.northflank.com/deploy_to_northflank_smm_36700fb050.svg -[northflank-deploy]: https://northflank.com/stacks/deploy-anythingllm From 77ed7d6cc33d48eb11648c8f8acf9c3d8721bdf2 Mon Sep 17 00:00:00 2001 From: Anjum Sohail Date: Tue, 10 Mar 2026 21:18:45 +0500 Subject: [PATCH 9/9] Restore README.md to original state from Base Repository Deleted the Previous Readme.md and Restore the Original README.md from Base Repository --- README.md | 299 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000000..42c7db916d9 --- /dev/null +++ b/README.md @@ -0,0 +1,299 @@ + + +

+ AnythingLLM logo +

+ +
+Mintplex-Labs%2Fanything-llm | Trendshift +
+ +

+ AnythingLLM: The all-in-one AI app you were looking for.
+ Chat with your docs, use AI Agents, hyper-configurable, multi-user, & no frustrating setup required. +

+ +

+ + Discord + | + + License + | + + Docs + | + + Hosted Instance + +

+ +

+ English · 简体中文 · 日本語 +

+ +

+👉 AnythingLLM for desktop (Mac, Windows, & Linux)! Download Now +

+ +A full-stack application that enables you to turn any document, resource, or piece of content into context that any LLM can use as a reference during chatting. This application allows you to pick and choose which LLM or Vector Database you want to use as well as supporting multi-user management and permissions. + +![Chatting](https://github.com/Mintplex-Labs/anything-llm/assets/16845892/cfc5f47c-bd91-4067-986c-f3f49621a859) + +
+Watch the demo! + +[![Watch the video](/images/youtube.png)](https://youtu.be/f95rGD9trL0) + +
+ +### Product Overview + +AnythingLLM is a full-stack application where you can use commercial off-the-shelf LLMs or popular open source LLMs and vectorDB solutions to build a private ChatGPT with no compromises that you can run locally as well as host remotely and be able to chat intelligently with any documents you provide it. + +AnythingLLM divides your documents into objects called `workspaces`. A Workspace functions a lot like a thread, but with the addition of containerization of your documents. Workspaces can share documents, but they do not talk to each other so you can keep your context for each workspace clean. + +## Cool features of AnythingLLM + +- 🆕 [**Full MCP-compatibility**](https://docs.anythingllm.com/mcp-compatibility/overview) +- 🆕 [**No-code AI Agent builder**](https://docs.anythingllm.com/agent-flows/overview) +- 🖼️ **Multi-modal support (both closed and open-source LLMs!)** +- [**Custom AI Agents**](https://docs.anythingllm.com/agent/custom/introduction) +- 👤 Multi-user instance support and permissioning _Docker version only_ +- 🦾 Agents inside your workspace (browse the web, etc) +- 💬 [Custom Embeddable Chat widget for your website](https://github.com/Mintplex-Labs/anythingllm-embed/blob/main/README.md) _Docker version only_ +- 📖 Multiple document type support (PDF, TXT, DOCX, etc) +- Simple chat UI with Drag-n-Drop functionality and clear citations. +- 100% Cloud deployment ready. +- Works with all popular [closed and open-source LLM providers](#supported-llms-embedder-models-speech-models-and-vector-databases). +- Built-in cost & time-saving measures for managing very large documents compared to any other chat UI. +- Full Developer API for custom integrations! +- Much more...install and find out! + +### Supported LLMs, Embedder Models, Speech models, and Vector Databases + +**Large Language Models (LLMs):** + +- [Any open-source llama.cpp compatible model](/server/storage/models/README.md#text-generation-llm-selection) +- [OpenAI](https://openai.com) +- [OpenAI (Generic)](https://openai.com) +- [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service) +- [AWS Bedrock](https://aws.amazon.com/bedrock/) +- [Anthropic](https://www.anthropic.com/) +- [NVIDIA NIM (chat models)](https://build.nvidia.com/explore/discover) +- [Google Gemini Pro](https://ai.google.dev/) +- [Hugging Face (chat models)](https://huggingface.co/) +- [Ollama (chat models)](https://ollama.ai/) +- [LM Studio (all models)](https://lmstudio.ai) +- [LocalAI (all models)](https://localai.io/) +- [Together AI (chat models)](https://www.together.ai/) +- [Fireworks AI (chat models)](https://fireworks.ai/) +- [Perplexity (chat models)](https://www.perplexity.ai/) +- [OpenRouter (chat models)](https://openrouter.ai/) +- [DeepSeek (chat models)](https://deepseek.com/) +- [Mistral](https://mistral.ai/) +- [Groq](https://groq.com/) +- [Cohere](https://cohere.com/) +- [KoboldCPP](https://github.com/LostRuins/koboldcpp) +- [LiteLLM](https://github.com/BerriAI/litellm) +- [Text Generation Web UI](https://github.com/oobabooga/text-generation-webui) +- [Apipie](https://apipie.ai/) +- [xAI](https://x.ai/) +- [Z.AI (chat models)](https://z.ai/model-api) +- [Novita AI (chat models)](https://novita.ai/model-api/product/llm-api?utm_source=github_anything-llm&utm_medium=github_readme&utm_campaign=link) +- [PPIO](https://ppinfra.com?utm_source=github_anything-llm) +- [Gitee AI](https://ai.gitee.com/) +- [Moonshot AI](https://www.moonshot.ai/) +- [Microsoft Foundry Local](https://github.com/microsoft/Foundry-Local) +- [CometAPI (chat models)](https://api.cometapi.com/) +- [Docker Model Runner](https://docs.docker.com/ai/model-runner/) +- [PrivateModeAI (chat models)](https://privatemode.ai/) +- [SambaNova Cloud (chat models)](https://cloud.sambanova.ai/) +- [Lemonade by AMD](https://lemonade-server.ai) + +**Embedder models:** + +- [AnythingLLM Native Embedder](/server/storage/models/README.md) (default) +- [OpenAI](https://openai.com) +- [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service) +- [LocalAI (all)](https://localai.io/) +- [Ollama (all)](https://ollama.ai/) +- [LM Studio (all)](https://lmstudio.ai) +- [Cohere](https://cohere.com/) + +**Audio Transcription models:** + +- [AnythingLLM Built-in](https://github.com/Mintplex-Labs/anything-llm/tree/master/server/storage/models#audiovideo-transcription) (default) +- [OpenAI](https://openai.com/) + +**TTS (text-to-speech) support:** + +- Native Browser Built-in (default) +- [PiperTTSLocal - runs in browser](https://github.com/rhasspy/piper) +- [OpenAI TTS](https://platform.openai.com/docs/guides/text-to-speech/voice-options) +- [ElevenLabs](https://elevenlabs.io/) +- Any OpenAI Compatible TTS service. + +**STT (speech-to-text) support:** + +- Native Browser Built-in (default) + +**Vector Databases:** + +- [LanceDB](https://github.com/lancedb/lancedb) (default) +- [PGVector](https://github.com/pgvector/pgvector) +- [Astra DB](https://www.datastax.com/products/datastax-astra) +- [Pinecone](https://pinecone.io) +- [Chroma & ChromaCloud](https://trychroma.com) +- [Weaviate](https://weaviate.io) +- [Qdrant](https://qdrant.tech) +- [Milvus](https://milvus.io) +- [Zilliz](https://zilliz.com) + +### Technical Overview + +This monorepo consists of six main sections: + +- `frontend`: A viteJS + React frontend that you can run to easily create and manage all your content the LLM can use. +- `server`: A NodeJS express server to handle all the interactions and do all the vectorDB management and LLM interactions. +- `collector`: NodeJS express server that processes and parses documents from the UI. +- `docker`: Docker instructions and build process + information for building from source. +- `embed`: Submodule for generation & creation of the [web embed widget](https://github.com/Mintplex-Labs/anythingllm-embed). +- `browser-extension`: Submodule for the [chrome browser extension](https://github.com/Mintplex-Labs/anythingllm-extension). + +## 🛳 Self-Hosting + +Mintplex Labs & the community maintain a number of deployment methods, scripts, and templates that you can use to run AnythingLLM locally. Refer to the table below to read how to deploy on your preferred environment or to automatically deploy. +| Docker | AWS | GCP | Digital Ocean | Render.com | +|----------------------------------------|----|-----|---------------|------------| +| [![Deploy on Docker][docker-btn]][docker-deploy] | [![Deploy on AWS][aws-btn]][aws-deploy] | [![Deploy on GCP][gcp-btn]][gcp-deploy] | [![Deploy on DigitalOcean][do-btn]][do-deploy] | [![Deploy on Render.com][render-btn]][render-deploy] | + +| Railway | RepoCloud | Elestio | Northflank | +| --------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------ | +| [![Deploy on Railway][railway-btn]][railway-deploy] | [![Deploy on RepoCloud][repocloud-btn]][repocloud-deploy] | [![Deploy on Elestio][elestio-btn]][elestio-deploy] | [![Deploy on Northflank][northflank-btn]][northflank-deploy] | + +[or set up a production AnythingLLM instance without Docker →](./BARE_METAL.md) + +## How to setup for development + +- `yarn setup` To fill in the required `.env` files you'll need in each of the application sections (from root of repo). + - Go fill those out before proceeding. Ensure `server/.env.development` is filled or else things won't work right. +- `yarn dev:server` To boot the server locally (from root of repo). +- `yarn dev:frontend` To boot the frontend locally (from root of repo). +- `yarn dev:collector` To then run the document collector (from root of repo). + +[Learn about documents](./server/storage/documents/DOCUMENTS.md) + +[Learn about vector caching](./server/storage/vector-cache/VECTOR_CACHE.md) + +## External Apps & Integrations + +_These are apps that are not maintained by Mintplex Labs, but are compatible with AnythingLLM. A listing here is not an endorsement._ + +- [Midori AI Subsystem Manager](https://io.midori-ai.xyz/subsystem/anythingllm/) - A streamlined and efficient way to deploy AI systems using Docker container technology. +- [Coolify](https://coolify.io/docs/services/anythingllm/) - Deploy AnythingLLM with a single click. +- [GPTLocalhost for Microsoft Word](https://gptlocalhost.com/demo/) - A local Word Add-in for you to use AnythingLLM in Microsoft Word. + +## Telemetry & Privacy + +AnythingLLM by Mintplex Labs Inc contains a telemetry feature that collects anonymous usage information. + +
+More about Telemetry & Privacy for AnythingLLM + +### Why? + +We use this information to help us understand how AnythingLLM is used, to help us prioritize work on new features and bug fixes, and to help us improve AnythingLLM's performance and stability. + +### Opting out + +Set `DISABLE_TELEMETRY` in your server or docker .env settings to "true" to opt out of telemetry. You can also do this in-app by going to the sidebar > `Privacy` and disabling telemetry. + +### What do you explicitly track? + +We will only track usage details that help us make product and roadmap decisions, specifically: + +- Type of your installation (Docker or Desktop) + +- When a document is added or removed. No information _about_ the document. Just that the event occurred. This gives us an idea of use. + +- Type of vector database in use. This helps us prioritize changes when updates arrive for that provider. + +- Type of LLM provider & model tag in use. This helps us prioritize changes when updates arrive for that provider or model, or combination thereof. eg: reasoning vs regular, multi-modal models, etc. + +- When a chat is sent. This is the most regular "event" and gives us an idea of the daily-activity of this project across all installations. Again, only the **event** is sent - we have no information on the nature or content of the chat itself. + +You can verify these claims by finding all locations `Telemetry.sendTelemetry` is called. Additionally these events are written to the output log so you can also see the specific data which was sent - if enabled. **No IP or other identifying information is collected**. The Telemetry provider is [PostHog](https://posthog.com/) - an open-source telemetry collection service. + +We take privacy very seriously, and we hope you understand that we want to learn how our tool is used, without using annoying popup surveys, so we can build something worth using. The anonymous data is _never_ shared with third parties, ever. + +[View all telemetry events in source code](https://github.com/search?q=repo%3AMintplex-Labs%2Fanything-llm%20.sendTelemetry(&type=code) + +
+ +## 👋 Contributing + +- [Contributing to AnythingLLM](./CONTRIBUTING.md) - How to contribute to AnythingLLM. + +## 💖 Sponsors + +### Premium Sponsors + + + + User avatar: DCS DIGITAL + + + +### All Sponsors + +User avatar: JaschaUser avatar: KickAssUser avatar: ShadowArcanistUser avatar: AtlasUser avatar: Predrag StojadinovićUser avatar: Diego SpinolaUser avatar: KyleUser avatar: Giulio De PasqualeUser avatar: User avatar: MacStadiumUser avatar: User avatar: User avatar: User avatar: User avatar: DennisUser avatar: Michael Hamilton, Ph.D.User avatar: User avatar: TernaryLabsUser avatar: Daniel CelaUser avatar: AlessoUser avatar: Rune MathisenUser avatar: User avatar: User avatar: AlanUser avatar: Damien PetersUser avatar: DCS DigitalUser avatar: Paul McilreavyUser avatar: Til WolfUser avatar: Leopoldo Crhistian Riverin GomezUser avatar: AJEsauUser avatar: Steven VanOmmerenUser avatar: Casey BoettcherUser avatar: User avatar: AvineetUser avatar: ChrisUser avatar: mirkoUser avatar: Tim ChampUser avatar: Peter MathisenUser avatar: Ed di GirolamoUser avatar: Wojciech MiłkowskiUser avatar: ADS FundUser avatar: arc46 GmbHUser avatar: Li YinUser avatar: SylphAI + +## 🌟 Contributors + +[![anythingllm contributors](https://contrib.rocks/image?repo=mintplex-labs/anything-llm)](https://github.com/mintplex-labs/anything-llm/graphs/contributors) + +[![Star History Chart](https://api.star-history.com/svg?repos=mintplex-labs/anything-llm&type=Timeline)](https://star-history.com/#mintplex-labs/anything-llm&Date) + +## 🔗 More Products + +- **[VectorAdmin][vector-admin]:** An all-in-one GUI & tool-suite for managing vector databases. +- **[OpenAI Assistant Swarm][assistant-swarm]:** Turn your entire library of OpenAI assistants into one single army commanded from a single agent. + +
+ +[![][back-to-top]](#readme-top) + +
+ +--- + +Copyright © 2026 [Mintplex Labs][profile-link].
+This project is [MIT](./LICENSE) licensed. + + + +[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-222628?style=flat-square +[profile-link]: https://github.com/mintplex-labs +[vector-admin]: https://github.com/mintplex-labs/vector-admin +[assistant-swarm]: https://github.com/Mintplex-Labs/openai-assistant-swarm +[docker-btn]: ./images/deployBtns/docker.png +[docker-deploy]: ./docker/HOW_TO_USE_DOCKER.md +[aws-btn]: ./images/deployBtns/aws.png +[aws-deploy]: ./cloud-deployments/aws/cloudformation/DEPLOY.md +[gcp-btn]: https://deploy.cloud.run/button.svg +[gcp-deploy]: ./cloud-deployments/gcp/deployment/DEPLOY.md +[do-btn]: https://www.deploytodo.com/do-btn-blue.svg +[do-deploy]: ./cloud-deployments/digitalocean/terraform/DEPLOY.md +[render-btn]: https://render.com/images/deploy-to-render-button.svg +[render-deploy]: https://render.com/deploy?repo=https://github.com/Mintplex-Labs/anything-llm&branch=render +[render-btn]: https://render.com/images/deploy-to-render-button.svg +[render-deploy]: https://render.com/deploy?repo=https://github.com/Mintplex-Labs/anything-llm&branch=render +[railway-btn]: https://railway.app/button.svg +[railway-deploy]: https://railway.app/template/HNSCS1?referralCode=WFgJkn +[repocloud-btn]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg +[repocloud-deploy]: https://repocloud.io/details/?app_id=276 +[elestio-btn]: https://elest.io/images/logos/deploy-to-elestio-btn.png +[elestio-deploy]: https://elest.io/open-source/anythingllm +[northflank-btn]: https://assets.northflank.com/deploy_to_northflank_smm_36700fb050.svg +[northflank-deploy]: https://northflank.com/stacks/deploy-anythingllm