Creating an AI Server for LM Studio models
This guide describes how to register a running LM Studio instance as an AI Server in AI Knowledge Fabric, so its models become selectable for Topics, GraphRAG Topics, and Agent Pipelines.
Prerequisite: LM Studio is installed, the models are downloaded, and the local server is running with Serve on Local Network enabled. If that is not yet the case, work through Getting started local model first.
1. Background: Managed vs. External
Every AI Server has a type that determines whether the platform controls its container:
| Server Type | Meaning |
|---|---|
Managed (deployed by this app) |
The platform generates a Compose file and starts/stops an Ollama container itself. Locked to the Ollama provider — this is the only provider it knows how to deploy. |
External (existing instance) |
The platform only talks to an already-running endpoint. Start/Stop do nothing; only reachability is checked. |
LM Studio is always registered as External. The platform cannot start or stop LM Studio — you control that on your desktop.
2. Create the AI Server
Navigate to Admin → AI Servers and click Add AI Server.
Fill in the form
| Field | Value | Notes |
|---|---|---|
Server Type |
|
Required — Managed would lock the provider to Ollama |
Provider |
|
LM Studio speaks the same language (protocol) as the OpenAI API |
Name |
e.g. |
Must be unique. Letters and |
Host |
see the table below |
Must be reachable from inside the Topic containers |
Port |
|
LM Studio’s default server port |
Use TLS (HTTPS) |
off |
LM Studio serves plain HTTP. Turn it on only for a server reached over |
Default Model ID |
|
Pre-fills the model picker in the Topic wizard; the user can still choose another model |
Leave API Key and Management API Key Env Var empty. LM Studio needs no key by default. If you protected your server with a key, enter it as API Key.
Choosing the Host value
This is the field that most often goes wrong. The value must be reachable from the Topic container, not from your browser:
| Your setup | Host value |
|---|---|
Management app in Docker (Docker Desktop or Linux), LM Studio on the same machine |
|
Management app started directly from the IDE / JAR, on the same machine as LM Studio |
|
LM Studio on a different machine in the network |
That machine’s IP or hostname, e.g. |
Management app in Kubernetes |
An address of the LM Studio machine that the pods can reach — never |
|
A pasted address is fine. If you paste a full address such as |
Click Save.
3. Verify the connection
The server detail page has three tabs:
| Tab | Contents |
|---|---|
Configuration |
The values you entered — editable |
Models |
The models LM Studio reports |
Actions |
Reachability check and deletion. Start/Stop do nothing for an external server |
Open the Models tab. Both models should be listed:
-
qwen2.5-coder-7b-instruct -
text-embedding-nomic-embed-text-v1.5
If the list is empty, the endpoint is not reachable — see Troubleshooting.
|
Pull New Model is only offered for Ollama servers. LM Studio models are downloaded in LM Studio itself, not from this UI. |
4. Use the server
Once the server is saved and reachable, its models appear in every model picker:
| Where | What to select |
|---|---|
Topic wizard, model step |
Chat model: |
Topic detail → Configuration |
Per-topic override of the chat/embedding model |
Pipeline Designer, AGENT node |
Pick |
Notes for local inference:
-
Set a timeout that suits local hardware. A 7B model on CPU is far slower than a cloud API — 5 minutes or more is realistic. Never leave the timeout empty.
-
Keep the embedding model stable. Changing it invalidates all existing vectors in a Topic and the documents have to be ingested again.
-
The same server can be used simultaneously by several Topics and Agents. LM Studio processes the requests sequentially, so parallel load increases response times noticeably.
5. Troubleshooting
| Symptom | Cause and fix |
|---|---|
Models tab is empty, server shown as unreachable |
LM Studio server not running, or Serve on Local Network disabled. LM Studio binds to |
"Cannot resolve hostname" |
Wrong Host value — see Choosing the Host value |
"Connection refused" |
Host resolves but nothing is listening on port 1234. Check LM Studio’s port setting |
Model list shows only one model |
The other model is not loaded in LM Studio and Just-In-Time loading is disabled |
Chat works, document upload fails |
Wrong model selected as the embedding model, or the embedding model is not loaded |
A name is rejected |
An AI server with that name already exists, or the name contains unsupported characters |
Related
-
AI Servers — all providers and every field of the form
-
AI Servers — all providers and every field of the form
-
Getting started local model — installing LM Studio and loading the models
-
Creating an AI Server for Claude — the same procedure for a cloud provider