Quickstart
This guide brings up the full platform on one machine with Docker: the infrastructure, a local identity provider (Authentik), every backend service and Foundry UI. You then build a knowledge base from a website and a support agent that answers only from it.
Prerequisites
Section titled “Prerequisites”Docker. Nothing else is needed on the host: the services build and run in containers. The first start pulls images and downloads dependencies, so allow several minutes. Docker needs plenty of free disk space.
The two repositories as sibling folders, because the scripts find each other by path:
workspace/ ├── foundry-backend/ └── ai-workbench-frontend/LM Studio on the host if you want local models (no cloud account). See Local models with LM Studio.
On Windows, run the scripts from Git Bash. If a clone fails with “Filename too long”, run
git config --global core.longpaths true.
1. Start the stack
Section titled “1. Start the stack”From the folder that holds both repositories:
bash foundry-backend/scripts/dev/stack.sh upup starts MongoDB, PostgreSQL with pgvector, RabbitMQ, Azurite (a local Azure Blob emulator), Authentik, the crawler’s URL frontier and a small fixture website, then the backend services and Foundry UI. It waits until every service reports healthy and prints the URLs.
| URL | What |
|---|---|
http://localhost:8080 | Foundry UI. If the port is taken, stack.sh picks the next free one and prints it. |
http://localhost:8090 | API gateway: /api/<service>/v1/... reaches the service as /v1/.... |
http://localhost:9000 | Authentik, the local OpenID Connect provider. |
http://localhost:8099 | The fixture website used for crawling tests. |
Two other commands:
bash foundry-backend/scripts/dev/stack.sh status # what is running, and the URLs again
bash foundry-backend/scripts/dev/stack.sh down # stop and remove the containers; data volumes are kept2. Sign in
Section titled “2. Sign in”Open Foundry UI and sign in with the local account:
- user
dev lmfoundry-dev
stack.sh up also makes dev a member of the default subscription, so the UI opens it straight away. See Subscriptions and tenants.
3. Pick a model
Section titled “3. Pick a model”Without cloud model credentials, chat uses local models from LM Studio on port 1234. Load the chat and embedding models before you chat or index:
lms load google/gemma-4-e4b
lms load text-embedding-nomic-embed-text-v1.5Then choose Gemma in the model picker. Details and troubleshooting are in Local models with LM Studio.
4. Build a knowledge base from a website
Section titled “4. Build a knowledge base from a website”- In Foundry UI, create a knowledge base, open its upload dialog and choose Website as the source.
- Enter the start URL. For a first run, use the bundled fixture site:
http://fixture-site/. It is trusted on the local stack only, and it already serves its verification file. - Set the limits (pages, depth, include and exclude patterns) and start discovery.
- When discovery finishes, review the page list: untick pages you don’t want, then approve. The approved pages are indexed in the background.
For a real website you first prove that you own its domain. The full flow, limits and re-crawls are in Support agent from a website.
5. Create a grounded agent
Section titled “5. Create a grounded agent”- Choose Create from website (from the app gallery, or from the website source when it finishes).
- Pick the knowledge base, give the agent a name and the site name, and set a contact (text, URL or email) for questions the site doesn’t answer.
- Open the agent and ask a question the site answers: the reply cites its sources as
[n]links with a sources list. Ask something the site doesn’t cover: the agent says it couldn’t find the answer and points to your contact.
The agent uses strict grounding. See Agents and grounding.
Troubleshooting
Section titled “Troubleshooting”| Symptom | What to do |
|---|---|
| Chat fails with “No models loaded” | Load the model in LM Studio (lms load ...); just-in-time loading is off. |
A script fails with set: pipefail: invalid option | The script got Windows line endings. Check out the repository with LF endings, or run sed -i 's/\r$//' on it. |
| Docker Desktop stops | The disk is full; the Docker disk image can grow large. Free space and restart Docker. |
| Every call returns 404 for a signed-in user | The user isn’t a member of the subscription in the path. stack.sh up adds dev to default; other users must be added as members. |