The in-browser backend runs entirely in your browser using transformers.js and the browser’s private file storage (OPFS). Documents are indexed locally — nothing leaves your device for the knowledge base step.Best for: a few dozen to a few hundred documents. No install, no server, no external dependencies. Works offline after the initial model download.Create a library
Open the knowledge base panel
Open Knowledge Base from the Manage section of the sidebar.
Choose In-browser
Select On this device and click Create new library.
Pick an embedding model
A dialog shows four models side by side. getbased benchmarks your device on first load and pre-selects the strongest model that runs smoothly on your hardware.| Model | Size | Notes |
|---|
| MiniLM | 22 MB | Fast, good general retrieval |
| BGE-small-en | 33 MB | Better English retrieval |
| Multilingual-E5 | 40 MB | 100+ languages |
| BGE-base-en | 110 MB | Highest English quality |
The model is locked at library creation — switching later would require re-indexing all documents, so the choice is made upfront. Libraries created before v1.21.4 continue to use MiniLM with no forced migration. Add documents
Drop your files into the panel. Supported formats: PDF, DOCX (Word), Markdown, plain text, and ZIP archives containing any of the above.
Wait for indexing
A progress pill appears in the bottom-right corner. You can close the panel and keep using the app — indexing runs in the background. Click Cancel on the pill to stop at the next excerpt; anything already indexed stays in the library.
Large batches (several hundred files) can take 10+ minutes on the in-browser engine. If that is your workflow, consider the external server backend below.
Switch between libraries
Open the knowledge base panel and click any library name in the list to activate it. Only one library is active at a time. The active library name appears as a badge in the chat header whenever it is being used.Query rewriting (recall booster)
When an AI provider is configured, the knowledge base can rephrase each question into three variants before searching, then merge the results. This closes the vocabulary gap between how you write your notes and how you ask questions later — a search for “Black Seed Oil” will also find notes titled “Nigella Sativa”.Toggle “Improve recall with query rewriting” in the knowledge base panel (default: on). Each rewrite uses roughly 100 tokens from your configured provider. Repeat questions in the same session use cached rewrites. The external server backend connects to a knowledge server you run — useful for larger document libraries, shared libraries, or faster GPU retrieval that a browser cannot match.Install the agent stack
The getbased-agent-stack bundles the RAG server, a browser management dashboard, and the MCP adapter. One command installs and starts everything on Linux:curl -sSL https://getbased.health/install.sh | bash
The script auto-detects uv or pipx, pulls getbased-agent-stack[full], and starts the RAG server on port 8322 and the management dashboard on port 8323 as systemd user services.Auto-start requires systemd. On macOS, Windows, and WSL1, the install succeeds but services must be started manually — see the manual install tab below.
Review before running
# Read the script before piping to bash
curl -sSL https://getbased.health/install.sh | less
# Or download and verify the hash
curl -sSL https://getbased.health/install.sh -o install.sh
curl -sSL https://getbased.health/install.sh.sha256 | sha256sum -c
bash install.sh
Manual install (macOS, Windows, WSL1)
# With pipx
pipx install --include-deps "getbased-agent-stack[full]"
# Or with uv
uv tool install \
--with-executables-from getbased-rag \
--with-executables-from getbased-dashboard \
--with-executables-from getbased-mcp \
"getbased-agent-stack[full]"
# One-shot configuration
getbased-stack init --yes
# Start services manually in two terminals
lens serve # RAG engine → http://127.0.0.1:8322
getbased-dashboard serve # Management → http://127.0.0.1:8323
Set up a library
Open the management dashboard
The installer prints a one-click login URL at the end. Click it to authenticate automatically. If you need it again, run getbased-dashboard login-url.
Create a library
In the dashboard, go to the Knowledge tab, create a library, and drop your files in. Wait for indexing to complete.
Copy the API key
Go to MCP → Environment and copy the LENS_API_KEY.
Connect in getbased
In the app, open the knowledge base panel and select External server. Toggle Enable Knowledge Source, enter a display name, paste the API key, and leave the endpoint URL as http://127.0.0.1:8322/query for a local install.
Save and test
Click Save + connect. getbased runs a test query to confirm the connection. If it succeeds, a badge appears in the chat header.
Developer endpoint contract
Developers implementing their own compatible server should use the Lens endpoint contract. Normal users do not need the HTTP request and response details.