Compare commits

...
Sign in to create a new pull request.

556 commits

Author SHA1 Message Date
acf0ed725a Update docker-compose.yml
Some checks failed
CodeQL / Analyze (push) Has been cancelled
2026-01-17 15:48:50 +00:00
a22dc9d901 Update docker-compose.yml
Some checks are pending
CodeQL / Analyze (push) Waiting to run
2026-01-17 15:22:47 +00:00
April I. Murphy
83c90a760f
Merge pull request #800 from langflow-ai/docs-various-16-jan-26
Docs: Expand browse knowledge and nudges flow, remove global filters, add docling_serve_url, link to changelog
2026-01-16 16:27:57 -08:00
April M
6c23b6ece6 changelog link 2026-01-16 15:57:53 -08:00
April M
e3f2b1a5ea build error 2026-01-16 15:51:42 -08:00
April M
7a2a466adf docling_serve_url 2026-01-16 15:43:46 -08:00
April M
5c45395df5 ingestion status 2026-01-16 14:52:38 -08:00
April M
f080ae0e2a more detail about nudges flow 2026-01-16 13:26:14 -08:00
April M
7d22747ac8 change chat flow to agent flow 2026-01-16 11:12:36 -08:00
April M
00ce78df5c issue 566 2026-01-16 10:47:32 -08:00
Edwin Jose
1c014d220a
Merge pull request #728 from langflow-ai/issue-templates 2026-01-16 10:00:58 -05:00
Edwin Jose
2e12862151
Merge branch 'main' into issue-templates 2026-01-16 10:00:42 -05:00
Edwin Jose
4667bcf155
Merge pull request #654 from langflow-ai/2409dependabot/github_actions/actions/setup-python-6 2026-01-16 09:22:14 -05:00
Edwin Jose
dbfa432de6
Merge branch 'main' into 2409dependabot/github_actions/actions/setup-python-6 2026-01-16 09:19:28 -05:00
Mike Fortman
b195576f14
Merge pull request #785 from langflow-ai/node-versioning
Upgrade to node LTS version including security fix
2026-01-15 15:44:15 -06:00
Sebastián Estévez
594a237842
Merge pull request #792 from langflow-ai/open-search-health
opensearch health check
2026-01-15 15:57:24 -05:00
ming luo
bc639d190b opensearch health check 2026-01-15 15:30:04 -05:00
Mendon Kissling
88c09846c0
Docs: Upgrade to node LTS version including security fix (#787)
* upgrade-node-for-security-fix

* package-lock
2026-01-15 13:23:55 -05:00
Sebastián Estévez
6dc1985e26
Merge pull request #788 from langflow-ai/flow-configmaps
fix: add flow configmaps to helm chart
2026-01-15 11:56:59 -05:00
phact
2bf88d8f5c add flow configmaps to helm chart 2026-01-15 11:50:34 -05:00
Sebastián Estévez
638e2d4c56
Merge branch 'helm' into main 2026-01-15 11:23:26 -05:00
Mike Fortman
f5b0cc9f29
Merge branch 'main' into node-versioning 2026-01-15 10:03:42 -06:00
April I. Murphy
211184ca9d
Merge pull request #778 from langflow-ai/docs-issue-765
Docs: GPU mode tips
2026-01-15 07:27:06 -08:00
April M
70bf08e7ec remove ec2 troubleshooting 2026-01-15 07:12:06 -08:00
April M
57438003c0 Merge branch 'main' into docs-issue-765 2026-01-15 07:09:48 -08:00
Mike Fortman
2dbb27634a Upgrade to node LTS version including security fix 2026-01-14 13:21:03 -06:00
Sebastián Estévez
99546cd0e7
Merge pull request #779 from steveh250/main
Updated GPU resource reservations to docker-compose
2026-01-14 10:59:53 -05:00
ming
dfc97a161c
Merge pull request #782 from langflow-ai/docker-build-runner
fix docker build gh runner
2026-01-13 17:19:29 -05:00
ming luo
5904475a45 try langflow-ai-arm64-40gb-ephemeral 2026-01-13 17:04:18 -05:00
ming luo
b4ec305652 fix docker build gh runner 2026-01-13 16:54:24 -05:00
April I. Murphy
674f8b6295
Merge pull request #753 from langflow-ai/docs-issue-519
Docs: Enable Algolia search
2026-01-13 12:27:45 -08:00
April I. Murphy
1c87ec1336
Merge branch 'main' into docs-issue-519 2026-01-13 12:21:59 -08:00
April I. Murphy
10738303a7
Update docs/docusaurus.config.js 2026-01-13 12:19:27 -08:00
ming
355b737c17
Merge pull request #777 from langflow-ai/add-docling-serve-env-var
feat: new env var to override docling serve host
2026-01-13 14:45:15 -05:00
ming
dc5513fe50
remove docker-compose test-integration.yml 2026-01-13 14:23:58 -05:00
Sebastián Estévez
7a29fd3851
Merge pull request #773 from langflow-ai/rootless-podman-os-permissions
use U,z for opensearch data
2026-01-13 14:17:11 -05:00
phact
7fa693b7b5 .env.example 2026-01-13 14:15:51 -05:00
Sebastián Estévez
16aa74dfe0
Merge branch 'main' into rootless-podman-os-permissions 2026-01-13 14:11:59 -05:00
ming luo
18447c2a4e use sudo apt-get 2026-01-13 14:01:00 -05:00
ming luo
de29a80cba add docker compose 2026-01-13 13:55:12 -05:00
April I. Murphy
954d2b3e3f
Merge pull request #780 from langflow-ai/docs-issue-607
Docs: Add small API/SDK intro page with links to SDK READMEs
2026-01-13 10:49:52 -08:00
April M
df3a9f7280 add small api/sdk page 2026-01-13 10:28:20 -08:00
April M
a3304594e5 indentation 2026-01-13 09:59:10 -08:00
Steven Harris
2b383ee325
Merge branch 'main' into main 2026-01-13 09:35:56 -08:00
April M
42df43d21a gpu mode tip partial 2026-01-13 09:24:52 -08:00
April M
ebaa1f1a4e punctuation 2026-01-13 09:20:39 -08:00
April M
bb63309d1c issue 762 and 765 2026-01-13 09:18:08 -08:00
phact
b9e65ed4b9 new env var to override docling serve host 2026-01-13 12:11:10 -05:00
April I. Murphy
4ea1f39f16
Merge pull request #775 from langflow-ai/revert-docs-issue-519-meta-tag
Chore: Remove Algolia meta tag after docs site domain verified
2026-01-13 08:33:29 -08:00
April I. Murphy
bccb36411c
Merge branch 'main' into docs-issue-519 2026-01-13 08:10:11 -08:00
April I. Murphy
7b57718518
Merge branch 'main' into revert-docs-issue-519-meta-tag 2026-01-13 08:09:57 -08:00
April I. Murphy
483850dffb
Merge pull request #776 from langflow-ai/docs-issue-519-sitemap
Chore: Generate sitemap for docs
2026-01-13 08:09:34 -08:00
Mendon Kissling
346ad126de allow-indexing-to-generate-sitemap 2026-01-13 11:05:32 -05:00
April M
a6692aa3e1 generate sitemap 2026-01-13 07:49:45 -08:00
April M
4fafd90d26 remove algolia meta tag after domain verified 2026-01-13 07:03:42 -08:00
April I. Murphy
c99d2a1e1a
Merge pull request #772 from langflow-ai/docs-issue-519-meta-tag
Chore: Temporarily add meta tag to docs site to verify Algolia
2026-01-13 07:02:27 -08:00
April I. Murphy
860f1706e5
Merge branch 'main' into docs-issue-519-meta-tag 2026-01-13 06:58:49 -08:00
Mendon Kissling
a454167a4d global-head-meta 2026-01-13 09:51:14 -05:00
Sebastián Estévez
197f9e49e0
Merge branch 'main' into rootless-podman-os-permissions 2026-01-13 09:36:12 -05:00
April I. Murphy
8f19358d9b
Merge pull request #766 from CodeVishal-17/docs-align-readme-openrag
Docs: Align README with OpenRAG documentation
2026-01-13 06:35:47 -08:00
phact
f81d0224b3 use U,z for opensearch data 2026-01-13 09:33:51 -05:00
April I. Murphy
4b3494d3e1
Merge branch 'main' into docs-align-readme-openrag 2026-01-13 06:22:17 -08:00
April M
fc299f78af remove outdated TOC, expand develop and trbsh 2026-01-13 06:21:43 -08:00
April M
f6e6999dca Merge branch 'main' into docs-issue-519 2026-01-13 06:01:53 -08:00
April M
5d43814675 temporarily add meta tag to verify algolia 2026-01-13 05:36:53 -08:00
Sebastián Estévez
ea0c97d7e1
Merge pull request #767 from langflow-ai/tui-pre-generate-keys
pre generate keys in tui for rootless podman
2026-01-12 15:25:45 -05:00
phact
ff3a361aa0 pre generate keys in tui for rootless podman 2026-01-12 14:12:36 -05:00
Vishal
adcd41eb8a Docs: align README with OpenRAG documentation 2026-01-12 22:47:35 +05:30
Steven Harris
68d56bb094
Merge pull request #1 from steveh250/steveh250-patch-1
Updated GPU resource reservations to docker-compose.gpu.yml
2026-01-11 14:08:13 -08:00
Steven Harris
cdec80288e
Updated GPU resource reservations to docker-compose
Original version was failing on Ubuntu EC2 instance with GPU - error message was:

'validating /home/ubuntu/.openrag/tui/docker-compose.gpu.yml: services.openrag-backend Additional property gpus is not allowed
Command exited with status 15
2026-01-11 14:06:19 -08:00
Ronnie Miller
11b90f20bb
Merge pull request #761 from langflow-ai/cookie-banner
Add IBM TrustArc cookie consent banner to docs site
2026-01-09 12:56:29 -08:00
Ronnie Miller
1985b849c0 Add IBM TrustArc cookie consent banner to docs site 2026-01-09 11:03:09 -08:00
dependabot[bot]
240c77446c
build(deps):(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-08 22:26:04 +00:00
Mendon Kissling
7d0d7013c0
remove-yarn (#760) 2026-01-08 17:25:03 -05:00
April I. Murphy
a04c6a7f05
Merge pull request #758 from langflow-ai/docs-dep-audit-8-jan-26
Chore: Bump qs dependency for docs build
2026-01-08 13:27:55 -08:00
April M
04f5967f56 address dependency audit findings 2026-01-08 12:55:26 -08:00
April I. Murphy
0ce489aa77
Merge pull request #756 from langflow-ai/docs-issue-650-pt-2
Docs: Update note about supported URLs for on-demand chat ingestion
2026-01-07 14:16:04 -08:00
Mike Fortman
553046a887
Merge pull request #750 from langflow-ai/dependecy-check
action for dependency check twice a week
2026-01-07 16:05:38 -06:00
April M
2bc963d445 update supported urls note 2026-01-07 13:49:08 -08:00
Sebastián Estévez
36d255704c
Merge pull request #755 from langflow-ai/keys-api-ux
keys api ux improvement
2026-01-07 12:22:25 -05:00
phact
bcbf15a06d keys api ux improvement 2026-01-07 12:20:59 -05:00
Mike Fortman
c1f112cb92
Merge pull request #749 from langflow-ai/anthro-models
Remove deprecated anthropic models
2026-01-07 10:00:33 -06:00
Mike Fortman
fef4e51956
Merge pull request #743 from langflow-ai/npm-deps
update dependencies
2026-01-07 09:56:40 -06:00
Mike Fortman
eab9766b5b
Merge branch 'main' into anthro-models 2026-01-07 09:41:21 -06:00
Mike Fortman
d13ae8d9de
Merge branch 'main' into npm-deps 2026-01-07 09:38:22 -06:00
Mike Fortman
3ac40ac4e8
Merge branch 'main' into dependecy-check 2026-01-07 09:38:10 -06:00
Sebastián Estévez
a197b77212
Merge pull request #754 from langflow-ai/centralize-docling-pid
centralize docling pid
2026-01-07 10:00:34 -05:00
phact
a6cd864f82 centralize docling pid 2026-01-07 09:57:17 -05:00
April M
6119c882e9 add algolia block 2026-01-07 05:47:28 -08:00
Mike Fortman
14eb46ef67
Merge branch 'main' into dependecy-check 2026-01-06 16:31:18 -06:00
Mike Fortman
cff00236bc action for dependency check twice a week 2026-01-06 15:44:07 -06:00
April I. Murphy
53ba67c40a
Merge pull request #748 from langflow-ai/docs-typo-6-jan-26
Chore: fix docs typo
2026-01-06 10:21:25 -08:00
Mike Fortman
32d4092d39 update anthropic models 2026-01-06 11:03:59 -06:00
April M
d1f7f3fc3b edit local document path variable 2026-01-06 08:18:20 -08:00
April M
cd108aa43d fix typo 2026-01-06 08:04:40 -08:00
Sebastián Estévez
8cfcce5bc0
Merge pull request #745 from langflow-ai/fix-harden-sdk-filters
Fix harden sdk filters
2026-01-06 09:28:38 -05:00
Mike Fortman
8b0e4a1a9c
Merge branch 'main' into npm-deps 2026-01-05 16:33:47 -06:00
April I. Murphy
dd507b15a3
Merge pull request #744 from langflow-ai/docs-known-issue-650
Docs: Clarify which flows are backed up automatically, and suggest UTF-8 encoding for URLs with special characters
2026-01-05 13:31:09 -08:00
April I. Murphy
b86243bd74
Merge branch 'main' into docs-known-issue-650 2026-01-05 13:27:36 -08:00
Sebastián Estévez
ef4bd68205
Merge branch 'main' into fix-harden-sdk-filters 2026-01-05 16:25:15 -05:00
phact
f00ee39031 makefile improvements for dev mode 2026-01-05 16:22:50 -05:00
April M
d5ee346ba7 clarify which flows are backed up automatically 2026-01-05 13:16:31 -08:00
Mike Fortman
b1609a010a update dependencies 2026-01-05 14:58:59 -06:00
Sebastián Estévez
8550f37c45
Merge pull request #742 from langflow-ai/sdk-release
Sdk release
2026-01-05 15:54:29 -05:00
Sebastián Estévez
7fdb5e4b8c
Merge branch 'main' into sdk-release 2026-01-05 15:54:19 -05:00
phact
32c177b5b2 Merge branch 'sdk-release' of github.com:langflow-ai/openrag into sdk-release 2026-01-05 15:53:33 -05:00
phact
6747980e71 npm bump ci 2026-01-05 15:53:16 -05:00
April M
3b617ba38a UTF-8 encoding tip 2026-01-05 12:31:20 -08:00
Sebastián Estévez
fdd805365b
Merge pull request #741 from langflow-ai/sdk-release
Sdk release
2026-01-05 15:21:44 -05:00
Sebastián Estévez
22883eaf24
Merge branch 'main' into sdk-release 2026-01-05 15:21:35 -05:00
phact
c8b65e58fe Merge branch 'sdk-release' of github.com:langflow-ai/openrag into sdk-release 2026-01-05 15:20:14 -05:00
phact
58107b5e9c ci sdk auth 2026-01-05 15:19:50 -05:00
Sebastián Estévez
1f71e77959
Merge pull request #740 from langflow-ai/sdk-release
Sdk release
2026-01-05 13:35:59 -05:00
Sebastián Estévez
a18264a158
Merge branch 'main' into sdk-release 2026-01-05 13:34:32 -05:00
phact
99c8face00 bump 2026-01-05 13:18:07 -05:00
phact
7722d3f4d2 Merge branch 'sdk-release' of github.com:langflow-ai/openrag into sdk-release 2026-01-05 13:17:07 -05:00
phact
ffcc100dc9 manual deploys 2026-01-05 13:16:01 -05:00
Sebastián Estévez
b6d92951a9
Merge pull request #738 from langflow-ai/sdk-release
ci trigger
2026-01-05 13:12:08 -05:00
Sebastián Estévez
42bb4f7eeb
Merge branch 'main' into sdk-release 2026-01-05 13:07:09 -05:00
phact
918ed6ee54 ci trigger 2026-01-05 13:06:38 -05:00
Sebastián Estévez
29ea5e7b9f
Merge pull request #733 from langflow-ai/sdk-release
Bump SDKs to v0.1.2
2026-01-05 12:59:00 -05:00
phact
82318346ed python and ts sdks v0.1.2 2026-01-05 11:04:47 -05:00
phact
534c3021dd harden filters 2026-01-05 11:03:15 -05:00
Mike Fortman
c923ecb396
Merge pull request #647 from langflow-ai/static-analysis
setup codeql for code analysis
2025-12-23 16:28:09 -06:00
Edwin Jose
38cef69d18 templates 2025-12-23 14:21:35 -05:00
Mike Fortman
36ee2a56c2
Merge branch 'main' into static-analysis 2025-12-23 10:51:30 -06:00
Sebastián Estévez
9b012f40e9
Merge pull request #725 from langflow-ai/fix-ci-build
indentation
2025-12-22 23:21:09 -05:00
phact
ed34cf0f0d indentation 2025-12-22 23:20:20 -05:00
Sebastián Estévez
a252c94312
Merge pull request #724 from langflow-ai/sdk-chat-fix
sdk chat endpoint fix
2025-12-22 23:15:47 -05:00
phact
28bda02351 streaming text extract formats 2025-12-22 22:53:36 -05:00
phact
0943ab5f2e streaming fix 2025-12-22 22:47:18 -05:00
phact
3a73d5bce3 Merge branch 'sdk-chat-fix' of github.com:phact/openrag into sdk-chat-fix 2025-12-22 22:22:14 -05:00
phact
242ac4c7f3 set state fix 2025-12-22 22:21:55 -05:00
Sebastián Estévez
b88bfac573
Merge branch 'main' into sdk-chat-fix 2025-12-22 22:01:56 -05:00
phact
850c504c55 sdk chat endpoint fix 2025-12-22 22:00:42 -05:00
Sebastián Estévez
e25a2bf966
Merge pull request #723 from langflow-ai/release-0.2.0
Release 0.2.0
2025-12-22 21:45:38 -05:00
phact
f3575a2bff Merge branch 'release-0.2.0' of github.com:phact/openrag into release-0.2.0 2025-12-22 21:17:36 -05:00
phact
5ad0fb814d lock 2025-12-22 21:17:04 -05:00
Sebastián Estévez
623d9503c1
Merge branch 'main' into release-0.2.0 2025-12-22 21:16:35 -05:00
Sebastián Estévez
900e5f9795
Merge pull request #683 from langflow-ai/docs-robots-public-preview
Docs: Prepare robots.txt for public site
2025-12-22 21:12:47 -05:00
Sebastián Estévez
be9d9e09f0
Merge pull request #702 from langflow-ai/fix-onedrive-redirects
fix: Follow redirects for OneDrive + SharePoint
2025-12-22 21:12:21 -05:00
pushkala-datastax
23c2d5c502
Update build-multiarch.yml 2025-12-22 17:05:08 -08:00
pushkala-datastax
a2ce4a9cc2
Bump version from 0.1.55 to 0.2.0 2025-12-22 16:26:07 -08:00
pushkala-datastax
7627b7db1b
Merge pull request #712 from langflow-ai/pypi-again-1
Uncomment PyPI publish step in workflow
2025-12-22 16:21:16 -08:00
pushkala-datastax
ac99816c91
Uncomment PyPI publish step in workflow 2025-12-22 14:28:07 -08:00
April I. Murphy
a9156aec68
Merge pull request #701 from langflow-ai/docs-22-dec-25
Docs: Add some troubleshooting advice
2025-12-22 14:19:38 -08:00
Eric Hare
13d1c8bb45
fix: Follow redirects for OneDrive + SharePoint 2025-12-22 13:54:39 -08:00
April M
94ca9dbb51 chrome and fix link 2025-12-22 13:12:16 -08:00
April M
7417e30004 chat service stops working 2025-12-22 13:07:43 -08:00
April M
adcd0a9e52 add prune images 2025-12-22 12:49:35 -08:00
April M
06db0805cf recommended ram 2025-12-22 12:42:27 -08:00
Sebastián Estévez
9738fba9c0
Merge pull request #696 from langflow-ai/release-rc-0.1.55
feat: Bump version to 0.1.55
2025-12-19 17:31:58 -05:00
April I. Murphy
ac80c3d1c1
Merge pull request #686 from langflow-ai/issue-685-docs-security-md
Docs: Create initial SECURITY.md
2025-12-19 14:31:00 -08:00
April I. Murphy
447e944687
Update SECURITY.md 2025-12-19 14:27:58 -08:00
April I. Murphy
ebbb31cf8d
Merge pull request #692 from langflow-ai/issue-504-docs-contributing
Docs: Add Contribute to OpenRAG page
2025-12-19 14:27:05 -08:00
phact
3e0f603d88 sdk versions 2025-12-19 17:12:34 -05:00
Sebastián Estévez
0740183a0f
Merge branch 'main' into release-rc-0.1.55 2025-12-19 17:11:00 -05:00
Sebastián Estévez
2ea4c6192a
Merge pull request #698 from langflow-ai/copilot/fix-duplicate-opensearch-password
Remove duplicate OPENSEARCH_PASSWORD and legacy docker-compose-cpu.yml
2025-12-19 17:10:33 -05:00
Sebastián Estévez
b450614c23
Merge branch 'main' into copilot/fix-duplicate-opensearch-password 2025-12-19 17:10:07 -05:00
Sebastián Estévez
6dcfa4f660
Merge pull request #633 from langflow-ai/prune-image-tui
feat: Add image pruning options to TUI
2025-12-19 17:09:03 -05:00
Sebastián Estévez
3281f9de37
Merge branch 'main' into copilot/fix-duplicate-opensearch-password 2025-12-19 17:07:04 -05:00
Sebastián Estévez
cc3ebb3101
Merge pull request #699 from langflow-ai/fix-tui-not-refreshing-issue
fix: Add refresh action to WelcomeScreen and auto refresh
2025-12-19 16:55:48 -05:00
Sebastián Estévez
195f4f11ef
Merge pull request #697 from langflow-ai/fix-factory-reset-tui-legacy-path
fix: Handle legacy TUI config directory cleanup in factory reset
2025-12-19 16:53:56 -05:00
April I. Murphy
06ae466a22
Apply suggestions from code review 2025-12-19 13:26:25 -08:00
copilot-swe-agent[bot]
8af1059720 Swap GPU and CPU deployment sections in documentation
Per review feedback, reorder deployment sections to show GPU first, CPU second.
Line 132 now correctly shows CPU deployment with single command (no explicit -f flags).

Co-authored-by: phact <1313220+phact@users.noreply.github.com>
2025-12-19 21:25:25 +00:00
Edwin Jose
6812e52510 Add refresh action to WelcomeScreen
Introduces a new 'r' key binding to refresh the service state and update the welcome screen. The refresh action asynchronously checks the status of container and native services, updates OAuth config state, and refreshes the UI to ensure consistency between displayed text and button states.
2025-12-19 15:35:26 -05:00
copilot-swe-agent[bot]
17590042db Fix duplicate OPENSEARCH_PASSWORD and remove legacy docker-compose-cpu.yml
- Remove duplicate OPENSEARCH_PASSWORD in docker-compose.yml line 136
- Delete legacy docker-compose-cpu.yml file
- Update Makefile to use base docker-compose.yml for CPU mode
- Update Makefile to use docker-compose.yml + docker-compose.gpu.yml for GPU mode
- Update documentation to reflect new architecture
- Remove all references to docker-compose-cpu.yml from docs

Co-authored-by: phact <1313220+phact@users.noreply.github.com>
2025-12-19 20:30:50 +00:00
copilot-swe-agent[bot]
b514c8c078 Initial plan 2025-12-19 20:24:48 +00:00
Edwin Jose
4bd321e7c0 Handle legacy TUI config directory cleanup
Added support for deleting and recreating the legacy TUI config directory (~/.openrag/tui/config/) during the config reset process. This ensures old configuration files are properly removed alongside the current config directory.
2025-12-19 15:10:45 -05:00
Edwin Jose
53e43349d0 Bump version to 0.1.55 in pyproject.toml
Updated the project version from 0.1.54 to 0.1.55 in pyproject.toml. No other source changes; uv.lock changes are dependency metadata updates.
2025-12-19 14:11:39 -05:00
April I. Murphy
0a87448906
Apply suggestions from code review
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
2025-12-19 10:36:19 -08:00
April M
e49c94fb37 fix link 2025-12-19 10:01:26 -08:00
April M
54c6f81296 add community/contribution page 2025-12-19 09:55:36 -08:00
April I. Murphy
38e8b23ccd
Merge pull request #689 from langflow-ai/docs-install-steps-test-18-dec
Chore: Minor edits to install/TUI instructions while testing and replace TUI screenshot
2025-12-19 08:25:00 -08:00
April M
2327a1e399 Merge branch 'main' into docs-install-steps-test-18-dec 2025-12-19 08:12:32 -08:00
April M
381c8d2e8a fix numbering and link 2025-12-19 08:12:15 -08:00
April I. Murphy
7a4817473d
Merge pull request #687 from langflow-ai/issue-509-lf-links-1-7
Chore: Audit LF docs links
2025-12-19 07:41:00 -08:00
April M
30b6d251cd peer review and test numbering 2025-12-19 07:38:44 -08:00
April M
d534785542 Merge branch 'main' into docs-install-steps-test-18-dec 2025-12-19 07:25:00 -08:00
Sebastián Estévez
ff4473cbe2
Merge pull request #678 from langflow-ai/sdks
SDKs
2025-12-19 06:59:19 -05:00
phact
07c637e222 improve ci cleanup 2025-12-19 06:41:34 -05:00
phact
b63304594e ingest status assertion 2025-12-19 06:35:22 -05:00
phact
9702071d5b docker logs before teardown 2025-12-19 05:02:17 -05:00
phact
94f7a0ad45 container logs if tests fail 2025-12-19 04:39:28 -05:00
Sebastián Estévez
5c6ea708be
Merge branch 'main' into prune-image-tui 2025-12-19 04:12:19 -05:00
phact
3c14905440 onboarding before tests 2025-12-19 03:59:37 -05:00
phact
304e0c15d2 v1 endpoint 2025-12-19 03:36:02 -05:00
phact
bb71167d11 v1 endpoints for kf and settings 2025-12-19 03:31:54 -05:00
phact
61371beeba ingest flow id 2025-12-19 03:31:19 -05:00
Sebastián Estévez
6344ab9713
Merge pull request #690 from langflow-ai/zxcvbn
better password validator for open search
2025-12-19 03:26:19 -05:00
phact
4fe7819052 try building images in ci 2025-12-19 02:56:30 -05:00
Sebastián Estévez
41883f27f9
Merge pull request #652 from langflow-ai/feat-add-run-query-opensearch
let the agent do full os queries
2025-12-19 02:32:27 -05:00
Sebastián Estévez
9ebfe18952
Merge branch 'main' into feat-add-run-query-opensearch 2025-12-19 02:32:12 -05:00
phact
37899eb98f keys routing 2025-12-19 02:29:29 -05:00
phact
e0e9e7507d better password validator for open search 2025-12-19 02:22:30 -05:00
phact
391594acc1 make local test port 2025-12-19 02:07:16 -05:00
Sebastián Estévez
0332538d86
Merge branch 'main' into sdks 2025-12-19 02:06:37 -05:00
phact
359c2a3043 test default port 2025-12-19 02:05:22 -05:00
phact
320973a426 backend /v1 frontend /api/v1 routing, sdks port 3000 2025-12-19 01:50:29 -05:00
April I. Murphy
4213676260
Merge branch 'main' into issue-509-lf-links-1-7 2025-12-18 18:10:19 -08:00
April I. Murphy
0bc7d57063
Merge pull request #675 from langflow-ai/issue-431-docs-ollama-models
Docs: Recommended Ollama models
2025-12-18 18:08:23 -08:00
April M
6e66b6f5fd edit instructions while testing and update TUI img 2025-12-18 18:00:06 -08:00
April M
37a914f162 edit install steps while testing 2025-12-18 16:58:23 -08:00
April M
296842df34 allow all crawlers 2025-12-18 16:00:16 -08:00
April M
2e0dc9a6da audit LF docs links 2025-12-18 15:57:03 -08:00
April M
86821863d4 create initial SECURITY.md 2025-12-18 15:44:11 -08:00
April M
b0c5a78e35 prepare robots.txt for public site 2025-12-18 15:00:01 -08:00
April I. Murphy
a460fd05fd
Merge pull request #677 from langflow-ai/issue-673-docs-new-storage-path
Docs: Update paths for `~/.openrag` directory and subdirectories
2025-12-18 14:57:54 -08:00
April M
dd3c0db64c small fixes 2025-12-18 14:48:43 -08:00
April M
d31ca54127 sme review 2025-12-18 14:38:44 -08:00
phact
0db50a2357 sdk tests dev dependency install 2025-12-18 17:21:24 -05:00
phact
f8835df636 enable frontend api key gen for no auth mode 2025-12-18 17:12:34 -05:00
phact
c1816bfd16 package.json 2025-12-18 16:48:00 -05:00
April M
8811d57203 Merge branch 'main' into issue-673-docs-new-storage-path 2025-12-18 12:59:42 -08:00
Sebastián Estévez
e666077ec2
Merge branch 'main' into sdks 2025-12-18 11:54:22 -05:00
Sebastián Estévez
78f1400575
Merge pull request #680 from langflow-ai/langfuse
langfuse
2025-12-18 11:54:04 -05:00
Sebastián Estévez
3098533a44
Merge branch 'main' into sdks 2025-12-18 11:51:37 -05:00
Sebastián Estévez
6c0aae182b
Merge branch 'main' into langfuse 2025-12-17 23:46:57 -05:00
phact
77a518b77d fix langfuse env name 2025-12-17 23:41:27 -05:00
Eric Hare
dc8e5e0be9
Merge pull request #681 from langflow-ai/v0.1.54
Release v0.1.54
2025-12-17 14:14:53 -08:00
Eric Hare
02a4162827
Release v0.1.54 2025-12-17 12:24:10 -08:00
phact
f3e1ca673a langfuse 2025-12-17 13:02:15 -05:00
Sebastián Estévez
66ef7a9987
Merge pull request #679 from langflow-ai/tui-detection
fix tui detection
2025-12-17 12:39:46 -05:00
phact
3ade104ad0 fix tui detection 2025-12-17 12:38:58 -05:00
phact
1ed9d1b481 publish 2025-12-17 12:36:05 -05:00
phact
cbfdf1c8a8 pyproject 2025-12-17 11:35:42 -05:00
April I. Murphy
791127c13e
Merge pull request #676 from langflow-ai/issue-529-docs-opensearch-desc
Docs: Don't describe OpenSearch as only a vector db
2025-12-17 07:47:59 -08:00
phact
afdf337c55 sdk readmes 2025-12-17 10:15:05 -05:00
phact
648074d3c8 filters and settings + ci fixes 2025-12-17 10:10:01 -05:00
phact
956674e0ae update readme 2025-12-16 23:28:44 -05:00
Sebastián Estévez
1ba81df52e
Merge branch 'main' into sdks 2025-12-16 23:20:19 -05:00
phact
7ab0e5b011 fix ts sdk, tests pass 2025-12-16 23:19:08 -05:00
phact
20664c5064 gitignore 2025-12-16 23:04:04 -05:00
phact
f6b9fe0395 txt to md 2025-12-16 23:03:53 -05:00
phact
9bc6f8b6eb ingest poll and other sdk endpoint fixes 2025-12-16 22:40:39 -05:00
April M
e844244d7e new paths for config etc 2025-12-16 18:19:04 -08:00
April M
96fad29cfc dont describe opensearch as only a vector db 2025-12-16 16:36:38 -08:00
April M
30d94c1140 recommended ollama models 2025-12-16 16:24:20 -08:00
Sebastián Estévez
75f01539e0
Merge branch 'main' into feat-add-run-query-opensearch 2025-12-16 15:04:58 -05:00
Sebastián Estévez
30b8c9a3ca
Merge pull request #637 from langflow-ai/feat-centralized-storage
feat: Centralized storage location for OpenRAG
2025-12-16 15:04:27 -05:00
Sebastián Estévez
6022870f43
Merge branch 'main' into feat-centralized-storage 2025-12-16 15:04:04 -05:00
phact
727edb9762 version and darwin conditional for easyorc 2025-12-16 15:01:54 -05:00
April I. Murphy
c44ad09e04
Merge pull request #622 from langflow-ai/issue-454-install-docs
Docs: Break monolithic install pages into more focused topics, use partials for some repeated content and code examples
2025-12-16 06:03:43 -08:00
Eric Hare
28a676039c
fix: Disambiguate the key error messages (#671) 2025-12-16 10:54:50 -03:00
Eric Hare
73b458a5be
fix: Add other model provider keys as examples, grouped AWS with other OAuth credentials (#670)
* fix: Add other model provider keys as examples

* Grouped AWS Access Key env variables

* Added llm and embedding provider config onto .env.example

---------

Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
2025-12-16 10:53:49 -03:00
phact
74cba85ae6 v0 sdks wip 2025-12-16 02:04:31 -05:00
April M
c02dbdd5f6 build errors 2025-12-15 16:11:56 -08:00
April M
ea21f85742 peer review 2025-12-15 16:04:30 -08:00
phact
9f52a4f339 0.1.53-rc3 2025-12-15 16:35:43 -05:00
phact
999a2d0e71 docker rc version fix 2025-12-15 16:35:09 -05:00
phact
795cbe3b60 expand compose paths, and fix .env on startup 2025-12-15 16:12:44 -05:00
April M
4551886cb5 Merge branch 'main' into issue-454-install-docs 2025-12-15 12:35:56 -08:00
phact
5ececd5435 lock 2025-12-15 15:16:15 -05:00
phact
bef3ad4501 factory reset permissions bug 2025-12-15 15:15:49 -05:00
phact
c6b4e840ac rc2 2025-12-15 14:35:52 -05:00
phact
4e91de1569 fix: duplicate command bug 2025-12-15 14:35:11 -05:00
pushkala-datastax
be62f74488
Merge pull request #669 from langflow-ai/release-chore-0.153
chore: release 0.1.53
2025-12-13 09:10:07 -08:00
Edwin Jose
82bd997410 uv update 2025-12-13 01:28:56 -05:00
Edwin Jose
1df76aa51e
Merge pull request #665 from langflow-ai/fix/filter_search 2025-12-12 17:04:21 -05:00
Edwin Jose
65eea676fc
Merge branch 'main' into fix/filter_search 2025-12-12 16:47:33 -05:00
Edwin Jose
3b77b8e4b6
Merge pull request #668 from langflow-ai/fix-url-ingestion 2025-12-12 16:20:02 -05:00
Edwin Jose
2ed6623bdd
Merge branch 'main' into feat-add-run-query-opensearch 2025-12-12 16:16:15 -05:00
Edwin Jose
fafbf22910 Update openrag_url_mcp.json 2025-12-12 16:14:49 -05:00
phact
dfd0fcb602 Merge branch 'feat-centralized-storage' of github.com:phact/openrag into feat-centralized-storage 2025-12-12 16:03:19 -05:00
phact
6a1a785714 fix os_clear and integration test 2025-12-12 16:02:50 -05:00
Sebastián Estévez
370a20a363
Merge branch 'main' into feat-centralized-storage 2025-12-12 15:46:27 -05:00
phact
fe84ab5df0 lock 2025-12-12 15:43:56 -05:00
phact
c27b5661d5 in case we bring back diag 2025-12-12 15:43:43 -05:00
phact
544855d097 missed some dirs 2025-12-12 15:43:28 -05:00
Edwin Jose
7672b4a2a1 Update openrag_url_mcp.json 2025-12-12 15:33:20 -05:00
Lucas Oliveira
da4bc12fd5
Updated ingestion flow with updated Docling component (#667) 2025-12-12 17:22:59 -03:00
Eric Hare
a37dc5dae2
Merge pull request #666 from langflow-ai/fix-jpg-error
fix: Better debugging for input type ingest failures
2025-12-12 12:17:43 -08:00
phact
dc9309328e v0.1.53-rc1 2025-12-12 15:16:15 -05:00
phact
55b8f72b2b persist json state 2025-12-12 15:13:11 -05:00
Eric Hare
ea4d97f191
fix: Better debugging for input type ingest failures 2025-12-12 12:00:19 -08:00
phact
41f7f701c9 actually don't delete copied fiels 2025-12-12 14:54:56 -05:00
phact
5260dc3caa prompt the user, add migration marker 2025-12-12 14:45:31 -05:00
Eric Hare
5cec9a8e8a
Update container_manager.py 2025-12-12 11:03:25 -08:00
Eric Hare
6c7e494dfe
Update container_manager.py 2025-12-12 10:42:47 -08:00
Eric Hare
9854302680
fix: Get the right tui compose file 2025-12-12 10:42:24 -08:00
Lucas Oliveira
fb554445ce use new hook to get all knowledges 2025-12-12 15:13:56 -03:00
Lucas Oliveira
f22f479b1f use fuse.js instead of query to search for filters 2025-12-12 15:13:44 -03:00
Lucas Oliveira
8ca0f84cd8 created useGetAllFiltersQuery 2025-12-12 15:13:27 -03:00
Lucas Oliveira
425d5a61d0 Added fuse.js 2025-12-12 15:13:19 -03:00
Eric Hare
0fe9086795
Env var volume mounts + one time migration of data 2025-12-12 10:09:32 -08:00
Eric Hare
058db53d1a
Update env_manager.py 2025-12-12 10:04:46 -08:00
Eric Hare
38cf01598b
Merge branch 'main' into feat-centralized-storage 2025-12-12 09:45:53 -08:00
Lucas Oliveira
b8f4497e95
fix: pass .env to commands being executed to always match new changes (#662)
* Pass .env to commands being executed to always match new changes

* Updated files to use load_dotenv

* removed sanitizer
2025-12-12 14:25:33 -03:00
Eric Hare
f85741b356
Merge branch 'main' into feat-centralized-storage 2025-12-12 09:17:57 -08:00
Eric Hare
3ffce7bd8d
fix: clean up openrag files on host only 2025-12-12 09:17:48 -08:00
Lucas Oliveira
3c2774128b
Fixed tool call signature on history to allow showing tool call content when refreshing the page (#661) 2025-12-12 14:03:58 -03:00
Eric Hare
aa214624c9
Update src/utils/paths.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 08:29:45 -08:00
Eric Hare
2e377d2c78
Update src/utils/migration.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 08:29:36 -08:00
Eric Hare
da7ab628a3
Update src/main.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 08:29:26 -08:00
Eric Hare
3e5d2474ff
Update src/main.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 08:29:07 -08:00
Eric Hare
e7bc94c8ee
Update src/tui/managers/env_manager.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 08:28:57 -08:00
Eric Hare
c002fbabc6
Merge branch 'main' into feat-centralized-storage 2025-12-12 08:23:44 -08:00
Eric Hare
ee16120cc2
Merge pull request #638 from langflow-ai/fix-granite-33-model
fix: Support tool calling for granite 3.3
2025-12-12 08:22:46 -08:00
Sebastián Estévez
f44ffb564c
Merge branch 'main' into feat-add-run-query-opensearch 2025-12-12 11:06:45 -05:00
Sebastián Estévez
f97fee7f0d
Merge pull request #632 from langflow-ai/fix-markdown-upload
fix: Revise prompt to handle markdown uploads
2025-12-12 10:55:04 -05:00
Lucas Oliveira
97dfe5bdeb
remove adding to failed tasks to fix failed tasks count (#663) 2025-12-12 12:53:03 -03:00
Sebastián Estévez
6cfb5e2c7a
Merge pull request #653 from langflow-ai/knip-cleanup
knip cleanup for ui
2025-12-12 10:16:56 -05:00
phact
37b519f02c doc name 2025-12-11 12:02:19 -05:00
Edwin Jose
823e5925ee
Merge branch 'main' into prune-image-tui 2025-12-10 20:54:43 -05:00
Edwin Jose
59ff141109
Merge branch 'main' into knip-cleanup 2025-12-10 20:54:10 -05:00
Edwin Jose
a78926dd37
Merge pull request #646 from langflow-ai/dependabot 2025-12-10 20:53:46 -05:00
Edwin Jose
1a31e7f6b5
Merge branch 'main' into dependabot 2025-12-10 20:53:27 -05:00
Mike Fortman
bea925c96e
Merge pull request #645 from langflow-ai/secret-detection
Add Secret detection
2025-12-10 14:34:45 -06:00
Mike Fortman
454f353ea7
Merge branch 'main' into knip-cleanup 2025-12-10 14:34:20 -06:00
Mike Fortman
2f7461e9bc
Merge pull request #648 from langflow-ai/flow_names
make flow names consistent
2025-12-10 14:29:51 -06:00
Mike Fortman
a8d2e16bf4 knip cleanup for ui 2025-12-10 13:43:11 -06:00
phact
ab0c734595 let the agent do full os queries 2025-12-10 12:15:19 -05:00
phact
ca5c681f5b v0 2025-12-09 23:35:05 -05:00
Mike Fortman
2d0a20dc68 make flow names consistent 2025-12-09 16:39:35 -06:00
Mike Fortman
98957d8317 setup codeql 2025-12-09 15:29:22 -06:00
Mike Fortman
e454b64f84 setup dependabot 2025-12-09 15:10:21 -06:00
Mike Fortman
2dddbbdbee baseline 2025-12-09 14:40:47 -06:00
Mike Fortman
2c4a67bcbb setup secret detection 2025-12-09 14:37:13 -06:00
Eric Hare
015a4d955e
Merge pull request #629 from langflow-ai/fix-setup-option-inaccessible
fix: Setup option inaccessible but available
2025-12-09 11:37:19 -08:00
Eric Hare
8fdeafb608
Merge pull request #631 from langflow-ai/fix-large-pdf-ingest
fix: Configurable ingestion timeout limits
2025-12-09 11:36:25 -08:00
Eric Hare
88e57e944f
Merge branch 'main' into fix-markdown-upload 2025-12-09 11:34:52 -08:00
Eric Hare
c3e8827a2e
Merge pull request #630 from langflow-ai/fix-txt-file-processing
fix: Support for txt file processing outside of Docling
2025-12-09 11:29:27 -08:00
Eric Hare
7074de5ba7
fix: Tool calling for granite 3.3 2025-12-09 10:07:21 -08:00
Eric Hare
e02cfd5fe9
feat: Centralized storage location for OpenRAG 2025-12-09 09:34:54 -08:00
Eric Hare
40dc7ac73e
Merge branch 'main' into fix-markdown-upload 2025-12-09 08:19:09 -08:00
Edwin Jose
7390e515a9
Merge branch 'main' into prune-image-tui 2025-12-08 16:15:24 -05:00
Edwin Jose
ccd8f48984
Merge pull request #626 from langflow-ai/uv-auto-update 2025-12-08 15:56:01 -05:00
Edwin Jose
0ea86871d7 Add image pruning options to monitor screen
Introduces two async methods to ContainerManager for pruning OpenRAG images: one for removing old/unused images and another for aggressively removing all images after stopping services. Adds a modal dialog for users to select prune options, integrates the prune workflow into the monitor screen, and updates UI controls to include a 'Prune Images' button.
2025-12-08 15:54:10 -05:00
Eric Hare
9eaec94a2f
fix: Revise prompt to handle markdown uploads 2025-12-08 09:33:21 -08:00
Eric Hare
79cc531dc4
fix: Configurable ingestion timeout limits 2025-12-08 09:14:40 -08:00
Eric Hare
a467e8a9b6
fix: Support for txt file processing outside of Docling 2025-12-08 09:09:05 -08:00
Eric Hare
55e1c498ed
fix: Setup option inaccessible by available 2025-12-08 08:52:30 -08:00
Edwin Jose
1bac60995f
Merge branch 'main' into uv-auto-update 2025-12-05 20:47:41 -05:00
April M
e93ce03f92 fix typo 2025-12-05 17:42:21 -08:00
April M
4a7de470a9 add pdf 2025-12-05 17:41:36 -08:00
pushkala-datastax
f3ab58853f
Merge pull request #625 from langflow-ai/release-1.52
chore: Bump version to 0.1.52 in pyproject.toml
2025-12-05 17:39:57 -08:00
Edwin Jose
4f1ec7fa4e Create update-uv-lock.yml 2025-12-05 20:28:00 -05:00
Edwin Jose
fc40b320d4 Bump version to 0.1.52 in pyproject.toml
Incremented the project version from 0.1.51 to 0.1.52 in pyproject.toml. No other source changes; uv.lock changes are dependency metadata updates.
2025-12-05 20:26:28 -05:00
pushkala-datastax
7a2f33509d
Merge pull request #621 from langflow-ai/release-chore-v0.1.51
chore: release v.0.1.51
2025-12-05 16:27:30 -08:00
April M
d8221cd2e4 Merge branch 'main' into issue-454-install-docs 2025-12-05 16:02:26 -08:00
Edwin Jose
c513152ce7
Merge branch 'main' into release-chore-v0.1.51 2025-12-05 18:48:00 -05:00
Edwin Jose
5bf2076b05
Merge pull request #620 from langflow-ai/fix/watsonx_fixes 2025-12-05 18:47:46 -05:00
April M
538602a2ea reuse 2025-12-05 15:46:54 -08:00
Edwin Jose
cd124e4e9c Update pyproject.toml 2025-12-05 18:46:40 -05:00
Edwin Jose
0fb9809b8b
Merge branch 'main' into fix/watsonx_fixes 2025-12-05 18:43:56 -05:00
Sebastián Estévez
4eb707a160
Merge pull request #617 from langflow-ai/fix/onboarding_rollback
fix: adds onboarding rollback to allow user to edit embedding provider if ingestion fails
2025-12-05 18:11:30 -05:00
Sebastián Estévez
c9b1c94692
Merge branch 'main' into fix/onboarding_rollback 2025-12-05 18:09:27 -05:00
Sebastián Estévez
d908174758
Merge pull request #618 from langflow-ai/fix/chat_filter_clearing
fix: chat filter being cleared
2025-12-05 18:09:07 -05:00
Sebastián Estévez
ce10191463
Merge branch 'main' into fix/chat_filter_clearing 2025-12-05 18:08:44 -05:00
Edwin Jose
1b3b7ef414
Merge branch 'main' into fix/watsonx_fixes 2025-12-05 18:01:48 -05:00
Edwin Jose
b28ec798ba Add multi-model OpenSearch vector store component
Introduces opensearch_multimodel.py, a new component supporting multi-model hybrid search and ingestion in OpenSearch with dynamic vector fields, parallel embedding, and advanced filtering. Refactors embedding generation in opensearch.py to use tenacity-based retry logic and IBM/Watsonx rate limiting. Updates related flow JSONs to integrate the new component.
2025-12-05 18:01:04 -05:00
Edwin Jose
ddee4679b9
Merge pull request #616 from langflow-ai/fix/watsonx_fixes 2025-12-05 17:55:20 -05:00
Edwin Jose
197f83e099
Merge branch 'main' into fix/watsonx_fixes 2025-12-05 17:55:12 -05:00
Lucas Oliveira
0d32189006 remove refetch nudges 2025-12-05 17:51:17 -03:00
Lucas Oliveira
0b40b606c2
fix: chat blocking async requests (#619)
* fix chat blocking async requests

* fix delete user conversation not being async
2025-12-05 17:48:51 -03:00
Lucas Oliveira
8c9da8fd3a remove nudges refetch during onboarding upload 2025-12-05 17:48:35 -03:00
Lucas Oliveira
898e1fe7a8 removed console log 2025-12-05 17:46:37 -03:00
Lucas Oliveira
358af97936 fixed error not popping up on upload 2025-12-05 17:44:25 -03:00
April M
15f2e2270a spacing and finish docker page 2025-12-05 12:03:05 -08:00
Lucas Oliveira
1eda6c8559 fixed chat filter being cleared after onboarding 2025-12-05 16:33:11 -03:00
Lucas Oliveira
3ffa405ae9 fixed onboarding upload to be linked to the task id 2025-12-05 16:24:36 -03:00
April M
4538433720 environment variables 2025-12-05 11:23:20 -08:00
Lucas Oliveira
e413ff98f9 Fetch history before nudges to not block 2025-12-05 16:11:48 -03:00
Lucas Oliveira
474823d5e1 Added onboarding rollback on frontend, when onboarding ingestion fails 2025-12-05 15:49:33 -03:00
Lucas Oliveira
6cc011d36e Added onboarding rollback on backend 2025-12-05 15:49:13 -03:00
Lucas Oliveira
1f528c2935 Show specific watsonX error on banner 2025-12-05 14:37:07 -03:00
Lucas Oliveira
f114766c31 dont run health check if still ingesting 2025-12-05 13:42:06 -03:00
Lucas Oliveira
44a54a1028 only get nudges if healthy 2025-12-05 13:39:31 -03:00
Lucas Oliveira
e2ba1d2a33 fixed validations running even if provider not filled up 2025-12-05 13:15:46 -03:00
Lucas Oliveira
f9e09dbb8e enable provider health and history only after onboarding 2025-12-05 13:09:44 -03:00
Lucas Oliveira
2169df80f8 Fixed ibm validation happening when api key is not present 2025-12-05 12:58:18 -03:00
Sebastián Estévez
2e7a4ceb4f
Merge pull request #613 from langflow-ai/frontend-vuln-nextjs
Frontend vuln nextjs
2025-12-05 10:49:49 -05:00
phact
0d97ece10b frontend dependencies 2025-12-05 10:47:14 -05:00
phact
e26499ce8f Merge branch 'main' of github.com:phact/openrag 2025-12-05 10:43:58 -05:00
Sebastián Estévez
b7d846cc2e
Merge pull request #611 from langflow-ai/relax-langflow-key-validation
perf fix: relax blocking langflow key validation on every request
2025-12-05 10:43:22 -05:00
April M
bfb028808f revise onboarding partial 2025-12-05 07:02:33 -08:00
April M
dc724fe8e7 clean up tabs 2025-12-04 22:28:04 -08:00
April M
15e3b99da0 partials for common install content 2025-12-04 22:10:16 -08:00
April M
951fd4b176 propagate prerequisites and format install cmds 2025-12-04 19:16:05 -08:00
April M
d578e7832e revised setup, explain uv cache, rename svc mgmt 2025-12-04 17:17:00 -08:00
phact
f44ef5dccb Merge branch 'relax-langflow-key-validation' of github.com:phact/openrag into relax-langflow-key-validation 2025-12-04 15:55:12 -05:00
phact
61b8ce75e9 import bug 2025-12-04 15:54:31 -05:00
phact
5095154159 import bug 2025-12-04 15:53:12 -05:00
Sebastián Estévez
62821d4533
Merge branch 'main' into relax-langflow-key-validation 2025-12-04 15:18:51 -05:00
phact
d33cf7ecc8 refactor langflow calls 2025-12-04 15:16:25 -05:00
phact
50d62c2cc0 perf fix: relax blocking langflow key validation on every request 2025-12-04 15:10:35 -05:00
April M
e2c4d0a9e5 breaking out install tabs to separate pages 2025-12-04 10:56:21 -08:00
April M
81d14dd1c9 broken links 2025-12-04 10:35:11 -08:00
April M
f094b6defc Merge branch 'main' into issue-454-install-docs 2025-12-04 06:32:54 -08:00
April M
9f085a8637 start breaking up content into the new pages 2025-12-03 20:24:48 -08:00
Sebastián Estévez
b06765e5ca
Merge pull request #603 from langflow-ai/crank-scarf-timeout
crank scarf timeout
2025-12-03 20:14:33 -05:00
phact
9d04f0916e crank scarf timeout 2025-12-03 20:13:05 -05:00
April M
20e67d0ce5 one more page and fix typo 2025-12-03 17:05:44 -08:00
April M
ef85366d18 add empty files 2025-12-03 16:58:01 -08:00
Sebastián Estévez
51386e9b56
Merge pull request #600 from langflow-ai/release-update-0.1.50
chore: create release v0.1.50
2025-12-03 19:52:09 -05:00
phact
f73646c977 lock 2025-12-03 19:51:46 -05:00
Sebastián Estévez
4064b8ff1d
Merge branch 'main' into release-update-0.1.50 2025-12-03 19:51:11 -05:00
Sebastián Estévez
3c83c72e46
Merge pull request #602 from langflow-ai/scarf-fire-and-forget
fire and foreget
2025-12-03 19:50:50 -05:00
phact
9f6f4cd60d fire and foreget 2025-12-03 19:49:30 -05:00
Sebastián Estévez
df9234d0ee
Merge branch 'main' into release-update-0.1.50 2025-12-03 19:45:49 -05:00
Sebastián Estévez
32d928074a
Merge pull request #598 from langflow-ai/fix/health_check_models
fix: make health check be lightweight on best case scenario
2025-12-03 19:45:32 -05:00
Sebastián Estévez
b3e6c4d973
Merge branch 'main' into fix/health_check_models 2025-12-03 19:43:01 -05:00
Sebastián Estévez
1bba2c6976
Merge pull request #599 from langflow-ai/feat-worker-update-ingestion-flow
feat: update ingestion flow with worker update
2025-12-03 19:39:34 -05:00
Sebastián Estévez
9b8098891f
Merge branch 'main' into feat-worker-update-ingestion-flow 2025-12-03 19:37:15 -05:00
phact
a109e76bd8 update other flows w/ latest opensearch component 2025-12-03 19:30:49 -05:00
Sebastián Estévez
6c67162cd0
Merge pull request #601 from langflow-ai/dead-code-remove
Dead code remove
2025-12-03 19:13:18 -05:00
phact
653a903bec hide scrollbar 2025-12-03 19:07:50 -05:00
phact
5f047b7750 remove dead code old onboarding 2025-12-03 18:58:51 -05:00
Edwin Jose
8949f1f03a Update pyproject.toml 2025-12-03 17:35:10 -05:00
Edwin Jose
9d89b53939
Merge branch 'main' into fix/health_check_models 2025-12-03 17:07:42 -05:00
Edwin Jose
c5f893002b Update ingestion_flow.json 2025-12-03 16:49:08 -05:00
Lucas Oliveira
92c29094b7
fix: added alreadyConfigured as option to retrieve models (#597)
* Added alreadyConfigured as option to retrieve models

* format
2025-12-03 18:03:15 -03:00
Lucas Oliveira
8279cec761 wait for 2 seconds if its watsonx 2025-12-03 17:33:29 -03:00
Lucas Oliveira
2ca741ed32 Added error when ingest fails too 2025-12-03 17:30:30 -03:00
Lucas Oliveira
89a2d697b3 fixed format 2025-12-03 17:25:54 -03:00
Lucas Oliveira
cc5711bb5e make health check enable completion check if chat is failed 2025-12-03 17:12:06 -03:00
Lucas Oliveira
9b08f1fcee create lightweight health check based on query param 2025-12-03 17:11:51 -03:00
April I. Murphy
a778cd76fa
Merge pull request #569 from langflow-ai/issue-552-remove-docs-known-issue
Docs: Remove known issue when issue 552 is fixed
2025-12-03 11:18:02 -08:00
Sebastián Estévez
175155fba0
Merge pull request #596 from langflow-ai/fix-port-check
Fix port check
2025-12-03 13:54:01 -05:00
phact
d4a44b1843 fix container port check 2025-12-03 13:53:26 -05:00
phact
56f2b5764b fix native port check 2025-12-03 13:47:06 -05:00
Sebastián Estévez
bc022f5903
Merge pull request #595 from langflow-ai/unnecessary-notification
unnecessary notification
2025-12-03 13:42:19 -05:00
phact
e7dc0bc0bd unnecessary notification 2025-12-03 13:41:36 -05:00
Sebastián Estévez
05f5afc4b8
Merge pull request #594 from langflow-ai/factory-reset-fixes
Factory reset fixes
2025-12-03 13:35:06 -05:00
phact
2d0988e6d4 add checkbox for backup deletion and remove explicit time out from toasts 2025-12-03 13:09:43 -05:00
phact
8afd2e4d45 add script and make while we're at it for os clear 2025-12-03 11:33:13 -05:00
phact
19c96140a6 fix tui os and backups clear 2025-12-03 11:32:38 -05:00
Edwin Jose
85929bf981
Merge pull request #592 from langflow-ai/fix-env-tui-persist 2025-12-03 11:17:55 -05:00
Sebastián Estévez
c2b8ff3914
Merge pull request #593 from langflow-ai/upgrade-opensearch
upgrade os dockerfile
2025-12-03 10:47:23 -05:00
phact
6c15d91f7a upgrade os dockerfile 2025-12-03 10:00:27 -05:00
Edwin Jose
b0a29415bd Add support for environment API key in onboarding
Enhanced IBM onboarding to allow using an API key from environment configuration, with UI controls for toggling and validation feedback. Also added support for pre-filling endpoint and project ID for IBM and Ollama providers based on existing settings.
2025-12-03 00:39:12 -05:00
April M
9b08d70022 typos 2025-12-02 16:03:49 -08:00
April M
eb2df96b49 factory reset 2025-12-02 16:00:00 -08:00
Lucas Oliveira
a93da15ae2
bump version (#586) 2025-12-02 20:55:59 -03:00
Sebastián Estévez
1a558c12b3
Merge pull request #585 from langflow-ai/copilot/fix-linter-issues
Fix TypeScript error: Add filter_id to RequestBody interface
2025-12-02 18:24:42 -05:00
copilot-swe-agent[bot]
817f6c5135 Fix TypeScript error: Add filter_id to RequestBody interface
Co-authored-by: phact <1313220+phact@users.noreply.github.com>
2025-12-02 23:21:49 +00:00
copilot-swe-agent[bot]
593138257e Initial plan 2025-12-02 23:16:26 +00:00
April M
bba9d703f2 built-in filter 2025-12-02 14:41:16 -08:00
Edwin Jose
2079093117
Merge pull request #583 from langflow-ai/feat/0.1.48 2025-12-02 17:31:52 -05:00
Edwin Jose
f1d619a51e
Merge branch 'main' into feat/0.1.48 2025-12-02 17:19:03 -05:00
Edwin Jose
12a13f1d2c
Merge pull request #574 from langflow-ai/feat-ollama-health-checks 2025-12-02 17:18:52 -05:00
Lucas Oliveira
25418c615b Bump version to 0.1.48 2025-12-02 19:11:35 -03:00
Eric Hare
c5e09c47fe
Reduce timeout to 60 2025-12-02 14:11:30 -08:00
Eric Hare
133b59c2c6
Merge branch 'main' into feat-ollama-health-checks 2025-12-02 14:08:39 -08:00
Lucas Oliveira
91e02a9141
fix: added factory reset notice and deleted mounted files (#581)
* Added factory reset notice and deleted mounted files

* Update monitor.py (#582)

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
2025-12-02 19:05:52 -03:00
April I. Murphy
86104f3e40
Merge pull request #579 from langflow-ai/docs-dependencies
docs: update packages
2025-12-02 14:05:30 -08:00
April M
d5e4e14629 Merge branch 'main' into issue-552-remove-docs-known-issue 2025-12-02 13:56:00 -08:00
Edwin Jose
9232e45d93
Merge pull request #573 from langflow-ai/onboarding-fqs 2025-12-02 16:52:58 -05:00
Edwin Jose
c83ea54745
Merge branch 'main' into onboarding-fqs 2025-12-02 16:52:28 -05:00
Lucas Oliveira
9753b5a6c5 update chat history after message is received 2025-12-02 18:44:44 -03:00
Lucas Oliveira
17c24ef618 Added new OpenSearch code into flows 2025-12-02 18:34:38 -03:00
Mendon Kissling
6518562b5f update-packages 2025-12-02 16:34:12 -05:00
Eric Hare
30ac7977f7
Merge branch 'main' into feat-ollama-health-checks 2025-12-02 13:32:27 -08:00
Eric Hare
d60432b1e0
Update provider_validation.py 2025-12-02 13:26:35 -08:00
April I. Murphy
fe2a2e4962
Merge pull request #577 from langflow-ai/regenerate-pdf
Docs: regenerate pdf
2025-12-02 13:18:58 -08:00
Lucas Oliveira
268bf95e7b Change openrag agent to ahve context about the knowledge filter 2025-12-02 18:16:35 -03:00
April M
80c67cfb9f regenerate pdf 2025-12-02 12:51:21 -08:00
Lucas Oliveira
ed77a9cba0
feat: add Scarf telemetry to OpenRAG (#548)
* added telemetry utils

* added telemetry to openrag

* fixed http timeout

* Added OS and GPU logging

* Track task fail and cancel

* Updated messages to be more readable
2025-12-02 16:52:51 -03:00
Eric Hare
a6f1ed7c48
feat: Provide ollama health checking 2025-12-02 11:16:34 -08:00
Sebastián Estévez
48d5e7c45e
Merge branch 'main' into onboarding-fqs 2025-12-02 13:15:31 -05:00
pushkala-datastax
3fbf19aaec
Merge pull request #564 from langflow-ai/fix-restore-embeddings
fix: Respect selected embedding model when restoring flow
2025-12-02 09:55:58 -08:00
pushkala-datastax
2de83c2619
Merge pull request #563 from langflow-ai/fix-restore-flow
fix: Handle providers in Restore Flow
2025-12-02 09:55:17 -08:00
phact
0a2a991519 search embeding model support for watsonx models 2025-12-02 11:58:01 -05:00
April M
d4ceecba24 remove known issue 2025-12-02 08:00:23 -08:00
April I. Murphy
ef2014f82e
Merge pull request #565 from langflow-ai/issue-552-known-01-dec-25
Docs: Modifications to the descriptions of upgrade and reinstall behaviors
2025-12-02 07:58:24 -08:00
April M
2113c52da3 Merge branch 'main' into issue-552-known-01-dec-25 2025-12-02 07:50:58 -08:00
April I. Murphy
2e9b1c6802
Merge pull request #538 from langflow-ai/issue-502-monolithic-pages
Docs: Reorganize core component pages
2025-12-02 07:44:26 -08:00
April I. Murphy
28f09e3264
Merge branch 'main' into issue-552-known-01-dec-25 2025-12-02 07:37:15 -08:00
April M
dc7588bb7e peer review pt 2 2025-12-02 07:36:52 -08:00
pushkala-datastax
c3ef3689b0
Merge pull request #551 from langflow-ai/pushkala-datastax-patch-5
fix: change upgrade behavior, pin containers to tui version, add notice on start when containers are not latest, upgrade only when not latest
2025-12-02 07:21:55 -08:00
phact
0fc0be855c onboarding filter creation + sticky filters 2025-12-02 02:31:59 -05:00
phact
c5e27b636f fix delete filter clickability 2025-12-01 23:16:01 -05:00
phact
585428f5e8 duplicate filter check 2025-12-01 22:49:28 -05:00
phact
f3aff1f090 bubble up search errors to ui 2025-12-01 22:42:46 -05:00
phact
8a14c69e54 pointer events auto, delete filter 2025-12-01 22:00:10 -05:00
phact
31c93846e6 fix fq ownership 2025-12-01 21:09:01 -05:00
April M
3323492573 peer review pt 1 2025-12-01 16:58:01 -08:00
April M
7b113f2e89 Merge branch 'main' into issue-502-monolithic-pages 2025-12-01 16:47:47 -08:00
April M
cf7a4e75ec must delete kb separately 2025-12-01 16:45:00 -08:00
April M
56c69c6ef4 Revert "fix the description of the known issue"
This reverts commit ad59a5b516.
2025-12-01 16:22:54 -08:00
pushkala-datastax
0c204fd3f8
Merge pull request #560 from langflow-ai/fix-auth-mode-redirect
fix auth redirect bug for auth mode enabled
2025-12-01 16:15:52 -08:00
April M
ad59a5b516 fix the description of the known issue 2025-12-01 15:52:19 -08:00
April M
178a42dc55 Merge branch 'main' into issue-552-known-01-dec-25 2025-12-01 15:05:41 -08:00
April M
253335f2e2 upgrade behavior 2025-12-01 15:03:10 -08:00
April M
3cfebf2cbb known issue with reinstall 2025-12-01 14:48:04 -08:00
Mike Fortman
594ffbb6a0
Merge pull request #562 from langflow-ai/model-get-calls
Fix security issue w/ get model calls
2025-12-01 16:15:22 -06:00
Eric Hare
7a11ebb189
fix: Respect selected embedding model when restoring flow 2025-12-01 14:04:28 -08:00
Eric Hare
03c851dfab
fix: Handle providers in Restore Flow 2025-12-01 13:57:23 -08:00
phact
c106438d75 wip 2025-12-01 16:36:35 -05:00
Mike Fortman
221edcece4
Merge branch 'main' into model-get-calls 2025-12-01 15:02:56 -06:00
Mike Fortman
55a685ebab fix get endpoints 2025-12-01 15:01:10 -06:00
phact
6cd1dc2664 consolidate version check, flush instead of wait 2025-12-01 15:42:30 -05:00
Lucas Oliveira
681a139a93
lock ingestion flow (#561) 2025-12-01 17:31:13 -03:00
Lucas Oliveira
559f1e319b fixed to pull images when version mismatch 2025-12-01 16:43:55 -03:00
Lucas Oliveira
b41209dc04 add version mismatch dialog on welcome start button 2025-12-01 16:13:33 -03:00
Lucas Oliveira
689a3a73d1 add fullscreen dialog on upgrade 2025-12-01 16:12:02 -03:00
Lucas Oliveira
9fe244e939 changed version to be from docker 2025-12-01 16:11:17 -03:00
Lucas Oliveira
9e2631d395 Implement container version check and pin 2025-12-01 16:08:17 -03:00
Lucas Oliveira
7f87fc5968 updated langflow version to be openrag version 2025-12-01 15:57:39 -03:00
phact
459c676c02 fix auth redirect bug for auth mode enabled 2025-12-01 11:30:09 -05:00
Mike Fortman
e95ade58a5 Merge branch 'main' of github.com:langflow-ai/openrag 2025-12-01 10:01:59 -06:00
pushkala-datastax
9911c19a07
Add upgrade completion notification and instructions
Added a callback to notify users after container services are upgraded, including instructions to upgrade the TUI package.
2025-11-30 08:05:49 -08:00
Lucas Oliveira
450fb79647
fix: change symlinks for openrag documents (#547)
* fix documents being copied to wrong place

* created correct symlinks

* Changed version
2025-11-28 14:44:25 -03:00
Lucas Oliveira
3624b4f82b
fix: openrag documents ingestion (#545)
* Changed references to /app/documents to reference /app/openrag-documents

* bump version
2025-11-27 15:22:09 -03:00
pushkala-datastax
268d5b3d00
Merge pull request #543 from langflow-ai/pushkala-datastax-patch-2
Bump version from 0.1.44 to 0.1.45
2025-11-27 09:40:42 -08:00
pushkala-datastax
8ea740b098
Bump version from 0.1.44 to 0.1.45 2025-11-27 09:40:31 -08:00
pushkala-datastax
4b88fbd3fa
Merge pull request #542 from langflow-ai/pushkala-datastax-patch-1
Container and openrag-documents
2025-11-27 09:38:19 -08:00
pushkala-datastax
54dfd723dc
Container and openrag-documents 2025-11-27 09:37:55 -08:00
Lucas Oliveira
541e97c615
Bump version to 0.1.44 (#541) 2025-11-27 13:41:18 -03:00
pushkala-datastax
c1762f824d
Merge pull request #540 from langflow-ai/pushkala-datastax-patch-6
Update volume path for openrag-documents
2025-11-27 08:38:07 -08:00
phact
9e933d6092 v0.1.43 2025-11-27 07:13:51 -05:00
Lucas Oliveira
cebb38eb04
fix: make backend reset langflow flows after upgrade, backup flows every 5 mins (#483)
* Changed backend to mount config at volume

* update lock

* Changed backend to reapply settings after detecting that flow is reset

* Added periodic backup for flows, make better reset

* tui warning

* Changed settings page to alert user that he has to disable lock flow

* Changed flows to be locked

* Do periodic backup only if onboarding is done

* Change backup function to only back up flows if flow lock is disabled

* Added session manager to reapply all settings

---------

Co-authored-by: Sebastián Estévez <estevezsebastian@gmail.com>
2025-11-26 22:53:33 -03:00
pushkala-datastax
0fdf5a6518
Update volume path for openrag-documents 2025-11-26 17:51:08 -08:00
April M
0f02b5fbc0 Merge branch 'main' into issue-502-monolithic-pages 2025-11-26 16:30:02 -08:00
April M
0a83ea2e6c finish knowledge and oauth 2025-11-26 16:22:59 -08:00
pushkala-datastax
1b0614bdd4
Merge pull request #536 from langflow-ai/pushkala-datastax-patch-4
Update path for warmup_ocr.pdf in Dockerfile
2025-11-26 15:27:50 -08:00
pushkala-datastax
4db5e22a1d
Update path for warmup_ocr.pdf in Dockerfile 2025-11-26 15:26:11 -08:00
pushkala-datastax
aca1d191e6
Merge pull request #535 from langflow-ai/tui-launch-status
Shows "Lauch openrag" button only after services are ready
2025-11-26 15:23:39 -08:00
Mike Fortman
5678ef1eef Merge branch 'main' of github.com:langflow-ai/openrag 2025-11-26 17:23:11 -06:00
Mike Fortman
1648e65e4d Showes lauch openrag button only after services are ready 2025-11-26 17:18:17 -06:00
pushkala-datastax
36fde4575a
Merge pull request #534 from langflow-ai/pushkala-datastax-patch-3
Update pyproject.toml
2025-11-26 15:14:19 -08:00
pushkala-datastax
a4fa9d309d
Update pyproject.toml 2025-11-26 15:13:51 -08:00
Mike Fortman
79bb998211
Merge pull request #521 from langflow-ai/doc-directory-name
change documents directory to openrag-documents
2025-11-26 16:15:26 -06:00
Mike Fortman
25dd787d2a
Merge branch 'main' into doc-directory-name 2025-11-26 16:11:58 -06:00
Edwin Jose
b921993d40
Merge pull request #526 from langflow-ai/bump-version-1.41 2025-11-26 16:28:00 -05:00
Edwin Jose
860df4684e Bump version to 0.1.41 in pyproject.toml
Updated the project version from 0.1.40 to 0.1.41 in pyproject.toml. No other code changes were made.
2025-11-26 16:25:49 -05:00
Edwin Jose
dee3953f7a
Merge pull request #515 from langflow-ai/support-multi-embedding 2025-11-26 15:19:07 -05:00
Edwin Jose
92f0d158d6
Merge branch 'main' into support-multi-embedding 2025-11-26 14:37:26 -05:00
Mike Fortman
dca5d5fba2
Merge branch 'main' into doc-directory-name 2025-11-26 13:10:24 -06:00
pushkala-datastax
5a6261d7e0
Merge pull request #520 from langflow-ai/conversation-sidebar-new-convo-state
Adds loading state and placeholder for new conversations
2025-11-26 11:09:33 -08:00
Mike Fortman
d6466db5a1 change documents directory 2025-11-26 12:59:40 -06:00
Edwin Jose
53139ecb8a Enable local builds and env embedding model config in compose files
Uncommented build sections for backend, frontend, and langflow services in docker-compose.yml to allow local image builds. Updated SELECTED_EMBEDDING_MODEL to use environment variable in both docker-compose.yml and docker-compose-cpu.yml for improved configurability.
2025-11-26 13:55:49 -05:00
April M
ae8638b071 working on knowledge pages still 2025-11-26 09:10:32 -08:00
April M
fa825525f8 organize knowledge pages 2025-11-26 08:22:27 -08:00
Edwin Jose
6c3fca2018
Merge branch 'main' into support-multi-embedding 2025-11-26 11:04:23 -05:00
April M
069135d563 build out chat page 2025-11-26 07:33:55 -08:00
April M
3101dd0ed5 polish agents page 2025-11-26 06:14:20 -08:00
Sebastián Estévez
b172c2888d
Merge branch 'main' into support-multi-embedding 2025-11-26 04:38:41 -05:00
phact
a1961f66b7 Merge branch 'main' into support-multi-embedding 2025-11-26 04:34:40 -05:00
Edwin Jose
3dbd503b4c
Merge branch 'main' into support-multi-embedding 2025-11-26 04:20:05 -05:00
Edwin Jose
998d8b9195 Add fail-safe mode to embedding and OpenSearch components
Introduces a 'fail_safe_mode' option to the Embedding Model and OpenSearch (Multi-Model Multi-Embedding) components, allowing errors to be logged and None returned instead of raising exceptions. Refactors embedding model fetching logic for better error handling and updates component metadata, field order, and dependencies. Also adds 'className' fields and updates frontend node folder IDs for improved UI consistency.
2025-11-26 01:15:30 -05:00
Edwin Jose
2fa6efeaa9 update flows 2025-11-26 00:43:40 -05:00
Edwin Jose
d3a66c82b9 Add fail-safe mode to Embedding Model component
Introduces a 'fail_safe_mode' option to the Embedding Model component, allowing errors to be logged and None returned instead of raising exceptions. Refactors embedding initialization logic for OpenAI, Ollama, and IBM watsonx.ai providers to support this mode, and updates UI configuration and metadata accordingly.
2025-11-25 23:09:58 -05:00
Edwin Jose
8aa44037dc Update Dockerfile.langflow 2025-11-25 22:50:43 -05:00
Edwin Jose
0f2012bbb9 Update Langflow tweaks and add provider credentials to headers
Replaces all references to 'OpenSearchHybrid-Ve6bS' with 'OpenSearchVectorStoreComponentMultimodalMultiEmbedding-By9U4' in main.py, processors, and file service. Adds a utility for injecting provider credentials into Langflow request headers and integrates it into chat and file services for improved credential handling.
2025-11-25 22:50:38 -05:00
April M
33df187f59 add topic backto nav 2025-11-25 18:22:40 -08:00
April M
75c7f237d0 working on knowledge topics 2025-11-25 18:21:05 -08:00
Edwin Jose
07b84e373a Update config import to use settings module
Replaced imports from config_manager with settings in chat_service.py and langflow_file_service.py to use get_openrag_config from config.settings. This change ensures consistency with the updated configuration structure.
2025-11-25 19:40:24 -05:00
Edwin Jose
0bb0b621f0 Merge branch 'support-multi-embedding' of https://github.com/langflow-ai/openrag into support-multi-embedding 2025-11-25 19:09:23 -05:00
Edwin Jose
0c191edaaf Switch ingestion flow to multimodal OpenSearch component
Replaces OpenSearchHybrid with OpenSearchVectorStoreComponentMultimodalMultiEmbedding in ingestion_flow.json, updating all relevant edges and embedding connections. Updates docker-compose.yml to use local builds for backend, frontend, and langflow, and improves environment variable handling for API keys. This refactor enables multi-model and multimodal embedding support for document ingestion and search.
2025-11-25 19:09:21 -05:00
Edwin Jose
41d0d96268
Merge branch 'main' into support-multi-embedding 2025-11-25 17:48:57 -05:00
Edwin Jose
284b982dbf Add SELECTED_EMBEDDING_MODEL global variable support
Introduces SELECTED_EMBEDDING_MODEL as a global environment variable in docker-compose files and ensures it is passed in API headers for Langflow-related services. Updates settings and onboarding logic to set this variable without triggering flow updates, improving embedding model configuration consistency across services.
2025-11-25 17:47:54 -05:00
April M
0f9ec832c2 nudges and flow names 2025-11-25 14:30:02 -08:00
April M
c93cf42f88 notes and prep 2025-11-25 13:02:39 -08:00
April M
b00e6e9c98 langflow functionality 2025-11-25 10:49:03 -08:00
April M
bf3224e709 flow customization info 2025-11-25 09:43:51 -08:00
290 changed files with 41760 additions and 27401 deletions

View file

@ -2,6 +2,14 @@
# Set to true to disable Langflow ingestion and use traditional OpenRAG processor
# If unset or false, Langflow pipeline will be used (default: upload -> ingest -> delete)
DISABLE_INGEST_WITH_LANGFLOW=false
# Langflow HTTP timeout configuration (in seconds)
# For large documents (300+ pages), ingestion can take 30+ minutes
# Increase these values if you experience timeouts with very large PDFs
# Default: 2400 seconds (40 minutes) total timeout, 30 seconds connection timeout
# LANGFLOW_TIMEOUT=2400
# LANGFLOW_CONNECT_TIMEOUT=30
# make one like so https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key
LANGFLOW_SECRET_KEY=
@ -32,17 +40,36 @@ GOOGLE_OAUTH_CLIENT_SECRET=
MICROSOFT_GRAPH_OAUTH_CLIENT_ID=
MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=
# OPTIONAL: dns routable from google (etc.) to handle continous ingest (something like ngrok works). This enables continous ingestion
WEBHOOK_BASE_URL=
OPENAI_API_KEY=
# AWS Access Key ID and Secret Access Key with access to your S3 instance
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# OPTIONAL: dns routable from google (etc.) to handle continous ingest (something like ngrok works). This enables continous ingestion
WEBHOOK_BASE_URL=
# Model Provider API Keys
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
OLLAMA_ENDPOINT=
WATSONX_API_KEY=
WATSONX_ENDPOINT=
WATSONX_PROJECT_ID=
# LLM Provider configuration. Providers can be "anthropic", "watsonx", "ibm" or "ollama".
LLM_PROVIDER=
LLM_MODEL=
# Embedding provider configuration. Providers can be "watsonx", "ibm" or "ollama".
EMBEDDING_PROVIDER=
EMBEDDING_MODEL=
# OPTIONAL url for openrag link to langflow in the UI
LANGFLOW_PUBLIC_URL=
# OPTIONAL: Override the full docling-serve URL (e.g., for remote instances)
# If not set, auto-detects host and uses port 5001
# DOCLING_SERVE_URL=http://my-docling-server:5001
# OPTIONAL: Override host for docling service (for special networking setups)
# HOST_DOCKER_INTERNAL=host.containers.internal
@ -52,3 +79,10 @@ LANGFLOW_SUPERUSER=
LANGFLOW_SUPERUSER_PASSWORD=
LANGFLOW_NEW_USER_IS_ACTIVE=False
LANGFLOW_ENABLE_SUPERUSER_CLI=False
# Langfuse tracing (optional)
# Get keys from https://cloud.langfuse.com or your self-hosted instance
LANGFUSE_SECRET_KEY=
LANGFUSE_PUBLIC_KEY=
# Leave empty for Langfuse Cloud, or set for self-hosted (e.g., http://localhost:3002)
LANGFUSE_HOST=

155
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View file

@ -0,0 +1,155 @@
name: Bug Report
description: Report a bug or unexpected behavior in OpenRAG
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the form below to help us understand and fix the issue.
- type: input
id: openrag-version
attributes:
label: OpenRAG Version
description: What version of OpenRAG are you using? Run `openrag --version` or check your package version.
placeholder: "e.g., 0.1.0"
validations:
required: true
- type: dropdown
id: deployment-method
attributes:
label: Deployment Method
description: How are you running OpenRAG?
options:
- uvx (uvx openrag)
- uv add (installed in project)
- Docker
- Podman
- Local development (make dev)
- Other
validations:
required: true
- type: input
id: os
attributes:
label: Operating System
description: What operating system are you using?
placeholder: "e.g., macOS 14.0, Ubuntu 22.04, Windows 11"
validations:
required: true
- type: input
id: python-version
attributes:
label: Python Version
description: What Python version are you using? Run `python --version` to check.
placeholder: "e.g., 3.13.0"
validations:
required: false
- type: dropdown
id: affected-area
attributes:
label: Affected Area
description: Which area(s) of OpenRAG does this bug affect? Select all that apply.
multiple: true
options:
- Ingestion (document processing, upload, Docling)
- Retrieval (search, OpenSearch, hybrid search)
- Chat (chat interface, conversations, AI responses)
- Knowledge Filters (partitions, document filtering)
- Settings (configuration, model providers)
- TUI (Terminal User Interface)
- Connectors (Google Drive, OneDrive, SharePoint)
- Frontend (Next.js UI, components)
- Backend/API (Python/Starlette)
- Infrastructure (Docker, OpenSearch, Langflow)
- SDK (Python or TypeScript SDK)
- Onboarding (setup wizard, initial configuration)
- Authentication (OIDC, API keys)
- Other
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: Describe the bug...
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
placeholder: What should have happened?
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: Actual Behavior
description: A clear and concise description of what actually happened.
placeholder: What actually happened?
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant Logs
description: |
Please copy and paste any relevant log output.
You can get logs using `make logs` for Docker deployments or check the terminal output.
This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: false
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context about the problem here (e.g., browser version, specific document types, model provider being used).
validations:
required: false
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please confirm the following before submitting.
options:
- label: I have searched existing issues to ensure this bug hasn't been reported before.
required: true
- label: I have provided all the requested information.
required: true

15
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,15 @@
blank_issues_enabled: false
contact_links:
- name: OpenRAG Documentation
url: https://docs.openr.ag/
about: Learn more about OpenRAG's features, installation, and configuration.
- name: Troubleshooting Guide
url: https://docs.openr.ag/support/troubleshoot
about: Check the troubleshooting guide for common issues and solutions.
- name: GitHub Discussions
url: https://github.com/langflow-ai/openrag/discussions
about: Ask questions and discuss ideas with the community.
- name: Contributing Guide
url: https://github.com/langflow-ai/openrag/blob/main/CONTRIBUTING.md
about: Learn how to contribute to OpenRAG development.

106
.github/ISSUE_TEMPLATE/documentation.yml vendored Normal file
View file

@ -0,0 +1,106 @@
name: Documentation Issue
description: Report an issue with documentation or request new documentation
title: "[Docs]: "
labels: ["documentation"]
body:
- type: markdown
attributes:
value: |
Thanks for helping improve OpenRAG's documentation! Please provide details about the issue or your request.
- type: dropdown
id: issue-type
attributes:
label: Issue Type
description: What type of documentation issue is this?
options:
- Incorrect information
- Missing documentation
- Outdated content
- Unclear or confusing
- Typo or grammatical error
- Broken links
- Request for new documentation
- Other
validations:
required: true
- type: dropdown
id: doc-area
attributes:
label: Documentation Area
description: Which area of documentation does this relate to?
multiple: true
options:
- Getting Started / Quickstart
- Installation (uvx, Docker, Podman)
- Configuration / Settings
- Ingestion & Document Processing
- Search & Retrieval
- Chat Interface
- Knowledge Filters
- Connectors (Google Drive, OneDrive, SharePoint)
- TUI (Terminal User Interface)
- API Reference
- SDK Documentation (Python/TypeScript)
- Troubleshooting
- Contributing Guide
- Other
validations:
required: true
- type: input
id: doc-url
attributes:
label: Documentation URL
description: If applicable, provide a link to the specific documentation page.
placeholder: "https://docs.openr.ag/..."
validations:
required: false
- type: textarea
id: current-content
attributes:
label: Current Content
description: If reporting an issue, what does the documentation currently say?
placeholder: Quote or describe the current documentation content.
validations:
required: false
- type: textarea
id: issue-description
attributes:
label: Issue Description
description: Describe the problem or what documentation you'd like to see added.
placeholder: |
For issues: Explain what's wrong or confusing about the current documentation.
For requests: Describe what topic you'd like documented and why it would be helpful.
validations:
required: true
- type: textarea
id: suggested-content
attributes:
label: Suggested Content
description: If you have suggestions for how to fix or improve the documentation, please share them.
placeholder: Provide suggested text, corrections, or an outline for new documentation.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context, screenshots, or examples here.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: Contribution
description: Would you be interested in contributing to fix this documentation issue?
options:
- label: I would be willing to submit a pull request to fix this issue.
required: false

View file

@ -0,0 +1,113 @@
name: Feature Request
description: Suggest a new feature or enhancement for OpenRAG
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please provide as much detail as possible to help us understand your request.
- type: dropdown
id: feature-area
attributes:
label: Feature Area
description: Which area(s) of OpenRAG does this feature relate to?
multiple: true
options:
- Ingestion (document processing, upload, Docling)
- Retrieval (search, OpenSearch, hybrid search)
- Chat (chat interface, conversations, AI responses)
- Knowledge Filters (partitions, document filtering)
- Settings (configuration, model providers)
- TUI (Terminal User Interface)
- Connectors (Google Drive, OneDrive, SharePoint)
- Frontend (Next.js UI, components)
- Backend/API (Python/Starlette)
- Infrastructure (Docker, OpenSearch, Langflow)
- SDK (Python or TypeScript SDK)
- Onboarding (setup wizard, initial configuration)
- Authentication (OIDC, API keys)
- New Area
validations:
required: true
- type: textarea
id: problem-description
attributes:
label: Problem Description
description: Is your feature request related to a problem? Please describe.
placeholder: A clear and concise description of what the problem is. E.g., "I'm always frustrated when..."
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like to see implemented.
placeholder: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: Describe your use case and how this feature would benefit you or others.
placeholder: |
As a [type of user], I want [goal] so that [benefit].
Example: As a developer, I want to filter documents by custom metadata so that I can organize my knowledge base more effectively.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe any alternative solutions or features you've considered.
placeholder: What other approaches have you thought about? Why wouldn't they work as well?
validations:
required: false
- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to your workflow?
options:
- Nice to have
- Would improve my workflow
- Critical for my use case
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context, mockups, screenshots, or examples about the feature request here.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: Contribution
description: Would you be interested in contributing to this feature?
options:
- label: I would be willing to help implement this feature.
required: false
- label: I can help test this feature once implemented.
required: false
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please confirm the following before submitting.
options:
- label: I have searched existing issues and discussions to ensure this feature hasn't been requested before.
required: true

11
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
commit-message:
prefix: "build(deps):"
include: scope

View file

@ -14,6 +14,7 @@ jobs:
outputs:
skip_release: ${{ steps.version.outputs.skip_release }}
version: ${{ steps.version.outputs.version }}
docker_version: ${{ steps.version.outputs.docker_version }}
is_prerelease: ${{ steps.version.outputs.is_prerelease }}
steps:
- name: Checkout
@ -26,6 +27,12 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
# Normalize version per PEP 440 for Docker tags
# e.g., "0.1.53-rc2" -> "0.1.53rc2" to match Python's importlib.metadata
DOCKER_VERSION=$(echo "$VERSION" | sed -E 's/-?(rc|alpha|beta|dev|post)/\1/g')
echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
echo "Docker Version: $DOCKER_VERSION"
# Check if tag already exists
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
echo "Tag v$VERSION already exists, skipping release"
@ -62,8 +69,7 @@ jobs:
tag: langflowai/openrag-backend
platform: linux/arm64
arch: arm64
#runs-on: [self-hosted, linux, ARM64, langflow-ai-arm64-2]
runs-on: RagRunner
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# frontend
- image: frontend
@ -77,8 +83,7 @@ jobs:
tag: langflowai/openrag-frontend
platform: linux/arm64
arch: arm64
#runs-on: [self-hosted, linux, ARM64, langflow-ai-arm64-2]
runs-on: RagRunner
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# langflow
- image: langflow
@ -92,8 +97,7 @@ jobs:
tag: langflowai/openrag-langflow
platform: linux/arm64
arch: arm64
#runs-on: self-hosted
runs-on: RagRunner
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# opensearch
- image: opensearch
@ -107,9 +111,7 @@ jobs:
tag: langflowai/openrag-opensearch
platform: linux/arm64
arch: arm64
#runs-on: [self-hosted, linux, ARM64, langflow-ai-arm64-2]
#runs-on: self-hosted
runs-on: RagRunner
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
runs-on: ${{ matrix.runs-on }}
@ -117,13 +119,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version from pyproject.toml
id: version
run: |
VERSION=$(grep '^version = ' pyproject.toml | cut -d '"' -f 2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -141,7 +136,7 @@ jobs:
file: ${{ matrix.file }}
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ matrix.tag }}:${{ steps.version.outputs.version }}-${{ matrix.arch }}
tags: ${{ matrix.tag }}:${{ needs.check-version.outputs.docker_version }}-${{ matrix.arch }}
cache-from: type=gha,scope=${{ matrix.image }}-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.image }}-${{ matrix.arch }}
@ -153,12 +148,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version from pyproject.toml
id: version
run: |
VERSION=$(grep '^version = ' pyproject.toml | cut -d '"' -f 2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
@ -167,7 +156,7 @@ jobs:
- name: Create and push multi-arch manifests
run: |
VERSION=${{ steps.version.outputs.version }}
VERSION=${{ needs.check-version.outputs.docker_version }}
# Create versioned tags
docker buildx imagetools create -t langflowai/openrag-backend:$VERSION \
@ -217,20 +206,13 @@ jobs:
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Extract version from pyproject.toml
id: version
run: |
VERSION=$(grep '^version = ' pyproject.toml | cut -d '"' -f 2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Build wheel and source distribution
run: |
uv build
@ -253,8 +235,8 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: Release ${{ steps.version.outputs.version }}
tag_name: v${{ needs.check-version.outputs.version }}
name: Release ${{ needs.check-version.outputs.version }}
draft: false
prerelease: ${{ needs.check-version.outputs.is_prerelease }}
generate_release_notes: true
@ -264,8 +246,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish to PyPI
# run: |
# uv publish
# env:
# UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
- name: Publish to PyPI
run: |
uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}

66
.github/workflows/codeql.yml vendored Normal file
View file

@ -0,0 +1,66 @@
name: "CodeQL"
on:
push:
branches: [ 'main' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'main' ]
schedule:
- cron: '17 2 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

60
.github/workflows/dependency-audit.yml vendored Normal file
View file

@ -0,0 +1,60 @@
name: Dependency Audit
on:
schedule:
# Run Monday, Thursday at 9am UTC
- cron: '0 9 * * 1,4'
workflow_dispatch: # Allow manual trigger
jobs:
npm-audit:
name: NPM Audit
runs-on: ubuntu-latest
strategy:
matrix:
directory: ['frontend', 'docs', 'sdks/typescript']
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run npm audit
working-directory: ${{ matrix.directory }}
run: |
echo "::group::NPM Audit for ${{ matrix.directory }}"
npm audit --audit-level=moderate || echo "::warning::NPM audit found vulnerabilities in ${{ matrix.directory }}"
echo "::endgroup::"
- name: Check for outdated packages
working-directory: ${{ matrix.directory }}
run: |
echo "::group::Outdated packages in ${{ matrix.directory }}"
npm outdated || true
echo "::endgroup::"
python-audit:
name: Python Audit
runs-on: ubuntu-latest
strategy:
matrix:
directory: ['.', 'sdks/python']
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install pip-audit
run: pip install pip-audit
- name: Run pip-audit
working-directory: ${{ matrix.directory }}
run: |
echo "::group::Python Audit for ${{ matrix.directory }}"
pip-audit --desc || echo "::warning::pip-audit found vulnerabilities in ${{ matrix.directory }}"
echo "::endgroup::"

View file

@ -23,9 +23,9 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: ./docs/yarn.lock
node-version: 20.20.0
cache: npm
cache-dependency-path: ./docs/package-lock.json
- name: Validate Branch Names
run: |
@ -74,14 +74,14 @@ jobs:
echo "url=${{ vars.DOCS_DRAFT_BASE_URL }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/index.html" >> $GITHUB_OUTPUT
- name: Install dependencies
run: cd docs && yarn install
run: cd docs && npm install
- name: Build website
if: success()
run: |
set -o pipefail
cd docs
yarn build |& tee $GITHUB_WORKSPACE/build.log
npm run build |& tee $GITHUB_WORKSPACE/build.log
env:
BASE_URL: /langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}
FORCE_COLOR: 0 # Disable color output

View file

@ -16,14 +16,14 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: ./docs/yarn.lock
node-version: 20.20.0
cache: npm
cache-dependency-path: ./docs/package-lock.json
- name: Install dependencies
run: cd docs && yarn install
run: cd docs && npm install
- name: Build website
run: cd docs && yarn build
run: cd docs && npm run build
# env:
# SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_PROD_SEGMENT_PUBLIC_WRITE_KEY }}

View file

@ -0,0 +1,59 @@
name: Publish Python SDK
on:
push:
branches:
- main
paths:
- 'sdks/python/pyproject.toml'
workflow_dispatch:
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdks/python
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Extract version from pyproject.toml
id: version
run: |
VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Check if version already published
id: check
run: |
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://pypi.org/pypi/openrag-sdk/${{ steps.version.outputs.version }}/json)
if [ "$HTTP_STATUS" = "200" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Build package
if: steps.check.outputs.exists == 'false'
run: uv build
- name: Publish to PyPI
if: steps.check.outputs.exists == 'false'
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
- name: Skip publish (version exists)
if: steps.check.outputs.exists == 'true'
run: echo "Version ${{ steps.version.outputs.version }} already exists on PyPI, skipping publish"

View file

@ -0,0 +1,64 @@
name: Publish TypeScript SDK
on:
push:
branches:
- main
paths:
- 'sdks/typescript/package.json'
workflow_dispatch:
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: sdks/typescript
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Update npm to latest
run: npm install -g npm@latest
- name: Extract version from package.json
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Check if version already published
id: check
run: |
if npm view openrag-sdk@${{ steps.version.outputs.version }} version 2>/dev/null; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Install dependencies
if: steps.check.outputs.exists == 'false'
run: npm ci
- name: Build
if: steps.check.outputs.exists == 'false'
run: npm run build
- name: Publish to npm
if: steps.check.outputs.exists == 'false'
run: npm publish --access public --provenance
- name: Skip publish (version exists)
if: steps.check.outputs.exists == 'true'
run: echo "Version ${{ steps.version.outputs.version }} already exists on npm, skipping publish"

View file

@ -7,6 +7,7 @@ on:
- 'tests/**.py'
- 'pyproject.toml'
- 'uv.lock'
- 'sdks/**'
- '.github/workflows/test-integration.yml'
workflow_dispatch:
inputs:
@ -14,7 +15,7 @@ on:
description: 'Build images locally instead of pulling from DockerHub'
required: false
type: boolean
default: false
default: true
jobs:
tests:
@ -27,6 +28,7 @@ jobs:
LANGFLOW_NEW_USER_IS_ACTIVE: "True"
LANGFLOW_ENABLE_SUPERUSER_CLI: "True"
LANGFLOW_CHAT_FLOW_ID: ${{ vars.LANGFLOW_CHAT_FLOW_ID || '1098eea1-6649-4e1d-aed1-b77249fb8dd0' }}
LANGFLOW_INGEST_FLOW_ID: ${{ vars.LANGFLOW_INGEST_FLOW_ID || '5488df7c-b93f-4f87-a446-b67028bc0813' }}
NUDGES_FLOW_ID: ${{ vars.NUDGES_FLOW_ID || 'ebc01d31-1976-46ce-a385-b0240327226c' }}
steps:
@ -38,8 +40,16 @@ jobs:
docker builder prune -af || true
docker-compose -f docker-compose.yml down -v --remove-orphans || true
- name: Cleanup root-owned files (OpenSearch data, config)
run: |
for i in 1 2 3; do
docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config" && break
echo "Attempt $i failed, retrying in 5s..."
sleep 5
done || true
- run: df -h
- name: Checkout
uses: actions/checkout@v4
@ -54,6 +64,11 @@ jobs:
with:
version: latest
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Python version
run: uv python install 3.13
@ -73,7 +88,10 @@ jobs:
# Disable startup ingest noise unless a test enables it
DISABLE_STARTUP_INGEST: "true"
run: |
if [ "${{ inputs.use_local_images }}" == "true" ]; then
# For PRs, always build locally since we're testing new code
# For workflow_dispatch, use the input (defaults to true)
USE_LOCAL="${{ inputs.use_local_images }}"
if [ "${{ github.event_name }}" == "pull_request" ] || [ "$USE_LOCAL" != "false" ]; then
echo "Running tests with locally built images..."
make test-ci-local
else

52
.github/workflows/update-uv-lock.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: Update uv.lock on version bump
on:
push:
branches:
- main
paths:
- 'pyproject.toml'
workflow_dispatch:
jobs:
update-lock:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Update uv.lock
run: uv sync
- name: Check for changes
id: changes
run: |
if git diff --quiet uv.lock; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes to uv.lock"
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "uv.lock has been updated"
fi
- name: Commit and push uv.lock
if: steps.changes.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add uv.lock
git commit -m "chore: update uv.lock after version bump [skip ci]"
git push

5
.gitignore vendored
View file

@ -17,6 +17,9 @@ wheels/
1001*.pdf
*.json
!**/package.json
!**/package-lock.json
!**/tsconfig.json
!flows/*.json
!src/tui/_assets/flows/*.json
!src/tui/_assets/flows/components/*.json
@ -29,3 +32,5 @@ config/
# OpenSearch data directory
opensearch-data/
node_modules

7
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,7 @@
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline", "--exclude-lines", "code_hash"]

180
.secrets.baseline Normal file
View file

@ -0,0 +1,180 @@
{
"version": "1.5.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
},
{
"name": "AWSKeyDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"name": "Base64HighEntropyString",
"limit": 4.5
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "DiscordBotTokenDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"name": "GitLabTokenDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "IPPublicDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "KeywordDetector",
"keyword_exclude": ""
},
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "OpenAIDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "PypiTokenDetector"
},
{
"name": "SendGridDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TelegramBotTokenDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"filters_used": [
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": ".secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
{
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
},
{
"path": "detect_secrets.filters.heuristic.is_lock_file"
},
{
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
},
{
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
},
{
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
},
{
"path": "detect_secrets.filters.heuristic.is_sequential_string"
},
{
"path": "detect_secrets.filters.heuristic.is_swagger_file"
},
{
"path": "detect_secrets.filters.heuristic.is_templated_secret"
},
{
"path": "detect_secrets.filters.regex.should_exclude_file",
"pattern": [
"flows/.*\\.json$"
]
},
{
"path": "detect_secrets.filters.regex.should_exclude_line",
"pattern": [
"code_hash"
]
}
],
"results": {
"docs/docs/_partial-integrate-chat.mdx": [
{
"type": "Secret Keyword",
"filename": "docs/docs/_partial-integrate-chat.mdx",
"hashed_secret": "e42fd8b9ad15d8fa5f4718cad7cf19b522807996",
"is_verified": false,
"line_number": 30
}
],
"src/main.py": [
{
"type": "Base64 High Entropy String",
"filename": "src/main.py",
"hashed_secret": "131a83e9ef8660d7dd0771da7ce5954d9ea801ee",
"is_verified": false,
"line_number": 404
}
],
"src/models/processors.py": [
{
"type": "Base64 High Entropy String",
"filename": "src/models/processors.py",
"hashed_secret": "131a83e9ef8660d7dd0771da7ce5954d9ea801ee",
"is_verified": false,
"line_number": 763
}
],
"src/services/langflow_file_service.py": [
{
"type": "Base64 High Entropy String",
"filename": "src/services/langflow_file_service.py",
"hashed_secret": "131a83e9ef8660d7dd0771da7ce5954d9ea801ee",
"is_verified": false,
"line_number": 97
}
]
},
"generated_at": "2025-12-09T20:33:13Z"
}

View file

@ -1,18 +1,79 @@
FROM opensearchproject/opensearch:3.0.0
########################################
# Stage 1: Upstream OpenSearch with plugins
########################################
FROM opensearchproject/opensearch:3.2.0 AS upstream_opensearch
# Remove plugins
RUN opensearch-plugin remove opensearch-neural-search || true && \
opensearch-plugin remove opensearch-knn || true && \
# removing this one due to Netty CVE-2025-58056, can bring it back in the future
opensearch-plugin remove opensearch-security-analytics || true
# Prepare jvector plugin artifacts
RUN mkdir -p /tmp/opensearch-jvector-plugin && \
curl -L -s https://github.com/opensearch-project/opensearch-jvector/releases/download/3.2.0.0/artifacts.tar.gz \
| tar zxvf - -C /tmp/opensearch-jvector-plugin
# Prepare neural-search plugin
RUN mkdir -p /tmp/opensearch-neural-search && \
curl -L -s https://storage.googleapis.com/opensearch-jvector/opensearch-neural-search-3.2.0.0-20251029200300.zip \
> /tmp/opensearch-neural-search/plugin.zip
# Install additional plugins
RUN opensearch-plugin install --batch file:///tmp/opensearch-jvector-plugin/repository/org/opensearch/plugin/opensearch-jvector-plugin/3.2.0.0/opensearch-jvector-plugin-3.2.0.0.zip && \
opensearch-plugin install --batch file:///tmp/opensearch-neural-search/plugin.zip && \
opensearch-plugin install --batch repository-gcs && \
opensearch-plugin install --batch repository-azure && \
# opensearch-plugin install --batch repository-s3 && \
opensearch-plugin install --batch https://github.com/opensearch-project/opensearch-prometheus-exporter/releases/download/3.2.0.0/prometheus-exporter-3.2.0.0.zip
# Apply Netty patch
COPY patch-netty.sh /tmp/
RUN whoami && bash /tmp/patch-netty.sh
# Set permissions for OpenShift compatibility before copying
RUN chmod -R g=u /usr/share/opensearch
########################################
# Stage 2: UBI9 runtime image
########################################
FROM registry.access.redhat.com/ubi9/ubi:latest
USER root
RUN echo y | dnf install less procps-ng findutils sysstat perf sudo
# Update packages and install required tools
# TODO bring back iostat somehow? sysstat isn't in ubi
# TODO bring back 'perf' package, but what did we need it for?
RUN dnf update -y && \
dnf install -y --allowerasing \
less procps-ng findutils sudo curl tar gzip shadow-utils which && \
dnf clean all
# Grant the opensearchuser sudo privileges
# 'wheel' is the sudo group in Amazon Linux
RUN usermod -aG wheel opensearch
# Create opensearch user and group
ARG UID=1000
ARG GID=1000
ARG OPENSEARCH_HOME=/usr/share/opensearch
# Change the sudoers file to allow passwordless sudo
RUN echo "opensearch ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
WORKDIR $OPENSEARCH_HOME
# Handle different architectures for async-profiler
RUN groupadd -g $GID opensearch && \
adduser -u $UID -g $GID -d $OPENSEARCH_HOME opensearch
# Grant the opensearch user sudo privileges (passwordless sudo)
RUN usermod -aG wheel opensearch && \
echo "opensearch ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Copy OpenSearch from the upstream stage
COPY --from=upstream_opensearch --chown=$UID:0 $OPENSEARCH_HOME $OPENSEARCH_HOME
ARG OPENSEARCH_VERSION=3.2.0
########################################
# Async-profiler (multi-arch like your original)
########################################
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "amd64" ]; then \
export ASYNC_PROFILER_URL=https://github.com/async-profiler/async-profiler/releases/download/v4.0/async-profiler-4.0-linux-x64.tar.gz; \
elif [ "$TARGETARCH" = "arm64" ]; then \
@ -24,32 +85,22 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
curl -s -L $ASYNC_PROFILER_URL | tar zxvf - --strip-components=1 -C /opt/async-profiler && \
chown -R opensearch:opensearch /opt/async-profiler
# Create profiling script (as in your original Dockerfile)
RUN echo "#!/bin/bash" > /usr/share/opensearch/profile.sh && \
echo "export PATH=\$PATH:/opt/async-profiler/bin" >> /usr/share/opensearch/profile.sh && \
echo "echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid >/dev/null" >> /usr/share/opensearch/profile.sh && \
echo "echo 0 | sudo tee /proc/sys/kernel/kptr_restrict >/dev/null" >> /usr/share/opensearch/profile.sh && \
echo "asprof \$@" >> /usr/share/opensearch/profile.sh && \
chmod 777 /usr/share/opensearch/profile.sh
RUN echo "#!/bin/bash" > /usr/share/opensearch/profile.sh
RUN echo "export PATH=\$PATH:/opt/async-profiler/bin" >> /usr/share/opensearch/profile.sh
RUN echo "echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid >/dev/null" >> /usr/share/opensearch/profile.sh
RUN echo "echo 0 | sudo tee /proc/sys/kernel/kptr_restrict >/dev/null" >> /usr/share/opensearch/profile.sh
RUN echo "asprof \$@" >> /usr/share/opensearch/profile.sh
########################################
# Security config (OIDC/DLS) and setup script
########################################
RUN chmod 777 /usr/share/opensearch/profile.sh
# Copy OIDC and DLS security configuration (as root)
# Copy OIDC and DLS security configuration (as root, like before)
COPY securityconfig/ /usr/share/opensearch/securityconfig/
RUN chown -R opensearch:opensearch /usr/share/opensearch/securityconfig/
USER opensearch
RUN opensearch-plugin remove opensearch-neural-search
RUN opensearch-plugin remove opensearch-knn
# FIXME installing the prom exporter plugin ahead of time isn't compatible with the operator, for now
# RUN opensearch-plugin install https://github.com/Virtimo/prometheus-exporter-plugin-for-opensearch/releases/download/v2.18.0/prometheus-exporter-2.18.0.0.zip
RUN echo y | opensearch-plugin install https://repo1.maven.org/maven2/org/opensearch/plugin/opensearch-jvector-plugin/3.0.0.3/opensearch-jvector-plugin-3.0.0.3.zip
RUN echo y | opensearch-plugin install repository-gcs
RUN echo y | opensearch-plugin install repository-azure
RUN echo y | opensearch-plugin install repository-s3
# Create a script to apply security configuration after OpenSearch starts
RUN echo '#!/bin/bash' > /usr/share/opensearch/setup-security.sh && \
echo 'echo "Waiting for OpenSearch to start..."' >> /usr/share/opensearch/setup-security.sh && \
@ -70,3 +121,18 @@ RUN echo '#!/bin/bash' > /usr/share/opensearch/setup-security.sh && \
echo ' -key /usr/share/opensearch/config/kirk-key.pem' >> /usr/share/opensearch/setup-security.sh && \
echo 'echo "Security configuration applied successfully"' >> /usr/share/opensearch/setup-security.sh && \
chmod +x /usr/share/opensearch/setup-security.sh
########################################
# Final runtime settings
########################################
USER opensearch
WORKDIR $OPENSEARCH_HOME
ENV JAVA_HOME=$OPENSEARCH_HOME/jdk
ENV PATH=$PATH:$JAVA_HOME/bin:$OPENSEARCH_HOME/bin
# Expose ports
EXPOSE 9200 9300 9600 9650
ENTRYPOINT ["./opensearch-docker-entrypoint.sh"]
CMD ["opensearch"]

View file

@ -21,7 +21,7 @@ COPY pyproject.toml uv.lock ./
RUN uv sync
# Copy sample document and warmup script for docling
COPY documents/warmup_ocr.pdf ./
COPY openrag-documents/warmup_ocr.pdf ./
COPY warm_up_docling.py ./
RUN uv run docling-tools models download
RUN uv run python - <<'PY'

View file

@ -1,4 +1,4 @@
FROM node:18-slim
FROM node:20.20.0-slim
# Set working directory
WORKDIR /app

View file

@ -1,4 +1,4 @@
FROM langflowai/langflow-nightly:1.7.0.dev19
FROM langflowai/langflow-nightly:1.7.0.dev21
EXPOSE 7860

130
Makefile
View file

@ -11,7 +11,7 @@ ifneq (,$(wildcard .env))
endif
.PHONY: help dev dev-cpu dev-local infra stop clean build logs shell-backend shell-frontend install \
test test-integration test-ci test-ci-local \
test test-integration test-ci test-ci-local test-sdk \
backend frontend install-be install-fe build-be build-fe logs-be logs-fe logs-lf logs-os \
shell-be shell-lf shell-os restart status health db-reset flow-upload quick setup
@ -46,15 +46,19 @@ help:
@echo "Testing:"
@echo " test - Run all backend tests"
@echo " test-integration - Run integration tests (requires infra)"
@echo " test-ci - Start infra, run integration tests, tear down (uses DockerHub images)"
@echo " test-ci - Start infra, run integration + SDK tests, tear down (uses DockerHub images)"
@echo " test-ci-local - Same as test-ci but builds all images locally"
@echo " test-sdk - Run SDK integration tests (requires running OpenRAG at localhost:3000)"
@echo " lint - Run linting checks"
@echo ""
# Development environments
# Use centralized env file from TUI if it exists, otherwise fall back to local .env
OPENRAG_ENV_FILE := $(shell if [ -f ~/.openrag/tui/.env ]; then echo "--env-file ~/.openrag/tui/.env"; fi)
dev:
@echo "🚀 Starting OpenRAG with GPU support..."
docker compose up -d
docker compose $(OPENRAG_ENV_FILE) -f docker-compose.yml -f docker-compose.gpu.yml up -d
@echo "✅ Services started!"
@echo " Backend: http://localhost:8000"
@echo " Frontend: http://localhost:3000"
@ -64,7 +68,7 @@ dev:
dev-cpu:
@echo "🚀 Starting OpenRAG with CPU only..."
docker compose -f docker-compose-cpu.yml up -d
docker compose $(OPENRAG_ENV_FILE) up -d
@echo "✅ Services started!"
@echo " Backend: http://localhost:8000"
@echo " Frontend: http://localhost:3000"
@ -74,7 +78,7 @@ dev-cpu:
dev-local:
@echo "🔧 Starting infrastructure only (for local development)..."
docker compose up -d opensearch dashboards langflow
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
@echo "✅ Infrastructure started!"
@echo " Langflow: http://localhost:7860"
@echo " OpenSearch: http://localhost:9200"
@ -84,7 +88,7 @@ dev-local:
infra:
@echo "🔧 Starting infrastructure services only..."
docker compose up -d opensearch dashboards langflow
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
@echo "✅ Infrastructure services started!"
@echo " Langflow: http://localhost:7860"
@echo " OpenSearch: http://localhost:9200"
@ -92,7 +96,7 @@ infra:
infra-cpu:
@echo "🔧 Starting infrastructure services only..."
docker-compose -f docker-compose-cpu.yml up -d opensearch dashboards langflow
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
@echo "✅ Infrastructure services started!"
@echo " Langflow: http://localhost:7860"
@echo " OpenSearch: http://localhost:9200"
@ -101,15 +105,13 @@ infra-cpu:
# Container management
stop:
@echo "🛑 Stopping all containers..."
docker compose down
docker compose -f docker-compose-cpu.yml down 2>/dev/null || true
docker compose $(OPENRAG_ENV_FILE) down
restart: stop dev
clean: stop
@echo "🧹 Cleaning up containers and volumes..."
docker compose down -v --remove-orphans
docker compose -f docker-compose-cpu.yml down -v --remove-orphans 2>/dev/null || true
docker compose $(OPENRAG_ENV_FILE) down -v --remove-orphans
docker system prune -f
# Local development
@ -137,50 +139,53 @@ install-fe:
# Building
build:
@echo "🔨 Building Docker images..."
docker compose build
@echo "Building all Docker images locally..."
docker build -t langflowai/openrag-opensearch:latest -f Dockerfile .
docker build -t langflowai/openrag-backend:latest -f Dockerfile.backend .
docker build -t langflowai/openrag-frontend:latest -f Dockerfile.frontend .
docker build -t langflowai/openrag-langflow:latest -f Dockerfile.langflow .
build-be:
@echo "🔨 Building backend image..."
docker build -t openrag-backend -f Dockerfile.backend .
@echo "Building backend image..."
docker build -t langflowai/openrag-backend:latest -f Dockerfile.backend .
build-fe:
@echo "🔨 Building frontend image..."
docker build -t openrag-frontend -f Dockerfile.frontend .
@echo "Building frontend image..."
docker build -t langflowai/openrag-frontend:latest -f Dockerfile.frontend .
# Logging and debugging
logs:
@echo "📋 Showing all container logs..."
docker compose logs -f
docker compose $(OPENRAG_ENV_FILE) logs -f
logs-be:
@echo "📋 Showing backend logs..."
docker compose logs -f openrag-backend
docker compose $(OPENRAG_ENV_FILE) logs -f openrag-backend
logs-fe:
@echo "📋 Showing frontend logs..."
docker compose logs -f openrag-frontend
docker compose $(OPENRAG_ENV_FILE) logs -f openrag-frontend
logs-lf:
@echo "📋 Showing langflow logs..."
docker compose logs -f langflow
docker compose $(OPENRAG_ENV_FILE) logs -f langflow
logs-os:
@echo "📋 Showing opensearch logs..."
docker compose logs -f opensearch
docker compose $(OPENRAG_ENV_FILE) logs -f opensearch
# Shell access
shell-be:
@echo "🐚 Opening shell in backend container..."
docker compose exec openrag-backend /bin/bash
docker compose $(OPENRAG_ENV_FILE) exec openrag-backend /bin/bash
shell-lf:
@echo "🐚 Opening shell in langflow container..."
docker compose exec langflow /bin/bash
docker compose $(OPENRAG_ENV_FILE) exec langflow /bin/bash
shell-os:
@echo "🐚 Opening shell in opensearch container..."
docker compose exec opensearch /bin/bash
docker compose $(OPENRAG_ENV_FILE) exec opensearch /bin/bash
# Testing and quality
test:
@ -206,13 +211,13 @@ test-ci:
chmod 644 keys/public_key.pem 2>/dev/null || true; \
fi; \
echo "Cleaning up old containers and volumes..."; \
docker compose -f docker-compose-cpu.yml down -v 2>/dev/null || true; \
docker compose down -v 2>/dev/null || true; \
echo "Pulling latest images..."; \
docker compose -f docker-compose-cpu.yml pull; \
docker compose pull; \
echo "Building OpenSearch image override..."; \
docker build --no-cache -t langflowai/openrag-opensearch:latest -f Dockerfile .; \
echo "Starting infra (OpenSearch + Dashboards + Langflow) with CPU containers"; \
docker compose -f docker-compose-cpu.yml up -d opensearch dashboards langflow; \
echo "Starting infra (OpenSearch + Dashboards + Langflow + Backend + Frontend) with CPU containers"; \
docker compose up -d opensearch dashboards langflow openrag-backend openrag-frontend; \
echo "Starting docling-serve..."; \
DOCLING_ENDPOINT=$$(uv run python scripts/docling_ctl.py start --port 5001 | grep "Endpoint:" | awk '{print $$2}'); \
echo "Docling-serve started at $$DOCLING_ENDPOINT"; \
@ -257,6 +262,21 @@ test-ci:
uv run pytest tests/integration -vv -s -o log_cli=true --log-cli-level=DEBUG; \
TEST_RESULT=$$?; \
echo ""; \
echo "Waiting for frontend at http://localhost:3000..."; \
for i in $$(seq 1 60); do \
curl -s http://localhost:3000/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Running Python SDK integration tests"; \
cd sdks/python && \
uv sync --extra dev && \
OPENRAG_URL=http://localhost:3000 uv run pytest tests/test_integration.py -vv -s || TEST_RESULT=1; \
cd ../..; \
echo "Running TypeScript SDK integration tests"; \
cd sdks/typescript && \
npm install && npm run build && \
OPENRAG_URL=http://localhost:3000 npm test || TEST_RESULT=1; \
cd ../..; \
echo ""; \
echo "=== Post-test JWT diagnostics ==="; \
echo "Generating test JWT token..."; \
TEST_TOKEN=$$(uv run python -c "from src.session_manager import SessionManager, AnonymousUser; sm = SessionManager('test'); print(sm.create_jwt_token(AnonymousUser()))" 2>/dev/null || echo ""); \
@ -269,7 +289,7 @@ test-ci:
echo ""; \
echo "Tearing down infra"; \
uv run python scripts/docling_ctl.py stop || true; \
docker compose -f docker-compose-cpu.yml down -v 2>/dev/null || true; \
docker compose down -v 2>/dev/null || true; \
exit $$TEST_RESULT
# CI-friendly integration test target with local builds: builds all images, brings up infra, waits, runs tests, tears down
@ -286,14 +306,14 @@ test-ci-local:
chmod 644 keys/public_key.pem 2>/dev/null || true; \
fi; \
echo "Cleaning up old containers and volumes..."; \
docker compose -f docker-compose-cpu.yml down -v 2>/dev/null || true; \
docker compose down -v 2>/dev/null || true; \
echo "Building all images locally..."; \
docker build -t langflowai/openrag-opensearch:latest -f Dockerfile .; \
docker build -t langflowai/openrag-backend:latest -f Dockerfile.backend .; \
docker build -t langflowai/openrag-frontend:latest -f Dockerfile.frontend .; \
docker build -t langflowai/openrag-langflow:latest -f Dockerfile.langflow .; \
echo "Starting infra (OpenSearch + Dashboards + Langflow) with CPU containers"; \
docker compose -f docker-compose-cpu.yml up -d opensearch dashboards langflow; \
echo "Starting infra (OpenSearch + Dashboards + Langflow + Backend + Frontend) with CPU containers"; \
docker compose up -d opensearch dashboards langflow openrag-backend openrag-frontend; \
echo "Starting docling-serve..."; \
DOCLING_ENDPOINT=$$(uv run python scripts/docling_ctl.py start --port 5001 | grep "Endpoint:" | awk '{print $$2}'); \
echo "Docling-serve started at $$DOCLING_ENDPOINT"; \
@ -338,6 +358,21 @@ test-ci-local:
uv run pytest tests/integration -vv -s -o log_cli=true --log-cli-level=DEBUG; \
TEST_RESULT=$$?; \
echo ""; \
echo "Waiting for frontend at http://localhost:3000..."; \
for i in $$(seq 1 60); do \
curl -s http://localhost:3000/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Running Python SDK integration tests"; \
cd sdks/python && \
uv sync --extra dev && \
OPENRAG_URL=http://localhost:3000 uv run pytest tests/test_integration.py -vv -s || TEST_RESULT=1; \
cd ../..; \
echo "Running TypeScript SDK integration tests"; \
cd sdks/typescript && \
npm install && npm run build && \
OPENRAG_URL=http://localhost:3000 npm test || TEST_RESULT=1; \
cd ../..; \
echo ""; \
echo "=== Post-test JWT diagnostics ==="; \
echo "Generating test JWT token..."; \
TEST_TOKEN=$$(uv run python -c "from src.session_manager import SessionManager, AnonymousUser; sm = SessionManager('test'); print(sm.create_jwt_token(AnonymousUser()))" 2>/dev/null || echo ""); \
@ -348,11 +383,32 @@ test-ci-local:
fi; \
echo "================================="; \
echo ""; \
if [ $$TEST_RESULT -ne 0 ]; then \
echo "=== Tests failed, dumping container logs ==="; \
echo ""; \
echo "=== Langflow logs (last 500 lines) ==="; \
docker logs langflow 2>&1 | tail -500 || echo "Could not get Langflow logs"; \
echo ""; \
echo "=== Backend logs (last 200 lines) ==="; \
docker logs openrag-backend 2>&1 | tail -200 || echo "Could not get backend logs"; \
echo ""; \
fi; \
echo "Tearing down infra"; \
uv run python scripts/docling_ctl.py stop || true; \
docker compose -f docker-compose-cpu.yml down -v 2>/dev/null || true; \
docker compose down -v 2>/dev/null || true; \
exit $$TEST_RESULT
# SDK integration tests (requires running OpenRAG instance)
test-sdk:
@echo "Running SDK integration tests..."
@echo "Make sure OpenRAG is running at localhost:3000 (make up)"
@echo ""
@echo "Running Python SDK tests..."
cd sdks/python && uv sync --extra dev && OPENRAG_URL=http://localhost:3000 uv run pytest tests/test_integration.py -vv -s
@echo ""
@echo "Running TypeScript SDK tests..."
cd sdks/typescript && npm install && npm run build && OPENRAG_URL=http://localhost:3000 npm test
lint:
@echo "🔍 Running linting checks..."
cd frontend && npm run lint
@ -361,7 +417,7 @@ lint:
# Service status
status:
@echo "📊 Container status:"
@docker compose ps 2>/dev/null || echo "No containers running"
@docker compose $(OPENRAG_ENV_FILE) ps 2>/dev/null || echo "No containers running"
health:
@echo "🏥 Health check:"
@ -376,6 +432,10 @@ db-reset:
curl -X DELETE "http://localhost:9200/knowledge_filters" -u admin:$${OPENSEARCH_PASSWORD} || true
@echo "Indices reset. Restart backend to recreate."
clear-os-data:
@echo "🧹 Clearing OpenSearch data directory..."
@uv run python scripts/clear_opensearch_data.py
# Flow management
flow-upload:
@echo "📁 Uploading flow to Langflow..."

View file

@ -15,68 +15,20 @@ OpenRAG is a comprehensive Retrieval-Augmented Generation platform that enables
<a href="https://deepwiki.com/langflow-ai/openrag"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
</div>
<div align="center">
<a href="#quickstart" style="color: #0366d6;">Quickstart</a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="#install-python-package" style="color: #0366d6;">Python package</a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="#docker-or-podman-installation" style="color: #0366d6;">Docker or Podman</a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="#development" style="color: #0366d6;">Development</a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="#troubleshooting" style="color: #0366d6;">Troubleshooting</a>
</div>
## Install OpenRAG
## Quickstart
To get started with OpenRAG, see the installation guides in the OpenRAG documentation:
To run OpenRAG without creating or modifying any project files, use `uvx`:
```bash
uvx openrag
```
This command runs OpenRAG without installing it to your project or globally.
To run a specific version of OpenRAG, run `uvx --from openrag==VERSION openrag`.
## Install Python package
To add the OpenRAG Python package to a Python project, use `uv`:
1. Create a new project with a virtual environment using `uv init`:
```bash
uv init YOUR_PROJECT_NAME
cd YOUR_PROJECT_NAME
```
The `(venv)` prompt doesn't change, but `uv` commands will automatically use the project's virtual environment.
For more information on virtual environments, see the [uv documentation](https://docs.astral.sh/uv/pip/environments).
2. Add OpenRAG to your project:
```bash
uv add openrag
```
To add a specific version of OpenRAG, run `uv add openrag==VERSION`.
3. Start the OpenRAG terminal user interface (TUI):
```bash
uv run openrag
```
4. Continue with the [Quickstart](https://docs.openr.ag/quickstart).
For all installation options, see the [OpenRAG installation guide](https://docs.openr.ag/install).
## Docker or Podman installation
By default, OpenRAG automatically starts the required containers and helps you manage them.
To install OpenRAG with self-managed containers, see the [OpenRAG installation guide](https://docs.openr.ag/docker).
* [Quickstart](https://docs.openr.ag/quickstart)
* [Install the OpenRAG Python package](https://docs.openr.ag/install-options)
* [Deploy self-managed services with Docker or Podman](https://docs.openr.ag/docker)
## Development
For developers wanting to contribute to OpenRAG or set up a development environment, see [CONTRIBUTING.md](CONTRIBUTING.md).
For developers who want to [contribute to OpenRAG](https://docs.openr.ag/support/contribute) or set up a development environment, see [CONTRIBUTING.md](CONTRIBUTING.md).
## Troubleshooting
For common issues and fixes, see [Troubleshoot OpenRAG](https://docs.openr.ag/support/troubleshoot).
For assistance with OpenRAG, see [Troubleshoot OpenRAG](https://docs.openr.ag/support/troubleshoot) and visit the [Discussions page](https://github.com/langflow-ai/openrag/discussions).
To report a bug or submit a feature request, visit the [Issues page](https://github.com/langflow-ai/openrag/issues).

64
SECURITY.md Normal file
View file

@ -0,0 +1,64 @@
# OpenRAG security policy and responsible disclosure
## Security policy
This security policy applies to all public projects under the langflow-ai organization on GitHub. We prioritize security and continuously work to safeguard our systems. However, vulnerabilities can still exist. If you identify a security issue, please report it to us so we can address it promptly.
### Security and bug fix versions
- Fixes are released either as part of the next minor version (e.g., 1.3.0 → 1.4.0) or as an on-demand patch version (e.g., 1.3.0 → 1.3.1)
- Security fixes are given priority and might be enough to cause a new version to be released
## Report a vulnerability
We encourage responsible disclosure of security vulnerabilities. If you find or suspect a security issue, please discreetly report it to us so we can address it promptly:
### Submit a report
Go to the [OpenRAG Security page](https://github.com/langflow-ai/openrag/security), and then click **Report a vulnerability** to start a private conversation between you and the repository's maintainers.
Provide as many specific details as possible to help us reproduce and fix the issue quickly, including the following:
- Steps to reproduce the issue
- Potential impact or concerns
- Any suggested fixes
Your report is kept confidential, and these details aren't shared without your consent.
### Response timeline
We will acknowledge your report within 5 business days.
We will provide an estimated resolution timeline.
We will keep you updated on our progress.
### Disclosure guidelines
- Don't publicly disclose vulnerabilities until we have assessed, resolved, and notified affected users.
- If you plan to present your research (e.g., at a conference or in a blog), share a draft with us at least 30 days in advance for review.
- Disclosures must not include the following:
- Data from any OpenRAG customer projects
- OpenRAG user/customer information
- Details about OpenRAG employees, contractors, or partners
We appreciate your efforts in helping us maintain a secure platform, and we look forward to working together to resolve any issues responsibly.
## Known vulnerabilities
The following known vulnerabilities are for the OpenRAG codebase.
This list doesn't include vulnerabilities within OpenRAG dependencies like OpenSearch and Langflow.
For Langflow vulnerabilities, see the [Langflow SECURITY.md](https://github.com/langflow-ai/langflow/blob/main/SECURITY.md).
There are no known vulnerabilities exclusive to the OpenRAG application at this time.
## Security configuration guidelines
### Start the Langflow server with authentication enabled
It is recommended that you set a Langflow password (`LANGFLOW_SUPERUSER_PASSWORD`) so the Langflow server starts with authentication enabled and the `langflow superuser` command disabled.
You can set this password when you install OpenRAG, or you can [edit the OpenRAG `.env` file and redeploy the OpenRAG containers](https://docs.openr.ag/reference/configuration#set-environment-variables).
For more information, see [OpenRAG's Langflow settings reference](https://docs.openr.ag/reference/configuration#langflow-settings).

View file

@ -1,141 +0,0 @@
services:
opensearch:
image: langflowai/openrag-opensearch:${OPENRAG_VERSION:-latest}
#build:
# context: .
# dockerfile: Dockerfile
container_name: os
depends_on:
- openrag-backend
environment:
- discovery.type=single-node
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}
# Run security setup in background after OpenSearch starts
command: >
bash -c "
# Ensure data directory has correct permissions
sudo chown -R opensearch:opensearch /usr/share/opensearch/data || true
# Start OpenSearch in background
/usr/share/opensearch/opensearch-docker-entrypoint.sh opensearch &
# Wait a bit for OpenSearch to start, then apply security config
sleep 10 && /usr/share/opensearch/setup-security.sh &
# Wait for background processes
wait
"
ports:
- "9200:9200"
- "9600:9600"
volumes:
- ${OPENSEARCH_DATA_PATH:-./opensearch-data}:/usr/share/opensearch/data:Z
dashboards:
image: opensearchproject/opensearch-dashboards:3.0.0
container_name: osdash
depends_on:
- opensearch
environment:
OPENSEARCH_HOSTS: '["https://opensearch:9200"]'
OPENSEARCH_USERNAME: "admin"
OPENSEARCH_PASSWORD: ${OPENSEARCH_PASSWORD}
ports:
- "5601:5601"
openrag-backend:
image: langflowai/openrag-backend:${OPENRAG_VERSION:-latest}
# build:
# context: .
# dockerfile: Dockerfile.backend
container_name: openrag-backend
depends_on:
- langflow
environment:
- OPENSEARCH_HOST=opensearch
- LANGFLOW_URL=http://langflow:7860
- LANGFLOW_PUBLIC_URL=${LANGFLOW_PUBLIC_URL}
- LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN}
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
- LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER}
- LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD}
- LANGFLOW_CHAT_FLOW_ID=${LANGFLOW_CHAT_FLOW_ID}
- LANGFLOW_INGEST_FLOW_ID=${LANGFLOW_INGEST_FLOW_ID}
- LANGFLOW_URL_INGEST_FLOW_ID=${LANGFLOW_URL_INGEST_FLOW_ID}
- DISABLE_INGEST_WITH_LANGFLOW=${DISABLE_INGEST_WITH_LANGFLOW:-false}
- NUDGES_FLOW_ID=${NUDGES_FLOW_ID}
- OPENSEARCH_PORT=9200
- OPENSEARCH_USERNAME=admin
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- WATSONX_API_KEY=${WATSONX_API_KEY}
- WATSONX_ENDPOINT=${WATSONX_ENDPOINT}
- WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID}
- OLLAMA_ENDPOINT=${OLLAMA_ENDPOINT}
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET}
- MICROSOFT_GRAPH_OAUTH_CLIENT_ID=${MICROSOFT_GRAPH_OAUTH_CLIENT_ID}
- MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=${MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET}
- WEBHOOK_BASE_URL=${WEBHOOK_BASE_URL}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
volumes:
- ./documents:/app/documents:Z
- ./keys:/app/keys:Z
- ./flows:/app/flows:U,z
openrag-frontend:
image: langflowai/openrag-frontend:${OPENRAG_VERSION:-latest}
# build:
# context: .
# dockerfile: Dockerfile.frontend
container_name: openrag-frontend
depends_on:
- openrag-backend
environment:
- OPENRAG_BACKEND_HOST=openrag-backend
ports:
- "3000:3000"
langflow:
volumes:
- ./flows:/app/flows:U,z
image: langflowai/openrag-langflow:${LANGFLOW_VERSION:-latest}
# build:
# context: .
# dockerfile: Dockerfile.langflow
container_name: langflow
ports:
- "7860:7860"
environment:
- LANGFLOW_DEACTIVATE_TRACING=true
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- WATSONX_API_KEY=${WATSONX_API_KEY}
- WATSONX_ENDPOINT=${WATSONX_ENDPOINT}
- WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID}
- OLLAMA_BASE_URL=${OLLAMA_ENDPOINT}
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
- JWT=None
- OWNER=None
- OWNER_NAME=None
- OWNER_EMAIL=None
- CONNECTOR_TYPE=system
- CONNECTOR_TYPE_URL=url
- OPENRAG-QUERY-FILTER="{}"
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- FILENAME=None
- MIMETYPE=None
- FILESIZE=0
- LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD,OWNER,OWNER_NAME,OWNER_EMAIL,CONNECTOR_TYPE,FILENAME,MIMETYPE,FILESIZE
- LANGFLOW_LOG_LEVEL=DEBUG
- LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN}
- LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER}
- LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD}
- LANGFLOW_NEW_USER_IS_ACTIVE=${LANGFLOW_NEW_USER_IS_ACTIVE}
- LANGFLOW_ENABLE_SUPERUSER_CLI=${LANGFLOW_ENABLE_SUPERUSER_CLI}
# - DEFAULT_FOLDER_NAME=OpenRAG
- HIDE_GETTING_STARTED_PROGRESS=true

View file

@ -3,5 +3,10 @@ services:
environment:
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- NVIDIA_VISIBLE_DEVICES=all
gpus: all
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]

View file

@ -29,7 +29,7 @@ services:
- "9200:9200"
- "9600:9600"
volumes:
- ${OPENSEARCH_DATA_PATH:-./opensearch-data}:/usr/share/opensearch/data:Z
- ${OPENSEARCH_DATA_PATH:-./opensearch-data}:/usr/share/opensearch/data:U,z
dashboards:
image: opensearchproject/opensearch-dashboards:3.0.0
@ -45,9 +45,9 @@ services:
openrag-backend:
image: langflowai/openrag-backend:${OPENRAG_VERSION:-latest}
# build:
# context: .
# dockerfile: Dockerfile.backend
build:
context: .
dockerfile: Dockerfile.backend
container_name: openrag-backend
depends_on:
- langflow
@ -80,41 +80,45 @@ services:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
volumes:
- ./documents:/app/documents:Z
- ./keys:/app/keys:Z
- ./flows:/app/flows:U,z
- ${OPENRAG_DOCUMENTS_PATH:-./openrag-documents}:/app/openrag-documents:Z
- ${OPENRAG_KEYS_PATH:-./keys}:/app/keys:U,z
- ${OPENRAG_FLOWS_PATH:-./flows}:/app/flows:U,z
- ${OPENRAG_CONFIG_PATH:-./config}:/app/config:Z
- ${OPENRAG_DATA_PATH:-./data}:/app/data:Z
openrag-frontend:
image: langflowai/openrag-frontend:${OPENRAG_VERSION:-latest}
# build:
# context: .
# dockerfile: Dockerfile.frontend
build:
context: .
dockerfile: Dockerfile.frontend
container_name: openrag-frontend
depends_on:
- openrag-backend
environment:
- OPENRAG_BACKEND_HOST=openrag-backend
ports:
- "3000:3000"
- "3003:3003"
langflow:
volumes:
- ./flows:/app/flows:U,z
image: langflowai/openrag-langflow:${LANGFLOW_VERSION:-latest}
# build:
# context: .
# dockerfile: Dockerfile.langflow
- ${OPENRAG_FLOWS_PATH:-./flows}:/app/flows:U,z
image: langflowai/openrag-langflow:${OPENRAG_VERSION:-latest}
build:
context: .
dockerfile: Dockerfile.langflow
container_name: langflow
ports:
- "7860:7860"
environment:
- LANGFLOW_DEACTIVATE_TRACING=true
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- WATSONX_API_KEY=${WATSONX_API_KEY}
- WATSONX_ENDPOINT=${WATSONX_ENDPOINT}
- WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID}
- OLLAMA_BASE_URL=${OLLAMA_ENDPOINT}
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-}
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-}
- LANGFUSE_HOST=${LANGFUSE_HOST:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-None}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-None}
- WATSONX_API_KEY=${WATSONX_API_KEY:-None}
- WATSONX_ENDPOINT=${WATSONX_ENDPOINT:-None}
- WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID:-None}
- OLLAMA_BASE_URL=${OLLAMA_ENDPOINT:-None}
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
- JWT=None
@ -128,7 +132,8 @@ services:
- FILENAME=None
- MIMETYPE=None
- FILESIZE=0
- LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD,OWNER,OWNER_NAME,OWNER_EMAIL,CONNECTOR_TYPE,FILENAME,MIMETYPE,FILESIZE
- SELECTED_EMBEDDING_MODEL=${SELECTED_EMBEDDING_MODEL:-}
- LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD,OWNER,OWNER_NAME,OWNER_EMAIL,CONNECTOR_TYPE,FILENAME,MIMETYPE,FILESIZE,SELECTED_EMBEDDING_MODEL,OPENAI_API_KEY,ANTHROPIC_API_KEY,WATSONX_API_KEY,WATSONX_ENDPOINT,WATSONX_PROJECT_ID,OLLAMA_BASE_URL
- LANGFLOW_LOG_LEVEL=DEBUG
- LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN}
- LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER}

View file

@ -5,13 +5,13 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
## Installation
```bash
yarn
npm install
```
## Local Development
```bash
yarn start
npm start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
@ -19,7 +19,7 @@ This command starts a local development server and opens up a browser window. Mo
## Build
```bash
yarn build
npm run build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
@ -29,20 +29,20 @@ This command generates static content into the `build` directory and can be serv
Using SSH:
```bash
USE_SSH=true yarn deploy
USE_SSH=true npm run deploy
```
Not using SSH:
```bash
GIT_USER=<Your GitHub username> yarn deploy
GIT_USER=<Your GitHub username> npm run deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
## Update the OpenRAG documentation PDF
The documentation PDF at `openrag/documents/openrag-documentation.pdf` is used by the OpenRAG application, so keep it up to date.
The documentation PDF at `openrag/openrag-documents/openrag-documentation.pdf` is used by the OpenRAG application, so keep it up to date.
To update the PDF, do the following:
@ -68,7 +68,7 @@ To remove these items, give the following prompt or something similar to your ID
2. Check your `.mdx` files to confirm these elements are removed.
Don't commit the changes.
3. From `openrag/docs`, run this command to build the site with the changes, and create a PDF at `openrag/documents`.
3. From `openrag/docs`, run this command to build the site with the changes, and create a PDF at `openrag/openrag-documents`.
```
npm run build:pdf

View file

@ -28,7 +28,6 @@ docs: {
See the [Docusaurus docs](https://docusaurus.io/docs/versioning) for more info.
1. Use the Docusaurus CLI command to create a version.
You can use `yarn` instead of `npm`.
```bash
# Create version 1.0.0 from current docs
npm run docusaurus docs:version 1.0.0

View file

@ -0,0 +1 @@
In no-auth mode, all documents are attributed to **Anonymous User** because there is no distinct document ownership or unique JWTs. For more control over document ownership and visibility, use OAuth mode. For more information, see [OpenSearch authentication and document access](/knowledge#auth).

View file

@ -0,0 +1,9 @@
```bash title="Docker"
docker compose down --volumes --remove-orphans --rmi local
docker system prune -f
```
```bash title="Podman"
podman compose down --volumes --remove-orphans --rmi local
podman system prune -f
```

View file

@ -0,0 +1,7 @@
```bash title="Docker"
docker compose up -d
```
```bash title="Podman"
podman compose up -d
```

View file

@ -0,0 +1,49 @@
1. Remove all containers, including stopped containers:
```bash title="Docker"
docker rm --force $(docker ps -aq)
```
```bash title="Podman"
podman rm --all --force
```
2. Remove all images:
```bash title="Docker"
docker rmi --force $(docker images -q)
```
```bash title="Podman"
podman rmi --all --force
```
3. Remove all volumes:
```bash title="Docker"
docker volume prune --force
```
```bash title="Podman"
podman volume prune --force
```
4. Remove all networks except the default network:
```bash title="Docker"
docker network prune --force
```
```bash title="Podman"
podman network prune --force
```
5. Clean up any leftover data:
```bash title="Docker"
docker system prune --all --force --volumes
```
```bash title="Podman"
podman system prune --all --force --volumes
```

View file

@ -0,0 +1,7 @@
```bash title="Docker"
docker stop $(docker ps -q)
```
```bash title="Podman"
podman stop --all
```

View file

@ -0,0 +1 @@
1. If you modified the built-in flows or created custom flows in your [OpenRAG Langflow instance](/agents), [export your flows](https://docs.langflow.org/concepts-flows-import) before starting this process. Although OpenRAG can preserve changes to the built-in flows, it doesn't preserve user-created flows. As a general best practice, exporting your flows is recommended to create backups of your customizations. Afterwards, you can reimport your flows or reference the exported flow JSON as needed.

View file

@ -0,0 +1,22 @@
:::warning
This is a destructive operation that does the following:
* Destroys all OpenRAG containers, volumes, and local images.
* Prunes any additional container objects.
* Deletes the contents of the `~/.openrag` directory _except_ for OpenRAG's `.env` file and the `/documents` subdirectory.
<p/>Destroyed containers and deleted data are lost and cannot be recovered after running this operation.
:::
<!--
Author's note: Don't remove the <p/> tag!
For some reason, this specific usage consistently enforces the line break and indentation whether the partial is nested or not.
Without the <p/> tag, when this partial is used inside a list (ex. nested under a step in a numbered list), there is no implicit line break after the last bullet.
When this partial is used outside of a list (as a top-level paragraph), there is an implicit line break after the last bullet.
Neither <br/> nor wrapping the entire line in <p> </p> worked consistently for both use cases.
Either the line break was missing or the indentation was incorrect.
This behavior was observed in Docusaurus 3.9.2 on 05 Dec 2025. In a future release, if this is not longer an issue, you can remove the tag and this note. :)
-->

View file

@ -0,0 +1,5 @@
GPU acceleration isn't required for most use cases.
OpenRAG's CPU-only deployment doesn't prevent you from using GPU acceleration in external services, such as Ollama servers.
GPU acceleration is required only for specific use cases, typically involving customization of the ingestion flows or ingestion logic.
For example, writing alternate ingest logic in OpenRAG that uses GPUs directly in the container, or customizing the ingestion flows to use Langflow's Docling component with GPU acceleration instead of OpenRAG's Docling Serve service.

View file

@ -0,0 +1,24 @@
<details>
<summary>About the OpenSearch Ingestion flow</summary>
When you upload documents locally or with OAuth connectors, the **OpenSearch Ingestion** flow runs in the background.
By default, this flow uses Docling Serve to import and process documents.
Like all [OpenRAG flows](/agents), you can [inspect the flow in Langflow](/agents#inspect-and-modify-flows), and you can customize it if you want to change the knowledge ingestion settings.
The **OpenSearch Ingestion** flow is comprised of several components that work together to process and store documents in your knowledge base:
* [**Docling Serve** component](https://docs.langflow.org/bundles-docling#docling-serve): Ingests files and processes them by connecting to OpenRAG's local Docling Serve service. The output is `DoclingDocument` data that contains the extracted text and metadata from the documents.
* [**Export DoclingDocument** component](https://docs.langflow.org/bundles-docling#export-doclingdocument): Exports processed `DoclingDocument` data to Markdown format with image placeholders. This conversion standardizes the document data in preparation for further processing.
* [**DataFrame Operations** component](https://docs.langflow.org/dataframe-operations): Three of these components run sequentially to add metadata to the document data: `filename`, `file_size`, and `mimetype`.
* [**Split Text** component](https://docs.langflow.org/split-text): Splits the processed text into chunks, based on the configured [chunk size and overlap settings](/knowledge#knowledge-ingestion-settings).
* **Secret Input** component: If needed, four of these components securely fetch the [OAuth authentication](/knowledge#auth) configuration variables: `CONNECTOR_TYPE`, `OWNER`, `OWNER_EMAIL`, and `OWNER_NAME`.
* **Create Data** component: Combines the authentication credentials from the **Secret Input** components into a structured data object that is associated with the document embeddings.
* [**Embedding Model** component](https://docs.langflow.org/components-embedding-models): Generates vector embeddings using your selected [embedding model](/knowledge#set-the-embedding-model-and-dimensions).
* [**OpenSearch** component](https://docs.langflow.org/bundles-elastic#opensearch): Stores the processed documents and their embeddings in a `documents` index of your OpenRAG [OpenSearch knowledge base](/knowledge).
The default address for the OpenSearch instance is `https://opensearch:9200`. To change this address, edit the `OPENSEARCH_PORT` [environment variable](/reference/configuration#opensearch-settings).
The default authentication method is JSON Web Token (JWT) authentication. If you [edit the flow](/agents#inspect-and-modify-flows), you can select `basic` auth mode, which uses the `OPENSEARCH_USERNAME` and `OPENSEARCH_PASSWORD` [environment variables](/reference/configuration#opensearch-settings) for authentication instead of JWT.
</details>

View file

@ -0,0 +1,5 @@
## Next steps
* Try some of OpenRAG's core features in the [quickstart](/quickstart#chat-with-documents).
* Learn how to [manage OpenRAG services](/manage-services).
* [Upload documents](/ingestion), and then use the [**Chat**](/chat) to explore your data.

View file

@ -0,0 +1,114 @@
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
1. Open the **OpenRAG OpenSearch Agent** flow in the Langflow visual editor: Click <Icon name="Settings2" aria-hidden="true"/> **Settings**, click **Edit in Langflow**, and then click **Proceed**.
2. Optional: If you don't want to use the Langflow API key that is generated automatically when you install OpenRAG, you can create a [Langflow API key](https://docs.langflow.org/api-keys-and-authentication).
This key doesn't grant access to OpenRAG; it is only for authenticating with the Langflow API.
1. In the Langflow visual editor, click your user icon in the header, and then select **Settings**.
2. Click **Langflow API Keys**, and then click <Icon name="Plus" aria-hidden="true"/> **Add New**.
3. Name your key, and then click **Create API Key**.
4. Copy the API key and store it securely.
5. Exit the Langflow **Settings** page to return to the visual editor.
3. Click **Share**, and then select **API access** to get pregenerated code snippets that call the Langflow API and run the flow.
These code snippets construct API requests with your Langflow server URL (`LANGFLOW_SERVER_ADDRESS`), the flow to run (`FLOW_ID`), required headers (`LANGFLOW_API_KEY`, `Content-Type`), and a payload containing the required inputs to run the flow, including a default chat input message.
In production, you would modify the inputs to suit your application logic. For example, you could replace the default chat input message with dynamic user input.
<Tabs>
<TabItem value="python" label="Python">
```python
import requests
import os
import uuid
api_key = 'LANGFLOW_API_KEY'
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow
# Request payload configuration
payload = {
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
}
payload["session_id"] = str(uuid.uuid4())
headers = {"x-api-key": api_key}
try:
# Send API request
response = requests.request("POST", url, json=payload, headers=headers)
response.raise_for_status() # Raise exception for bad status codes
# Print response
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Error making API request: {e}")
except ValueError as e:
print(f"Error parsing response: {e}")
```
</TabItem>
<TabItem value="typescript" label="TypeScript">
```typescript
const crypto = require('crypto');
const apiKey = 'LANGFLOW_API_KEY';
const payload = {
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
};
payload.session_id = crypto.randomUUID();
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
"x-api-key": apiKey
},
body: JSON.stringify(payload)
};
fetch('http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID', options)
.then(response => response.json())
.then(response => console.warn(response))
.catch(err => console.error(err));
```
</TabItem>
<TabItem value="curl" label="curl">
```bash
curl --request POST \
--url 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false' \
--header 'Content-Type: application/json' \
--header "x-api-key: LANGFLOW_API_KEY" \
--data '{
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
}'
```
</TabItem>
</Tabs>
4. Copy your preferred snippet, and then run it:
* **Python**: Paste the snippet into a `.py` file, save it, and then run it with `python filename.py`.
* **TypeScript**: Paste the snippet into a `.ts` file, save it, and then run it with `ts-node filename.ts`.
* **curl**: Paste and run snippet directly in your terminal.
If the request is successful, the response includes many details about the flow run, including the session ID, inputs, outputs, components, durations, and more.
In production, you won't pass the raw response to the user in its entirety.
Instead, you extract and reformat relevant fields for different use cases, as demonstrated in the [Langflow quickstart](https://docs.langflow.org/get-started-quickstart#extract-data-from-the-response).
For example, you could pass the chat output text to a front-end user-facing application, and store specific fields in logs and backend data stores for monitoring, chat history, or analytics.
You could also pass the output from one flow as input to another flow.

View file

@ -1,5 +0,0 @@
import Icon from "@site/src/components/icon/icon";
All flows included with OpenRAG are designed to be modular, performant, and provider-agnostic.
To modify a flow, click <Icon name="Settings2" aria-hidden="true"/> **Settings**, and click **Edit in Langflow**.
OpenRAG's visual editor is based on the [Langflow visual editor](https://docs.langflow.org/concepts-overview), so you can edit your flows to match your specific use case.

View file

@ -0,0 +1,13 @@
OpenRAG isn't guaranteed to be compatible with all models that are available through Ollama.
For example, some models might produce unexpected results, such as JSON-formatted output instead of natural language responses, and some models aren't appropriate for the types of tasks that OpenRAG performs, such as those that generate media.
The OpenRAG team recommends the following models when using Ollama as your model provider:
* **Language models**: `gpt-oss:20b` or `mistral-nemo:12b`.
If you choose `gpt-oss:20b`, consider using Ollama Cloud or running Ollama on a remote machine because this model requires at least 16GB of RAM.
* **Embedding models**: [`nomic-embed-text:latest`](https://ollama.com/library/nomic-embed-text), `mxbai-embed-large:latest`, or `embeddinggemma:latest`.
You can experiment with other models, but if you encounter issues that you are unable to resolve through other RAG best practices (like context filters and prompt engineering), try switching to one of the recommended models.
You can submit an [OpenRAG GitHub issue](https://github.com/langflow-ai/openrag/issues) to request support for specific models.

View file

@ -1,24 +0,0 @@
import Icon from "@site/src/components/icon/icon";
Using Ollama for your OpenRAG language model provider offers greater flexibility and configuration, but can also be overwhelming to start.
These recommendations are a reasonable starting point for users with at least one GPU and experience running LLMs locally.
For best performance, OpenRAG recommends OpenAI's `gpt-oss:20b` language model. However, this model uses 16GB of RAM, so consider using Ollama Cloud or running Ollama on a remote machine.
For generating embeddings, OpenRAG recommends the [`nomic-embed-text`](https://ollama.com/library/nomic-embed-text) embedding model, which provides high-quality embeddings optimized for retrieval tasks.
To run models in [**Ollama Cloud**](https://docs.ollama.com/cloud), follow these steps:
1. Sign in to Ollama Cloud.
In a terminal, enter `ollama signin` to connect your local environment with Ollama Cloud.
2. To run the model, in Ollama, select the `gpt-oss:20b-cloud` model, or run `ollama run gpt-oss:20b-cloud` in a terminal.
Ollama Cloud models are run at the same URL as your local Ollama server at `http://localhost:11434`, and automatically offloaded to Ollama's cloud service.
3. Connect OpenRAG to the same local Ollama server as you would for local models in onboarding, using the default address of `http://localhost:11434`.
4. In the **Language model** field, select the `gpt-oss:20b-cloud` model.
<br></br>
To run models on a **remote Ollama server**, follow these steps:
1. Ensure your remote Ollama server is accessible from your OpenRAG instance.
2. In the **Ollama Base URL** field, enter your remote Ollama server's base URL, such as `http://your-remote-server:11434`.
OpenRAG connects to the remote Ollama server and populates the lists with the server's available models.
3. Select your **Embedding model** and **Language model** from the available options.

View file

@ -1,74 +1,136 @@
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOllama from '@site/docs/_partial-ollama.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
## Application onboarding
## Complete the application onboarding process {#application-onboarding}
The first time you start OpenRAG, whether using the TUI or a `.env` file, you must complete application onboarding.
The first time you start the OpenRAG application, you must complete the application onboarding process to select language and embedding models that are essential for OpenRAG features like the [**Chat**](/chat).
:::warning
Most values from onboarding can be changed later in the OpenRAG **Settings** page, but there are important restrictions.
Some of these variables, such as the embedding models, can be changed seamlessly after onboarding.
Others are immutable and require you to destroy and recreate the OpenRAG containers.
For more information, see the [OpenRAG environment variables reference](/reference/configuration).
The **language model provider** and **embeddings model provider** can only be selected at onboarding.
To change your provider selection later, you must [reinstall OpenRAG](/install#reinstall).
You can use different providers for your language model and embedding model, such as Anthropic for the language model and OpenAI for the embedding model.
Additionally, you can set multiple embedding models.
You can use different providers for your language model and embedding model, such as Anthropic for the language model and OpenAI for the embeddings model.
You only need to complete onboarding for your preferred providers.
<Tabs groupId="Provider">
<TabItem value="Anthropic" label="Anthropic" default>
:::info
Anthropic doesn't provide embedding models. If you select Anthropic for your language model, you must select a different provider for the embedding model.
:::
Choose one LLM provider and complete these steps:
1. Enter your Anthropic API key, or enable **Use environment API key** to pull the key from your [OpenRAG `.env` file](/reference/configuration).
<Tabs groupId="Provider">
<TabItem value="Anthropic" label="Anthropic" default>
:::info
Anthropic does not provide embedding models. If you select Anthropic for your language model, you must then select a different provider for embeddings.
:::
1. Enable **Use environment Anthropic API key** to automatically use your key from the `.env` file.
Alternatively, paste an Anthropic API key into the field.
2. Under **Advanced settings**, select your **Language Model**.
3. Click **Complete**.
4. In the second onboarding panel, select a provider for embeddings and select your **Embedding Model**.
5. To complete the onboarding tasks, click **What is OpenRAG**, and then click **Add a Document**.
Alternatively, click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
6. Continue with the [Quickstart](/quickstart).
2. Under **Advanced settings**, select the language model that you want to use.
</TabItem>
<TabItem value="OpenAI" label="OpenAI">
1. Enable **Get API key from environment variable** to automatically enter your key from the TUI-generated `.env` file.
Alternatively, paste an OpenAI API key into the field.
2. Under **Advanced settings**, select your **Language Model**.
3. Click **Complete**.
4. In the second onboarding panel, select a provider for embeddings and select your **Embedding Model**.
5. To complete the onboarding tasks, click **What is OpenRAG**, and then click **Add a Document**.
Alternatively, click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
6. Continue with the [Quickstart](/quickstart).
3. Click **Complete**.
</TabItem>
<TabItem value="IBM watsonx.ai" label="IBM watsonx.ai">
1. Complete the fields for **watsonx.ai API Endpoint**, **IBM Project ID**, and **IBM API key**.
These values are found in your IBM watsonx deployment.
2. Under **Advanced settings**, select your **Language Model**.
3. Click **Complete**.
4. In the second onboarding panel, select a provider for embeddings and select your **Embedding Model**.
5. To complete the onboarding tasks, click **What is OpenRAG**, and then click **Add a Document**.
Alternatively, click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
6. Continue with the [Quickstart](/quickstart).
4. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
</TabItem>
<TabItem value="Ollama" label="Ollama">
:::tip
Ollama is not included with OpenRAG. To install Ollama, see the [Ollama documentation](https://docs.ollama.com/).
:::
1. To connect to an Ollama server running on your local machine, enter your Ollama server's base URL address.
The default Ollama server address is `http://localhost:11434`.
OpenRAG connects to the Ollama server and populates the model lists with the server's available models.
2. Select the **Embedding Model** and **Language Model** your Ollama server is running.
<details closed>
<summary>Ollama model selection and external server configuration</summary>
<PartialOllama />
</details>
3. Click **Complete**.
4. To complete the onboarding tasks, click **What is OpenRAG**, and then click **Add a Document**.
5. Continue with the [Quickstart](/quickstart).
</TabItem>
</Tabs>
5. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the credential is valid and has access to the selected model, and then click **Complete** to retry ingestion.
6. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
<TabItem value="IBM watsonx.ai" label="IBM watsonx.ai">
1. For **watsonx.ai API Endpoint**, select the base URL for your watsonx.ai model deployment.
2. Enter your watsonx.ai deployment's project ID and API key.
You can enable **Use environment API key** to pull the key from your [OpenRAG `.env` file](/reference/configuration).
3. Under **Advanced settings**, select the language model that you want to use.
4. Click **Complete**.
5. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
6. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the credentials are valid and have access to the selected model, and then click **Complete** to retry ingestion.
7. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
<TabItem value="Ollama" label="Ollama">
Using Ollama as your language and embedding model provider offers greater flexibility and configuration options for hosting models.
However, it requires additional setup because Ollama isn't included with OpenRAG.
You must deploy Ollama separately if you want to use Ollama as a model provider.
:::info
<PartialOllamaModels />
:::
1. [Install Ollama locally or on a remote server](https://docs.ollama.com/), or [run models in Ollama Cloud](https://docs.ollama.com/cloud).
If you are running a remote server, it must be accessible from your OpenRAG deployment.
2. In the OpenRAG onboarding dialog, enter your Ollama server's base URL:
* **Local Ollama server**: Enter your Ollama server's base URL and port. The default Ollama server address is `http://localhost:11434`.
* **Ollama Cloud**: Because Ollama Cloud models run at the same address as a local Ollama server and automatically offload to Ollama's cloud service, you can use the same base URL and port as you would for a local Ollama server. The default address is `http://localhost:11434`.
* **Remote server**: Enter your remote Ollama server's base URL and port, such as `http://your-remote-server:11434`.
3. Select the language model that your Ollama server is running.
If your server isn't running any language models, you must either deploy a language model on your Ollama server, or use another provider for the language model.
Language model and embedding model selections are independent.
You can use the same or different servers for each model.
To use different providers for each model, you must configure both providers, and select the relevant model for each provider.
4. Click **Complete**.
5. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
6. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the server address is valid, and that the selected model is running on the server.
Then, click **Complete** to retry ingestion.
7. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
<TabItem value="OpenAI" label="OpenAI (default)">
1. Enter your OpenAI API key, or enable **Use environment API key** to pull the key from your [OpenRAG `.env` file](/reference/configuration).
2. Under **Advanced settings**, select the language model that you want to use.
3. Click **Complete**.
4. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
5. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the credential is valid and has access to the selected model, and then click **Complete** to retry ingestion.
6. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
</Tabs>

View file

@ -0,0 +1,11 @@
* **No-auth mode**: If you select **Basic Setup** in the [TUI](/tui), or your [OpenRAG `.env` file](/reference/configuration) doesn't include OAuth credentials, then the OpenRAG OpenSearch instance runs in no-auth mode.
This mode uses one anonymous JWT token for OpenSearch authentication.
There is no differentiation between users; all users that access your OpenRAG instance can access all documents uploaded to your knowledge base.
* **OAuth mode**: If you select **Advanced Setup** in the [TUI](/tui), or your [OpenRAG `.env` file](/reference/configuration) includes OAuth credentials, then the OpenRAG OpenSearch instance runs in OAuth mode.
This mode uses a unique JWT token for each OpenRAG user, and each document is tagged with user ownership.
Documents are filtered by user owner; users see only the documents that they uploaded or have access to through their cloud storage accounts.
To enable OAuth mode after initial setup, see [Ingest files with OAuth connectors](/ingestion#oauth-ingestion).

View file

@ -0,0 +1,20 @@
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
* Gather the credentials and connection details for your preferred model providers.
You must have access to at least one language model and one embedding model.
If a provider offers both types, you can use the same provider for both models.
If a provider offers only one type, you must select two providers.
* **OpenAI**: Create an [OpenAI API key](https://platform.openai.com/api-keys).
* **Anthropic**: Create an [Anthropic API key](https://www.anthropic.com/docs/api/reference).
Anthropic provides language models only; you must select an additional provider for embeddings.
* **IBM watsonx.ai**: Get your watsonx.ai API endpoint, IBM project ID, and IBM API key from your watsonx deployment.
* **Ollama**: Deploy an [Ollama instance and models](https://docs.ollama.com/) locally, in the cloud, or on a remote server. Then, get your Ollama server's base URL and the names of the models that you want to use.
:::info
<PartialOllamaModels />
:::
* Optional: Install GPU support with an NVIDIA GPU, [CUDA](https://docs.nvidia.com/cuda/) support, and compatible NVIDIA drivers on the OpenRAG host machine.
If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment that is suitable for most use cases.
The default CPU-only deployment doesn't prevent you from using GPU acceleration in external services, such as Ollama servers.

View file

@ -0,0 +1,10 @@
* Install [uv](https://docs.astral.sh/uv/getting-started/installation/).
* Install [Podman](https://podman.io/docs/installation) (recommended) or [Docker](https://docs.docker.com/get-docker/).
The OpenRAG team recommends, at minimum, 8 GB of RAM for container VMs.
However, if you plan to upload large files regularly, more RAM is recommended.
For more information, see [Troubleshoot OpenRAG](/support/troubleshoot).
* Install [`podman-compose`](https://docs.podman.io/en/latest/markdown/podman-compose.1.html) or [Docker Compose](https://docs.docker.com/compose/install/).
To use Docker Compose with Podman, you must alias Docker Compose commands to Podman commands.

View file

@ -0,0 +1 @@
* Install [Python](https://www.python.org/downloads/release/python-3100/) version 3.13 or later.

View file

@ -0,0 +1,2 @@
* For Microsoft Windows, you must use the Windows Subsystem for Linux (WSL).
See [Install OpenRAG on Windows](/install-windows) before proceeding.

View file

@ -0,0 +1,126 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
You can use either **Basic Setup** or **Advanced Setup** to configure OpenRAG.
This choice determines how OpenRAG authenticates with your deployment's [OpenSearch instance](/knowledge), and it controls user access to documents stored in your OpenSearch knowledge base:
<PartialOpenSearchAuthMode />
:::info
You must use **Advanced Setup** if you want to [use OAuth connectors to upload documents from cloud storage](/ingestion#oauth-ingestion).
:::
If OpenRAG detects OAuth credentials during setup, it recommends **Advanced Setup** in the TUI.
<Tabs groupId="Setup method">
<TabItem value="Basic setup" label="Basic setup" default>
1. In the TUI, select **Basic Setup**.
2. Enter administrator passwords for the OpenRAG OpenSearch and Langflow services.
The OpenSearch password is required, and a secure password is automatically generated if you don't provide one manually.
The Langflow password is recommended but optional.
If the Langflow password is empty, the Langflow server starts without authentication enabled. For more information, see [Langflow settings](/reference/configuration#langflow-settings).
You can click **Generate Password** to create a Langflow password and username automatically.
3. Optional: Under **API Keys**, enter your model provider credentials, or leave these fields empty if you want to configure model provider credentials during the application onboarding process.
There is no material difference between providing these values now or during the [application onboarding process](#application-onboarding).
If you provide a credential now, it can be populated automatically during the application onboarding process if you enable the **Use environment API key** option.
OpenRAG's core functionality requires access to language and embedding models.
By default, OpenRAG uses OpenAI models.
If you aren't sure which models or providers to use, you must provide an OpenAI API key to use OpenRAG's default model configuration.
4. Optional: Under **Others**, edit the [knowledge base](/knowledge) paths if you don't want to use the default paths:
* **Documents Paths**: One or more paths to directories are where OpenRAG looks for documents to ingest.
* **OpenSearch Data Path**: Specify the path where you want OpenRAG to create your OpenSearch index.
5. Click **Save Configuration**.
Your passwords and API keys, if provided, are stored in the [OpenRAG `.env` file](/reference/configuration) at `~/.openrag/tui`.
If you modified any credentials that were pulled from an existing `.env` file, those values are updated in the `.env` file.
6. Click **Start OpenRAG** to start the OpenRAG services.
This process can take some time while OpenRAG pulls and runs the container images.
If all services start successfully, the TUI prints a confirmation message:
```text
Services started successfully
Command completed successfully
```
7. Click **Close**, and then click **Launch OpenRAG** or navigate to `localhost:3000` in your browser.
8. Continue with the [application onboarding process](#application-onboarding).
</TabItem>
<TabItem value="Advanced setup" label="Advanced setup">
1. In the TUI, select **Advanced Setup**.
2. Enter administrator passwords for the OpenRAG OpenSearch and Langflow services.
The OpenSearch password is required, and a secure password is automatically generated if you don't provide one manually.
The Langflow password is recommended but optional.
If the Langflow password is empty, the Langflow server starts without authentication enabled. For more information, see [Langflow settings](/reference/configuration#langflow-settings).
You can click **Generate Password** to create a Langflow password and username automatically.
3. Optional: Under **API Keys**, enter your model provider credentials, or leave the **OpenAI**, **Anthropic**, **Ollama**, and **IBM watsonx.ai** fields empty if you want to configure model provider credentials during the application onboarding process.
There is no material difference between providing these values now or during the [application onboarding process](#application-onboarding).
If you provide a credential now, it can be populated automatically during the application onboarding process if you enable the **Use environment API key** option.
OpenRAG's core functionality requires access to language and embedding models.
By default, OpenRAG uses OpenAI models.
If you aren't sure which models or providers to use, you must provide an OpenAI API key to use OpenRAG's default model configuration.
4. Recommended: To upload documents from external storage, such as Google Drive, add the required OAuth credentials for the connectors that you want to use under **API Keys**. These settings can be populated automatically if OpenRAG detects these credentials in an [OpenRAG `.env` file](/reference/configuration) at `~/.openrag/tui`.
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
You can [manage OAuth credentials](/ingestion#oauth-ingestion) later, but it is recommended to configure them during initial set up.
5. Register the redirect URIs shown in the TUI in your OAuth provider.
These are the URLs your OAuth provider will use to redirect users back to OpenRAG after they sign in.
6. Optional: Under **Others**, you can edit the following settings if needed:
* **Documents Paths**: Use the default path or provide one or more paths to directories are where OpenRAG looks for documents to ingest in to your [knowledge base](/knowledge).
* **OpenSearch Data Path**: Specify the path where you want OpenRAG to create your OpenSearch index.
* **Langflow Public URL (`LANGFLOW_PUBLIC_URL`)** : Sets the base address to access the Langflow web interface. This is where users interact with flows in a browser.
* **Webhook Base URL (`WEBHOOK_BASE_URL`)**: If applicable, set the base address for your OAuth connector endpoints. If set, the OAuth connector webhook URLs are constructed as `WEBHOOK_BASE_URL/connectors/${provider}/webhook`.
7. Click **Save Configuration**.
Your passwords, API key, and OAuth credentials, if provided, are stored in the [OpenRAG `.env` file](/reference/configuration) at `~/.openrag/tui`.
If you modified any credentials that were pulled from an existing `.env` file, those values are updated in the `.env` file.
8. Click **Start OpenRAG** to start the OpenRAG services.
This process can take some time while OpenRAG pulls and runs the container images.
If all services start successfully, the TUI prints a confirmation message:
```text
Services started successfully
Command completed successfully
```
9. Click **Close**, and then click **Launch OpenRAG** or navigate to `localhost:3000` in your browser.
10. If you enabled OAuth connectors, you must sign in to your OAuth provider before being redirected to your OpenRAG instance.
11. Continue with the [application onboarding process](#application-onboarding).
</TabItem>
</Tabs>

View file

@ -0,0 +1,5 @@
import Icon from "@site/src/components/icon/icon";
When using the OpenRAG **Chat**, click <Icon name="Plus" aria-hidden="true"/> **Add** in the chat input field to upload a file to the current chat session.
Files added this way are processed and made available to the agent for the current conversation only.
These files aren't stored in the knowledge base permanently.

View file

@ -1,66 +1,91 @@
---
title: Langflow in OpenRAG
title: Use Langflow in OpenRAG
slug: /agents
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialModifyFlows from '@site/docs/_partial-modify-flows.mdx';
OpenRAG leverages Langflow's Agent component to power the OpenRAG OpenSearch Agent flow.
OpenRAG includes a built-in [Langflow](https://docs.langflow.org/) instance for creating and managing functional application workflows called _flows_.
In a flow, the individual workflow steps are represented by [_components_](https://docs.langflow.org/concepts-components) that are connected together to form a complete process.
[Flows](https://docs.langflow.org/concepts-overview) in Langflow are functional representations of application workflows, with multiple [component](https://docs.langflow.org/concepts-components) nodes connected as single steps in a workflow.
OpenRAG includes several built-in flows:
In the OpenRAG OpenSearch Agent flow, components like the Langflow [**Agent** component](https://docs.langflow.org/agents) and [**OpenSearch** component](https://docs.langflow.org/bundles-elastic#opensearch) are connected to intelligently chat with your knowledge by embedding your query, comparing it the vector database embeddings, and generating a response with the LLM.
* The [**OpenRAG OpenSearch Agent** flow](/chat#flow) powers the **Chat** feature in OpenRAG.
* The [**OpenSearch Ingestion** and **OpenSearch URL Ingestion** flows](/ingestion) process documents and web content for storage in your OpenSearch knowledge base.
* The [**OpenRAG OpenSearch Nudges** flow](/chat#nudges) provides optional contextual suggestions in the OpenRAG **Chat**.
![OpenRAG Open Search Agent Flow](/img/opensearch-agent-flow.png)
You can customize these flows and create your own flows using OpenRAG's embedded Langflow visual editor.
The Agent component shines here in its ability to make decisions on not only what query should be sent, but when a query is necessary to solve the problem at hand.
## Inspect and modify flows {#inspect-and-modify-flows}
<details closed>
<summary>How do agents work?</summary>
All OpenRAG flows are designed to be modular, performant, and provider-agnostic.
Agents extend Large Language Models (LLMs) by integrating tools, which are functions that provide additional context and enable autonomous task execution. These integrations make agents more specialized and powerful than standalone LLMs.
To view and modify a flow in OpenRAG, click <Icon name="Settings2" aria-hidden="true"/> **Settings**.
From here, you can manage OAuth connectors, model providers, and common parameters for the **Agent** and **Knowledge Ingestion** flows.
Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action. For example, you might create an agent that can access your company's documentation, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code.
To further explore and edit flows, click **Edit in Langflow** to launch the embedded [Langflow visual editor](https://docs.langflow.org/concepts-overview) where you can fully [customize the flow](https://docs.langflow.org/concepts-flows) to suit your use case.
Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response. The response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API.
:::tip
After you click **Edit in Langflow**, you can access and edit all of OpenRAG's built-in flows from the Langflow editor's [**Projects** page](https://docs.langflow.org/concepts-flows#projects).
In an agentic context, tools are functions that the agent can run to perform tasks or access external resources. A function is wrapped as a Tool object with a common interface that the agent understands. Agents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization. The Tool object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request.
If you edit any flows other than the **Agent** or **Knowledge Ingestion** flows, it is recommended that you [export the flows](https://docs.langflow.org/concepts-flows-import) before editing so you can revert them to their original state if needed.
:::
</details>
For example, the following steps explain how to edit the built-in **Agent** flow, which is the **OpenRAG OpenSearch Agent** flow used for the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**:
## Use the OpenRAG OpenSearch Agent flow {#flow}
1. In OpenRAG, click <Icon name="Settings2" aria-hidden="true"/> **Settings**, and then find the **Agent** section.
If you've chatted with your knowledge in OpenRAG, you've already experienced the OpenRAG OpenSearch Agent chat flow.
To switch OpenRAG over to the [Langflow visual editor](https://docs.langflow.org/concepts-overview) and view the OpenRAG OpenSearch Agentflow, click <Icon name="Settings2" aria-hidden="true"/> **Settings**, and then click **Edit in Langflow**.
This flow contains eight components connected together to chat with your data:
2. If you only need to edit the language model or agent instructions, edit those fields directly on the **Settings** page.
Language model changes are saved automatically.
To apply new instructions, click **Save Agent Instructions**.
* The [**Agent** component](https://docs.langflow.org/agents) orchestrates the entire flow by deciding when to search the knowledge base, how to formulate search queries, and how to combine retrieved information with the user's question to generate a comprehensive response.
The **Agent** behaves according to the prompt in the **Agent Instructions** field.
* The [**Chat Input** component](https://docs.langflow.org/components-io) is connected to the Agent component's Input port. This allows to flow to be triggered by an incoming prompt from a user or application.
* The [**OpenSearch** component](https://docs.langflow.org/bundles-elastic#opensearch) is connected to the Agent component's Tools port. The agent might not use this database for every request; the agent only uses this connection if it decides the knowledge can help respond to the prompt.
* The [**Language Model** component](https://docs.langflow.org/components-models) is connected to the Agent component's Language Model port. The agent uses the connected LLM to reason through the request sent through Chat Input.
* The [**Embedding Model** component](https://docs.langflow.org/components-embedding-models) is connected to the OpenSearch component's Embedding port. This component converts text queries into vector representations that are compared with document embeddings stored in OpenSearch for semantic similarity matching. This gives your Agent's queries context.
* The [**Text Input** component](https://docs.langflow.org/components-io) is populated with the global variable `OPENRAG-QUERY-FILTER`.
This filter is the [Knowledge filter](/knowledge#create-knowledge-filters), and filters which knowledge sources to search through.
* The **Agent** component's Output port is connected to the [**Chat Output** component](https://docs.langflow.org/components-io), which returns the final response to the user or application.
* An [**MCP Tools** component](https://docs.langflow.org/mcp-client) is connected to the Agent's **Tools** port. This component calls the [OpenSearch URL Ingestion flow](/ingestion#url-flow), which Langflow uses as an MCP server to fetch content from URLs and store in OpenSearch.
3. To edit all flow settings and components with full customization capabilities, click **Edit in Langflow** to launch the Langflow visual editor in a new browser tab.
<PartialModifyFlows />
If prompted to acknowledge that you are entering Langflow, click **Proceed**.
For an example of changing out the agent's language model in OpenRAG, see the [Quickstart](/quickstart#change-components).
If Langflow requests login information, enter the `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD` from your [OpenRAG `.env` file](/reference/configuration).
To restore the flow to its initial state, in OpenRAG, click <Icon name="Settings2" aria-hidden="true"/> **Settings**, and then click **Restore Flow**.
OpenRAG warns you that this discards all custom settings. Click **Restore** to restore the flow.
![OpenRAG OpenSearch Agent flow](/img/opensearch-agent-flow.png)
## Additional Langflow functionality
4. Modify the flow as desired, and then press <kbd>Command</kbd>+<kbd>S</kbd> (<kbd>Ctrl</kbd>+<kbd>S</kbd>) to save your changes.
Langflow includes features beyond Agents to help you integrate OpenRAG into your application, and all Langflow features are included in OpenRAG.
You can close the Langflow browser tab, or leave it open if you want to continue experimenting with the flow editor.
* Langflow can serve your flows as an [MCP server](https://docs.langflow.org/mcp-server), or consume other MCP servers as an [MCP client](https://docs.langflow.org/mcp-client). Get started with the [MCP tutorial](https://docs.langflow.org/mcp-tutorial).
5. After you modify any **Agent** flow settings, go to the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, and then click <Icon name="Plus" aria-hidden="true"/> **Start new conversation** in the **Conversations** list.
This ensures that the chat doesn't persist any context from the previous conversation with the original flow settings.
* If you don't see the component you need, extend Langflow's functionality by creating [custom Python components](https://docs.langflow.org/components-custom-components).
### Revert a built-in flow to its original configuration {#revert-a-built-in-flow-to-its-original-configuration}
* Langflow offers component [bundles](https://docs.langflow.org/components-bundle-components) to integrate with many popular vector stores, AI/ML providers, and search APIs.
After you edit the **Agent** or **Knowledge Ingestion** built-in flows, you can click **Restore flow** on the **Settings** page to revert either flow to its original state when you first installed OpenRAG.
This is a destructive action that discards all customizations to the flow.
This option isn't available for other built-in flows such as the **Nudges** flow.
To restore these flows to their original state, you must reimport the flow from a backup (if you exported one before editing), or [reset](/manage-services#reset-containers) or [reinstall](/reinstall) OpenRAG.
## Build custom flows and use other Langflow functionality
In addition to OpenRAG's built-in flows, all Langflow features are available through OpenRAG, including the ability to [create your own flows](https://docs.langflow.org/concepts-flows) and popular extensibility features such as the following:
* [Create custom components](https://docs.langflow.org/components-custom-components).
* Integrate with many third-party services through [bundles](https://docs.langflow.org/components-bundle-components).
* Use [MCP clients](https://docs.langflow.org/mcp-client) and [MCP servers](https://docs.langflow.org/mcp-server), and serve flows as MCP tools for your agentic flows.
Explore the [Langflow documentation](https://docs.langflow.org/) to learn more about the Langflow platform, features, and visual editor.
## Modify a flow at runtime {#modify-a-flow-at-runtime}
You can use _tweaks_ to modify flow settings at runtime without permanently changing the flow's configuration.
Tweaks are one-time parameter modifications that are passed to specific Langflow components during flow execution.
For more information on tweaks, see the Langflow documentation on [Input schema (tweaks)](https://docs.langflow.org/concepts-publish#input-schema).
## Set the Langflow version
By default, OpenRAG is pinned to the latest Langflow Docker image for stability.
If necessary, you can set a specific Langflow version with the `LANGFLOW_VERSION` [environment variable](/reference/configuration). However, there are risks to changing this setting:
* The [Langflow documentation](https://docs.langflow.org/) describes the functionality present in the latest release of the Langflow OSS Python package. If your `LANGFLOW_VERSION` is different, the Langflow documentation might not align with the features and default settings in your OpenRAG installation.
* Components might break, including components in OpenRAG's built-in flows.
* Default settings and behaviors might change causing unexpected results when OpenRAG expects a newer default.

View file

@ -0,0 +1,116 @@
---
title: Chat in OpenRAG
slug: /chat
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialIntegrateChat from '@site/docs/_partial-integrate-chat.mdx';
import PartialTempKnowledge from '@site/docs/_partial-temp-knowledge.mdx';
After you [upload documents to your knowledge base](/ingestion), you can use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat** feature to interact with your knowledge through natural language queries.
The OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat** uses an LLM-powered agent to understand your queries, retrieve relevant information from your knowledge base, and generate context-aware responses.
The agent can also fetch information from URLs and new documents that you provide during the chat session.
To limit the knowledge available to the agent, use [filters](/knowledge-filters).
The agent can call specialized Model Context Protocol (MCP) tools to extend its capabilities.
To add or change the available tools, you must edit the [**OpenRAG OpenSearch Agent** flow](#flow).
:::tip
Try chatting, uploading documents, and modifying chat settings in the [quickstart](/quickstart).
:::
## OpenRAG OpenSearch Agent flow {#flow}
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, the **OpenRAG OpenSearch Agent** flow runs in the background to retrieve relevant information from your knowledge base and generate a response.
If you [inspect the flow in Langflow](/agents#inspect-and-modify-flows), you'll see that it is comprised of eight components that work together to ingest chat messages, retrieve relevant information from your knowledge base, and then generate responses.
When you inspect this flow, you can edit the components to customize the agent's behavior.
![OpenRAG Open Search Agent Flow](/img/opensearch-agent-flow.png)
* [**Chat Input** component](https://docs.langflow.org/chat-input-and-output#chat-input): This component starts the flow when it receives a chat message. It is connected to the **Agent** component's **Input** port.
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, your chat messages are passed to the **Chat Input** component, which then sends them to the **Agent** component for processing.
* [**Agent** component](https://docs.langflow.org/components-agents): This component orchestrates the entire flow by processing chat messages, searching the knowledge base, and organizing the retrieved information into a cohesive response.
The agent's general behavior is defined by the prompt in the **Agent Instructions** field and the model connected to the **Language Model** port.
One or more specialized tools can be attached to the **Tools** port to extend the agent's capabilities. In this case, there are two tools: **MCP Tools** and **OpenSearch**.
The **Agent** component is the star of this flow because it powers decision making, tool calling, and an LLM-driven conversational experience.
<details>
<summary>How do agents work?</summary>
Agents extend Large Language Models (LLMs) by integrating tools, which are functions that provide additional context and enable autonomous task execution. These integrations make agents more specialized and powerful than standalone LLMs.
Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action. For example, you might create an agent that can access your company's documentation, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code.
Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response. The response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API.
In an agentic context, tools are functions that the agent can run to perform tasks or access external resources. A function is wrapped as a Tool object with a common interface that the agent understands. Agents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization. The Tool object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request.
</details>
* [**Language Model** component](https://docs.langflow.org/components-models): Connected to the **Agent** component's **Language Model** port, this component provides the base language model driver for the agent. The agent cannot function without a model because the model is used for general knowledge, reasoning, and generating responses.
Different models can change the style and content of the agent's responses, and some models might be better suited for certain tasks than others. If the agent doesn't seem to be handling requests well, try changing the model to see how the responses change. For example, fast models might be good for simple queries, but they might not have the depth of reasoning for complex, multi-faceted queries.
* [**MCP Tools** component](https://docs.langflow.org/mcp-client): Connected to the **Agent** component's **Tools** port, this component can be used to [access any MCP server](https://docs.langflow.org/mcp-server) and the MCP tools provided by that server. In this case, your OpenRAG Langflow instance's [**Starter Project**](https://docs.langflow.org/concepts-flows#projects) is the MCP server, and the [**OpenSearch URL Ingestion** flow](/ingestion#url-flow) is the MCP tool.
This flow fetches content from URLs, and then stores the content in your OpenRAG OpenSearch knowledge base. By serving this flow as an MCP tool, the agent can selectively call this tool if a URL is detected in the chat input.
* [**OpenSearch** component](https://docs.langflow.org/bundles-elastic#opensearch): Connected to the **Agent** component's **Tools** port, this component lets the agent search your [OpenRAG OpenSearch knowledge base](/knowledge). The agent might not use this database for every request; the agent uses this connection only if it decides that documents in your knowledge base are relevant to your query.
* [**Embedding Model** component](https://docs.langflow.org/components-embedding-models): Connected to the **OpenSearch** component's **Embedding** port, this component generates embeddings from chat input that are used in [similarity search](https://www.ibm.com/think/topics/vector-search) to find content in your knowledge base that is relevant to the chat input. The agent uses this information to generate context-aware responses that are specialized for your data.
It is critical that the embedding model used here matches the embedding model used when you [upload documents to your knowledge base](/ingestion). Mismatched models and dimensions can degrade the quality of similarity search results causing the agent to retrieve irrelevant documents from your knowledge base.
* [**Text Input** component](https://docs.langflow.org/text-input-and-output#text-input): Connected to the **OpenSearch** component's **Search Filters** port, this component is populated with a Langflow global variable named `OPENRAG-QUERY-FILTER`. If a global or chat-level [knowledge filter](/knowledge-filters) is set, then the variable contains the filter expression, which limits the documents that the agent can access in the knowledge base.
If no knowledge filter is set, then the `OPENRAG-QUERY-FILTER` variable is empty, and the agent can access all documents in the knowledge base.
* [**Chat Output** component](https://docs.langflow.org/chat-input-and-output#chat-output): Connected to the **Agent** component's **Output** port, this component returns the agent's generated response as a chat message.
## Nudges {#nudges}
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, the **OpenRAG OpenSearch Nudges** flow runs in the background to pull additional context from your knowledge base and chat history.
Nudges appear as prompts in the chat, and they are based on the contents of your OpenRAG OpenSearch knowledge base.
Click a nudge to accept it and start a chat based on the nudge.
Like OpenRAG's other built-in flows, you can [inspect the flow in Langflow](/agents#inspect-and-modify-flows), and you can customize it if you want to change the nudge behavior.
However, this flow is specifically designed to work with the OpenRAG chat and knowledge base.
Major changes to this flow might break the nudge functionality or produce irrelevant nudges.
The **Nudges** flow consists of **Embedding model**, **Language model**, **OpenSearch**, **Input/Output*, and other components that browse your knowledge base, identify key themes and possible insights, and then produce prompts based on the findings.
For example, if your knowledge base contains documents about cybersecurity, possible nudges might include `Explain zero trust architecture principles` or `How to identify a social engineering attack`.
## Upload documents to the chat
<PartialTempKnowledge />
## Inspect tool calls and knowledge
During the chat, you'll see information about the agent's process. For more detail, you can inspect individual tool calls. This is helpful for troubleshooting because it shows you how the agent used particular tools. For example, click <Icon name="Gear" aria-hidden="true"/> **Function Call: search_documents (tool_call)** to view the log of tool calls made by the agent to the **OpenSearch** component.
If documents in your knowledge base seem to be missing or interpreted incorrectly, see [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
If tool calls and knowledge appear normal, but the agent's responses seem off-topic or incorrect, consider changing the agent's language model or prompt, as explained in [Inspect and modify flows](/agents#inspect-and-modify-flows).
## Integrate OpenRAG chat into an application
You can integrate OpenRAG flows into your applications using the [Langflow API](https://docs.langflow.org/api-reference-api-examples).
To simplify this integration, you can get pre-configured code snippets directly from the embedded Langflow visual editor.
The following example demonstrates how to generate and use code snippets for the **OpenRAG OpenSearch Agent** flow:
<PartialIntegrateChat />
## Troubleshoot chat {#troubleshoot-chat}
The following issues can occur when using the OpenRAG **Chat** feature:
* Documents seem to be missing or interpreted incorrectly: See [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
* Service is suddenly unavailable when it was working previously: If there is no other obvious cause, such as the service or container VM being stopped or disconnected, there might be a problem with the flow configuration. Use the [**Restore flow** option](/agents#revert-a-built-in-flow-to-its-original-configuration) to revert the **OpenRAG OpenSearch Agent** flow to its original configuration.
If you made customizations to the flow, make sure to [export your flow](https://docs.langflow.org/concepts-flows-import) before restoring the flow.

View file

@ -1,120 +1,292 @@
---
title: Docling in OpenRAG
title: Ingest knowledge
slug: /ingestion
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialModifyFlows from '@site/docs/_partial-modify-flows.mdx';
import PartialTempKnowledge from '@site/docs/_partial-temp-knowledge.mdx';
import PartialIngestionFlow from '@site/docs/_partial-ingestion-flow.mdx';
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
import PartialDockerStopAll from '@site/docs/_partial-docker-stop-all.mdx';
OpenRAG uses [Docling](https://docling-project.github.io/docling/) for document ingestion.
More specifically, OpenRAG uses [Docling Serve](https://github.com/docling-project/docling-serve), which starts a `docling serve` process on your local machine and runs Docling ingestion through an API service.
Upload documents to your [OpenRAG OpenSearch instance](/knowledge) to populate your knowledge base with unique content, such as your own company documents, research papers, or websites.
Documents are processed through OpenRAG's knowledge ingestion flows with Docling.
Docling ingests documents from your local machine or OAuth connectors, splits them into chunks, and stores them as separate, structured documents in the OpenSearch `documents` index.
OpenRAG can ingest knowledge from direct file uploads, URLs, and OAuth authenticated connectors.
OpenRAG chose Docling for its support for a wide variety of file formats, high performance, and advanced understanding of tables and images.
Knowledge ingestion is powered by OpenRAG's built-in knowledge ingestion flows that use Docling to process documents before storing the documents in your OpenSearch database.
During ingestion, documents are broken into smaller chunks of content that are then embedded using your selected [embedding model](/knowledge#set-the-embedding-model-and-dimensions).
Then, the chunks, embeddings, and associated metadata (which connects chunks of the same document) are stored in your OpenSearch database.
To modify OpenRAG's ingestion settings, including the Docling settings and ingestion flows, click 2" aria-hidden="true"/> **Settings**.
To modify chunking behavior and other ingestion settings, see [Knowledge ingestion settings](/knowledge#knowledge-ingestion-settings) and [Inspect and modify flows](/agents#inspect-and-modify-flows).
## Knowledge ingestion settings
## Ingest local files and folders
These settings configure the Docling ingestion parameters.
You can upload files and folders from your local machine to your knowledge base:
OpenRAG will warn you if `docling serve` is not running.
To start or stop `docling serve` or any other native services, in the TUI main menu, click **Start Native Services** or **Stop Native Services**.
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge** to view your OpenSearch knowledge base.
**Embedding model** determines which AI model is used to create vector embeddings. The default is the OpenAI `text-embedding-3-small` model.
2. Click **Add Knowledge** to add your own documents to your OpenRAG knowledge base.
**Chunk size** determines how large each text chunk is in number of characters.
Larger chunks yield more context per chunk, but can include irrelevant information. Smaller chunks yield more precise semantic search, but can lack context.
The default value of `1000` characters provides a good starting point that balances these considerations.
3. To upload one file, click <Icon name="File" aria-hidden="true"/> **File**. To upload all documents in a folder, click <Icon name="Folder" aria-hidden="true"/> **Folder**.
**Chunk overlap** controls the number of characters that overlap over chunk boundaries.
Use larger overlap values for documents where context is most important, and use smaller overlap values for simpler documents, or when optimization is most important.
The default value of 200 characters of overlap with a chunk size of 1000 (20% overlap) is suitable for general use cases. Decrease the overlap to 10% for a more efficient pipeline, or increase to 40% for more complex documents.
The default path is `~/.openrag/documents`.
To change this path, see [Set the local documents path](/knowledge#set-the-local-documents-path).
**Table Structure** enables Docling's [`DocumentConverter`](https://docling-project.github.io/docling/reference/document_converter/) tool for parsing tables. Instead of treating tables as plain text, tables are output as structured table data with preserved relationships and metadata. **Table Structure** is enabled by default.
The selected files are processed in the background through the **OpenSearch Ingestion** flow.
**OCR** enables or disabled OCR processing when extracting text from images and scanned documents.
OCR is disabled by default. This setting is best suited for processing text-based documents as quickly as possible with Docling's [`DocumentConverter`](https://docling-project.github.io/docling/reference/document_converter/). Images are ignored and not processed.
<PartialIngestionFlow />
Enable OCR when you are processing documents containing images with text that requires extraction, or for scanned documents. Enabling OCR can slow ingestion performance.
You can [monitor ingestion](#monitor-ingestion) to see the progress of the uploads and check for failed uploads.
If OpenRAG detects that the local machine is running on macOS, OpenRAG uses the [ocrmac](https://www.piwheels.org/project/ocrmac/) OCR engine. Other platforms use [easyocr](https://www.jaided.ai/easyocr/).
## Ingest local files temporarily
**Picture descriptions** adds image descriptions generated by the [SmolVLM-256M-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) model to OCR processing. Enabling picture descriptions can slow ingestion performance.
<PartialTempKnowledge />
## Knowledge ingestion flows
## Ingest files with OAuth connectors {#oauth-ingestion}
[Flows](https://docs.langflow.org/concepts-overview) in Langflow are functional representations of application workflows, with multiple [component](https://docs.langflow.org/concepts-components) nodes connected as single steps in a workflow.
OpenRAG can use OAuth authenticated connectors to ingest documents from the following external services:
The **OpenSearch Ingestion** flow is the default knowledge ingestion flow in OpenRAG: when you **Add Knowledge** in OpenRAG, you run the OpenSearch Ingestion flow in the background. The flow ingests documents using **Docling Serve** to import and process documents.
* AWS S3
* Google Drive
* Microsoft OneDrive
* Microsoft Sharepoint
This flow contains ten components connected together to process and store documents in your knowledge base.
These connectors enable seamless ingestion of files from cloud storage to your OpenRAG knowledge base.
* The [**Docling Serve** component](https://docs.langflow.org/bundles-docling) processes input documents by connecting to your instance of Docling Serve.
* The [**Export DoclingDocument** component](https://docs.langflow.org/components-docling) exports the processed DoclingDocument to markdown format with image export mode set to placeholder. This conversion makes the structured document data into a standardized format for further processing.
* Three [**DataFrame Operations** components](https://docs.langflow.org/components-processing#dataframe-operations) sequentially add metadata columns to the document data of `filename`, `file_size`, and `mimetype`.
* The [**Split Text** component](https://docs.langflow.org/components-processing#split-text) splits the processed text into chunks with a chunk size of 1000 characters and an overlap of 200 characters.
* Four **Secret Input** components provide secure access to configuration variables: `CONNECTOR_TYPE`, `OWNER`, `OWNER_EMAIL`, and `OWNER_NAME`. These are runtime variables populated from OAuth login.
* The **Create Data** component combines the secret inputs into a structured data object that will be associated with the document embeddings.
* The [**Embedding Model** component](https://docs.langflow.org/components-embedding-models) generates vector embeddings using OpenAI's `text-embedding-3-small` model. The embedding model is selected at [Application onboarding] and cannot be changed.
* The [**OpenSearch** component](https://docs.langflow.org/bundles-elastic#opensearch) stores the processed documents and their embeddings in the `documents` index at `https://opensearch:9200`. By default, the component is authenticated with a JWT token, but you can also select `basic` auth mode, and enter your OpenSearch admin username and password.
Individual users can connect their personal cloud storage accounts to OpenRAG. Each user must separately authorize OpenRAG to access their own cloud storage. When a user connects a cloud storage service, they are redirected to authenticate with that service provider and grant OpenRAG permission to sync documents from their personal cloud storage.
<PartialModifyFlows />
### Enable OAuth connectors
### OpenSearch URL Ingestion flow {#url-flow}
Before users can connect their own cloud storage accounts, you must configure the provider's OAuth credentials in OpenRAG. Typically, this requires that you register OpenRAG as an OAuth application in your cloud provider, and then obtain the app's OAuth credentials, such as a client ID and secret key.
To enable multiple connectors, you must register an app and generate credentials for each provider.
An additional knowledge ingestion flow is included in OpenRAG, where it is used as an MCP tool by the [**Open Search Agent flow**](/agents#flow).
The agent calls this component to fetch web content, and the results are ingested into OpenSearch.
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
For more on using MCP clients in Langflow, see [MCP clients](https://docs.langflow.org/mcp-client).\
To connect additional MCP servers to the MCP client, see [Connect to MCP servers from your application](https://docs.langflow.org/mcp-tutorial).
If you use the [Terminal User Interface (TUI)](/tui) to manage your OpenRAG services, enter OAuth credentials on the **Advanced Setup** page.
You can do this during [installation](/install#setup), or you can add the credentials afterwards:
## Use OpenRAG default ingestion instead of Docling serve
1. If OpenRAG is running, click **Stop All Services** in the TUI.
If you want to use OpenRAG's built-in pipeline instead of Docling serve, set `DISABLE_INGEST_WITH_LANGFLOW=true` in [Environment variables](/reference/configuration#document-processing).
2. Open the **Advanced Setup** page, and then add the OAuth credentials for the cloud storage providers that you want to use under **API Keys**:
The built-in pipeline still uses the Docling processor, but uses it directly without the Docling Serve API.
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
For more information, see [`processors.py` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/src/models/processors.py#L58).
3. Register the redirect URIs shown in the TUI in your OAuth provider.
These are the URLs your OAuth provider will use to redirect users back to OpenRAG after they sign in.
## Performance expectations
4. Click **Save Configuration** to add the OAuth credentials to your [OpenRAG `.env` file](/reference/configuration).
5. Click **Start Services** to restart the OpenRAG containers with OAuth enabled.
6. Launch the OpenRAG app.
You should be prompted to sign in to your OAuth provider before being redirected to your OpenRAG instance.
</TabItem>
<TabItem value="env" label="Self-managed services">
If you [installed OpenRAG with self-managed services](/docker), set OAuth credentials in your [OpenRAG `.env` file](/reference/configuration).
You can do this during [initial set up](/docker#setup), or you can add the credentials afterwards:
1. Stop all OpenRAG containers:
<PartialDockerStopAll />
2. Edit your OpenRAG `.env` file to add the OAuth credentials for the cloud storage providers that you want to use:
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
```env
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_OAUTH_CLIENT_SECRET=
```
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
```env
MICROSOFT_GRAPH_OAUTH_CLIENT_ID=
MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=
```
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
```env
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
```
3. Save the `.env` file.
4. Restart your OpenRAG containers:
<PartialDockerComposeUp />
5. Access the OpenRAG frontend at `http://localhost:3000`.
You should be prompted to sign in to your OAuth provider before being redirected to your OpenRAG instance.
</TabItem>
</Tabs>
### Authenticate and ingest files from cloud storage
After you start OpenRAG with OAuth connectors enabled, each user is prompted to authenticate with the OAuth provider upon accessing your OpenRAG instance.
Individual authentication is required to access a user's cloud storage from your OpenRAG instance.
For example, if a user navigates to the default OpenRAG URL at `http://localhost:3000`, they are redirected to the OAuth provider's sign-in page.
After authenticating and granting the required permissions for OpenRAG, the user is redirected back to OpenRAG.
To ingest knowledge with an OAuth connector, do the following:
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge** to view your OpenSearch knowledge base.
2. Click **Add Knowledge**, and then select a storage provider.
3. On the **Add Cloud Knowledge** page, click **Add Files**, and then select the files and folders to ingest from the connected storage.
4. Click **Ingest Files**.
The selected files are processed in the background through the **OpenSearch Ingestion** flow.
<PartialIngestionFlow />
You can [monitor ingestion](#monitor-ingestion) to see the progress of the uploads and check for failed uploads.
## Ingest knowledge from URLs {#url-flow}
When using the OpenRAG chat, you can enter URLs into the chat to be ingested in real-time during your conversation.
:::info
The chat cannot ingest URLs that end in static document file extensions like `.pdf`.
To upload these types of files, see [Ingest local files and folders](#ingest-local-files-and-folders) and [Ingest files with OAuth connectors](#oauth-ingestion).
:::
OpenRAG runs the **OpenSearch URL Ingestion** flow to ingest web content from URLs.
This flow isn't directly accessible from the OpenRAG user interface.
Instead, this flow is called by the [**OpenRAG OpenSearch Agent** flow](/chat#flow) as a Model Context Protocol (MCP) tool.
The agent can call this component to fetch web content from a given URL, and then ingest that content into your OpenSearch knowledge base.
Like all OpenRAG flows, you can [inspect the flow in Langflow](/agents#inspect-and-modify-flows), and you can customize it.
For more information about MCP in Langflow, see the Langflow documentation on [MCP clients](https://docs.langflow.org/mcp-client) and [MCP servers](https://docs.langflow.org/mcp-tutorial).
## Monitor ingestion {#monitor-ingestion}
Depending on the amount of data to ingest, document ingestion can take a few seconds, minutes, or longer.
For this reason, document ingestion tasks run in the background.
In the OpenRAG user interface, a badge is shown on <Icon name="Bell" aria-hidden="true"/> **Tasks** when OpenRAG tasks are active.
Click <Icon name="Bell" aria-hidden="true"/> **Tasks** to inspect and cancel tasks.
Tasks are separated into multiple sections:
* The **Active Tasks** section includes all tasks that are **Pending**, **Running**, or **Processing**:
* **Pending**: The task is queued and waiting to start.
* **Running**: The task is actively processing files.
* **Processing**: The task is performing ingestion operations.
To stop an active task, click <Icon name="X" aria-hidden="true"/> **Cancel**. Canceling a task stops processing immediately and marks the ingestion as failed.
* The **Recent Tasks** section lists recently finished tasks.
:::warning
**Completed** doesn't mean success.
A completed task can report successful ingestions, failed ingestions, or both, depending on the number of files processed.
:::
Check the **Success** and **Failed** counts for each completed task to determine the overall success rate.
**Failed** means something went wrong during ingestion, or the task was manually canceled.
For more information, see [Troubleshoot ingestion](#troubleshoot-ingestion).
For each task, depending on its state, you can find the task ID, start time, duration, number of files processed successfully, number of files that failed, and the number of files enqueued for processing.
### Ingestion performance expectations
The following performance test was conducted with Docling Serve.
On a local VM with 7 vCPUs and 8 GiB RAM, OpenRAG ingested approximately 5.03 GB across 1,083 files in about 42 minutes.
This equates to approximately 2.4 documents per second.
You can generally expect equal or better performance on developer laptops and significantly faster on servers.
Throughput scales with CPU cores, memory, storage speed, and configuration choices such as embedding model, chunk size and overlap, and concurrency.
You can generally expect equal or better performance on developer laptops, and significantly faster performance on servers.
Throughput scales with CPU cores, memory, storage speed, and configuration choices, such as the embedding model, chunk size, overlap, and concurrency.
This test returned 12 errors (approximately 1.1%).
This test returned 12 error, approximately 1.1 percent of the total files ingested.
All errors were file-specific, and they didn't stop the pipeline.
Ingestion dataset:
<details>
<summary>Ingestion performance test details</summary>
* Total files: 1,083 items mounted
* Total size on disk: 5,026,474,862 bytes (approximately 5.03 GB)
* Ingestion dataset:
Hardware specifications:
* Total files: 1,083 items mounted
* Total size on disk: 5,026,474,862 bytes (approximately 5.03 GB)
* Machine: Apple M4 Pro
* Podman VM:
* Name: `podman-machine-default`
* Type: `applehv`
* vCPUs: 7
* Memory: 8 GiB
* Disk size: 100 GiB
* Hardware specifications:
Test results:
* Machine: Apple M4 Pro
* Podman VM:
```text
2025-09-24T22:40:45.542190Z /app/src/main.py:231 Ingesting default documents when ready disable_langflow_ingest=False
2025-09-24T22:40:45.546385Z /app/src/main.py:270 Using Langflow ingestion pipeline for default documents file_count=1082
...
2025-09-24T23:19:44.866365Z /app/src/main.py:351 Langflow ingestion completed success_count=1070 error_count=12 total_files=1082
```
* Name: podman-machine-default
* Type: applehv
* vCPUs: 7
* Memory: 8 GiB
* Disk size: 100 GiB
Elapsed time: ~42 minutes 15 seconds (2,535 seconds)
* Test results:
Throughput: ~2.4 documents/second
```text
2025-09-24T22:40:45.542190Z /app/src/main.py:231 Ingesting default documents when ready disable_langflow_ingest=False
2025-09-24T22:40:45.546385Z /app/src/main.py:270 Using Langflow ingestion pipeline for default documents file_count=1082
...
2025-09-24T23:19:44.866365Z /app/src/main.py:351 Langflow ingestion completed success_count=1070 error_count=12 total_files=1082
```
* Elapsed time: Approximately 42 minutes 15 seconds (2,535 seconds)
* Throughput: Approximately 2.4 documents per second
</details>
## Troubleshoot ingestion {#troubleshoot-ingestion}
The following issues can occur during document ingestion.
### Failed or slow ingestion
If an ingestion task fails, do the following:
* Make sure you uploaded only supported file types.
* Split very large files into smaller files.
* Remove unusual or complex embedded content, such as videos or animations. Although Docling can replace some non-text content with placeholders during ingestion, some embedded content might cause errors.
* Make sure your Podman/Docker VM has sufficient memory for the ingestion tasks.
The minimum recommendation is 8 GB of RAM.
If you regularly upload large files, more RAM is recommended.
For more information, see [Memory issue with Podman on macOS](/support/troubleshoot#memory-issue-with-podman-on-macos) and [Container out of memory errors](/support/troubleshoot#container-out-of-memory-errors).
* If OCR ingestion fails due to OCR missing, see [OCR ingestion fails (easyocr not installed)](/support/troubleshoot#ocr-ingestion-fails-easyocr-not-installed).
### Problems when referencing documents in chat
If the OpenRAG **Chat** doesn't seem to use your documents correctly, [browse your knowledge base](/knowledge#browse-knowledge) to confirm that the documents are uploaded in full, and the chunks are correct.
If the documents are present and well-formed, check your [knowledge filters](/knowledge-filters).
If you applied a filter to the chat, make sure the expected documents aren't excluded by the filter settings.
You can test this by applying the filter when you [browse the knowledge base](/knowledge#browse-knowledge).
If the filter excludes any documents, the agent cannot access those documents.
Be aware that some settings create dynamic filters that don't always produce the same results, such as a **Search query** combined with a low **Response limit**.
If the document chunks have missing, incorrect, or unexpected text, you must [delete the documents](/knowledge#delete-knowledge) from your knowledge base, modify the [ingestion parameters](/knowledge#knowledge-ingestion-settings) or the documents themselves, and then reingest the documents.
For example:
* Break combined documents into separate files for better metadata context.
* Make sure scanned documents are legible enough for extraction, and enable the **OCR** option. Poorly scanned documents might require additional preparation or rescanning before ingestion.
* Adjust the **Chunk size** and **Chunk overlap** settings to better suit your documents. Larger chunks provide more context but can include irrelevant information, while smaller chunks yield more precise semantic search but can lack context.
## See also
* [Configure knowledge](/knowledge)
* [Filter knowledge](/knowledge-filters)
* [Chat with knowledge](/chat)
* [Inspect and modify flows](/agents#inspect-and-modify-flows)

View file

@ -0,0 +1,87 @@
---
title: Filter knowledge
slug: /knowledge-filters
---
import Icon from "@site/src/components/icon/icon";
import PartialAnonymousUserOwner from '@site/docs/_partial-anonymous-user-owner.mdx';
OpenRAG's knowledge filters help you organize and manage your [knowledge base](/knowledge) by creating pre-defined views of your documents.
Each knowledge filter captures a specific subset of documents based on given a search query and filters.
Knowledge filters can be used with different OpenRAG functionality.
For example, knowledge filters can help agents access large knowledge bases efficiently by narrowing the scope of documents that you want the agent to use.
## Built-in filters
When you install OpenRAG, it automatically creates an **OpenRAG docs** filter that includes OpenRAG's default documents.
These documents provide information about OpenRAG itself and help you learn how to use OpenRAG.
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, [apply the **OpenRAG docs** filter](#apply-a-filter) if you want to ask questions about OpenRAG's features and functionality.
This limits the agent's context to the default OpenRAG documentation rather than all documents in your knowledge base.
After uploading your own documents, it is recommended that you create your own filters to organize your documents effectively and separate them from the default OpenRAG documents.
## Create a filter
To create a knowledge filter, do the following:
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge**, and then click <Icon name="Plus" aria-hidden="true"/> **Knowledge Filters**.
2. Enter a **Name**.
3. Optional: Click the filter icon next to the filter name to select a different icon and color for the filter.
This is purely cosmetic, but it can help you visually distinguish different sets of filters, such as different projects or sources.
4. Optional: Enter a **Description**.
5. Customize the filter settings.
By default, filters match all documents in your knowledge base.
Use the filter settings to narrow the scope of documents that the filter captures:
* **Search Query**: Enter a natural language text string for semantic search.
When you apply a filter that has a **Search Query**, only documents matching the search query are included.
It is recommended that you also use the **Score Threshold** setting to avoid returning irrelevant documents.
* **Data Sources**: Select specific files and folders to include in the filter.
This is useful if you want to create a filter for a specific project or topic and you know the specific documents you want to include.
Similarly, if you upload a folder of documents or enable an OAuth connector, you might want to create a filter that only includes the documents from that source.
* **Document Types**: Filter by file type.
* **Owners**: Filter by the user that uploaded the documents.
<PartialAnonymousUserOwner />
* **Connectors**: Filter by [upload source](/ingestion), such as the local file system or an OAuth connector.
* **Response Limit**: Set the maximum number of results to return from the knowledge base. The default is `10`, which means the filter returns only the top 10 most relevant documents.
* **Score Threshold**: Set the minimum relevance score for similarity search. The default score is `0`. A threshold is recommended to avoid returned irrelevant documents.
6. Click **Create Filter**.
## Edit a filter
To modify a filter, click <Icon name="Library" aria-hidden="true"/> **Knowledge**, and then click the filter you want to edit in the **Knowledge Filters** list.
On the filter settings pane, edit the filter as desired, and then click **Update Filter**.
## Apply a filter {#apply-a-filter}
In the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, click <Icon name="Funnel" aria-hidden="true"/> **Filter**, and then select the filter to apply.
Chat filters apply to one chat session only.
You can also use filters when [browsing your knowledge base](/knowledge#browse-knowledge).
This is a helpful way to test filters and manage knowledge bases that have many documents.
## Delete a filter
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge**.
2. In the **Knowledge Filters** list, click the filter that you want to delete.
3. In the filter settings pane, click **Delete Filter**.

View file

@ -1,158 +1,216 @@
---
title: OpenSearch in OpenRAG
title: Configure knowledge
slug: /knowledge
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialModifyFlows from '@site/docs/_partial-modify-flows.mdx';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialAnonymousUserOwner from '@site/docs/_partial-anonymous-user-owner.mdx';
OpenRAG uses [OpenSearch](https://docs.opensearch.org/latest/) for its vector-backed knowledge store.
This is a specialized database for storing and retrieving embeddings, which helps your Agent efficiently find relevant information.
OpenSearch provides powerful hybrid search capabilities with enterprise-grade security and multi-tenancy support.
OpenRAG includes a built-in [OpenSearch](https://docs.opensearch.org/latest/) instance that serves as the underlying datastore for your _knowledge_ (documents).
This specialized database is used to store and retrieve your documents and the associated vector data (embeddings).
## Authentication and document access {#auth}
The documents in your OpenSearch knowledge base provide specialized context in addition to the general knowledge available to the language model that you select when you [install OpenRAG](/install-options) or [edit a flow](/agents).
OpenRAG supports two authentication modes based on how you [install OpenRAG](/install), and which mode you choose affects document access.
You can [upload documents](/ingestion) from a variety of sources to populate your knowledge base with unique content, such as your own company documents, research papers, or websites.
Documents are processed through OpenRAG's knowledge ingestion flows with Docling.
**No-auth mode (Basic Setup)**: This mode uses a single anonymous JWT token for OpenSearch authentication, so documents uploaded to the `documents` index by one user are visible to all other users on the OpenRAG server.
Then, the [OpenRAG **Chat**](/chat) can run [similarity searches](https://www.ibm.com/think/topics/vector-search) against your OpenSearch database to retrieve relevant information and generate context-aware responses.
**OAuth mode (Advanced Setup)**: Each OpenRAG user is granted a JWT token, and each document is tagged with user ownership. Documents are filtered by user ownership, ensuring users only see documents they uploaded or have access to.
You can configure how documents are ingested and how the **Chat** interacts with your knowledge base.
## Ingest knowledge
## Browse knowledge {#browse-knowledge}
OpenRAG supports knowledge ingestion through direct file uploads and OAuth connectors.
To configure the knowledge ingestion pipeline parameters, see [Docling Ingestion](/ingestion).
The **Knowledge** page lists the documents OpenRAG has ingested into your OpenSearch database, specifically in an [OpenSearch index](https://docs.opensearch.org/latest/getting-started/intro/#index) named `documents`.
### Direct file ingestion
To explore the raw contents of your knowledge base, click <Icon name="Library" aria-hidden="true"/> **Knowledge** to get a list of all ingested documents.
The **Knowledge Ingest** flow uses Langflow's [**File** component](https://docs.langflow.org/components-data#file) to split and embed files loaded from your local machine into the OpenSearch database.
### Inspect knowledge
The default path to your local folder is mounted from the `./documents` folder in your OpenRAG project directory to the `/app/documents/` directory inside the Docker container. Files added to the host or the container will be visible in both locations. To configure this location, modify the **Documents Paths** variable in either the TUI's [Advanced Setup](/install#setup) menu or in the `.env` used by Docker Compose.
For each document, the **Knowledge** page provides the following information:
To load and process a single file from the mapped location, click **Add Knowledge**, and then click <Icon name="File" aria-hidden="true"/> **File**.
The file is loaded into your OpenSearch database, and appears in the Knowledge page.
* **Source**: Name of the ingested content, such as the file name.
To load and process a directory from the mapped location, click **Add Knowledge**, and then click <Icon name="Folder" aria-hidden="true"/> **Folder**.
The files are loaded into your OpenSearch database, and appear in the Knowledge page.
* **Size**
To add files directly to a chat session, click <Icon name="Plus" aria-hidden="true"/> in the chat input and select the files you want to include. Files added this way are processed and made available to the agent for the current conversation, and are not permanently added to the knowledge base.
* **Type**
### Ingest files through OAuth connectors {#oauth-ingestion}
* **Owner**: User that uploaded the document.
OpenRAG supports Google Drive, OneDrive, and Sharepoint as OAuth connectors for seamless document synchronization.
<PartialAnonymousUserOwner />
OAuth integration allows individual users to connect their personal cloud storage accounts to OpenRAG. Each user must separately authorize OpenRAG to access their own cloud storage files. When a user connects a cloud service, they are redirected to authenticate with that service provider and grant OpenRAG permission to sync documents from their personal cloud storage.
* **Chunks**: Number of chunks created by splitting the document during ingestion.
Before users can connect their cloud storage accounts, you must configure OAuth credentials in OpenRAG. This requires registering OpenRAG as an OAuth application with a cloud provider and obtaining client ID and secret keys for each service you want to support.
Click a document to view the individual chunks and technical details related to chunking.
If the chunks seem incorrect or incomplete, see [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
To add an OAuth connector to OpenRAG, do the following.
This example uses Google OAuth.
If you wish to use another provider, add the secrets to another provider.
* **Avg score**: Average similarity score across all chunks of the document.
<Tabs groupId="Installation type">
<TabItem value="TUI" label="TUI" default>
1. If OpenRAG is running, stop it with **Status** > **Stop Services**.
2. Click **Advanced Setup**.
3. Add the OAuth provider's client and secret key in the [Advanced Setup](/install#setup) menu.
4. Click **Save Configuration**.
The TUI generates a new `.env` file with your OAuth values.
5. Click **Start Container Services**.
</TabItem>
<TabItem value=".env" label=".env">
1. Stop the Docker deployment.
2. Add the OAuth provider's client and secret key in the `.env` file for Docker Compose.
```bash
GOOGLE_OAUTH_CLIENT_ID='YOUR_OAUTH_CLIENT_ID'
GOOGLE_OAUTH_CLIENT_SECRET='YOUR_OAUTH_CLIENT_SECRET'
```
3. Save your `.env` file.
4. Start the Docker deployment.
</TabItem>
</Tabs>
If you [search the knowledge base](#search-knowledge), the **Avg score** column shows the similarity score for your search query or filter.
The OpenRAG frontend at `http://localhost:3000` now redirects to an OAuth callback login page for your OAuth provider.
A successful authentication opens OpenRAG with the required scopes for your connected storage.
* **Embedding model** and **Dimensions**: The embedding model and dimensions used to embed the chunks.
To add knowledge from an OAuth-connected storage provider, do the following:
* **Status**: Status of document ingestion.
If ingestion is complete and successful, then the status is **Active**.
For more information, see [Monitor ingestion](/ingestion#monitor-ingestion).
1. Click **Add Knowledge**, and then select the storage provider, for example, **Google Drive**.
The **Add Cloud Knowledge** page opens.
2. To add files or folders from the connected storage, click **Add Files**.
Select the files or folders you want and click **Select**.
You can select multiple files.
3. When your files are selected, click **Ingest Files**.
The ingestion process can take some time depending on the size of your documents.
4. When ingestion is complete, your documents are available in the Knowledge screen.
### Search knowledge {#search-knowledge}
If ingestion fails, click **Status** to view the logged error.
You can use the search field on the **Knowledge** page to find documents using semantic search and knowledge filters:
## Monitor ingestion tasks
To search all documents, enter a search string in the search field, and then press <kbd>Enter</kbd>.
When you upload files, process folders, or sync documents, OpenRAG processes them as background tasks.
A badge appears on the <Icon name="Bell" aria-hidden="true"/> **Tasks** icon when there are active tasks running.
To open the Tasks menu, click <Icon name="Bell" aria-hidden="true"/> **Tasks**.
To apply a [knowledge filter](/knowledge-filters), select the filter from the **Knowledge Filters** list.
The filter settings pane opens, and the filter appears in the search field.
To remove the filter, close the filter settings pane or clear the filter from the search field.
**Active Tasks** shows tasks that are currently processing.
A **Pending** task is queued and waiting to start, a **Running** task is actively processing files, and a **Processing** task is performing ingestion operations. For each active task, you can find the task ID, start time, duration, the number of files processed so far, and the total files.
You can use the filter alone or in combination with a search string.
If a knowledge filter has a **Search Query**, that query is applied in addition to any text string you enter in the search field.
You can cancel active tasks by clicking <Icon name="X" aria-hidden="true"/> **Cancel**. Canceling a task stops processing immediately and marks the task as failed.
Only one filter can be applied at a time.
## Explore knowledge
### Default documents {#default-documents}
The **Knowledge** page lists the documents OpenRAG has ingested into the OpenSearch vector database's `documents` index.
By default, OpenRAG includes some initial documents about OpenRAG.
These documents are ingested automatically during the [application onboarding process](/install#application-onboarding).
To explore your current knowledge, click <Icon name="Library" aria-hidden="true"/> **Knowledge**.
Click on a document to display the chunks derived from splitting the default documents into the vector database.
You can use these documents to ask OpenRAG about itself, or to test the [**Chat**](/chat) feature before uploading your own documents.
Documents are processed with the default **Knowledge Ingest** flow, so if you want to split your documents differently, edit the **Knowledge Ingest** flow.
If you [delete these documents](#delete-knowledge), then you won't be able to ask OpenRAG about itself and it's own functionality.
It is recommended that you keep these documents, and use [filters](/knowledge-filters) to separate them from your other knowledge.
An **OpenRAG Docs** filter is created automatically for these documents.
<PartialModifyFlows />
## OpenSearch authentication and document access {#auth}
## Create knowledge filters
When you [install OpenRAG](/install-options), you provide the initial configuration values for your OpenRAG services, including authentication credentials for OpenSearch and OAuth connectors.
This configuration determines how OpenRAG authenticates with your deployment's OpenSearch instance, and it controls user access to documents in your knowledge base:
OpenRAG includes a knowledge filter system for organizing and managing document collections.
Knowledge filters are saved search configurations that allow you to create custom views of your document collection. They store search queries, filter criteria, and display settings that can be reused across different parts of OpenRAG.
<PartialOpenSearchAuthMode />
Knowledge filters help agents work more efficiently with large document collections by focusing their context within relevant documents sets.
## OpenSearch indexes
To create a knowledge filter, do the following:
An [OpenSearch index](https://docs.opensearch.org/latest/getting-started/intro/#index) is a collection of documents in an OpenSearch database.
1. Click **Knowledge**, and then click <Icon name="Plus" aria-hidden="true"/> **Knowledge Filters**.
The **Knowledge Filter** pane appears.
2. Enter a **Name** and **Description**, and then click **Create Filter**.
A new filter is created with default settings that match all documents.
3. To modify the filter, click <Icon name="Library" aria-hidden="true"/> **Knowledge**, and then click your new filter to edit it in the **Knowledge Filter** pane.
By default, all documents you upload to your OpenRAG knowledge base are stored in an index named `documents`.
The following filter options are configurable.
* **Search Query**: Enter text for semantic search, such as "financial reports from Q4".
* **Data Sources**: Select specific data sources or folders to include.
* **Document Types**: Filter by file type.
* **Owners**: Filter by who uploaded the documents.
* **Connectors**: Filter by connector types, such as local upload or Google Drive.
* **Response Limit**: Set maximum number of results. The default is `10`.
* **Score Threshold**: Set minimum relevance score. The default score is `0`.
It is possible to change the index name by [editing the ingestion flow](/agents#inspect-and-modify-flows).
However, this can impact dependent processes, such as the [filters](/knowledge-filters) and [**Chat**](/chat), that reference the `documents` index by default.
Make sure you edit other flows as needed to ensure all processes use the same index name.
4. When you're done editing the filter, click **Update Filter**.
If you encounter errors or unexpected behavior after changing the index name, you can [revert the flows to their original configuration](/agents#revert-a-built-in-flow-to-its-original-configuration), or [delete knowledge](/knowledge#delete-knowledge) to clear the existing documents from your knowledge base.
5. To apply the filter to OpenRAG globally, click <Icon name="Library" aria-hidden="true"/> **Knowledge**, and then select the filter to apply. One filter can be enabled at a time.
## Knowledge ingestion settings {#knowledge-ingestion-settings}
To apply the filter to a single chat session, in the <Icon name="MessageSquare" aria-hidden="true"/> **Chat** window, click <Icon name="Funnel" aria-hidden="true"/>, and then select the filter to apply.
:::warning
Knowledge ingestion settings apply to documents you upload after making the changes.
Documents uploaded before changing these settings aren't reprocessed.
:::
To delete the filter, in the **Knowledge Filter** pane, click **Delete Filter**.
After changing knowledge ingestion settings, you must determine if you need to reupload any documents to be consistent with the new settings.
## OpenRAG default configuration
It isn't always necessary to reupload documents after changing knowledge ingestion settings.
For example, it is typical to upload some documents with OCR enabled and others without OCR enabled.
OpenRAG automatically detects and configures the correct vector dimensions for embedding models, ensuring optimal search performance and compatibility.
If needed, you can use [filters](/knowledge-filters) to separate documents that you uploaded with different settings, such as different embedding models.
The complete list of supported models is available at [`models_service.py` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/src/services/models_service.py).
### Set the embedding model and dimensions {#set-the-embedding-model-and-dimensions}
You can use custom embedding models by specifying them in your configuration.
When you [install OpenRAG](/install-options), you select at least one embedding model during the [application onboarding process](/install#application-onboarding).
OpenRAG automatically detects and configures the appropriate vector dimensions for your selected embedding model, ensuring optimal search performance and compatibility.
If you use an unknown embedding model, OpenRAG automatically falls back to `1536` dimensions and logs a warning. The system continues to work, but search quality can be affected if the actual model dimensions differ from `1536`.
In the OpenRAG repository, you can find the complete list of supported models in [`models_service.py`](https://github.com/langflow-ai/openrag/blob/main/src/services/models_service.py) and the corresponding vector dimensions in [`settings.py`](https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py).
The default embedding dimension is `1536` and the default model is `text-embedding-3-small`.
During the application onboarding process, you can select from the supported models.
The default embedding dimension is `1536`, and the default model is the OpenAI `text-embedding-3-small`.
For models with known vector dimensions, see [`settings.py` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py).
If you want to use an unsupported model, you must manually set the model in your [OpenRAG `.env` file](/reference/configuration).
If you use an unsupported embedding model that doesn't have defined dimensions in `settings.py`, then OpenRAG falls back to the default dimensions (1536) and logs a warning. OpenRAG's OpenSearch instance and flows continue to work, but [similarity search](https://www.ibm.com/think/topics/vector-search) quality can be affected if the actual model dimensions aren't 1536.
To change the embedding model after onboarding, modify the embedding model configuration on the OpenRAG **Settings** page or in your [OpenRAG `.env` file](/reference/configuration).
This ensures that all relevant [OpenRAG flows](/agents) are updated to use the new embedding model configuration.
If you edit these settings in the `.env` file, you must [stop and restart the OpenRAG containers](/manage-services#stop-and-start-containers) to apply the changes.
### Set Docling parameters
OpenRAG uses [Docling](https://docling-project.github.io/docling/) for document ingestion because it supports many file formats, processes tables and images well, and performs efficiently.
When you [upload documents](/ingestion), Docling processes the files, splits them into chunks, and stores them as separate, structured documents in your OpenSearch knowledge base.
#### Select a Docling implementation {#select-a-docling-implementation}
You can use either Docling Serve or OpenRAG's built-in Docling ingestion pipeline to process documents.
* **Docling Serve ingestion**: By default, OpenRAG uses [Docling Serve](https://github.com/docling-project/docling-serve).
It starts a local `docling serve` process, and then runs Docling ingestion through the Docling Serve API.
To use a remote `docling serve` instance or your own local instance, set `DOCLING_SERVE_URL=http://**HOST_IP**:5001` in your [OpenRAG `.env` file](/reference/configuration#document-processing-settings).
The service must run on port 5001.
* **Built-in Docling ingestion**: If you want to use OpenRAG's built-in Docling ingestion pipeline instead of the separate Docling Serve service, set `DISABLE_INGEST_WITH_LANGFLOW=true` in your [OpenRAG `.env` file](/reference/configuration#document-processing-settings).
The built-in pipeline uses the Docling processor directly instead of through the Docling Serve API.
For the underlying functionality, see [`processors.py`](https://github.com/langflow-ai/openrag/blob/main/src/models/processors.py#L58) in the OpenRAG repository.
#### Configure Docling ingestion settings
To modify the Docling document processing and embedding parameters, click <Icon name="Settings2" aria-hidden="true"/> **Settings** in OpenRAG, and then find the **Knowledge Ingest** section.
:::tip
The TUI warns you if `docling serve` isn't running.
For information about starting and stopping OpenRAG native services, like Docling, see [Manage OpenRAG services](/manage-services).
:::
You can edit the following parameters:
* **Embedding model**: Select the model to use to generate vector embeddings for your documents.
This is initially set during installation.
The recommended way to change this setting is in the OpenRAG <Icon name="Settings2" aria-hidden="true"/> **Settings** or your [OpenRAG `.env` file](/reference/configuration).
This ensures that all relevant [OpenRAG flows](/agents) are updated to use the new embedding model configuration.
If you uploaded documents prior to changing the embedding model, you can [create filters](/knowledge-filters) to separate documents embedded with different models, or you can reupload all documents to regenerate embeddings with the new model.
If you want to use multiple embeddings models, similarity search (in the **Chat**) can take longer as it searches each model's embeddings separately.
* **Chunk size**: Set the number of characters for each text chunk when breaking down a file.
Larger chunks yield more context per chunk, but can include irrelevant information. Smaller chunks yield more precise semantic search, but can lack context.
The default value is 1000 characters, which is usually a good balance between context and precision.
* **Chunk overlap**: Set the number of characters to overlap over chunk boundaries.
Use larger overlap values for documents where context is most important. Use smaller overlap values for simpler documents or when optimization is most important.
The default value is 200 characters, which represents an overlap of 20 percent if the **Chunk size** is 1000. This is suitable for general use. For faster processing, decrease the overlap to approximately 10 percent. For more complex documents where you need to preserve context across chunks, increase it to approximately 40 percent.
* **Table structure**: Enables Docling's [`DocumentConverter`](https://docling-project.github.io/docling/reference/document_converter/) tool for parsing tables. Instead of treating tables as plain text, tables are output as structured table data with preserved relationships and metadata. This option is enabled by default.
* **OCR**: Enables Optical Character Recognition (OCR) processing when extracting text from images and ingesting scanned documents. This setting is best suited for processing text-based documents faster with Docling's [`DocumentConverter`](https://docling-project.github.io/docling/reference/document_converter/). Images are ignored and not processed.
This option is disabled by default. Enabling OCR can slow ingestion performance.
If OpenRAG detects that the local machine is running on macOS, OpenRAG uses the [ocrmac](https://www.piwheels.org/project/ocrmac/) OCR engine. Other platforms use [easyocr](https://www.jaided.ai/easyocr/).
* **Picture descriptions**: Only applicable if **OCR** is enabled. Adds image descriptions generated by the [`SmolVLM-256M-Instruct`](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) model. Enabling picture descriptions can slow ingestion performance.
### Set the local documents path {#set-the-local-documents-path}
The default path for local uploads is `~/.openrag/documents`. This is mounted to the `/app/openrag-documents/` directory inside the OpenRAG container. Files added to the host or container directory are visible in both locations.
To change this location, modify the **Documents Paths** variable in either the [**Basic/Advanced Setup** menu](/install#setup) or in your [OpenRAG `.env` file](/reference/configuration).
## Delete knowledge {#delete-knowledge}
:::warning
This is a destructive operation that cannot be undone.
:::
To delete documents from your knowledge base, click <Icon name="Library" aria-hidden="true"/> **Knowledge**, use the checkboxes to select one or more documents, and then click **Delete**.
If you select the checkbox at the top of the list, all documents are selected and your entire knowledge base will be deleted.
To delete an individual document, you can also click <Icon name="Ellipsis" aria-hidden="true"/> **More** next to that document, and then select **Delete**.
To completely clear your entire knowledge base and OpenSearch index, [reset your OpenRAG containers](/manage-services#reset-containers) or [reinstall OpenRAG](/reinstall).
## See also
* [Ingest knowledge](/ingestion)
* [Filter knowledge](/knowledge-filters)
* [Chat with knowledge](/chat)
* [Inspect and modify flows](/agents#inspect-and-modify-flows)

View file

@ -1,118 +1,119 @@
---
title: Install OpenRAG containers
title: Deploy OpenRAG with self-managed services
slug: /docker
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialWsl from '@site/docs/_partial-wsl-install.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqNoScript from '@site/docs/_partial-prereq-no-script.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
import PartialGpuModeTip from '@site/docs/_partial-gpu-mode-tip.mdx';
OpenRAG has two Docker Compose files. Both files deploy the same applications and containers locally, but they are for different environments:
To manage your own OpenRAG services, deploy OpenRAG with Docker or Podman.
- [`docker-compose.yml`](https://github.com/langflow-ai/openrag/blob/main/docker-compose.yml) is an OpenRAG deployment with GPU support for accelerated AI processing. This Docker Compose file requires an NVIDIA GPU with [CUDA](https://docs.nvidia.com/cuda/) support.
- [`docker-compose-cpu.yml`](https://github.com/langflow-ai/openrag/blob/main/docker-compose-cpu.yml) is a CPU-only version of OpenRAG for systems without NVIDIA GPU support. Use this Docker Compose file for environments where GPU drivers aren't available.
Use this installation method if you don't want to [use the Terminal User Interface (TUI)](/tui), or you need to run OpenRAG in an environment where using the TUI is unfeasible.
## Prerequisites
- Install the following:
<PartialPrereqWindows />
- [Python](https://www.python.org/downloads/release/python-3100/) version 3.13 or later.
- [uv](https://docs.astral.sh/uv/getting-started/installation/).
- [Podman](https://podman.io/docs/installation) (recommended) or [Docker](https://docs.docker.com/get-docker/).
- [`podman-compose`](https://docs.podman.io/en/latest/markdown/podman-compose.1.html) or [Docker Compose](https://docs.docker.com/compose/install/). To use Docker Compose with Podman, you must alias Docker Compose commands to Podman commands.
<PartialPrereqPython />
- Microsoft Windows only: To run OpenRAG on Windows, you must use the Windows Subsystem for Linux (WSL).
<PartialPrereqNoScript />
<details>
<summary>Install WSL for OpenRAG</summary>
<PartialPrereqCommon />
<PartialWsl />
## Prepare your deployment {#setup}
</details>
1. Clone the OpenRAG repository:
- Prepare model providers and credentials.
During [Application Onboarding](#application-onboarding), you must select language model and embedding model providers.
If your chosen provider offers both types, you can use the same provider for both selections.
If your provider offers only one type, such as Anthropic, you must select two providers.
Gather the credentials and connection details for your chosen model providers before starting onboarding:
- OpenAI: Create an [OpenAI API key](https://platform.openai.com/api-keys).
- Anthropic language models: Create an [Anthropic API key](https://www.anthropic.com/docs/api/reference).
- IBM watsonx.ai: Get your watsonx.ai API endpoint, IBM project ID, and IBM API key from your watsonx deployment.
- Ollama: Use the [Ollama documentation](https://docs.ollama.com/) to set up your Ollama instance locally, in the cloud, or on a remote server, and then get your Ollama server's base URL.
- Optional: Install GPU support with an NVIDIA GPU, [CUDA](https://docs.nvidia.com/cuda/) support, and compatible NVIDIA drivers on the OpenRAG host machine. This is required to use the GPU-accelerated Docker Compose file. If you choose not to use GPU support, you must use the CPU-only Docker Compose file instead.
## Install OpenRAG with Docker Compose
To install OpenRAG with Docker Compose, do the following:
1. Clone the OpenRAG repository.
```bash
git clone https://github.com/langflow-ai/openrag.git
```
2. Change to the root of the cloned repository:
```bash
cd openrag
```
2. Install dependencies.
3. Install dependencies:
```bash
uv sync
```
3. Copy the example `.env` file included in the repository root.
The example file includes all environment variables with comments to guide you in finding and setting their values.
4. Create a `.env` file at the root of the cloned repository.
You can create an empty file or copy the repository's [`.env.example`](https://github.com/langflow-ai/openrag/blob/main/.env.example) file.
The example file contains some of the [OpenRAG environment variables](/reference/configuration) to get you started with configuring your deployment.
```bash
cp .env.example .env
```
Alternatively, create a new `.env` file in the repository root.
```
touch .env
```
5. Edit the `.env` file to configure your deployment using [OpenRAG environment variables](/reference/configuration).
The OpenRAG Docker Compose files pull values from your `.env` file to configure the OpenRAG containers.
The following variables are required or recommended:
4. The Docker Compose files are populated with the values from your `.env` file.
The `OPENSEARCH_PASSWORD` value must be set.
`OPENSEARCH_PASSWORD` can be automatically generated when using the TUI, but for a Docker Compose installation, you can set it manually instead. To generate an OpenSearch admin password, see the [OpenSearch documentation](https://docs.opensearch.org/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password).
* **`OPENSEARCH_PASSWORD` (Required)**: Sets the OpenSearch administrator password. It must adhere to the [OpenSearch password complexity requirements](https://docs.opensearch.org/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password).
The following values are optional:
* **`LANGFLOW_SUPERUSER`**: The username for the Langflow administrator user. If `LANGFLOW_SUPERUSER` isn't set, then the default value is `admin`.
```bash
OPENAI_API_KEY=your_openai_api_key
LANGFLOW_SECRET_KEY=your_secret_key
```
* **`LANGFLOW_SUPERUSER_PASSWORD` (Strongly recommended)**: Sets the Langflow administrator password, and determines the Langflow server's default authentication mode. If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then the Langflow server starts without authentication enabled. For more information, see [Langflow settings](/reference/configuration#langflow-settings).
`OPENAI_API_KEY` is optional. You can provide it during [Application Onboarding](#application-onboarding) or choose a different model provider. If you want to set it in your `.env` file, you can find your OpenAI API key in your [OpenAI account](https://platform.openai.com/api-keys).
* **`LANGFLOW_SECRET_KEY` (Strongly recommended)**: A secret encryption key for internal Langflow operations. It is recommended to [generate your own Langflow secret key](https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key). If `LANGFLOW_SECRET_KEY` isn't set, then Langflow generates a secret key automatically.
`LANGFLOW_SECRET_KEY` is optional. Langflow will auto-generate it if not set. For more information, see the [Langflow documentation](https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key).
* **Model provider credentials**: Provide credentials for your preferred model providers. If none of these are set in the `.env` file, you must configure at least one provider during the [application onboarding process](#application-onboarding).
The following Langflow configuration values are optional but important to consider:
* `OPENAI_API_KEY`
* `ANTHROPIC_API_KEY`
* `OLLAMA_ENDPOINT`
* `WATSONX_API_KEY`
* `WATSONX_ENDPOINT`
* `WATSONX_PROJECT_ID`
```bash
LANGFLOW_SUPERUSER=admin
LANGFLOW_SUPERUSER_PASSWORD=your_langflow_password
```
* **OAuth provider credentials**: To upload documents from external storage, such as Google Drive, set the required OAuth credentials for the connectors that you want to use. You can [manage OAuth credentials](/ingestion#oauth-ingestion) later, but it is recommended to configure them during initial set up so you don't have to rebuild the containers.
`LANGFLOW_SUPERUSER` defaults to `admin`. You can omit it or set it to a different username. `LANGFLOW_SUPERUSER_PASSWORD` is optional. If omitted, Langflow runs in [autologin mode](https://docs.langflow.org/api-keys-and-authentication#langflow-auto-login) with no password required. If set, Langflow requires password authentication.
For more information on configuring OpenRAG with environment variables, see [Environment variables](/reference/configuration).
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
For more information and variables, see [OpenRAG environment variables](/reference/configuration).
## Start services
1. To use the default Docling Serve implementation, start `docling serve` on port 5001 on the host machine using the included script:
5. Start `docling serve` on the host machine.
OpenRAG Docker installations require that `docling serve` is running on port 5001 on the host machine.
This enables [Mac MLX](https://opensource.apple.com/projects/mlx/) support for document processing.
```bash
uv run python scripts/docling_ctl.py start --port 5001
```
6. Confirm `docling serve` is running.
```
Docling cannot run inside a Docker container due to system-level dependencies, so you must manage it as a separate service on the host machine.
For more information, see [Stop, start, and inspect native services](/manage-services#start-native-services).
Port 5001 is required to deploy OpenRAG successfully; don't use a different port.
Additionally, this enables the [MLX framework](https://opensource.apple.com/projects/mlx/) for accelerated performance on Apple Silicon Mac machines.
:::tip
If you don't want to use the default Docling Serve implementation, see [Select a Docling implementation](/knowledge#select-a-docling-implementation).
:::
2. Confirm `docling serve` is running.
The following command checks the status of the default Docling Serve implementation:
```bash
uv run python scripts/docling_ctl.py status
```
Make sure the response shows that `docling serve` is running, for example:
If `docling serve` is running, the output includes the status, address, and process ID (PID):
```bash
Status: running
Endpoint: http://127.0.0.1:5001
@ -120,84 +121,56 @@ To install OpenRAG with Docker Compose, do the following:
PID: 27746
```
7. Deploy OpenRAG locally with Docker Compose based on your deployment type.
3. Deploy the OpenRAG containers locally using the appropriate Docker Compose configuration for your environment:
<Tabs groupId="Compose file">
<TabItem value="docker-compose.yml" label="docker-compose.yml" default>
```bash
docker compose build
docker compose up -d
```
</TabItem>
<TabItem value="docker-compose-cpu.yml" label="docker-compose-cpu.yml">
```bash
docker compose -f docker-compose-cpu.yml up -d
```
</TabItem>
</Tabs>
* **CPU-only deployment** (default, recommended): If your host machine doesn't have NVIDIA GPU support, use the base `docker-compose.yml` file:
The OpenRAG Docker Compose file starts five containers:
| Container Name | Default Address | Purpose |
|---|---|---|
| OpenRAG Backend | http://localhost:8000 | FastAPI server and core functionality. |
| OpenRAG Frontend | http://localhost:3000 | React web interface for users. |
| Langflow | http://localhost:7860 | AI workflow engine and flow management. |
| OpenSearch | http://localhost:9200 | Vector database for document storage. |
| OpenSearch Dashboards | http://localhost:5601 | Database administration interface. |
```bash title="Docker"
docker compose up -d
```
8. Verify installation by confirming all services are running.
```bash title="Podman"
podman compose up -d
```
```bash
* **GPU-accelerated deployment**: If your host machine has an NVIDIA GPU with CUDA support and compatible NVIDIA drivers, use the base `docker-compose.yml` file with the `docker-compose.gpu.yml` override:
```bash title="Docker"
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
```
```bash title="Podman"
podman compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
```
:::tip
<PartialGpuModeTip />
:::
4. Wait for the OpenRAG containers to start, and then confirm that all containers are running:
```bash title="Docker"
docker compose ps
```
You can now access OpenRAG at the following endpoints:
```bash title="Podman"
podman compose ps
```
- **Frontend**: http://localhost:3000
- **Backend API**: http://localhost:8000
- **Langflow**: http://localhost:7860
The OpenRAG Docker Compose files deploy the following containers:
9. Continue with [Application Onboarding](#application-onboarding).
| Container Name | Default address | Purpose |
|---|---|---|
| OpenRAG Backend | http://localhost:8000 | FastAPI server and core functionality. |
| OpenRAG Frontend | http://localhost:3000 | React web interface for user interaction. |
| Langflow | http://localhost:7860 | [AI workflow engine](/agents). |
| OpenSearch | http://localhost:9200 | Datastore for [knowledge](/knowledge). |
| OpenSearch Dashboards | http://localhost:5601 | OpenSearch database administration interface. |
To stop `docling serve` when you're done with your OpenRAG deployment, run:
When the containers are running, you can access your OpenRAG services at their addresses.
```bash
uv run python scripts/docling_ctl.py stop
```
5. Access the OpenRAG frontend at `http://localhost:3000`, and then continue with the [application onboarding process](#application-onboarding).
<PartialOnboarding />
## Container management commands
Manage your OpenRAG containers with the following commands.
These commands are also available in the TUI's [Status menu](/install#status).
### Upgrade containers
Upgrade your containers to the latest version while preserving your data.
```bash
docker compose pull
docker compose up -d --force-recreate
```
### Rebuild containers (destructive)
Reset state by rebuilding all of your containers.
Your OpenSearch and Langflow databases will be lost.
Documents stored in the `./documents` directory will persist, since the directory is mounted as a volume in the OpenRAG backend container.
```bash
docker compose up --build --force-recreate --remove-orphans
```
### Remove all containers and data (destructive)
Completely remove your OpenRAG installation and delete all data.
This deletes all of your data, including OpenSearch data, uploaded documents, and authentication.
```bash
docker compose down --volumes --remove-orphans --rmi local
docker system prune -f
```
<PartialInstallNextSteps />

View file

@ -0,0 +1,34 @@
---
title: Select an installation method
slug: /install-options
---
The [OpenRAG architecture](/#openrag-architecture) is lightweight and container-based with a central OpenRAG backend that orchestrates the various services and external connectors.
Depending on your use case, OpenRAG can assist with service management, or you can manage the services yourself.
Select the installation method that best fits your needs:
* **Use the [Terminal User Interface (TUI)](/tui) to manage services**: For guided configuration and simplified service management, install OpenRAG with TUI-managed services. Use one of the following options:
* [**Automatic installer script**](/install): Run one script to install the required dependencies and OpenRAG.
* [**`uv`**](/install-uv): Install OpenRAG as a dependency of a new or existing Python project.
* [**`uvx`**](/install-uvx): Install OpenRAG without creating a project or modifying your project's dependencies.
* [**Install OpenRAG on Microsoft Windows**](/install-windows): On Windows machines, you must install OpenRAG within the Windows Subsystem for Linux (WSL).
:::warning
OpenRAG doesn't support nested virtualization; don't run OpenRAG on a WSL distribution that is inside a Windows VM.
:::
* [**Manage your own services**](/docker): You can use Docker or Podman to deploy self-managed OpenRAG services.
The first time you start OpenRAG, you must complete the application onboarding process.
This is required for all installation methods because it prepares the minimum required configuration for OpenRAG to run.
For TUI-managed services, you must also complete initial setup before you start the OpenRAG services.
For more information, see the instructions for your preferred installation method.
Your OpenRAG configuration is stored in a `.env` file.
When using TUI-managed services, this file is created automatically at `~/.openrag/tui`, or you can provide a pre-populated `.env` file in this directory before starting the TUI.
The TUI prompts you for the required values during setup and onboarding, and any values detected in a preexisting `.env` file are populated automatically.
When using self-managed services, you must provide a pre-populated `.env` file, as you would for any Docker or Podman deployment.
For more information, see the instructions for your preferred installation method and the [OpenRAG environment variables reference](/reference/configuration).

View file

@ -0,0 +1,124 @@
---
title: Install OpenRAG in a Python project with uv
slug: /install-uv
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialSetup from '@site/docs/_partial-setup.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqNoScript from '@site/docs/_partial-prereq-no-script.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
Use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) to install OpenRAG as a managed or unmanaged dependency in a new or existing Python project.
When you install OpenRAG with `uv`, you will use the [Terminal User Interface (TUI)](/tui) to configure and manage your OpenRAG deployment.
For other installation methods, see [Select an installation method](/install-options).
## Prerequisites
<PartialPrereqWindows />
<PartialPrereqPython />
<PartialPrereqNoScript />
<PartialPrereqCommon />
## Install and start OpenRAG with uv
There are two ways to install OpenRAG with `uv`:
* [**`uv add`** (Recommended)](#uv-add): Install OpenRAG as a managed dependency in a new or existing `uv` Python project.
This is recommended because it adds OpenRAG to your `pyproject.toml` and lockfile for better management of dependencies and the virtual environment.
* [**`uv pip install`**](#uv-pip-install): Use the [`uv pip` interface](https://docs.astral.sh/uv/pip/) to install OpenRAG into an existing Python project that uses `pip`, `pip-tools`, and `virtualenv` commands.
If you encounter errors during installation, see [Troubleshoot OpenRAG](/support/troubleshoot).
### Use uv add {#uv-add}
1. Create a new `uv`-managed Python project:
```bash
uv init PROJECT_NAME
```
2. Change into your new project directory:
```bash
cd PROJECT_NAME
```
Because `uv` manages the virtual environment for you, you won't see a `(venv)` prompt.
`uv` commands automatically use the project's virtual environment.
3. Add OpenRAG to your project:
* Add the latest version:
```bash
uv add openrag
```
* Add a specific version:
```bash
uv add openrag==0.1.30
```
* Add a local wheel:
```bash
uv add path/to/openrag-VERSION-py3-none-any.whl
```
For more options, see [Managing dependencies with `uv`](https://docs.astral.sh/uv/concepts/projects/dependencies/).
4. Optional: If you want to use a pre-populated [OpenRAG `.env` file](/reference/configuration), create one at `~/.openrag/tui` before starting OpenRAG.
5. Start the OpenRAG TUI:
```bash
uv run openrag
```
### Use uv pip install {#uv-pip-install}
1. Activate your virtual environment.
2. Install the OpenRAG Python package:
```bash
uv pip install openrag
```
3. Optional: If you want to use a pre-populated [OpenRAG `.env` file](/reference/configuration), create one at `~/.openrag/tui` before starting OpenRAG.
4. Start the OpenRAG TUI:
```bash
uv run openrag
```
## Set up OpenRAG with the TUI {#setup}
When you install OpenRAG with `uv`, you manage the OpenRAG services with the TUI.
The TUI guides you through the initial configuration process before you start the OpenRAG services.
Your configuration values are stored in an [OpenRAG `.env` file](/reference/configuration) that is created automatically at `~/.openrag/tui`.
If OpenRAG detects an existing `.env` file in this directory, then the TUI can populate those values automatically during setup and onboarding.
Container definitions are stored in the `docker-compose` files in the same directory as the OpenRAG `.env` file.
<PartialSetup />
<PartialOnboarding />
<PartialInstallNextSteps />

View file

@ -0,0 +1,83 @@
---
title: Invoke OpenRAG with uvx
slug: /install-uvx
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialSetup from '@site/docs/_partial-setup.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqNoScript from '@site/docs/_partial-prereq-no-script.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
Use [`uvx`](https://docs.astral.sh/uv/guides/tools/#running-tools) to invoke OpenRAG outside of a Python project or without modifying your project's dependencies.
:::tip
The [automatic installer script](/install) also uses `uvx` to install OpenRAG.
:::
When you install OpenRAG with `uvx`, you will use the [Terminal User Interface (TUI)](/tui) to configure and manage your OpenRAG deployment.
This installation method is best for testing OpenRAG by running it outside of a Python project.
For other installation methods, see [Select an installation method](/install-options).
## Prerequisites
<PartialPrereqWindows />
<PartialPrereqPython />
<PartialPrereqNoScript />
<PartialPrereqCommon />
## Install and run OpenRAG with uvx
1. Create a directory to store your OpenRAG configuration files and data, and then change to that directory:
```bash
mkdir openrag-workspace
cd openrag-workspace
```
2. Optional: If you want to use a pre-populated [OpenRAG `.env` file](/reference/configuration), create one at `~/.openrag/tui` before invoking OpenRAG.
3. Invoke OpenRAG:
```bash
uvx openrag
```
You can invoke a specific version using any of the [`uvx` version specifiers](https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions), such as `--from`:
```bash
uvx --from openrag==0.1.30 openrag
```
Invoking OpenRAG with `uvx openrag` creates a cached, ephemeral environment for the TUI in your local `uv` cache.
By invoking OpenRAG in a specific directory, your OpenRAG configuration files and data are stored separately from the `uv` cache.
Clearing the `uv` cache doesn't remove your entire OpenRAG installation.
After clearing the cache, you can re-invoke OpenRAG (`uvx openrag`) to restart the TUI with your preserved configuration and data.
If you encounter errors during installation, see [Troubleshoot OpenRAG](/support/troubleshoot).
## Set up OpenRAG with the TUI {#setup}
When you install OpenRAG with `uvx`, you manage the OpenRAG services with the TUI.
The TUI guides you through the initial configuration process before you start the OpenRAG services.
Your configuration values are stored in an [OpenRAG `.env` file](/reference/configuration) that is created automatically at `~/.openrag/tui`.
If OpenRAG detects an existing `.env` file in this directory, then the TUI can populate those values automatically during setup and onboarding.
Container definitions are stored in the `docker-compose` files in the same directory as the OpenRAG `.env` file.
<PartialSetup />
<PartialOnboarding />
<PartialInstallNextSteps />

View file

@ -1,4 +1,21 @@
1. [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install) with the Ubuntu distribution using WSL 2:
---
title: Install OpenRAG on Microsoft Windows
slug: /install-windows
---
If you're using Windows, you must install OpenRAG within the Windows Subsystem for Linux (WSL).
:::warning
Nested virtualization isn't supported.
OpenRAG isn't compatible with nested virtualization, which can cause networking issues.
Don't install OpenRAG on a WSL distribution that is installed inside a Windows VM.
Instead, install OpenRAG on your base OS or a non-nested Linux VM.
:::
## Install OpenRAG in the WSL
1. [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install) with an Ubuntu distribution using WSL 2:
```powershell
wsl --install -d Ubuntu
@ -8,18 +25,18 @@
For existing WSL installations, you can [change the distribution](https://learn.microsoft.com/en-us/windows/wsl/install#change-the-default-linux-distribution-installed) and [check the WSL version](https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
:::warning Known limitation
OpenRAG isn't compatible with nested virtualization, which can cause networking issues.
Don't install OpenRAG on a WSL distribution that is installed inside a Windows VM.
Instead, install OpenRAG on your base OS or a non-nested Linux VM.
:::
2. [Start your WSL Ubuntu distribution](https://learn.microsoft.com/en-us/windows/wsl/install#ways-to-run-multiple-linux-distributions-with-wsl) if it doesn't start automatically.
3. [Set up a username and password for your WSL distribution](https://learn.microsoft.com/en-us/windows/wsl/setup/environment#set-up-your-linux-username-and-password).
4. [Install Docker Desktop for Windows with WSL 2](https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers). When you reach the Docker Desktop **WSL integration** settings, make sure your Ubuntu distribution is enabled, and then click **Apply & Restart** to enable Docker support in WSL.
The Docker Desktop WSL integration makes Docker available within your WSL distribution.
You don't need to install Docker or Podman separately in your WSL distribution before you install OpenRAG.
5. Install and run OpenRAG from within your WSL Ubuntu distribution.
<br/>
You can install OpenRAG in your WSL distribution using any of the [OpenRAG installation methods](/install-options).
## Troubleshoot OpenRAG in WSL
If you encounter issues with port forwarding or the Windows Firewall, you might need to adjust the [Hyper-V firewall settings](https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall) to allow communication between your WSL distribution and the Windows host. For more troubleshooting advice for networking issues, see [Troubleshooting WSL common issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#common-issues).

View file

@ -1,442 +1,82 @@
---
title: Install OpenRAG with TUI
title: Install OpenRAG with the automatic installer script
slug: /install
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialWsl from '@site/docs/_partial-wsl-install.mdx';
import PartialSetup from '@site/docs/_partial-setup.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
[Install OpenRAG](#install) and then run the [OpenRAG Terminal User Interface(TUI)](#setup) to start your OpenRAG deployment with a guided setup process.
:::tip
To quickly install and test OpenRAG's core features, try the [quickstart](/quickstart).
:::
The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal.
The installer script installs `uv`, Docker or Podman, Docker Compose, and OpenRAG.
Then, it installs and runs OpenRAG with `uvx`.
![OpenRAG TUI Interface](@site/static/img/OpenRAG_TUI_2025-09-10T13_04_11_757637.svg)
When you install OpenRAG with the installer script, you will use the [Terminal User Interface (TUI)](/tui) to configure and manage your OpenRAG deployment.
Instead of starting OpenRAG using Docker commands and manually editing values in the `.env` file, the TUI walks you through the setup. It prompts for variables where required, creates a `.env` file for you, and then starts OpenRAG.
Once OpenRAG is running, use the TUI to monitor your application, control your containers, and retrieve logs.
If you prefer running Podman or Docker containers and manually editing `.env` files, see [Install OpenRAG Containers](/docker).
This installation method is best for testing OpenRAG by running it outside of a Python project.
For other installation methods, see [Select an installation method](/install-options).
## Prerequisites
- All OpenRAG installations require [Python](https://www.python.org/downloads/release/python-3100/) version 3.13 or later.
<PartialPrereqWindows />
- If you aren't using the automatic installer script, install the following:
<PartialPrereqPython />
- [uv](https://docs.astral.sh/uv/getting-started/installation/).
- [Podman](https://podman.io/docs/installation) (recommended) or [Docker](https://docs.docker.com/get-docker/).
- [`podman-compose`](https://docs.podman.io/en/latest/markdown/podman-compose.1.html) or [Docker Compose](https://docs.docker.com/compose/install/). To use Docker Compose with Podman, you must alias Docker Compose commands to Podman commands.
<PartialPrereqCommon />
- Microsoft Windows only: To run OpenRAG on Windows, you must use the Windows Subsystem for Linux (WSL).
## Run the installer script {#install}
<details>
<summary>Install WSL for OpenRAG</summary>
1. Create a directory to store your OpenRAG configuration files and data, and then change to that directory:
<PartialWsl />
```bash
mkdir openrag-workspace
cd openrag-workspace
```
</details>
2. Get and run the installer script:
- Prepare model providers and credentials.
```bash
curl -fsSL https://docs.openr.ag/files/run_openrag_with_prereqs.sh | bash
```
During [Application Onboarding](#application-onboarding), you must select language model and embedding model providers.
If your chosen provider offers both types, you can use the same provider for both selections.
If your provider offers only one type, such as Anthropic, you must select two providers.
The installer script installs OpenRAG with [`uvx`](https://docs.astral.sh/uv/guides/tools/#running-tools) in the directory where you run the script.
Gather the credentials and connection details for your chosen model providers before starting onboarding:
3. Wait while the installer script prepares your environment and installs OpenRAG.
You might be prompted to install certain dependencies if they aren't already present in your environment.
- OpenAI: Create an [OpenAI API key](https://platform.openai.com/api-keys).
- Anthropic language models: Create an [Anthropic API key](https://www.anthropic.com/docs/api/reference).
- IBM watsonx.ai: Get your watsonx.ai API endpoint, IBM project ID, and IBM API key from your watsonx deployment.
- Ollama: Use the [Ollama documentation](https://docs.ollama.com/) to set up your Ollama instance locally, in the cloud, or on a remote server, and then get your Ollama server's base URL.
The entire process can take a few minutes.
Once the environment is ready, the OpenRAG TUI starts.
- Optional: Install GPU support with an NVIDIA GPU, [CUDA](https://docs.nvidia.com/cuda/) support, and compatible NVIDIA drivers on the OpenRAG host machine. If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment.
![OpenRAG TUI Interface](@site/static/img/openrag_tui_dec_2025.png)
## Install OpenRAG {#install}
Choose an installation method based on your needs:
* For new users, the automatic installer script detects and installs prerequisites and then runs OpenRAG.
* For a quick test, use `uvx` to run OpenRAG without creating a project or modifying files.
* Use `uv add` to install OpenRAG as a managed dependency in a new or existing Python project.
* Use `uv pip install` to install OpenRAG into an existing virtual environment.
<Tabs groupId="Installation method">
<TabItem value="installer" label="Automatic installer" default>
The script detects and installs uv, Docker/Podman, and Docker Compose prerequisites, then runs OpenRAG with `uvx`.
1. Create a directory to store the OpenRAG configuration files:
```bash
mkdir openrag-workspace
cd openrag-workspace
```
2. Run the installer:
```bash
curl -fsSL https://docs.openr.ag/files/run_openrag_with_prereqs.sh | bash
```
The TUI creates a `.env` file and docker-compose files in the current working directory.
</TabItem>
<TabItem value="uvx" label="Quick test with uvx">
Use `uvx` to quickly run OpenRAG without creating a project or modifying any files.
1. Create a directory to store the OpenRAG configuration files:
```bash
mkdir openrag-workspace
cd openrag-workspace
```
2. Run OpenRAG:
```bash
uvx openrag
```
To run a specific version:
```bash
uvx --from openrag==0.1.30 openrag
```
The TUI creates a `.env` file and docker-compose files in the current working directory.
</TabItem>
<TabItem value="uv-add" label="Python project with uv add">
Use `uv add` to install OpenRAG as a dependency in your Python project. This adds OpenRAG to your `pyproject.toml` and lockfile, making your installation reproducible and version-controlled.
1. Create a new project with a virtual environment:
```bash
uv init YOUR_PROJECT_NAME
cd YOUR_PROJECT_NAME
```
The `(venv)` prompt doesn't change, but `uv` commands will automatically use the project's virtual environment.
2. Add OpenRAG to your project:
```bash
uv add openrag
```
To add a specific version:
```bash
uv add openrag==0.1.30
```
3. Start the OpenRAG TUI:
```bash
uv run openrag
```
<details closed>
<summary>Install a local wheel</summary>
If you downloaded the OpenRAG wheel to your local machine, install it by specifying its path:
1. Add the wheel to your project:
```bash
uv add PATH/TO/openrag-VERSION-py3-none-any.whl
```
Replace `PATH/TO/` and `VERSION` with the path and version of your downloaded OpenRAG `.whl` file.
2. Run OpenRAG:
```bash
uv run openrag
```
</details>
</TabItem>
<TabItem value="uv-pip" label="Existing virtual environment with uv pip install">
Use `uv pip install` to install OpenRAG into an existing virtual environment that isn't managed by `uv`.
:::tip
For new projects, `uv add` is recommended as it manages dependencies in your project's lockfile.
:::
1. Activate your virtual environment.
2. Install OpenRAG:
```bash
uv pip install openrag
```
3. Run OpenRAG:
```bash
uv run openrag
```
</TabItem>
</Tabs>
Continue with [Set up OpenRAG with the TUI](#setup).
Because the installer script uses `uvx`, it creates a cached, ephemeral environment in your local `uv` cache, and your OpenRAG configuration files and data are stored separately from the `uv` cache.
Clearing the cache doesn't delete your entire OpenRAG installation, only the temporary TUI environment.
After clearing the cache, run `uvx openrag` to [access the TUI](/tui) and continue with your preserved configuration and data.
If you encounter errors during installation, see [Troubleshoot OpenRAG](/support/troubleshoot).
## Set up OpenRAG with the TUI {#setup}
The TUI creates a `.env` file in your OpenRAG directory root and starts OpenRAG.
If the TUI detects a `.env` file in the OpenRAG root directory, it sources any variables from the `.env` file.
If the TUI detects OAuth credentials, it enforces the **Advanced Setup** path.
When you install OpenRAG with the installer script, you manage the OpenRAG services with the TUI.
The TUI guides you through the initial configuration process before you start the OpenRAG services.
<Tabs groupId="Setup method">
<TabItem value="Basic setup" label="Basic setup" default>
Your configuration values are stored in an [OpenRAG `.env` file](/reference/configuration) that is created automatically at `~/.openrag/tui`.
If OpenRAG detects an existing `.env` file in this directory, then the TUI can populate those values automatically during setup and onboarding.
**Basic Setup** can generate all of the required values for OpenRAG. The OpenAI API key is optional and can be provided during onboarding.
**Basic Setup** does not set up OAuth connections for ingestion from cloud providers.
For OAuth setup, use **Advanced Setup**.
For information about the difference between basic (no auth) and OAuth in OpenRAG, see [Authentication and document access](/knowledge#auth).
Container definitions are stored in the `docker-compose` files in the same directory as the OpenRAG `.env` file.
1. To install OpenRAG with **Basic Setup**, click **Basic Setup** or press <kbd>1</kbd>.
2. Click **Generate Passwords** to generate passwords for OpenSearch and Langflow.
The OpenSearch password is required. The Langflow admin password is optional.
If no Langflow admin password is generated, Langflow runs in [autologin mode](https://docs.langflow.org/api-keys-and-authentication#langflow-auto-login) with no password required.
3. Optional: Paste your OpenAI API key in the OpenAI API key field. You can also provide this during onboarding or choose a different model provider.
4. Click **Save Configuration**.
Your passwords are saved in the `.env` file used to start OpenRAG.
5. To start OpenRAG, click **Start All Services**.
Startup pulls container images and runs them, so it can take some time.
When startup is complete, the TUI displays the following:
```bash
Services started successfully
Command completed successfully
```
6. To start the Docling service, under **Native Services**, click **Start**.
7. To open the OpenRAG application, navigate to the TUI main menu, and then click **Open App**.
Alternatively, in your browser, navigate to `localhost:3000`.
8. Continue with [Application Onboarding](#application-onboarding).
</TabItem>
<TabItem value="Advanced setup" label="Advanced setup">
1. To install OpenRAG with **Advanced Setup**, click **Advanced Setup** or press <kbd>2</kbd>.
2. Click **Generate Passwords** to generate passwords for OpenSearch and Langflow.
The OpenSearch password is required. The Langflow admin password is optional.
If no Langflow admin password is generated, Langflow runs in [autologin mode](https://docs.langflow.org/api-keys-and-authentication#langflow-auto-login) with no password required.
3. Paste your OpenAI API key in the OpenAI API key field.
4. Add your client and secret values for Google or Microsoft OAuth.
These values can be found with your OAuth provider.
For more information, see the [Google OAuth client](https://developers.google.com/identity/protocols/oauth2) or [Microsoft Graph OAuth client](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth) documentation.
5. The OpenRAG TUI presents redirect URIs for your OAuth app.
These are the URLs your OAuth provider will redirect back to after user sign-in.
Register these redirect values with your OAuth provider as they are presented in the TUI.
6. Click **Save Configuration**.
7. To start OpenRAG, click **Start All Services**.
Startup pulls container images and runs them, so it can take some time.
When startup is complete, the TUI displays the following:
```bash
Services started successfully
Command completed successfully
```
8. To start the Docling service, under **Native Services**, click **Start**.
9. To open the OpenRAG application, navigate to the TUI main menu, and then click **Open App**.
Alternatively, in your browser, navigate to `localhost:3000`.
You are presented with your provider's OAuth sign-in screen.
After sign-in, you are redirected to the redirect URI.
Two additional variables are available for Advanced Setup:
The `LANGFLOW_PUBLIC_URL` controls where the Langflow web interface can be accessed. This is where users interact with their flows in a browser.
The `WEBHOOK_BASE_URL` controls where the endpoint for `/connectors/CONNECTOR_TYPE/webhook` will be available.
This connection enables real-time document synchronization with external services.
Supported webhook endpoints:
- Google Drive: `/connectors/google_drive/webhook`
- OneDrive: `/connectors/onedrive/webhook`
- SharePoint: `/connectors/sharepoint/webhook`
10. Continue with [Application Onboarding](#application-onboarding).
</TabItem>
</Tabs>
<PartialSetup />
<PartialOnboarding />
## Exit the OpenRAG TUI
To exit the OpenRAG TUI, navigate to the main menu, and then press <kbd>q</kbd>.
The OpenRAG containers continue to run until they are stopped.
For more information, see [Manage OpenRAG containers with the TUI ](#tui-container-management).
To relaunch the TUI, run `uv run openrag`.
If you installed OpenRAG with `uvx`, run `uvx openrag`.
## Manage OpenRAG containers with the TUI {#tui-container-management}
After installation, the TUI can deploy, manage, and upgrade your OpenRAG containers.
### Start all services
Click **Start All Services** to start the OpenRAG containers.
The TUI automatically detects your container runtime, and then checks if your machine has compatible GPU support by checking for `CUDA`, `NVIDIA_SMI`, and Docker/Podman runtime support. This check determines which Docker Compose file OpenRAG uses.
The TUI then pulls the images and deploys the containers with the following command.
```bash
docker compose up -d
```
If images are missing, the TUI runs `docker compose pull`, then runs `docker compose up -d`.
### Status
The **Status** menu displays information on your container deployment.
Here you can check container health, find your service ports, view logs, and upgrade your containers.
To view streaming logs, select the container you want to view, and press <kbd>l</kbd>.
To copy your logs, click **Copy to Clipboard**.
To **upgrade** your containers, click **Upgrade**.
**Upgrade** runs `docker compose pull` and then `docker compose up -d --force-recreate`.
For more information, see [Upgrade OpenRAG containers with the TUI](#upgrade-openrag-containers-with-the-tui).
To **reset** your containers, click **Reset**.
Reset gives you a completely fresh start.
Reset deletes all of your data, including OpenSearch data, uploaded documents, and authentication.
**Reset** runs two commands.
It first stops and removes all containers, volumes, and local images.
```
docker compose down --volumes --remove-orphans --rmi local
```
When the first command is complete, OpenRAG removes any additional Docker objects with `prune`.
```
docker system prune -f
```
### Native services status
A _native service_ in OpenRAG refers to a service run locally on your machine, and not within a container.
The `docling serve` process is a native service in OpenRAG, because it's a document processing service that is run on your local machine, and controlled separately from the containers.
To start or stop `docling serve` or any other native services, in the TUI Status menu, click **Stop** or **Restart**.
To view the status, port, or PID of a native service, in the TUI main menu, click [Status](#status).
## Upgrade OpenRAG {#upgrade}
To upgrade OpenRAG, upgrade the OpenRAG Python package, and then upgrade the OpenRAG containers using the OpenRAG TUI.
Upgrading the OpenRAG Python package updates the TUI and Python code, but container versions are controlled separately by environment variables in your `.env` file.
### Upgrade OpenRAG python package
Use the following steps to upgrade the OpenRAG Python package to the latest version from [PyPI](https://pypi.org/project/openrag/).
After upgrading the Python package, you should also [upgrade your OpenRAG containers](#upgrade-openrag-containers-with-the-tui).
<Tabs groupId="Installation method">
<TabItem value="installer" label="Automatic installer / uvx" default>
If you installed OpenRAG using the [automatic installer](#install) or [uvx](#install), follow these steps to upgrade:
1. Navigate to your OpenRAG workspace directory:
```bash
cd openrag-workspace
```
2. Upgrade the OpenRAG package:
```bash
uvx --from openrag openrag
```
To upgrade to a specific version:
```bash
uvx --from openrag==0.1.33 openrag
```
3. After upgrading the Python package, [upgrade your containers](#upgrade-openrag-containers-with-the-tui).
</TabItem>
<TabItem value="uv-add" label="Python project with uv add">
1. Navigate to your project directory:
```bash
cd YOUR_PROJECT_NAME
```
2. Update OpenRAG to the latest version:
```bash
uv add --upgrade openrag
```
To upgrade to a specific version:
```bash
uv add --upgrade openrag==0.1.33
```
3. Start the OpenRAG TUI:
```bash
uv run openrag
```
4. After upgrading the Python package, [upgrade your containers](#upgrade-openrag-containers-with-the-tui).
</TabItem>
<TabItem value="uv-pip" label="Existing virtual environment with uv pip install">
1. Activate your virtual environment.
2. Upgrade OpenRAG:
```bash
uv pip install --upgrade openrag
```
To upgrade to a specific version:
```bash
uv pip install --upgrade openrag==0.1.33
```
3. Start the OpenRAG TUI:
```bash
uv run openrag
```
4. After upgrading the Python package, [upgrade your containers](#upgrade-openrag-containers-with-the-tui).
</TabItem>
</Tabs>
### Upgrade OpenRAG containers with the TUI {#upgrade-openrag-containers-with-the-tui}
After upgrading the OpenRAG Python package, upgrade your containers to ensure they match the `latest` version.
**Upgrade** runs `docker compose pull`, which pulls container images based on versions specified in your `.env` file.
`OPENRAG_VERSION` is set to `latest` by default, so it pulls the `latest` available container images.
1. In the OpenRAG TUI, click **Status**, and then click **Upgrade**.
2. When the upgrade completes, close the **Status** window and continue using OpenRAG.
If you encounter a `langflow container already exists` error during upgrade, see [Langflow container already exists during upgrade](/support/troubleshoot#langflow-container-already-exists-during-upgrade) in the troubleshooting guide.
To pin container versions to a specific release other than `latest`, set the `OPENRAG_VERSION` in your `.env` file:
```bash
OPENRAG_VERSION=0.1.33
```
For more information, see [System settings environment variables](/reference/configuration#system-settings).
## Diagnostics
The **Diagnostics** menu provides health monitoring for your container runtimes and monitoring of your OpenSearch security.
## Reinstall OpenRAG {#reinstall}
To reinstall OpenRAG with a completely fresh setup:
1. Reset your containers using the **Reset** button in the [TUI status](#status) menu.
This removes all containers, volumes, and data.
2. Optional: Delete your project's `.env` file.
The Reset operation does not remove your project's `.env` file, so your passwords, API keys, and OAuth settings can be preserved.
If you delete the `.env` file, run the [Set up OpenRAG with the TUI](#setup) process again to create a new configuration.
3. In the TUI Setup menu, follow these steps from [Basic Setup](#setup):
1. Click **Start All Services** to pull container images and start them.
2. Under **Native Services**, click **Start** to start the Docling service.
3. Click **Open App** to open the OpenRAG application.
4. Continue with [Application Onboarding](#application-onboarding).
<PartialInstallNextSteps />

View file

@ -0,0 +1,178 @@
---
title: Manage OpenRAG containers and services
slug: /manage-services
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
import PartialDockerComposeDownAndPrune from '@site/docs/_partial-docker-compose-down-and-prune.mdx';
import PartialFactorResetWarning from '@site/docs/_partial-factory-reset-warning.mdx';
import PartialExportFlows from '@site/docs/_partial-export-flows.mdx';
Service management is an essential part of maintaining your OpenRAG deployment.
Most OpenRAG services run in containers.
However, some services, like Docling, run directly on the local machine.
If you [installed OpenRAG](/install-options) with the automated installer script, `uv`, or `uvx`, you can use the [Terminal User Interface (TUI)](/tui) to manage your OpenRAG configuration and services.
For [self-managed deployments](/docker), run Docker or Podman commands to manage your OpenRAG services.
## Monitor services and view logs
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
In the TUI, click **Status** to access diagnostics and controls for all OpenRAG services, including container health, ports, and image versions.
To view streaming logs, click the name of a service, and then press <kbd>l</kbd>.
For the Docling native service, see [Stop, start, and inspect native services](#start-native-services).
</TabItem>
<TabItem value="env" label="Self-managed services">
For self-managed container services, you can get container logs with [`docker compose logs`](https://docs.docker.com/reference/cli/docker/compose/logs/) or [`podman logs`](https://docs.podman.io/en/latest/markdown/podman-logs.1.html).
For the Docling native service, see [Stop, start, and inspect native services](#start-native-services).
</TabItem>
</Tabs>
## Stop and start containers
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
On the TUI's **Status** page, you can stop, start, and restart OpenRAG's container-based services.
When you click **Restart** or **Start Services**, the following processes are triggered:
1. OpenRAG automatically detects your container runtime, and then checks if your machine has compatible GPU support by checking for `CUDA`, `NVIDIA_SMI`, and Docker/Podman runtime support. This check determines which Docker Compose file OpenRAG uses because there are separate Docker Compose files for GPU and CPU deployments.
2. OpenRAG pulls the OpenRAG container images with `docker compose pull` if any images are missing.
3. OpenRAG deploys the containers with `docker compose up -d`.
</TabItem>
<TabItem value="env" label="Self-managed services">
Use [`docker compose down`](https://docs.docker.com/reference/cli/docker/compose/down/) and [`docker compose up -d`](https://docs.docker.com/reference/cli/docker/compose/up/).
To stop or start individual containers, use targeted commands like `docker stop CONTAINER_ID` and `docker start CONTAINER_ID`.
</TabItem>
</Tabs>
## Stop, start, and inspect native services (Docling) {#start-native-services}
A _native service_ in OpenRAG is a service that runs locally on your machine, not within a container. For example, the `docling serve` process is an OpenRAG native service because this document processing service runs on your local machine, separate from the OpenRAG containers.
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
On the TUI's **Status** page, you can stop, start, restart, and inspect OpenRAG's native services.
The **Native Services** section lists the status, port, and process ID (PID) for each native service.
To manage a native service, click the service's name, and then click **Stop**, **Start** or **Restart**.
To view the logs for a native service, click the service's name, and then press <kbd>l</kbd>.
</TabItem>
<TabItem value="env" label="Self-managed services">
Because the Docling service doesn't run in a container, you must start and stop it manually on the host machine:
* Stop `docling serve`:
```bash
uv run python scripts/docling_ctl.py stop
```
* Start `docling serve`:
```bash
uv run python scripts/docling_ctl.py start --port 5001
```
* Check that `docling serve` is running:
```bash
uv run python scripts/docling_ctl.py status
```
If `docling serve` is running, the output includes the status, address, and process ID (PID):
```text
Status: running
Endpoint: http://127.0.0.1:5001
Docs: http://127.0.0.1:5001/docs
PID: 27746
```
</TabItem>
</Tabs>
## Upgrade services
See [Upgrade OpenRAG](/upgrade).
## Reset containers (destructive) {#reset-containers}
<PartialFactorResetWarning />
Use these steps to reset your OpenRAG deployment by recreating the containers and deleting all data in the `~/.openrag` directory _except_ for the `.env` file and the `/documents` subdirectory.
This restores your OpenRAG deployment to a near-initial state while preserving your configuration (in `.env`) and uploaded documents (in `/documents`).
Your documents are reingested into a fresh OpenSearch index after the reset.
To reset your OpenRAG deployment _and_ delete all OpenRAG data, see [Reinstall OpenRAG](/reinstall).
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
<PartialExportFlows />
2. To destroy and recreate your OpenRAG containers, click **Status** in the TUI, and then click **Factory Reset**.
3. Repeat the [setup process](/install#setup) to restart the services and launch the OpenRAG app. Your OpenRAG passwords, OAuth credentials (if previously set), and onboarding configuration are restored from the `.env` file.
4. If you exported customized flows, [import your flows](https://docs.langflow.org/concepts-flows-import) into Langflow after completing the onboarding process.
</TabItem>
<TabItem value="env" label="Self-managed services">
<PartialExportFlows />
2. Recreate the containers:
```bash title="Docker"
docker compose up --build --force-recreate --remove-orphans
```
```bash title="Podman"
podman compose up --build --force-recreate --remove-orphans
```
3. Launch the OpenRAG app, and then repeat the [application onboarding process](/docker#application-onboarding).
4. If you exported customized flows, [import your flows](https://docs.langflow.org/concepts-flows-import) into Langflow after completing the onboarding process.
</TabItem>
</Tabs>
## Prune images
Use image pruning to free up disk space by removing unused OpenRAG container images.
For TUI-managed services, use the TUI's **Prune Images** option to clean up your OpenRAG container images.
You can choose to prune unused images only or all images.
If you prune all images, the OpenRAG services are stopped, all images are pruned, and then the required images are pulled the next time you start the OpenRAG services.
For self-managed services, use [`docker image prune`](https://docs.docker.com/engine/reference/commandline/image_prune/) or [`podman image prune`](https://docs.podman.io/en/latest/markdown/podman-image-prune.1.html) to remove unused images.
## See also
* [Uninstall OpenRAG](/uninstall)

View file

@ -6,35 +6,28 @@ slug: /quickstart
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialWsl from '@site/docs/_partial-wsl-install.mdx';
import PartialIntegrateChat from '@site/docs/_partial-integrate-chat.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
Use this quickstart to install OpenRAG, and then try some of OpenRAG's core features.
## Prerequisites
This quickstart requires the following:
<PartialPrereqPython />
- An [OpenAI API key](https://platform.openai.com/api-keys).
* Get an [OpenAI API key](https://platform.openai.com/api-keys).
This quickstart uses OpenAI for simplicity.
For other providers, see the complete [installation guide](/install).
- [Python](https://www.python.org/downloads/release/python-3100/) version 3.13 or later.
- Microsoft Windows only: To run OpenRAG on Windows, you must use the Windows Subsystem for Linux (WSL).
<details>
<summary>Install WSL for OpenRAG</summary>
<PartialWsl />
</details>
For other providers, see the other [installation methods](/install-options).
<PartialPrereqWindows />
## Install OpenRAG
For this quickstart, install OpenRAG with the automatic installer script and basic setup:
For this quickstart, install OpenRAG with the automatic installer script and basic setup.
The script installs OpenRAG dependencies, including Docker or Podman, and then it installs and runs OpenRAG with [`uvx`](https://docs.astral.sh/uv/guides/tools/#running-tools).
1. Create a directory to store the OpenRAG configuration files, and then change to that directory:
1. Create a directory for your OpenRAG installation, and then change to that directory:
```bash
mkdir openrag-workspace
@ -47,44 +40,46 @@ For this quickstart, install OpenRAG with the automatic installer script and bas
bash run_openrag_with_prereqs.sh
```
This script installs OpenRAG and its dependencies, including Docker or Podman, and it creates a `.env` file and `docker-compose` files in the current working directory.
Wait while the installer script prepares your environment and installs OpenRAG.
You might be prompted to install certain dependencies if they aren't already present in your environment.
This process can take a few minutes.
Once the environment is ready, OpenRAG starts.
3. Click **Basic Setup**.
The entire process can take a few minutes.
Once the environment is ready, the OpenRAG [Terminal User Interface (TUI)](/tui) starts.
4. Create passwords for your OpenRAG installation's OpenSearch and Langflow services. You can click **Generate Passwords** to automatically generate passwords.
![OpenRAG TUI Interface](@site/static/img/openrag_tui_dec_2025.png)
The OpenSearch password is required. The Langflow admin password is optional.
If you don't generate a Langflow admin password, Langflow runs in [autologin mode](https://docs.langflow.org/api-keys-and-authentication#langflow-auto-login) with no password required.
3. In the TUI, click **Basic Setup**.
Your passwords are saved in the `.env` file that is used to start OpenRAG.
You can find this file in your OpenRAG installation directory.
4. For **Langflow Admin Password**, click **Generate Password** to create a Langflow administrator password and username.
5. Click **Save Configuration**, and then click **Start All Services**.
5. Use the default values for all other fields.
Wait a few minutes while the startup process pulls and runs the necessary container images.
Proceed when you see the following messages in the terminal user interface (TUI):
6. Click **Save Configuration**.
```bash
Your OpenRAG configuration and passwords are stored in an [OpenRAG `.env` file](/reference/configuration) file that is created automatically at `~/.openrag/tui`.
OpenRAG container definitions are stored in the `docker-compose` files in the same directory.
7. Click **Start OpenRAG** to start the OpenRAG services.
This process can take some time while OpenRAG pulls and runs the container images.
If all services start successfully, the TUI prints a confirmation message:
```text
Services started successfully
Command completed successfully
```
6. To open the OpenRAG application, go to the TUI main menu, and then click **Open App**.
Alternatively, in your browser, navigate to `localhost:3000`.
8. Click **Close**, and then click **Launch OpenRAG** to access the OpenRAG application and start the application onboarding process.
7. Select the **OpenAI** model provider, enter your OpenAI API key, and then click **Complete**.
9. For this quickstart, select the **OpenAI** model provider, enter your OpenAI API key, and then click **Complete**. Use the default settings for all other model options.
For this quickstart, you can use the default options for the model settings.
8. Click through the overview slides for a brief introduction to OpenRAG and basic setup, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
10. Click through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
You can complete this quickstart without going through the overview.
The overview demonstrates some basic functionality that is covered in the next section and in other parts of the OpenRAG documentation.
## Load and chat with documents {#chat-with-documents}
OpenRAG's knowledge base chat is powered by the [OpenRAG OpenSearch Agent](/agents).
Use the [OpenRAG **Chat**](/chat) to explore the documents in your OpenRAG database using natural language queries.
Some documents are included by default to get you started, and you can load your own documents.
1. In OpenRAG, click <Icon name="MessageSquare" aria-hidden="true"/> **Chat**.
@ -94,16 +89,16 @@ For example: `What documents are available to you?`
The agent responds with a summary of OpenRAG's default documents.
3. To verify the agent's response, click <Icon name="Library" aria-hidden="true"/> **Knowledge** to view the documents stored in the OpenRAG OpenSearch vector database.
3. To verify the agent's response, click <Icon name="Library" aria-hidden="true"/> **Knowledge** to view the documents stored in the OpenRAG OpenSearch database.
You can click a document to view the chunks of the document as they are stored in the database.
4. Click **Add Knowledge** to add your own documents to your OpenRAG knowledge base.
For this quickstart, use either the <Icon name="File" aria-hidden="true"/> **File** or <Icon name="Folder" aria-hidden="true"/> **Folder** upload options to load documents from your local machine.
**Folder** uploads an entire directory.
The default directory is the `/documents` subdirectory in your OpenRAG installation directory.
The default directory is `~/.openrag/documents`.
For information about the cloud storage provider options, see [Ingest files through OAuth connectors](/knowledge#oauth-ingestion).
For information about the cloud storage provider options, see [Ingest files with OAuth connectors](/ingestion#oauth-ingestion).
5. Return to the **Chat** window, and then ask a question related to the documents that you just uploaded.
@ -111,12 +106,12 @@ You can click a document to view the chunks of the document as they are stored i
* Click <Icon name="Gear" aria-hidden="true"/> **Function Call: search_documents (tool_call)** to view the log of tool calls made by the agent. This is helpful for troubleshooting because it shows you how the agent used particular tools.
* Click <Icon name="Library" aria-hidden="true"/> **Knowledge** to confirm that the documents are present in the OpenRAG OpenSearch vector database, and then click each document to see how the document was chunked.
* Click <Icon name="Library" aria-hidden="true"/> **Knowledge** to confirm that the documents are present in the OpenRAG OpenSearch database, and then click each document to see how the document was chunked.
If a document was chunked improperly, you might need to tweak the ingestion or modify and reupload the document.
* Click <Icon name="Settings2" aria-hidden="true"/> **Settings** to modify the knowledge ingestion settings.
For more information about knowledge bases and knowledge ingestion, see [OpenSearch in OpenRAG](/knowledge).
For more information, see [Configure knowledge](/knowledge) and [Ingest knowledge](/ingestion).
## Change the language model and chat settings {#change-components}
@ -126,16 +121,16 @@ You can click a document to view the chunks of the document as they are stored i
2. For greater insight into the underlying [Langflow flow](/agents) that drives the OpenRAG chat, click **Edit in Langflow** and then click **Proceed** to launch the Langflow visual editor in a new browser window.
If Langflow requests login information, enter the `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD` from the `.env` file in your OpenRAG installation directory.
If Langflow requests login information, enter the `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD` from the `.env` file at `~/.openrag/tui`.
The OpenRAG OpenSearch Agent flow opens in a new browser window.
The **OpenRAG OpenSearch Agent** flow opens in a new browser window.
![OpenRAG OpenSearch Agent flow](/img/opensearch-agent-flow.png)
3. For this quickstart, try changing the model.
Click the **Language Model** component, and then change the **Model Name** to a different OpenAI model.
When editing built-in flows, you can click **Restore flow** to revert the flow to its initial state.
After you edit a built-in flow, you can click **Restore flow** on the **Settings** page to revert the flow to its original state when you first installed OpenRAG.
4. Press <kbd>Command</kbd>+<kbd>S</kbd> (<kbd>Ctrl</kbd>+<kbd>S</kbd>) to save your changes.
@ -153,122 +148,12 @@ You can use these flows as-is or modify them to better suit your needs, as demon
You can send and receive requests with the Langflow API using Python, TypeScript, or curl.
1. Open the OpenRAG OpenSearch Agent flow in the Langflow visual editor: From the **Chat** window, click <Icon name="Settings2" aria-hidden="true"/> **Settings**, click **Edit in Langflow**, and then click **Proceed**.
2. Create a [Langflow API key](https://docs.langflow.org/api-keys-and-authentication), which is a user-specific token required to send requests to the Langflow server.
This key doesn't grant access to OpenRAG.
1. In the Langflow visual editor, click your user icon in the header, and then select **Settings**.
2. Click **Langflow API Keys**, and then click <Icon name="Plus" aria-hidden="true"/> **Add New**.
3. Name your key, and then click **Create API Key**.
4. Copy the API key and store it securely.
5. Exit the Langflow **Settings** page to return to the visual editor.
3. Click **Share**, and then select **API access** to get pregenerated code snippets that call the Langflow API and run the flow.
These code snippets construct API requests with your Langflow server URL (`LANGFLOW_SERVER_ADDRESS`), the flow to run (`FLOW_ID`), required headers (`LANGFLOW_API_KEY`, `Content-Type`), and a payload containing the required inputs to run the flow, including a default chat input message.
In production, you would modify the inputs to suit your application logic. For example, you could replace the default chat input message with dynamic user input.
<Tabs>
<TabItem value="python" label="Python">
```python
import requests
import os
import uuid
api_key = 'LANGFLOW_API_KEY'
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow
# Request payload configuration
payload = {
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
}
payload["session_id"] = str(uuid.uuid4())
headers = {"x-api-key": api_key}
try:
# Send API request
response = requests.request("POST", url, json=payload, headers=headers)
response.raise_for_status() # Raise exception for bad status codes
# Print response
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Error making API request: {e}")
except ValueError as e:
print(f"Error parsing response: {e}")
```
</TabItem>
<TabItem value="typescript" label="TypeScript">
```typescript
const crypto = require('crypto');
const apiKey = 'LANGFLOW_API_KEY';
const payload = {
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
};
payload.session_id = crypto.randomUUID();
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
"x-api-key": apiKey
},
body: JSON.stringify(payload)
};
fetch('http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID', options)
.then(response => response.json())
.then(response => console.warn(response))
.catch(err => console.error(err));
```
</TabItem>
<TabItem value="curl" label="curl">
```bash
curl --request POST \
--url 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false' \
--header 'Content-Type: application/json' \
--header "x-api-key: LANGFLOW_API_KEY" \
--data '{
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
}'
```
</TabItem>
</Tabs>
4. Copy your preferred snippet, and then run it:
* **Python**: Paste the snippet into a `.py` file, save it, and then run it with `python filename.py`.
* **TypeScript**: Paste the snippet into a `.ts` file, save it, and then run it with `ts-node filename.ts`.
* **curl**: Paste and run snippet directly in your terminal.
If the request is successful, the response includes many details about the flow run, including the session ID, inputs, outputs, components, durations, and more.
In production, you won't pass the raw response to the user in its entirety.
Instead, you extract and reformat relevant fields for different use cases, as demonstrated in the [Langflow quickstart](https://docs.langflow.org/quickstart#extract-data-from-the-response).
For example, you could pass the chat output text to a front-end user-facing application, and store specific fields in logs and backend data stores for monitoring, chat history, or analytics.
You could also pass the output from one flow as input to another flow.
<PartialIntegrateChat />
## Next steps
* **Reinstall OpenRAG with your preferred settings**: This quickstart used a minimal setup to demonstrate OpenRAG's core functionality.
It is recommended that you reinstall OpenRAG with your preferred configuration because some settings are immutable after initial setup.
For all installation options, see [Install OpenRAG with TUI](/install) and [Install OpenRAG with containers](/docker).
* **Reinstall OpenRAG with your preferred settings**: This quickstart used `uvx` and a minimal setup to demonstrate OpenRAG's core functionality.
It is recommended that you [reinstall OpenRAG](/reinstall) with your preferred configuration and [installation method](/install-options).
* **Learn more about OpenRAG**: Explore OpenRAG and the OpenRAG documentation to learn more about its features and functionality.

View file

@ -0,0 +1,87 @@
---
title: Reinstall OpenRAG
slug: /reinstall
---
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
import PartialDockerComposeDownAndPrune from '@site/docs/_partial-docker-compose-down-and-prune.mdx';
import PartialDockerStopAll from '@site/docs/_partial-docker-stop-all.mdx';
import PartialDockerRemoveAndCleanupSteps from '@site/docs/_partial-docker-remove-and-cleanup-steps.mdx';
import PartialFactorResetWarning from '@site/docs/_partial-factory-reset-warning.mdx';
import PartialExportFlows from '@site/docs/_partial-export-flows.mdx';
You can reset your OpenRAG deployment to its initial state by recreating the containers and deleting accessory data, such as the `.env` file and ingested documents.
:::warning
These are destructive operations that reset your OpenRAG deployment to an initial state.
Destroyed containers and deleted data are lost and cannot be recovered after running these operations.
:::
## Reinstall TUI-managed containers
<PartialExportFlows />
2. In the TUI, click **Status**, and then click **Factory Reset** to [reset your OpenRAG containers](/manage-services#reset-containers).
<PartialFactorResetWarning />
3. Press <kbd>Esc</kbd> to close the **Status** page, and then press <kbd>q</kbd> to exit the TUI.
4. Optional: Delete or edit [OpenRAG's `.env` file](/reference/configuration), which is stored at `~/.openrag/tui`.
This file contains your OpenRAG configuration, including OpenRAG passwords, API keys, OAuth settings, and other environment variables. If you delete this file, the TUI automatically generates a new one after you repeat the setup and onboarding process. If you preserve this file, the TUI can read values from the existing `.env` file during setup and onboarding.
5. Optional: Remove any files from the `~/.openrag/documents` subdirectory that you don't want to reingest after redeploying the containers.
It is recommended that you preserve OpenRAG's [default documents](https://github.com/langflow-ai/openrag/tree/main/openrag-documents).
6. Restart the TUI with `uv run openrag` or `uvx openrag`.
7. Repeat the [setup process](/install#setup) to configure OpenRAG and restart all services.
Then, launch the OpenRAG app and repeat the [application onboarding process](/install#application-onboarding).
## Reinstall self-managed containers with `docker compose` or `podman compose`
Use these steps to reinstall OpenRAG containers with streamlined `docker compose` or `podman compose` commands:
<PartialExportFlows />
2. Destroy the containers, volumes, and local images, and then remove (prune) any additional container objects.
<PartialFactorResetWarning />
<PartialDockerComposeDownAndPrune />
3. Optional: Edit OpenRAG's `.env` file if needed.
4. Optional: Remove any files from the `~/.openrag/documents` subdirectory that you don't want to reingest after redeploying the containers.
It is recommended that you preserve OpenRAG's [default documents](https://github.com/langflow-ai/openrag/tree/main/openrag-documents).
5. Redeploy OpenRAG:
<PartialDockerComposeUp />
6. Launch the OpenRAG app, and then repeat the [application onboarding process](/docker#application-onboarding).
## Reinstall self-managed containers with discrete `docker` or `podman` commands
Use these commands to remove and clean up OpenRAG containers with discrete `docker` or `podman` commands.
If you want to reinstall one container, specify the container name in the commands instead of running the commands on all containers.
<PartialExportFlows />
2. Stop all running containers:
<PartialDockerStopAll />
3. Remove and clean up containers:
<PartialDockerRemoveAndCleanupSteps />
4. Optional: Edit OpenRAG's `.env` file if needed.
5. Optional: If you removed all containers or specifically the OpenSearch container, then you can remove any files from the `~/.openrag/documents` subdirectory that you don't want to reingest after redeploying the containers.
It is recommended that you preserve OpenRAG's [default documents](https://github.com/langflow-ai/openrag/tree/main/openrag-documents).
6. If you removed all OpenRAG containers, [redeploy OpenRAG](/docker).
If you removed only one container, redeploy that container with the appropriate `docker run` or `podman run` command.

View file

@ -0,0 +1,52 @@
---
title: Use the TUI
slug: /tui
---
import PartialGpuModeTip from '@site/docs/_partial-gpu-mode-tip.mdx';
The OpenRAG Terminal User Interface (TUI) provides a simplified and guided experience for configuring, managing, and monitoring your OpenRAG deployment directly from the terminal.
![OpenRAG TUI Interface](@site/static/img/openrag_tui_dec_2025.png)
If you install OpenRAG with the [automatic installer script](/install), [`uv`](/install-uv), or [`uvx`](/install-uvx), you use the TUI to manage your OpenRAG deployment.
The TUI guides you through the initial setup, automatically manages your OpenRAG `.env` and `docker-compose` files, and provides convenient access to [service management](/manage-services) controls.
In contrast, when you [deploy OpenRAG with self-managed services](/docker), you must manually configure OpenRAG by preparing a `.env` file, and then use Docker or Podman commands to deploy and manage your OpenRAG services.
## Access the TUI {#access-the-tui}
If you installed OpenRAG with `uv`, access the TUI with `uv run openrag`.
If you installed OpenRAG with the automatic installer script or `uvx`, access the TUI with `uvx openrag`.
## Navigate the TUI
You can navigate the TUI with your mouse or keyboard.
Keyboard shortcuts for additional menus are printed at the bottom of the TUI screen.
## Manage services with the TUI
Use the TUI's **Status** page to access controls and information for your OpenRAG services.
For more information, see [Manage OpenRAG services](/manage-services).
## Toggle GPU/CPU mode
You can toggle between GPU and CPU mode from within the TUI if your system has compatible GPU hardware and drivers installed.
In the TUI, click **Status**, and then click **Switch to GPU Mode** or **Switch to CPU Mode**.
This change requires restarting all OpenRAG services because each mode has its own `docker-compose` file.
:::tip
<PartialGpuModeTip />
:::
## Exit the OpenRAG TUI
To exit the OpenRAG TUI, press <kbd>q</kbd> on the TUI main page.
Exiting the TUI doesn't stop your OpenRAG services.
Your OpenRAG services continue to run until they are stopped from within the TUI or by another process that inadvertently stops them.
To restart the TUI, see [Access the TUI](#access-the-tui).

View file

@ -0,0 +1,58 @@
---
title: Remove OpenRAG
slug: /uninstall
---
import PartialDockerComposeDownAndPrune from '@site/docs/_partial-docker-compose-down-and-prune.mdx';
import PartialDockerStopAll from '@site/docs/_partial-docker-stop-all.mdx';
import PartialDockerRemoveAndCleanupSteps from '@site/docs/_partial-docker-remove-and-cleanup-steps.mdx';
:::tip
If you want to reset your OpenRAG containers without removing OpenRAG entirely, see [Reset OpenRAG containers](/manage-services) and [Reinstall OpenRAG](/reinstall).
:::
## Uninstall TUI-managed deployments
If you used the [automated installer script](/install) or [`uvx`](/install-uvx) to install OpenRAG, clear your `uv` cache (`uv cache clean`) to remove the TUI environment, and then delete the `~/.openrag` directory.
If you used [`uv`](/install-uv) to install OpenRAG, run `uv remove openrag` in your Python project, and then delete the `~/.openrag` directory.
## Uninstall self-managed deployments
For self-managed services, destroy the containers, prune any additional container objects, delete any remaining OpenRAG files, and then shut down the Docling service.
### Uninstall with `docker compose` or `podman compose`
Use these steps to uninstall a self-managed OpenRAG deployment with streamlined `docker compose` or `podman compose` commands:
1. Destroy the containers, volumes, and local images, and then remove (prune) any additional container objects:
<PartialDockerComposeDownAndPrune />
2. Remove OpenRAG's `.env` file and the `~/.openrag/documents` directory, which aren't deleted by the previous commands.
3. Stop `docling-serve`:
```bash
uv run python scripts/docling_ctl.py stop
```
### Uninstall with discrete `docker` or `podman` commands
Use these commands to uninstall a self-managed OpenRAG deployment with discrete `docker` or `podman` commands:
1. Stop all running containers:
<PartialDockerStopAll />
2. Remove and clean up containers:
<PartialDockerRemoveAndCleanupSteps />
3. Remove OpenRAG's `.env` file and the `~/.openrag/documents` directory, which aren't deleted by the previous commands.
4. Stop `docling-serve`:
```bash
uv run python scripts/docling_ctl.py stop
```

View file

@ -0,0 +1,156 @@
---
title: Upgrade OpenRAG
slug: /upgrade
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialExportFlows from '@site/docs/_partial-export-flows.mdx';
Use these steps to upgrade your OpenRAG deployment to the latest version or a specific version.
## Export customized flows before upgrading
If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, [export your flows](https://docs.langflow.org/concepts-flows-import) before upgrading.
This ensure that you won't lose your flows after upgrading, and you can reference the exported flows if there are any breaking changes in the new version.
## Upgrade TUI-managed deployments
To upgrade OpenRAG, you need to upgrade the OpenRAG Python package, and then upgrade the OpenRAG containers.
Upgrading the Python package also upgrades Docling by bumping the dependency in `pyproject.toml`.
This is a two-part process because upgrading the OpenRAG Python package updates the Terminal User Interface (TUI) and Python code, but the container versions are controlled by environment variables in your [OpenRAG `.env` file](/reference/configuration).
<PartialExportFlows />
2. To check for updates, click **Status** in the TUI, and then click **Upgrade**.
3. If there is an update available, press <kbd>Esc</kbd> to close the **Status** page, then then click **Stop All Services**.
4. Press <kbd>q</kbd> to exit the TUI.
5. Upgrade the OpenRAG Python package to the latest version from [PyPI](https://pypi.org/project/openrag/).
The commands to upgrade the package depend on how you installed OpenRAG.
<Tabs>
<TabItem value="installer" label="Script or uvx" default>
Use these steps to upgrade the Python package if you installed OpenRAG using the [installer script](/install) or [`uvx`](/install-uvx):
1. Navigate to your OpenRAG workspace directory:
```bash
cd openrag-workspace
```
2. Upgrade the OpenRAG package:
```bash
uvx --from openrag openrag
```
You can invoke a specific version using any of the [`uvx` version specifiers](https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions), such as `--from`:
```bash
uvx --from openrag==0.1.30 openrag
```
</TabItem>
<TabItem value="uv-add" label="uv add">
Use these steps to upgrade the Python package if you installed OpenRAG with [`uv add`](/install-uv):
1. Navigate to your project directory:
```bash
cd YOUR_PROJECT_NAME
```
2. Update OpenRAG to the latest version:
```bash
uv add --upgrade openrag
```
To upgrade to a specific version:
```bash
uv add --upgrade openrag==0.1.33
```
3. Start the OpenRAG TUI:
```bash
uv run openrag
```
</TabItem>
<TabItem value="uv-pip" label="uv pip install">
Use these steps to upgrade the Python package if you installed OpenRAG with [`uv pip install`](/install-uv):
1. Activate your virtual environment.
2. Upgrade OpenRAG:
```bash
uv pip install --upgrade openrag
```
To upgrade to a specific version:
```bash
uv pip install --upgrade openrag==0.1.33
```
3. Start the OpenRAG TUI:
```bash
uv run openrag
```
</TabItem>
</Tabs>
6. In the OpenRAG TUI, click **Start Services**, and then wait while the services start.
When you start services after upgrading the Python package, OpenRAG runs `docker compose pull` to get the appropriate container images matching the version specified in your OpenRAG `.env` file. Then, it recreates the containers with the new images using `docker compose up -d --force-recreate`.
:::tip Pin container versions
In the OpenRAG `.env` file, the `OPENRAG_VERSION` [environment variable](/reference/configuration#system-settings) is set to `latest` by default, which pulls the `latest` available container images.
To pin a specific container image version, you can set `OPENRAG_VERSION` to the desired container image version, such as `OPENRAG_VERSION=0.1.33`.
However, when you upgrade the Python package, OpenRAG automatically attempts to keep the `OPENRAG_VERSION` synchronized with the Python package version.
You might need to edit the `.env` file after upgrading the Python package to enforce a different container version.
The TUI warns you if it detects a version mismatch.
:::
If you get an error that `langflow container already exists` error during upgrade, see [Langflow container already exists during upgrade](/support/troubleshoot#langflow-container-already-exists-during-upgrade).
7. After the containers start, click **Close**, and then click **Launch OpenRAG**.
## Upgrade self-managed deployments
<PartialExportFlows />
2. Fetch and apply the latest container images while preserving your OpenRAG data:
```bash title="Docker"
docker compose pull
docker compose up -d --force-recreate
```
```bash title="Podman"
podman compose pull
podman compose up -d --force-recreate
```
By default, OpenRAG's `docker-compose` files pull the latest container images.
3. After the containers start, access the OpenRAG application at `http://localhost:3000`.
## See also
* [Manage OpenRAG services](/manage-services)
* [Troubleshoot OpenRAG](/support/troubleshoot)

View file

@ -4,19 +4,24 @@ slug: /
hide_table_of_contents: true
---
OpenRAG is an open-source package for building agentic RAG systems that integrates with a wide range of orchestration tools, vector databases, and LLM providers.
OpenRAG is an open-source package for building agentic RAG systems that integrates with a wide range of orchestration tools, databases, and LLM providers.
OpenRAG connects and amplifies three popular, proven open-source projects into one powerful platform:
* [Langflow](https://docs.langflow.org): Langflow is a versatile tool for building and deploying AI agents and MCP servers. It supports all major LLMs, vector databases, and a growing library of AI tools.
* [Langflow](https://docs.langflow.org): Langflow is a versatile tool for building and deploying AI agents and MCP servers. It supports all major LLMs, popular vector databases, and a growing library of AI tools.
OpenRAG uses several built-in flows, and it provides full access to all Langflow features through the embedded Langflow visual editor.
By customizing the built-in flows or creating your own flows, every part of the OpenRAG stack interchangeable. You can modify any aspect of the flows from basic settings, like changing the language model, to replacing entire components. You can also write your own custom Langflow components, integrate MCP servers, call APIs, and leverage any other functionality provided by Langflow.
* [OpenSearch](https://docs.opensearch.org/latest/): OpenSearch is a community-driven, Apache 2.0-licensed open source search and analytics suite that makes it easy to ingest, search, visualize, and analyze data.
It provides powerful hybrid search capabilities with enterprise-grade security and multi-tenancy support.
* [Docling](https://docling-project.github.io/docling/): Docling simplifies document processing, parsing diverse formats — including advanced PDF understanding — and providing seamless integrations with the gen AI ecosystem.
OpenRAG uses OpenSearch as the underlying database for storing and retrieving your documents and associated vector data (embeddings). You can ingest documents from a variety of sources, including your local filesystem and OAuth authenticated connectors to popular cloud storage services.
OpenRAG builds on Langflow's familiar interface while adding OpenSearch for vector storage and Docling for simplified document parsing. It uses opinionated flows that serve as ready-to-use recipes for ingestion, retrieval, and generation from familiar sources like Google Drive, OneDrive, and SharePoint.
* [Docling](https://docling-project.github.io/docling/): Docling simplifies document processing, supports many file formats and advanced PDF parsing, and provides seamless integrations with the generative AI ecosystem.
What's more, every part of the stack is interchangeable: You can write your own custom components in Python, try different language models, and customize your flows to build a personalized agentic RAG system.
OpenRAG uses Docling to parse and chunk documents that are stored in your OpenSearch knowledge base.
:::tip
Ready to get started? Try the [quickstart](/quickstart) to install OpenRAG and start exploring in minutes.
@ -52,12 +57,12 @@ flowchart TD
ext --> backend
```
* The **OpenRAG Backend** is the central orchestration service that coordinates all other components.
* **OpenRAG backend**: The central orchestration service that coordinates all other components.
* **Langflow** provides a visual workflow engine for building AI agents, and connects to **OpenSearch** for vector storage and retrieval.
* **Langflow**: This container runs a Langflow instance. It provides the embedded Langflow visual editor for editing and creating flow, and it connects to the **OpenSearch** container for document storage and retrieval.
* **Docling Serve** is a local document processing service managed by the **OpenRAG Backend**.
* **Docling Serve**: This is a local document processing service managed by the **OpenRAG backend**.
* **External connectors** integrate third-party cloud storage services through OAuth authenticated connections to the **OpenRAG Backend**, allowing synchronization of external storage with your OpenSearch knowledge base.
* **External connectors**: Integrate third-party cloud storage services with OAuth authenticated connectors to the **OpenRAG backend**, allowing you to load documents from external storage to your OpenSearch knowledge base.
* The **OpenRAG Frontend** provides the user interface for interacting with the platform.
* **OpenRAG frontend**: Provides the user interface for interacting with the OpenRAG platform.

View file

@ -0,0 +1,12 @@
---
title: OpenRAG APIs and SDKs
slug: /reference/api-sdk-overview
---
You can use OpenRAG's APIs and SDKs to integrate and extend OpenRAG's capabilities:
* [Python SDK](https://github.com/langflow-ai/openrag/tree/main/sdks/python)
* [TypeScript/JavaScript SDK](https://github.com/langflow-ai/openrag/tree/main/sdks/typescript)
<!-- TBD: MCP: See https://github.com/langflow-ai/openrag/pull/729 -->
<!-- TBD: API Reference: See https://github.com/langflow-ai/openrag/issues/734 -->

View file

@ -3,130 +3,127 @@ title: Environment variables
slug: /reference/configuration
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
OpenRAG recognizes environment variables from the following sources:
OpenRAG's `.env` file is the primary configuration file for OpenRAG.
Environment variables in `.env` always take precedence over other sources.
* [Environment variables](#configure-environment-variables): Values set in the `.env` file.
* [Langflow runtime overrides](#langflow-runtime-overrides): Langflow components can set environment variables at runtime.
* [Default or fallback values](#default-values-and-fallbacks): These values are default or fallback values if OpenRAG doesn't find a value.
For deployments managed with the Terminal User Interface (TUI), this file is located at `~/.openrag/tui`, and it can be created automatically during [installation](/install-options).
## Configure environment variables
For [self-managed deployments](/docker), this file can be located at the root of your OpenRAG project directory or referenced from another location.
Environment variables are set in a `.env` file in the root of your OpenRAG project directory.
For an example, see [`.env.example` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/.env.example).
For an example `.env` file, see [`.env.example` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/.env.example).
:::tip
OpenRAG's Docker Compose files are populated automatically using values from the `.env` file, so you don't need to edit the Docker Compose files manually.
:::
The Docker Compose files are populated with values from your `.env`, so you don't need to edit the Docker Compose files manually.
If a variable isn't set, OpenRAG uses default or fallback values where available.
Not all variables have default values, and errors can occur if required variables aren't set.
Default values can be found in the reference tables on this page and in [`config_manager.py`](https://github.com/langflow-ai/openrag/blob/main/src/config/config_manager.py), [`settings.py`](https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py), and [`logging_config.py`](https://github.com/langflow-ai/openrag/blob/main/src/utils/logging_config.py).
Environment variables always take precedence over other variables.
You can [temporarily set Langflow variables at runtime](/agents#modify-a-flow-at-runtime).
However, these temporary overrides don't overlap with most OpenRAG environment variables.
The only exceptions are flow-level Langflow settings, such as the language model used in a flow.
### Set environment variables
## Edit the `.env` file {#set-environment-variables}
To set environment variables, do the following.
During [installation](/install-options), an initial `.env` file is created automatically or manually.
You can edit this file to change OpenRAG configuration settings after installation.
1. Stop OpenRAG.
2. Set the values in the `.env` file:
```bash
LOG_LEVEL=DEBUG
LOG_FORMAT=json
SERVICE_NAME=openrag-dev
```
3. Start OpenRAG.
Each OpenRAG environment variable is either mutable or immutable.
This determines the actions you must take to apply changes after editing the `.env` file:
Updating provider API keys or provider endpoints in the `.env` file will not take effect after [Application onboarding](/install#application-onboarding). To change these values, you must:
* **Mutable environment variables**: You can apply changes to mutable environment variables by [stopping and restarting the OpenRAG services](/manage-services) after editing the `.env` file.
1. Stop OpenRAG.
2. Remove the containers:
```
docker-compose down
```
3. Update the values in your `.env` file.
4. Start OpenRAG containers.
```
docker-compose up -d
```
5. Complete [Application onboarding](/install#application-onboarding) again.
* **Immutable environment variables**: You must [redeploy OpenRAG](/reinstall) with your modified `.env` file if you change immutable environment variables.
## Supported environment variables
## Model provider settings {#model-provider-settings}
All OpenRAG configuration can be controlled through environment variables.
Configure which models and providers OpenRAG uses to generate text and embeddings.
You only need to provide credentials for the providers you are using in OpenRAG.
### AI provider settings
Configure which AI models and providers OpenRAG uses for language processing and embeddings.
For more information, see [Application onboarding](/install#application-onboarding).
These variables are initially set during the [application onboarding process](/install#application-onboarding).
Some of these variables are immutable and can only be changed by redeploying OpenRAG, as explained in [Set environment variables](#set-environment-variables).
| Variable | Default | Description |
|----------|---------|-------------|
| `EMBEDDING_MODEL` | `text-embedding-3-small` | Embedding model for vector search. |
| `LLM_MODEL` | `gpt-4o-mini` | Language model for the chat agent. |
| `MODEL_PROVIDER` | `openai` | Model provider, such as OpenAI or IBM watsonx.ai. |
| `OPENAI_API_KEY` | - | Your OpenAI API key. Optional. Can be provided during application onboarding when installing OpenRAG. |
| `PROVIDER_API_KEY` | - | API key for the model provider. |
| `PROVIDER_ENDPOINT` | - | Custom provider endpoint. Only used for IBM or Ollama providers. |
| `PROVIDER_PROJECT_ID` | - | Project ID for providers. Only required for the IBM watsonx.ai provider. |
| `EMBEDDING_MODEL` | `text-embedding-3-small` | Embedding model for generating vector embeddings for documents in the knowledge base and similarity search queries. Can be changed after the application onboarding process. Accepts one or more models. |
| `LLM_MODEL` | `gpt-4o-mini` | Language model for language processing and text generation in the **Chat** feature. |
| `MODEL_PROVIDER` | `openai` | Model provider, as one of `openai`, `watsonx`, `ollama`, or `anthropic`. |
| `ANTHROPIC_API_KEY` | Not set | API key for the Anthropic language model provider. |
| `OPENAI_API_KEY` | Not set | API key for the OpenAI model provider, which is also the default model provider. |
| `OLLAMA_ENDPOINT` | Not set | Custom provider endpoint for the Ollama model provider. |
| `WATSONX_API_KEY` | Not set | API key for the IBM watsonx.ai model provider. |
| `WATSONX_ENDPOINT` | Not set | Custom provider endpoint for the IBM watsonx.ai model provider. |
| `WATSONX_PROJECT_ID` | Not set | Project ID for the IBM watsonx.ai model provider. |
### Document processing
## Document processing settings {#document-processing-settings}
Control how OpenRAG processes and ingests documents into your knowledge base.
For more information, see [Ingestion](/ingestion).
Control how OpenRAG [processes and ingests documents](/ingestion) into your knowledge base.
Most of these settings can be configured on the OpenRAG **Settings** page or in the `.env` file.
| Variable | Default | Description |
|----------|---------|-------------|
| `CHUNK_OVERLAP` | `200` | Overlap between chunks. |
| `CHUNK_SIZE` | `1000` | Text chunk size for document processing. |
| `DISABLE_INGEST_WITH_LANGFLOW` | `false` | Disable Langflow ingestion pipeline. |
| `DOCLING_OCR_ENGINE` | - | OCR engine for document processing. |
| `DOCLING_OCR_ENGINE` | Set by OS | OCR engine for document processing. For macOS, `ocrmac`. For any other OS, `easyocr`. |
| `DOCLING_SERVE_URL` | `http://**HOST_IP**:5001` | URL for the [Docling Serve instance](/knowledge#select-a-docling-implementation). By default, OpenRAG starts a local `docling serve` process and auto-detects the host. To use your own local or remote Docling Serve instance, set this variable to the full path to the target instance. The service must run on port 5001. |
| `OCR_ENABLED` | `false` | Enable OCR for image processing. |
| `OPENRAG_DOCUMENTS_PATHS` | `./documents` | Document paths for ingestion. |
| `OPENRAG_DOCUMENTS_PATH` | `~/.openrag/documents` | The [local documents path](/knowledge#set-the-local-documents-path) for ingestion. |
| `PICTURE_DESCRIPTIONS_ENABLED` | `false` | Enable picture descriptions. |
### Langflow settings
## Langflow settings {#langflow-settings}
Configure Langflow authentication.
Configure the OpenRAG Langflow server's authentication, contact point, and built-in flow definitions.
:::info
The `LANGFLOW_SUPERUSER_PASSWORD` is set in your `.env` file, and this value determines the default values for several other Langflow authentication variables.
If the `LANGFLOW_SUPERUSER_PASSWORD` variable isn't set, then the Langflow server starts _without_ authentication enabled.
For better security, it is recommended to set `LANGFLOW_SUPERUSER_PASSWORD` so the [Langflow server starts with authentication enabled](https://docs.langflow.org/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled).
:::
| Variable | Default | Description |
|----------|---------|-------------|
| `LANGFLOW_AUTO_LOGIN` | `False` | Enable auto-login for Langflow. |
| `LANGFLOW_CHAT_FLOW_ID` | pre-filled | This value is pre-filled. The default value is found in [.env.example](https://github.com/langflow-ai/openrag/blob/main/.env.example). |
| `LANGFLOW_ENABLE_SUPERUSER_CLI` | `False` | Enable superuser CLI. |
| `LANGFLOW_INGEST_FLOW_ID` | pre-filled | This value is pre-filled. The default value is found in [.env.example](https://github.com/langflow-ai/openrag/blob/main/.env.example). |
| `LANGFLOW_KEY` | auto-generated | Explicit Langflow API key. |
| `LANGFLOW_NEW_USER_IS_ACTIVE` | `False` | New users are active by default. |
| `LANGFLOW_PUBLIC_URL` | `http://localhost:7860` | Public URL for Langflow. |
| `LANGFLOW_SECRET_KEY` | - | Secret key for Langflow internal operations. |
| `LANGFLOW_SUPERUSER` | - | Langflow admin username. Required. |
| `LANGFLOW_SUPERUSER_PASSWORD` | - | Langflow admin password. Required. |
| `LANGFLOW_URL` | `http://localhost:7860` | Langflow URL. |
| `NUDGES_FLOW_ID` | pre-filled | This value is pre-filled. The default value is found in [.env.example](https://github.com/langflow-ai/openrag/blob/main/.env.example). |
| `SYSTEM_PROMPT` | "You are a helpful AI assistant with access to a knowledge base. Answer questions based on the provided context." | System prompt for the Langflow agent. |
| `LANGFLOW_AUTO_LOGIN` | Determined by `LANGFLOW_SUPERUSER_PASSWORD` | Whether to enable [auto-login mode](https://docs.langflow.org/api-keys-and-authentication#langflow-auto-login) for the Langflow visual editor and CLI. If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then `LANGFLOW_AUTO_LOGIN` is `True` and auto-login mode is enabled. If `LANGFLOW_SUPERUSER_PASSWORD` is set, then `LANGFLOW_AUTO_LOGIN` is `False` and auto-login mode is disabled. Langflow API calls always require authentication with a Langflow API key regardless of the auto-login setting. |
| `LANGFLOW_ENABLE_SUPERUSER_CLI` | Determined by `LANGFLOW_SUPERUSER_PASSWORD` | Whether to enable the [Langflow CLI `langflow superuser` command](https://docs.langflow.org/api-keys-and-authentication#langflow-enable-superuser-cli). If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then `LANGFLOW_ENABLE_SUPERUSER_CLI` is `True` and superuser accounts can be created with the Langflow CLI. If `LANGFLOW_SUPERUSER_PASSWORD` is set, then `LANGFLOW_ENABLE_SUPERUSER_CLI` is `False` and the `langflow superuser` command is disabled. |
| `LANGFLOW_NEW_USER_IS_ACTIVE` | Determined by `LANGFLOW_SUPERUSER_PASSWORD` | Whether new [Langflow user accounts are active by default](https://docs.langflow.org/api-keys-and-authentication#langflow-new-user-is-active). If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then `LANGFLOW_NEW_USER_IS_ACTIVE` is `True` and new user accounts are active by default. If `LANGFLOW_SUPERUSER_PASSWORD` is set, then `LANGFLOW_NEW_USER_IS_ACTIVE` is `False` and new user accounts are inactive by default. |
| `LANGFLOW_PUBLIC_URL` | `http://localhost:7860` | Public URL for the Langflow instance. Forms the base URL for Langflow API calls and other interfaces with your OpenRAG Langflow instance. |
| `LANGFLOW_KEY` | Automatically generated | A Langflow API key to run flows with Langflow API calls. Because Langflow API keys are server-specific, allow OpenRAG to generate this key initially. You can create additional Langflow API keys after deploying OpenRAG. |
| `LANGFLOW_SECRET_KEY` | Automatically generated | Secret encryption key for Langflow internal operations. It is recommended to [generate your own Langflow secret key](https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key) for this variable. If this variable isn't set, then Langflow generates a secret key automatically. |
| `LANGFLOW_SUPERUSER` | `admin` | Username for the Langflow administrator user. |
| `LANGFLOW_SUPERUSER_PASSWORD` | Not set | Langflow administrator password. If this variable isn't set, then the Langflow server starts _without_ authentication enabled. It is recommended to set `LANGFLOW_SUPERUSER_PASSWORD` so the [Langflow server starts with authentication enabled](https://docs.langflow.org/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled). |
| `LANGFLOW_URL` | `http://localhost:7860` | URL for the Langflow instance. |
| `LANGFLOW_CHAT_FLOW_ID`, `LANGFLOW_INGEST_FLOW_ID`, `NUDGES_FLOW_ID` | Built-in flow IDs | These variables are set automatically to the IDs of the chat, ingestion, and nudges [flows](/agents). The default values are found in [`.env.example`](https://github.com/langflow-ai/openrag/blob/main/.env.example). Only change these values if you want to replace a built-in flow with your own custom flow. The flow JSON must be present in your version of the OpenRAG codebase. For example, if you [deploy self-managed services](/docker), you can add the flow JSON to your local clone of the OpenRAG repository before deploying OpenRAG. |
| `SYSTEM_PROMPT` | `You are a helpful AI assistant with access to a knowledge base. Answer questions based on the provided context.` | System prompt instructions for the agent driving the **Agent** flow (OpenRAG **Chat**). |
### OAuth provider settings
## OAuth provider settings
Configure OAuth providers and external service integrations.
Configure [OAuth providers](/ingestion#oauth-ingestion) and external service integrations.
| Variable | Default | Description |
|----------|---------|-------------|
| `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` | - | AWS integrations. |
| `GOOGLE_OAUTH_CLIENT_ID` / `GOOGLE_OAUTH_CLIENT_SECRET` | - | Google OAuth authentication. |
| `MICROSOFT_GRAPH_OAUTH_CLIENT_ID` / `MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET` | - | Microsoft OAuth. |
| `WEBHOOK_BASE_URL` | - | Base URL for webhook endpoints. |
| `AWS_ACCESS_KEY_ID`<br/>`AWS_SECRET_ACCESS_KEY` | Not set | Enable access to AWS S3 with an [AWS OAuth app](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html) integration. |
| `GOOGLE_OAUTH_CLIENT_ID`<br/>`GOOGLE_OAUTH_CLIENT_SECRET` | Not set | Enable the [Google OAuth client](https://developers.google.com/identity/protocols/oauth2) integration. You can generate these values in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). |
| `MICROSOFT_GRAPH_OAUTH_CLIENT_ID`<br/>`MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET` | Not set | Enable the [Microsoft Graph OAuth client](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth) integration by providing [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). |
| `WEBHOOK_BASE_URL` | Not set | Base URL for OAuth connector webhook endpoints. If this variable isn't set, a default base URL is used. |
### OpenSearch settings
## OpenSearch settings
Configure OpenSearch database authentication.
| Variable | Default | Description |
|----------|---------|-------------|
| `OPENSEARCH_HOST` | `localhost` | OpenSearch host. |
| `OPENSEARCH_PASSWORD` | - | Password for OpenSearch admin user. Required. |
| `OPENSEARCH_PORT` | `9200` | OpenSearch port. |
| `OPENSEARCH_USERNAME` | `admin` | OpenSearch username. |
| `OPENSEARCH_HOST` | `localhost` | OpenSearch instance host. |
| `OPENSEARCH_PORT` | `9200` | OpenSearch instance port. |
| `OPENSEARCH_USERNAME` | `admin` | OpenSearch administrator username. |
| `OPENSEARCH_PASSWORD` | Must be set at start up | Required. OpenSearch administrator password. Must adhere to the [OpenSearch password complexity requirements](https://docs.opensearch.org/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password). You must set this directly in the `.env` or in the TUI's [**Basic/Advanced Setup**](/install#setup). |
### System settings
## System settings
Configure general system components, session management, and logging.
@ -134,31 +131,10 @@ Configure general system components, session management, and logging.
|----------|---------|-------------|
| `LANGFLOW_KEY_RETRIES` | `15` | Number of retries for Langflow key generation. |
| `LANGFLOW_KEY_RETRY_DELAY` | `2.0` | Delay between retries in seconds. |
| `LANGFLOW_VERSION` | `latest` | Langflow Docker image version. |
| `LOG_FORMAT` | - | Log format (set to "json" for JSON output). |
| `LOG_LEVEL` | `INFO` | Logging level (DEBUG, INFO, WARNING, ERROR). |
| `MAX_WORKERS` | - | Maximum number of workers for document processing. |
| `OPENRAG_VERSION` | `latest` | OpenRAG Docker image version. |
| `LANGFLOW_VERSION` | `OPENRAG_VERSION` | Langflow Docker image version. By default, OpenRAG uses the `OPENRAG_VERSION` for the Langflow Docker image version. |
| `LOG_FORMAT` | Not set | Set to `json` to enabled JSON-formatted log output. If this variable isn't set, then the default logging format is used. |
| `LOG_LEVEL` | `INFO` | Logging level. Can be one of `DEBUG`, `INFO`, `WARNING`, or `ERROR`. `DEBUG` provides the most detailed logs but can impact performance. |
| `MAX_WORKERS` | `1` | Maximum number of workers for document processing. |
| `OPENRAG_VERSION` | `latest` | The version of the OpenRAG Docker images to run. For more information, see [Upgrade OpenRAG](/upgrade) |
| `SERVICE_NAME` | `openrag` | Service name for logging. |
| `SESSION_SECRET` | auto-generated | Session management. |
## Langflow runtime overrides
Langflow runtime overrides allow you to modify component settings at runtime without changing the base configuration.
Runtime overrides are implemented through **tweaks** - parameter modifications that are passed to specific Langflow components during flow execution.
For more information on tweaks, see [Input schema (tweaks)](https://docs.langflow.org/concepts-publish#input-schema).
## Default values and fallbacks
When no environment variables or configuration file values are provided, OpenRAG uses default values.
These values can be found in the code base at the following locations.
### OpenRAG configuration defaults
These values are defined in [`config_manager.py` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/src/config/config_manager.py).
### System configuration defaults
These fallback values are defined in [`settings.py` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py).
| `SESSION_SECRET` | Automatically generated | Session management. |

View file

@ -0,0 +1,155 @@
---
title: Contribute to OpenRAG
slug: /support/contribute
---
There are several ways you can interact with the OpenRAG community and contribute to the OpenRAG codebase.
## Star OpenRAG on GitHub
If you like OpenRAG, you can star the [OpenRAG GitHub repository](https://github.com/langflow-ai/openrag).
Stars help other users find OpenRAG more easily, and quickly understand that other users have found it useful.
Because OpenRAG is open-source, the more visible the repository is, the more likely the codebase is to attract contributors.
## Watch the GitHub repository
You can watch the [OpenRAG GitHub repository](https://github.com/langflow-ai/openrag) to get notified about new releases and other repository activity.
To get release notifications only, select **Releases only**.
If you select **Watching**, you will receive notifications about new releases as well as issues, discussions, and pull requests. For information about customizing repository notifications, see the [GitHub documentation on repository subscriptions](https://docs.github.com/en/subscriptions-and-notifications/how-tos/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions).
## Request enhancements and get help through GitHub
You can report bugs, submit feature requests, and get help with OpenRAG through the GitHub repository.
The repository is the best place to report bugs and request enhancements to ensure that they are tracked by OpenRAG maintainers.
### GitHub issues
The [Issues page in the OpenRAG repository](https://github.com/langflow-ai/openrag/issues) is actively updated with bugs and feature requests.
:::tip
The best way to promote a request or bug is to comment on an existing issue that matches your request.
Before you report a bug or submit a feature request, search for existing similar issues.
If you find one, add a comment with any relevant details instead of opening a new issue.
Highly active issues are more likely to receive attention from contributors.
:::
Feature planning for OpenRAG is tracked through the [Projects page in the OpenRAG repository](https://github.com/langflow-ai/openrag/projects).
### GitHub discussions
If you need help with your code or OpenRAG in general, you can visit the [OpenRAG GitHub Discussions page](https://github.com/langflow-ai/openrag/discussions).
The OpenRAG team doesn't provide individual support over email, and the team believes that public discussions help more users by virtue of their discoverability.
## Community guidelines and tips
Because the OpenRAG repository is public, the OpenRAG team asks that you follow these guidelines when submitting questions and issues:
* **Provide as many details as possible**: Simply stating that a feature doesn't work isn't helpful. The OpenRAG team needs details in order to recreate and find the issue.
* **Explain what exactly went wrong**: Include error messages and descriptions of _how_ your code failed, not just the fact that it failed.
* **Retrace your steps**: Explain what happened before the error, what you expected to happen instead of the error, and any recent changes you made, such as upgrading OpenRAG or a dependency.
* **Describe your environment**: Include your operating system, OpenRAG version, Python version, and any other environment-related details that could have contributed to the issue.
* **Include snippets of the code that failed**: Be sure to omit any sensitive values, and only provide parts that are relevant to the failure rather than the entire script. Providing code snippets makes it much easier to reproduce errors, troubleshoot, and provide specific advice.
* If your submission includes long sections of code, logs, or tracebacks, wrap them in [details tags](https://developer.mozilla.org/en/docs/Web/HTML/Element/details) (`<details> PASTE CODE HERE </details>`) to collapse the content and make it easier to read your submission.
* **Omit sensitive information**: Other than the information available on your public GitHub profile, don't include sensitive or personally identifying data, such as security keys, full names, personal identification numbers, addresses, and phone numbers.
* **Be kind**: Although bugs can be frustrating with any software, remember that your messages are read by real people who want to help. While you don't have to be saccharine, there's no need to be rude to get support.
* Your issues and discussions are attached to your GitHub account, and they can be read by anyone on the internet, including current and potential employers and colleagues.
* The OpenRAG repository is a public GitHub repository and, therefore, subject to the [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-community-code-of-conduct).
## Contribute to the codebase
If you want to contribute code to OpenRAG, you can do so by submitting a pull request (PR) to the OpenRAG GitHub repository.
See [CONTRIBUTING.md](https://github.com/langflow-ai/openrag/blob/main/CONTRIBUTING.md) to set up your development environment and learn about the contribution process.
### Tips for successful submissions
* Explain the motivation for your submission in the PR description.
Clarify how the change benefits the OpenRAG codebase and its users.
* Keep PRs small and focused on a single change or set of related changes.
* If applicable, include tests that verify your changes.
* Add documentation for new features, or edit existing documentation (if needed) when modifying existing code.
For more information, see [Contribute documentation](#contribute-documentation).
### Use of AI tools in contributions
If you use AI tools to generate significant portions of the code in your PR, the OpenRAG team asks that you do the following:
* Consider disclosing significant use of AI tools in your pull request description, particularly if you are unable to expertly review your own code contributions. For example: `I used an AI tool to generate the code for <function>, but I am not an expert in <language>. There might be some inefficiencies or antipatterns present.`
* Avoid using AI tools to generate large volumes of code if you don't have personal knowledge of that language and the functionality being implemented. Instead, consider submitting a feature request to the [Issues page in the OpenRAG repository](https://github.com/langflow-ai/openrag/issues).
* Be critical when reviewing code or documentation generated by AI tools to ensure it is accurate, efficient, and avoids antipatterns and vulnerabilities.
* Don't flood the repository with AI-generated pull requests.
Low quality and spam contributions can be closed without review at the discretion of the maintainers.
Repeated low-quality contributions can lead to a ban on contributions.
## Contribute documentation {#contribute-documentation}
The OpenRAG documentation is built using [Docusaurus](https://docusaurus.io/) and written in [Markdown](https://docusaurus.io/docs/markdown-features).
For style guidance, see the [Google Developer Documentation Style Guide](https://developers.google.com/style).
1. Install [Node.js](https://nodejs.org/en/download/package-manager).
2. Fork the [OpenRAG GitHub repository](https://github.com/langflow-ai/openrag).
3. Add the new remote to your local repository on your local machine:
```bash
git remote add FORK_NAME https://github.com/GIT_USERNAME/openrag.git
```
Replace the following:
* `FORK_NAME`: A name for your fork of the repository
* `GIT_USERNAME`: Your Git username
4. Change to the `/docs` directory in your local repository:
```bash
cd openrag/docs
```
If you're running a development container for code contributions, run the documentation build from outside the container on your host terminal.
The documentation build might not work properly when run from inside the development container workspace.
5. Install dependencies and start a local Docusaurus static site with hot reload:
```bash
npm install
npm start
```
The documentation is served at `http://localhost:3000`.
6. To edit and create content, work with the `.mdx` files in the `openrag/docs/docs` directory.
Create new files in `.mdx` format.
Navigation is defined in `openrag/docs/sidebars.js`.
Most pages use a `slug` for shorthand cross-referencing, rather than supplying the full or relative directory path.
For example, if a page has a `slug` of `/cool-page`, you can link to it with `[Cool page](/cool-page)` from any other `/docs` page.
7. Recommended: After making some changes, run `npm run build` to build the site locally with more robust logging.
This can help you find broken links before creating a PR.
8. Create a pull request against the `main` branch of the OpenRAG repository with a clear title and description of your changes:
* Provide a clear title in the format of `Docs: <summary of change>`. For example, `Docs: fix broken link on contributing page`. Pull request titles appear in OpenRAG's release notes, so they should explain what the PR does as explicitly as possible.
* Explain why and how you made the changes in the pull request description.
* If the pull request closes an issue, include `Closes #NUMBER` in the description, such as `Closes #1234`.
* If you used AI tools to write significant portions of the documentation, consider disclosing this in the PR description.
9. Add the `documentation` label to your pull request.
10. Keep an eye on your pull request in case an OpenRAG maintainer requests changes or asks questions.
OpenRAG technical writers can directly edit documentation PRs to enforce style guidelines and fix errors.

View file

@ -3,17 +3,21 @@ title: Troubleshoot OpenRAG
slug: /support/troubleshoot
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.
## OpenSearch fails to start
## Installation and start up issues
Check that `OPENSEARCH_PASSWORD` set in [Environment variables](/reference/configuration) meets requirements.
The password must contain at least 8 characters, and must contain at least one uppercase letter, one lowercase letter, one digit, and one special character that is strong.
The following issues relate to OpenRAG installation and start up.
## OpenRAG fails to start from the TUI with operation not supported
### OpenSearch fails to start
Check that the value of the `OPENSEARCH_PASSWORD` [environment variable](/reference/configuration) meets the [OpenSearch password complexity requirements](https://docs.opensearch.org/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password).
If you need to change the password, you must [reset the OpenRAG services](/manage-services).
### OpenRAG fails to start from the TUI with operation not supported
This error occurs when starting OpenRAG with the TUI in [WSL (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/install).
@ -21,7 +25,7 @@ The error occurs because OpenRAG is running within a WSL environment, so `webbro
To access the OpenRAG application, open a web browser and enter `http://localhost:3000` in the address bar.
## OpenRAG installation fails with unable to get local issuer certificate
### OpenRAG installation fails with unable to get local issuer certificate
If you are installing OpenRAG on macOS, and the installation fails with `unable to get local issuer certificate`, run the following command, and then retry the installation:
@ -31,18 +35,27 @@ open "/Applications/Python VERSION/Install Certificates.command"
Replace `VERSION` with your installed Python version, such as `3.13`.
### Application onboarding gets stuck on Google Chrome
If the OpenRAG onboarding process gets stuck when using Google Chrome, try clearing your browser's cache.
## Langflow connection issues
Verify the `LANGFLOW_SUPERUSER` credentials set in [Environment variables](/reference/configuration) are correct.
Verify that the value of the `LANGFLOW_SUPERUSER` environment variable is correct.
For more information about this variable and how this variable controls Langflow access, see [Langflow settings](/reference/configuration#langflow-settings).
## Container out of memory errors
## Container out of memory errors {#container-out-of-memory-errors}
Increase Docker memory allocation or use [docker-compose-cpu.yml](https://github.com/langflow-ai/openrag/blob/main/docker-compose-cpu.yml) to deploy OpenRAG.
Increase your container VM's allocated memory, or use a CPU-only deployment to reduce memory usage.
## Memory issue with Podman on macOS
For TUI-managed deployments, you can enable **CPU mode** on the TUI's **Status** page.
For self-managed deployments, CPU-only deployments use the `docker-compose.yml` file that doesn't have GPU overrides.
## Memory issue with Podman on macOS {#memory-issue-with-podman-on-macos}
If you're using Podman on macOS, you might need to increase VM memory on your Podman machine.
This example increases the machine size to 8 GB of RAM, which should be sufficient to run OpenRAG.
This example increases the machine size to 8 GB of RAM, which is the minimum recommended RAM for OpenRAG:
```bash
podman machine stop
@ -53,31 +66,52 @@ podman machine start
## Port conflicts
Ensure ports 3000, 7860, 8000, 9200, 5601 are available.
With the default [environment variable](/reference/configuration) values, OpenRAG requires the following ports to be available on the host machine:
## OCR ingestion fails (easyocr not installed)
* 3000: Langflow application
* 5001: Docling local ingestion service
* 5601: OpenSearch Dashboards
* 7860: Docling UI
* 8000: Docling API
* 9200: OpenSearch service
If Docling ingestion fails with an OCR-related error and mentions `easyocr` is missing, this is likely due to a stale `uv` cache.
## OCR ingestion fails (easyocr not installed) {#ocr-ingestion-fails-easyocr-not-installed}
`easyocr` is already included as a dependency in OpenRAG's `pyproject.toml`. Project-managed installations using `uv sync` and `uv run` always sync dependencies directly from your `pyproject.toml`, so they should have `easyocr` installed.
Docling ingestion can fail with an OCR-related error that mentions `easyocr` is missing.
This is likely due to a stale `uv` cache when you [install OpenRAG with `uvx`](/install-uvx).
If you're running OpenRAG with `uvx openrag`, `uvx` creates a cached, ephemeral environment that doesn't modify your project. This cache can become stale.
When you invoke OpenRAG with `uvx openrag`, `uvx` creates a cached, ephemeral environment that doesn't modify your project.
The location and path of this cache depends on your operating system.
For example, on macOS, this is typically a user cache directory, such as `~/.cache/uv`.
On macOS, this cache directory is typically a user cache directory such as `/Users/USER_NAME/.cache/uv`.
This cache can become stale, producing errors like missing dependencies.
1. To clear the uv cache, run:
1. If the TUI is open, press <kbd>q</kbd> to exit the TUI.
2. Clear the `uv` cache:
```bash
uv cache clean
```
2. Start OpenRAG:
To clear the OpenRAG cache only, run:
```bash
uv cache clean openrag
```
3. Invoke OpenRAG to restart the TUI:
```bash
uvx openrag
```
If you do not need OCR, you can disable OCR-based processing in your ingestion settings to avoid requiring `easyocr`.
4. Click **Launch OpenRAG**, and then retry document ingestion.
If you install OpenRAG with `uv`, dependencies are synced directly from your `pyproject.toml` file.
This should automatically install `easyocr` because `easyocr` is included as a dependency in OpenRAG's `pyproject.toml`.
If you don't need OCR, you can disable OCR-based processing in your [ingestion settings](/knowledge#knowledge-ingestion-settings) to avoid requiring `easyocr`.
## Upgrade fails due to Langflow container already exists {#langflow-container-already-exists-during-upgrade}
@ -85,129 +119,44 @@ If you encounter a `langflow container already exists` error when upgrading Open
To resolve this issue, do the following:
First, try removing only the Langflow container, and then retry the upgrade in the OpenRAG TUI by clicking **Status** and then **Upgrade**.
1. Remove only the Langflow container:
<Tabs groupId="Container software">
<TabItem value="Podman" label="Podman">
1. Stop the Langflow container:
1. Stop the Langflow container:
```bash title="Docker"
docker stop langflow
```
```bash
podman stop langflow
```
```bash title="Podman"
podman stop langflow
```
2. Remove the Langflow container:
2. Remove the Langflow container:
```bash
podman rm langflow --force
```
```bash title="Docker"
docker rm langflow --force
```
</TabItem>
<TabItem value="Docker" label="Docker" default>
```bash title="Podman"
podman rm langflow --force
```
1. Stop the Langflow container:
2. Retry the [upgrade](/upgrade).
```bash
docker stop langflow
```
3. If reinstalling the Langflow container doesn't resolve the issue, then you must [reset all containers](/manage-services) or [reinstall OpenRAG](/reinstall).
2. Remove the Langflow container:
4. Retry the [upgrade](/upgrade).
```bash
docker rm langflow --force
```
If no updates are available after reinstalling OpenRAG, then you reinstalled at the latest version, and your deployment is up to date.
</TabItem>
</Tabs>
## Document ingestion or similarity search issues
If reinstalling the Langflow container doesn't resolve the issue, you must reset to a fresh installation by removing all OpenRAG containers and data.
Then, you can retry the upgrade.
See [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
:::warning
This is a destructive operation that completely resets your OpenRAG containers and removes all OpenRAG data, including OpenSearch data, uploaded documents, and authentication details.
Your `.env` file is preserved, so your configuration settings remain intact, but all other data is lost.
:::
## Ollama model issues
To reset your installation, stop your containers, and then completely remove them.
After removing the containers, retry the upgrade in the OpenRAG TUI by clicking **Status** and then **Upgrade**.
<PartialOllamaModels />
<Tabs groupId="Container software">
<TabItem value="Podman" label="Podman">
## Chat issues
1. Stop all running containers:
```bash
podman stop --all
```
2. Remove all containers, including stopped containers:
```bash
podman rm --all --force
```
3. Remove all images:
```bash
podman rmi --all --force
```
4. Remove all volumes:
```bash
podman volume prune --force
```
5. Remove all networks except the default network:
```bash
podman network prune --force
```
6. Clean up any leftover data:
```bash
podman system prune --all --force --volumes
```
</TabItem>
<TabItem value="Docker" label="Docker" default>
1. Stop all running containers:
```bash
docker stop $(docker ps -q)
```
2. Remove all containers, including stopped containers:
```bash
docker rm --force $(docker ps -aq)
```
3. Remove all images:
```bash
docker rmi --force $(docker images -q)
```
4. Remove all volumes:
```bash
docker volume prune --force
```
5. Remove all networks except the default network:
```bash
docker network prune --force
```
6. Clean up any leftover data:
```bash
docker system prune --all --force --volumes
```
</TabItem>
</Tabs>
See [Troubleshoot chat](/chat#troubleshoot-chat).

View file

@ -8,12 +8,113 @@ import {themes as prismThemes} from 'prism-react-renderer';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const isProduction = process.env.NODE_ENV === 'production';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'OpenRAG',
tagline: 'Open Source RAG Platform',
favicon: 'img/favicon.ico',
headTags: [
...(isProduction
? [
// Google Consent Mode - Set defaults before Google tags load
{
tagName: "script",
attributes: {},
innerHTML: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Set default consent to denied
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
});
`,
},
// TrustArc Consent Update Listener
{
tagName: "script",
attributes: {},
innerHTML: `
(function() {
function updateGoogleConsent() {
if (typeof window.truste !== 'undefined' && window.truste.cma) {
var consent = window.truste.cma.callApi('getConsent', window.location.href) || {};
// Map TrustArc categories to Google consent types
// Category 0 = Required, 1 = Functional, 2 = Advertising, 3 = Analytics
var hasAdvertising = consent[2] === 1;
var hasAnalytics = consent[3] === 1;
gtag('consent', 'update', {
'ad_storage': hasAdvertising ? 'granted' : 'denied',
'ad_user_data': hasAdvertising ? 'granted' : 'denied',
'ad_personalization': hasAdvertising ? 'granted' : 'denied',
'analytics_storage': hasAnalytics ? 'granted' : 'denied'
});
}
}
// Listen for consent changes
if (window.addEventListener) {
window.addEventListener('cm_data_subject_consent_changed', updateGoogleConsent);
window.addEventListener('cm_consent_preferences_set', updateGoogleConsent);
}
// Initial check after TrustArc loads
if (document.readyState === 'complete') {
updateGoogleConsent();
} else {
window.addEventListener('load', updateGoogleConsent);
}
})();
`,
},
// IBM Analytics Configuration (required for TrustArc)
{
tagName: "script",
attributes: {},
innerHTML: `
window._ibmAnalytics = {
"settings": {
"name": "DataStax",
"tealiumProfileName": "ibm-subsidiary",
},
"trustarc": {
"privacyPolicyLink": "https://ibm.com/privacy"
}
};
window.digitalData = {
"page": {
"pageInfo": {
"ibm": {
"siteId": "IBM_DataStax",
}
},
"category": {
"primaryCategory": "PC230"
}
}
};
`,
},
// IBM Common Stats Script - loads TrustArc
{
tagName: "script",
attributes: {
src: "//1.www.s81c.com/common/stats/ibm-common.js",
async: "true",
},
},
]
: []),
],
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: true, // Improve compatibility with the upcoming Docusaurus v4
@ -26,7 +127,7 @@ const config = {
baseUrl: process.env.BASE_URL ? process.env.BASE_URL : '/',
// Control search engine indexing - set to true to prevent indexing
noIndex: true,
noIndex: false,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
@ -75,6 +176,19 @@ const config = {
theme: {
customCss: './src/css/custom.css',
},
// Use preset-classic sitemap https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-sitemap
sitemap: {
lastmod: 'date',
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
createSitemapItems: async (params) => {
const {defaultCreateSitemapItems, ...rest} = params;
const items = await defaultCreateSitemapItems(rest);
return items.filter((item) => !item.url.includes('/page/'));
},
},
}),
],
],
@ -115,15 +229,26 @@ const config = {
{
html: `<div class="footer-links">
<span>© ${new Date().getFullYear()} OpenRAG</span>
<span id="preferenceCenterContainer"> ·&nbsp; <a href="#" onclick="if(typeof window !== 'undefined' && window.truste && window.truste.eu && window.truste.eu.clickListener) { window.truste.eu.clickListener(); } return false;" style="cursor: pointer;">Manage Privacy Choices</a></span>
</div>`,
},
],
},
],
},
algolia: {
appId: "SMEA51Q5OL",
// public key, safe to commit
apiKey: "b2ec302e9880e8979ad6a68f0c36271e",
indexName: "openrag-algolia",
contextualSearch: true,
searchParameters: {},
searchPagePath: "search",
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'docker', 'yaml'],
},
mermaid: {
theme: {light: 'neutral', dark: 'forest'},

1620
docs/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"build:pdf": "rm -f ../documents/openrag-documentation.pdf && npm run build && npm run serve & sleep 10 && npx docusaurus-to-pdf && pkill -f 'docusaurus serve'",
"build:pdf": "rm -f ../openrag-documents/openrag-documentation.pdf && npm run build && npm run serve & sleep 10 && npx docusaurus-to-pdf && pkill -f 'docusaurus serve'",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
@ -22,7 +22,7 @@
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"docusaurus-plugin-image-zoom": "^3.0.1",
"lucide-react": "^0.544.0",
"lucide-react": "^0.555.0",
"prism-react-renderer": "^2.3.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
@ -31,7 +31,7 @@
"@docusaurus/module-type-aliases": "3.9.2",
"@docusaurus/tsconfig": "3.9.2",
"@docusaurus/types": "3.9.2",
"typescript": "~5.6.2"
"typescript": "~5.9.3"
},
"browserslist": {
"production": [
@ -46,6 +46,6 @@
]
},
"engines": {
"node": ">=18.0"
"node": ">=20.20.0"
}
}

View file

@ -1,7 +1,7 @@
{
"baseUrl": "http://localhost:3000",
"entryPoint": "http://localhost:3000",
"outputDir": "../documents/openrag-documentation.pdf",
"outputDir": "../openrag-documents/openrag-documentation.pdf",
"customStyles": "table { max-width: 3500px !important; } .navbar, .footer, .breadcrumbs { display: none !important; }",
"forceImages": true
}

View file

@ -22,13 +22,71 @@ const sidebars = {
label: "About OpenRAG"
},
"get-started/quickstart",
"get-started/install",
"get-started/docker",
"core-components/agents",
"core-components/knowledge",
"core-components/ingestion",
{
type: "category",
label: "Installation",
items: [
"get-started/install-options",
{ type: "doc",
id: "get-started/install",
label: "Run the installer script",
},
{ type: "doc",
id: "get-started/install-uv",
label: "Install OpenRAG with uv",
},
"get-started/install-uvx",
{ type: "doc",
id: "get-started/install-windows",
label: "Install OpenRAG on Windows",
},
{ type: "doc",
id: "get-started/docker",
label: "Deploy self-managed services",
},
"get-started/upgrade",
"get-started/reinstall",
"get-started/uninstall",
],
},
"get-started/tui",
{
type: "doc",
id: "get-started/manage-services",
label: "Manage services",
},
{
type: "doc",
id: "core-components/agents",
label: "Flows",
},
{
type: "category",
label: "Knowledge",
items: [
"core-components/knowledge",
"core-components/ingestion",
"core-components/knowledge-filters",
],
},
{
type: "doc",
id: "core-components/chat",
label: "Chat",
},
"reference/configuration",
{
type: "doc",
id: "reference/api-sdk-overview",
label: "APIs and SDKs",
},
"support/contribute",
"support/troubleshoot",
{
type: "link",
label: "Changelog",
href: "https://github.com/langflow-ai/openrag/releases",
},
],
};

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

BIN
docs/static/img/openrag_tui_dec_2025.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,12 +1,8 @@
# Robots.txt for OpenRAG Documentation
# Block all crawlers by default
# Allow all crawlers
User-agent: *
Disallow: /
Allow: /
# Allow specific crawlers if needed (uncomment when ready for launch)
# User-agent: Googlebot
# Allow: /
# Sitemap location (uncomment when ready for launch)
# Sitemap: https://docs.openr.ag/sitemap.xml
# Sitemap location
Sitemap: https://docs.openr.ag/sitemap.xml

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,364 +1,364 @@
"use client";
import { useState, useEffect } from "react";
import { Cloud, FolderOpen, Loader2, Upload } from "lucide-react";
import { useEffect, useState } from "react";
import { ProtectedRoute } from "@/components/protected-route";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Upload, FolderOpen, Loader2, Cloud } from "lucide-react";
import { ProtectedRoute } from "@/components/protected-route";
import { useTask } from "@/contexts/task-context";
function AdminPage() {
console.log("AdminPage component rendered!");
const [fileUploadLoading, setFileUploadLoading] = useState(false);
const [pathUploadLoading, setPathUploadLoading] = useState(false);
const [selectedFile, setSelectedFile] = useState<File | null>(null);
const [folderPath, setFolderPath] = useState("/app/documents/");
const [bucketUploadLoading, setBucketUploadLoading] = useState(false);
const [bucketUrl, setBucketUrl] = useState("s3://");
const [uploadStatus, setUploadStatus] = useState<string>("");
const [awsEnabled, setAwsEnabled] = useState(false);
const { addTask } = useTask();
console.log("AdminPage component rendered!");
const [fileUploadLoading, setFileUploadLoading] = useState(false);
const [pathUploadLoading, setPathUploadLoading] = useState(false);
const [selectedFile, setSelectedFile] = useState<File | null>(null);
const [folderPath, setFolderPath] = useState("/app/openrag-documents/");
const [bucketUploadLoading, setBucketUploadLoading] = useState(false);
const [bucketUrl, setBucketUrl] = useState("s3://");
const [uploadStatus, setUploadStatus] = useState<string>("");
const [awsEnabled, setAwsEnabled] = useState(false);
const { addTask } = useTask();
useEffect(() => {
console.log("AdminPage useEffect running - checking AWS availability");
const checkAws = async () => {
try {
console.log("Making request to /api/upload_options");
const res = await fetch("/api/upload_options");
console.log("Response status:", res.status, "OK:", res.ok);
if (res.ok) {
const data = await res.json();
console.log("Response data:", data);
setAwsEnabled(Boolean(data.aws));
}
} catch (err) {
console.error("Failed to check AWS availability", err);
}
};
checkAws();
}, []);
useEffect(() => {
console.log("AdminPage useEffect running - checking AWS availability");
const checkAws = async () => {
try {
console.log("Making request to /api/upload_options");
const res = await fetch("/api/upload_options");
console.log("Response status:", res.status, "OK:", res.ok);
if (res.ok) {
const data = await res.json();
console.log("Response data:", data);
setAwsEnabled(Boolean(data.aws));
}
} catch (err) {
console.error("Failed to check AWS availability", err);
}
};
checkAws();
}, []);
const handleFileUpload = async (e: React.FormEvent) => {
e.preventDefault();
if (!selectedFile) return;
const handleFileUpload = async (e: React.FormEvent) => {
e.preventDefault();
if (!selectedFile) return;
setFileUploadLoading(true);
setUploadStatus("");
setFileUploadLoading(true);
setUploadStatus("");
try {
const formData = new FormData();
formData.append("file", selectedFile);
try {
const formData = new FormData();
formData.append("file", selectedFile);
const response = await fetch("/api/router/upload_ingest", {
method: "POST",
body: formData,
});
const response = await fetch("/api/router/upload_ingest", {
method: "POST",
body: formData,
});
const result = await response.json();
const result = await response.json();
if (response.ok) {
setUploadStatus(`File uploaded successfully! ID: ${result.id}`);
setSelectedFile(null);
// Reset the file input
const fileInput = document.getElementById(
"file-input",
) as HTMLInputElement;
if (fileInput) fileInput.value = "";
} else {
setUploadStatus(`Error: ${result.error || "Upload failed"}`);
}
} catch (error) {
setUploadStatus(
`Error: ${error instanceof Error ? error.message : "Upload failed"}`,
);
} finally {
setFileUploadLoading(false);
}
};
if (response.ok) {
setUploadStatus(`File uploaded successfully! ID: ${result.id}`);
setSelectedFile(null);
// Reset the file input
const fileInput = document.getElementById(
"file-input",
) as HTMLInputElement;
if (fileInput) fileInput.value = "";
} else {
setUploadStatus(`Error: ${result.error || "Upload failed"}`);
}
} catch (error) {
setUploadStatus(
`Error: ${error instanceof Error ? error.message : "Upload failed"}`,
);
} finally {
setFileUploadLoading(false);
}
};
const handleBucketUpload = async (e: React.FormEvent) => {
e.preventDefault();
if (!bucketUrl.trim()) return;
const handleBucketUpload = async (e: React.FormEvent) => {
e.preventDefault();
if (!bucketUrl.trim()) return;
setBucketUploadLoading(true);
setUploadStatus("");
setBucketUploadLoading(true);
setUploadStatus("");
try {
const response = await fetch("/api/upload_bucket", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ s3_url: bucketUrl }),
});
try {
const response = await fetch("/api/upload_bucket", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ s3_url: bucketUrl }),
});
const result = await response.json();
const result = await response.json();
if (response.status === 201) {
const taskId = result.task_id || result.id;
const totalFiles = result.total_files || 0;
if (response.status === 201) {
const taskId = result.task_id || result.id;
const totalFiles = result.total_files || 0;
if (!taskId) {
throw new Error("No task ID received from server");
}
if (!taskId) {
throw new Error("No task ID received from server");
}
addTask(taskId);
setUploadStatus(
`🔄 Processing started for ${totalFiles} files. Check the task notification panel for real-time progress. (Task ID: ${taskId})`,
);
setBucketUrl("");
} else {
setUploadStatus(`Error: ${result.error || "Bucket processing failed"}`);
}
} catch (error) {
setUploadStatus(
`Error: ${error instanceof Error ? error.message : "Bucket processing failed"}`,
);
} finally {
setBucketUploadLoading(false);
}
};
addTask(taskId);
setUploadStatus(
`🔄 Processing started for ${totalFiles} files. Check the task notification panel for real-time progress. (Task ID: ${taskId})`,
);
setBucketUrl("");
} else {
setUploadStatus(`Error: ${result.error || "Bucket processing failed"}`);
}
} catch (error) {
setUploadStatus(
`Error: ${error instanceof Error ? error.message : "Bucket processing failed"}`,
);
} finally {
setBucketUploadLoading(false);
}
};
const handlePathUpload = async (e: React.FormEvent) => {
e.preventDefault();
if (!folderPath.trim()) return;
const handlePathUpload = async (e: React.FormEvent) => {
e.preventDefault();
if (!folderPath.trim()) return;
setPathUploadLoading(true);
setUploadStatus("");
setPathUploadLoading(true);
setUploadStatus("");
try {
const response = await fetch("/api/upload_path", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ path: folderPath }),
});
try {
const response = await fetch("/api/upload_path", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ path: folderPath }),
});
const result = await response.json();
const result = await response.json();
if (response.status === 201) {
// New flow: Got task ID, use centralized tracking
const taskId = result.task_id || result.id;
const totalFiles = result.total_files || 0;
if (response.status === 201) {
// New flow: Got task ID, use centralized tracking
const taskId = result.task_id || result.id;
const totalFiles = result.total_files || 0;
if (!taskId) {
throw new Error("No task ID received from server");
}
if (!taskId) {
throw new Error("No task ID received from server");
}
// Add task to centralized tracking
addTask(taskId);
// Add task to centralized tracking
addTask(taskId);
setUploadStatus(
`🔄 Processing started for ${totalFiles} files. Check the task notification panel for real-time progress. (Task ID: ${taskId})`,
);
setFolderPath("");
setPathUploadLoading(false);
} else if (response.ok) {
// Original flow: Direct response with results
const successful =
result.results?.filter(
(r: { status: string }) => r.status === "indexed",
).length || 0;
const total = result.results?.length || 0;
setUploadStatus(
`Path processed successfully! ${successful}/${total} files indexed.`,
);
setFolderPath("");
setPathUploadLoading(false);
} else {
setUploadStatus(`Error: ${result.error || "Path upload failed"}`);
setPathUploadLoading(false);
}
} catch (error) {
setUploadStatus(
`Error: ${error instanceof Error ? error.message : "Path upload failed"}`,
);
setPathUploadLoading(false);
}
};
setUploadStatus(
`🔄 Processing started for ${totalFiles} files. Check the task notification panel for real-time progress. (Task ID: ${taskId})`,
);
setFolderPath("");
setPathUploadLoading(false);
} else if (response.ok) {
// Original flow: Direct response with results
const successful =
result.results?.filter(
(r: { status: string }) => r.status === "indexed",
).length || 0;
const total = result.results?.length || 0;
setUploadStatus(
`Path processed successfully! ${successful}/${total} files indexed.`,
);
setFolderPath("");
setPathUploadLoading(false);
} else {
setUploadStatus(`Error: ${result.error || "Path upload failed"}`);
setPathUploadLoading(false);
}
} catch (error) {
setUploadStatus(
`Error: ${error instanceof Error ? error.message : "Path upload failed"}`,
);
setPathUploadLoading(false);
}
};
// Remove the old pollPathTaskStatus function since we're using centralized system
// Remove the old pollPathTaskStatus function since we're using centralized system
return (
<div className="space-y-8">
<div>
<h1 className="text-3xl font-bold">Ingest</h1>
<p className="text-muted-foreground">
Upload and manage documents in your database
</p>
</div>
return (
<div className="space-y-8">
<div>
<h1 className="text-3xl font-bold">Ingest</h1>
<p className="text-muted-foreground">
Upload and manage documents in your database
</p>
</div>
{uploadStatus && (
<Card
className={
uploadStatus.includes("Error")
? "border-destructive"
: "border-green-500"
}
>
<CardContent className="pt-6">
<p
className={
uploadStatus.includes("Error")
? "text-destructive"
: "text-green-600"
}
>
{uploadStatus}
</p>
</CardContent>
</Card>
)}
{uploadStatus && (
<Card
className={
uploadStatus.includes("Error")
? "border-destructive"
: "border-green-500"
}
>
<CardContent className="pt-6">
<p
className={
uploadStatus.includes("Error")
? "text-destructive"
: "text-green-600"
}
>
{uploadStatus}
</p>
</CardContent>
</Card>
)}
<div className="grid gap-6 md:grid-cols-3">
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Upload className="h-5 w-5" />
Upload File
</CardTitle>
<CardDescription>
Upload a single document to be indexed and searchable
</CardDescription>
</CardHeader>
<CardContent>
<form onSubmit={handleFileUpload} className="space-y-4">
<div className="space-y-2">
<Label htmlFor="file-input">Select File</Label>
<Input
id="file-input"
type="file"
onChange={(e) => setSelectedFile(e.target.files?.[0] || null)}
accept=".pdf,.doc,.docx,.txt,.md"
className="cursor-pointer"
/>
</div>
<Button
type="submit"
disabled={!selectedFile || fileUploadLoading}
className="w-full"
>
{fileUploadLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
Uploading...
</>
) : (
<>
<Upload className="mr-2 h-4 w-4" />
Upload File
</>
)}
</Button>
</form>
</CardContent>
</Card>
<div className="grid gap-6 md:grid-cols-3">
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Upload className="h-5 w-5" />
Upload File
</CardTitle>
<CardDescription>
Upload a single document to be indexed and searchable
</CardDescription>
</CardHeader>
<CardContent>
<form onSubmit={handleFileUpload} className="space-y-4">
<div className="space-y-2">
<Label htmlFor="file-input">Select File</Label>
<Input
id="file-input"
type="file"
onChange={(e) => setSelectedFile(e.target.files?.[0] || null)}
accept=".pdf,.doc,.docx,.txt,.md"
className="cursor-pointer"
/>
</div>
<Button
type="submit"
disabled={!selectedFile || fileUploadLoading}
className="w-full"
>
{fileUploadLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
Uploading...
</>
) : (
<>
<Upload className="mr-2 h-4 w-4" />
Upload File
</>
)}
</Button>
</form>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<FolderOpen className="h-5 w-5" />
Upload Folder
</CardTitle>
<CardDescription>
Process all documents in a folder path on the server
</CardDescription>
</CardHeader>
<CardContent>
<form onSubmit={handlePathUpload} className="space-y-4">
<div className="space-y-2">
<Label htmlFor="folder-path">Folder Path</Label>
<Input
id="folder-path"
type="text"
placeholder="/path/to/documents"
value={folderPath}
onChange={(e) => setFolderPath(e.target.value)}
/>
</div>
<Button
type="submit"
disabled={!folderPath.trim() || pathUploadLoading}
className="w-full"
>
{pathUploadLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
Processing...
</>
) : (
<>
<FolderOpen className="mr-2 h-4 w-4" />
Process Folder
</>
)}
</Button>
</form>
</CardContent>
</Card>
{awsEnabled && (
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Cloud className="h-5 w-5" />
Process Bucket
</CardTitle>
<CardDescription>
Process all documents from an S3 bucket. AWS credentials must be
set as environment variables.
</CardDescription>
</CardHeader>
<CardContent>
<form onSubmit={handleBucketUpload} className="space-y-4">
<div className="space-y-2">
<Label htmlFor="bucket-url">S3 URL</Label>
<Input
id="bucket-url"
type="text"
placeholder="s3://bucket/path"
value={bucketUrl}
onChange={(e) => setBucketUrl(e.target.value)}
/>
</div>
<Button
type="submit"
disabled={!bucketUrl.trim() || bucketUploadLoading}
className="w-full"
>
{bucketUploadLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
Processing...
</>
) : (
<>
<Cloud className="mr-2 h-4 w-4" />
Process Bucket
</>
)}
</Button>
</form>
</CardContent>
</Card>
)}
</div>
</div>
);
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<FolderOpen className="h-5 w-5" />
Upload Folder
</CardTitle>
<CardDescription>
Process all documents in a folder path on the server
</CardDescription>
</CardHeader>
<CardContent>
<form onSubmit={handlePathUpload} className="space-y-4">
<div className="space-y-2">
<Label htmlFor="folder-path">Folder Path</Label>
<Input
id="folder-path"
type="text"
placeholder="/path/to/documents"
value={folderPath}
onChange={(e) => setFolderPath(e.target.value)}
/>
</div>
<Button
type="submit"
disabled={!folderPath.trim() || pathUploadLoading}
className="w-full"
>
{pathUploadLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
Processing...
</>
) : (
<>
<FolderOpen className="mr-2 h-4 w-4" />
Process Folder
</>
)}
</Button>
</form>
</CardContent>
</Card>
{awsEnabled && (
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Cloud className="h-5 w-5" />
Process Bucket
</CardTitle>
<CardDescription>
Process all documents from an S3 bucket. AWS credentials must be
set as environment variables.
</CardDescription>
</CardHeader>
<CardContent>
<form onSubmit={handleBucketUpload} className="space-y-4">
<div className="space-y-2">
<Label htmlFor="bucket-url">S3 URL</Label>
<Input
id="bucket-url"
type="text"
placeholder="s3://bucket/path"
value={bucketUrl}
onChange={(e) => setBucketUrl(e.target.value)}
/>
</div>
<Button
type="submit"
disabled={!bucketUrl.trim() || bucketUploadLoading}
className="w-full"
>
{bucketUploadLoading ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
Processing...
</>
) : (
<>
<Cloud className="mr-2 h-4 w-4" />
Process Bucket
</>
)}
</Button>
</form>
</CardContent>
</Card>
)}
</div>
</div>
);
}
export default function ProtectedAdminPage() {
return (
<ProtectedRoute>
<AdminPage />
</ProtectedRoute>
);
return (
<ProtectedRoute>
<AdminPage />
</ProtectedRoute>
);
}

View file

@ -0,0 +1,57 @@
import {
type UseMutationOptions,
useMutation,
useQueryClient,
} from "@tanstack/react-query";
export interface CreateApiKeyRequest {
name: string;
}
export interface CreateApiKeyResponse {
key_id: string;
api_key: string;
name: string;
key_prefix: string;
created_at: string;
}
export const useCreateApiKeyMutation = (
options?: Omit<
UseMutationOptions<CreateApiKeyResponse, Error, CreateApiKeyRequest>,
"mutationFn"
>,
) => {
const queryClient = useQueryClient();
async function createApiKey(
variables: CreateApiKeyRequest,
): Promise<CreateApiKeyResponse> {
const response = await fetch("/api/keys", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(variables),
});
if (!response.ok) {
const errorData = await response.json().catch(() => ({}));
throw new Error(errorData.error || "Failed to create API key");
}
return response.json();
}
return useMutation({
mutationFn: createApiKey,
onSuccess: (...args) => {
queryClient.invalidateQueries({
queryKey: ["api-keys"],
});
options?.onSuccess?.(...args);
},
onError: options?.onError,
onSettled: options?.onSettled,
});
};

View file

@ -3,6 +3,7 @@ import {
useMutation,
useQueryClient,
} from "@tanstack/react-query";
import { ONBOARDING_OPENRAG_DOCS_FILTER_ID_KEY } from "@/lib/constants";
export interface OnboardingVariables {
// Provider selection
@ -28,6 +29,7 @@ export interface OnboardingVariables {
interface OnboardingResponse {
message: string;
edited: boolean;
openrag_docs_filter_id?: string;
}
export const useOnboardingMutation = (
@ -59,6 +61,15 @@ export const useOnboardingMutation = (
return useMutation({
mutationFn: submitOnboarding,
onSuccess: (data) => {
// Store OpenRAG Docs filter ID if returned
if (data.openrag_docs_filter_id && typeof window !== "undefined") {
localStorage.setItem(
ONBOARDING_OPENRAG_DOCS_FILTER_ID_KEY,
data.openrag_docs_filter_id
);
}
},
onSettled: () => {
// Invalidate settings query to refetch updated data
queryClient.invalidateQueries({ queryKey: ["settings"] });

View file

@ -0,0 +1,44 @@
import {
type UseMutationOptions,
useMutation,
useQueryClient,
} from "@tanstack/react-query";
interface OnboardingRollbackResponse {
message: string;
}
export const useOnboardingRollbackMutation = (
options?: Omit<
UseMutationOptions<OnboardingRollbackResponse, Error, void>,
"mutationFn"
>,
) => {
const queryClient = useQueryClient();
async function rollbackOnboarding(): Promise<OnboardingRollbackResponse> {
const response = await fetch("/api/onboarding/rollback", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || "Failed to rollback onboarding");
}
return response.json();
}
return useMutation({
mutationFn: rollbackOnboarding,
onSettled: () => {
// Invalidate settings query to refetch updated data
queryClient.invalidateQueries({ queryKey: ["settings"] });
},
...options,
});
};

View file

@ -0,0 +1,49 @@
import {
type UseMutationOptions,
useMutation,
useQueryClient,
} from "@tanstack/react-query";
export interface RevokeApiKeyRequest {
key_id: string;
}
export interface RevokeApiKeyResponse {
success: boolean;
}
export const useRevokeApiKeyMutation = (
options?: Omit<
UseMutationOptions<RevokeApiKeyResponse, Error, RevokeApiKeyRequest>,
"mutationFn"
>,
) => {
const queryClient = useQueryClient();
async function revokeApiKey(
variables: RevokeApiKeyRequest,
): Promise<RevokeApiKeyResponse> {
const response = await fetch(`/api/keys/${variables.key_id}`, {
method: "DELETE",
});
if (!response.ok) {
const errorData = await response.json().catch(() => ({}));
throw new Error(errorData.error || "Failed to revoke API key");
}
return response.json();
}
return useMutation({
mutationFn: revokeApiKey,
onSuccess: (...args) => {
queryClient.invalidateQueries({
queryKey: ["api-keys"],
});
options?.onSuccess?.(...args);
},
onError: options?.onError,
onSettled: options?.onSettled,
});
};

View file

@ -60,9 +60,9 @@ export const useDoclingHealthQuery = (
// If healthy, check every 30 seconds; otherwise check every 3 seconds
return query.state.data?.status === "healthy" ? 30000 : 3000;
},
refetchOnWindowFocus: true,
refetchOnWindowFocus: false, // Disabled to reduce unnecessary calls on tab switches
refetchOnMount: true,
staleTime: 30000, // Consider data stale after 25 seconds
staleTime: 30000, // Consider data fresh for 30 seconds
...options,
},
queryClient,

View file

@ -0,0 +1,36 @@
import {
type UseQueryOptions,
useQuery,
useQueryClient,
} from "@tanstack/react-query";
import type { KnowledgeFilter } from "./useGetFiltersSearchQuery";
export const useGetAllFiltersQuery = (
options?: Omit<UseQueryOptions<KnowledgeFilter[]>, "queryKey" | "queryFn">,
) => {
const queryClient = useQueryClient();
async function getAllFilters(): Promise<KnowledgeFilter[]> {
const response = await fetch("/api/knowledge-filter/search", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query: "", limit: 1000 }), // Fetch all filters
});
const json = await response.json();
if (!response.ok || !json.success) {
// ensure we always return a KnowledgeFilter[] to satisfy the return type
return [];
}
return (json.filters || []) as KnowledgeFilter[];
}
return useQuery<KnowledgeFilter[]>(
{
queryKey: ["knowledge-filters", "all"],
queryFn: getAllFilters,
...options,
},
queryClient,
);
};

View file

@ -0,0 +1,31 @@
import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
export interface ApiKey {
key_id: string;
name: string;
key_prefix: string;
created_at: string;
last_used_at: string | null;
}
export interface GetApiKeysResponse {
keys: ApiKey[];
}
export const useGetApiKeysQuery = (
options?: Omit<UseQueryOptions<GetApiKeysResponse>, "queryKey" | "queryFn">,
) => {
async function getApiKeys(): Promise<GetApiKeysResponse> {
const response = await fetch("/api/keys");
if (response.ok) {
return await response.json();
}
throw new Error("Failed to fetch API keys");
}
return useQuery({
queryKey: ["api-keys"],
queryFn: getApiKeys,
...options,
});
};

View file

@ -4,6 +4,7 @@ import {
useQueryClient,
} from "@tanstack/react-query";
import type { EndpointType } from "@/contexts/chat-context";
import { useChat } from "@/contexts/chat-context";
export interface RawConversation {
response_id: string;
@ -50,14 +51,17 @@ export const useGetConversationsQuery = (
options?: Omit<UseQueryOptions, "queryKey" | "queryFn">,
) => {
const queryClient = useQueryClient();
const { isOnboardingComplete } = useChat();
async function getConversations(): Promise<ChatConversation[]> {
async function getConversations(context: { signal?: AbortSignal }): Promise<ChatConversation[]> {
try {
// Fetch from the selected endpoint only
const apiEndpoint =
endpoint === "chat" ? "/api/chat/history" : "/api/langflow/history";
const response = await fetch(apiEndpoint);
const response = await fetch(apiEndpoint, {
signal: context.signal,
});
if (!response.ok) {
console.error(`Failed to fetch conversations: ${response.status}`);
@ -84,19 +88,32 @@ export const useGetConversationsQuery = (
return conversations;
} catch (error) {
// Ignore abort errors - these are expected when requests are cancelled
if (error instanceof Error && error.name === 'AbortError') {
return [];
}
console.error(`Failed to fetch ${endpoint} conversations:`, error);
return [];
}
}
// Extract enabled from options and combine with onboarding completion check
// Query is only enabled if onboarding is complete AND the caller's enabled condition is met
const callerEnabled = options?.enabled ?? true;
const enabled = isOnboardingComplete && callerEnabled;
const queryResult = useQuery(
{
queryKey: ["conversations", endpoint, refreshTrigger],
placeholderData: (prev) => prev,
queryFn: getConversations,
staleTime: 0, // Always consider data stale to ensure fresh data on trigger changes
staleTime: 5000, // Consider data fresh for 5 seconds to prevent excessive refetching
gcTime: 5 * 60 * 1000, // Keep in cache for 5 minutes
networkMode: 'always', // Ensure requests can be cancelled
refetchOnMount: false, // Don't refetch on every mount
refetchOnWindowFocus: false, // Don't refetch when window regains focus
...options,
enabled, // Override enabled after spreading options to ensure onboarding check is applied
},
queryClient,
);

View file

@ -0,0 +1,21 @@
import type { KnowledgeFilter } from "./useGetFiltersSearchQuery";
export async function getFilterById(
filterId: string
): Promise<KnowledgeFilter | null> {
try {
const response = await fetch(`/api/knowledge-filter/${filterId}`, {
method: "GET",
headers: { "Content-Type": "application/json" },
});
const json = await response.json();
if (!response.ok || !json.success) {
return null;
}
return json.filter as KnowledgeFilter;
} catch (error) {
console.error("Failed to fetch filter by ID:", error);
return null;
}
}

Some files were not shown because too many files have changed in this diff Show more