@@ -207,7 +207,7 @@ A *Context* defines the full behaviour of Sophia for a given knowledge base: the
207207[cols="1,1,3", options="header"]
208208|===
209209| Field | Required | Description
210- | `_id` | ✓ | Context name (e.g. `restheart`, `cloud`). Used in `?context=` and `X-Sophia-Context` header.
210+ | `_id` | ✓ | Context name (e.g. `restheart`, `cloud`). Used in the web URL path and `X-Sophia-Context` MCP header.
211211| `template` | ✓ | System prompt. Must contain `<documents-placeholder>`, `<history-placeholder>`, `<userprompt>`.
212212| `options` | — | LLM and RAG parameters. Falls back to server defaults if omitted.
213213| `tags` | — | Tags automatically ANDed into every vector search — restricts the knowledge base.
@@ -250,3 +250,23 @@ echo '{"options": {"relevantsLimit": 8, "temperature": 0.2}}' | \
250250----
251251http -a admin:password DELETE :8080/contexts/restheart
252252----
253+
254+ === Selecting a Context in the Web Interface
255+
256+ The active context is encoded in the URL path of the Sophia web application:
257+
258+ [source]
259+ ----
260+ https://sophia.restheart.com/ → default context
261+ https://sophia.restheart.com/contexts/restheart → "restheart" context
262+ https://sophia.restheart.com/contexts/cloud → "cloud" context
263+ ----
264+
265+ Use these URLs when embedding Sophia in an iframe or linking directly to a specific knowledge base:
266+
267+ [source,html]
268+ ----
269+ <iframe src="https://sophia.restheart.com/contexts/restheart" ...></iframe>
270+ ----
271+
272+ For MCP clients, the context is selected via the `X-Sophia-Context` request header (see link:/docs/cloud/sophia/mcp[Sophia MCP Server]).
0 commit comments