Connect Your Lore Server
Not available on hosted StudioBrain today. Lore federation is not part of
the live SaaS. On app.studiobrain.ai the Lore storage option is hidden in the
web app (it is behind the build-time flag NEXT_PUBLIC_SB_ENABLE_LORE_STORAGE,
off by default), and the edge API answers the lore control-plane paths
(/api/tenant/lore-config*, /api/lore/*, /api/fileserver/*) with
501 RELAY_NOT_ON_EDGE. Hosted projects store content in StudioBrain Cloud
(per-project storage plus R2 object storage), always on.
The lore write path lives in crates/sb-enterprise, the future enterprise and
on-prem offering. It is not a shipped feature yet, so do not plan around it.
A lore repository is a version-controlled store (Epic Games’ lore, hostable with the open-source LoreGUI desktop app). The planned design lets StudioBrain write each entity change into your lore repo as a new revision, so edits can be branched, diffed, merged and reverted.
Design summary
| StudioBrain Cloud (current) | Lore federation (planned) | |
|---|---|---|
| Source of truth | Your project’s hosted storage | Revisions in your lore repository |
| History | Project change feed | Full lore revision history |
| Availability | All hosted plans | Not available on hosted SaaS |
Planned connection details, as modeled in the code:
- Relay URL in the form
lore://host:port/repo(lores://for TLS), with an explicit port. Relay hosts are checked against an allowlist (LORE_RELAY_HOST_ALLOWLIST, defaultrelay.studiobrain.ai). - Repository name and branch (default
main). - Consent grant. Write access would be granted through the StudioBrain accounts consent dialog. The product only ever receives an opaque grant reference, never a raw token.
- Desktop one-flow install. The desktop app (
clients/desktop) contains orchestration code to install, host and advertise a bundled lore server.
Control-plane contract
The wire types for these endpoints are defined in
packages/frontend-cloud/src/lib/lore-config.contract.ts:
GET/POST/PUT /api/tenant/lore-configPOST /api/tenant/lore-config/test-connectionGET /api/lore/statusPOST /api/tenant/lore/relay-advertise
None of these are served by the hosted API edge today (see the notice above).