Skip to content

Fully Local LM Studio Agent (No Cloud)

This playbook builds an agent that runs entirely on a local LM Studio provider through the Pi SDK runtime, with lite-tier (FTS-only) memory and no outbound network. No cloud API keys, no outbound calls, no second local tool required. An optional upgrade to journal-tier semantic recall — using LM Studio’s own embeddings endpoint, still no second tool — is documented at the end.

A privacy-focused user who prefers LM Studio’s GUI-driven local server over Ollama’s CLI daemon and wants the whole stack — chat model and recall — to stay on their own machine.

An agent that runs entirely on a local LM Studio provider via the Pi SDK runtime, with lite-tier memory and no outbound network.

Every key below is verified against the config blueprint. The providers map registers LM Studio; runtime.model references it as lmstudio:qwen3.6-32b. type: "lmstudio" defaults to baseUrl: "http://localhost:1234" when omitted — LM Studio’s default local-server port — shown explicitly here for clarity.

{
"runtime": {
"model": "lmstudio:qwen3.6-32b"
},
"providers": {
"lmstudio": {
"type": "lmstudio",
"baseUrl": "http://localhost:1234",
"enabled": true
}
},
"memory": {
"mode": "lite",
"path": "./.mono-agent/memory",
"writeMode": "append-host-summary"
},
"webhook": {
"enabled": true
}
}
  1. Open LM Studio, load a model, and start the local server from the Developer tab (default port 1234).
  2. Scaffold the agent: mono-agent init --model lmstudio:<your-model-id> --memory lite — a lmstudio:* model auto-adds the LM Studio provider block. (There is no LM Studio preset; the local-private preset is Ollama-based.)
  3. If your loaded model’s id differs from qwen3.6-32b, update runtime.model to match exactly what LM Studio reports for the loaded model.
  4. Run mono-agent validate to confirm LM Studio’s local server is reachable.
  5. Run mono-agent start — keep the webhook channel as the zero-credential smoke channel.
  6. curl the webhook endpoint and confirm a response generated by the local model.

LM Studio is a first-class embeddings provider. Journal-tier hybrid (BM25 + vector) recall uses the same local server’s /v1/embeddings endpoint and never sends an Ollama request or requires an OpenAI/dummy key. Add it deliberately after the base agent is working:

  1. In LM Studio, load an embedding model too (e.g. a Nomic Embed Text v1.5 GGUF) alongside your chat model — LM Studio serves both from the same local server concurrently.
  2. Rerun guided mono-agent init in a fresh folder and choose Journal → LM Studio, or add the equivalent explicit block and switch mode to journal:
    {
    "memory": {
    "mode": "journal",
    "path": "./.mono-agent/memory",
    "embeddings": {
    "provider": "lmstudio",
    "model": "text-embedding-nomic-embed-text-v1.5",
    "endpoint": "http://localhost:1234",
    "dim": 768
    }
    }
    }
  3. Keep apiKeyEnv absent for LM Studio’s default keyless server. If you enabled LM Studio authentication, add "apiKeyEnv": "LM_STUDIO_API_KEY" and populate that variable in the agent’s owner-only .env; a declared but missing value reports waiting and does not retry keyless.
  4. Run mono-agent memory rebuild --json for an existing Journal/BuJo root, then mono-agent validate. A provider/model/dimension change is a new managed index identity; never reuse or relabel old vectors.