Skip to content
Guide

Setting up LM Studio

Run free models on your own computer from a desktop app, with no key.

On this page

LM Studio is a desktop app for finding, downloading and running AI models on your own computer. Aldwin connects to its local server. This guide covers installing LM Studio, starting the server, and connecting Aldwin.

What LM Studio is#

LM Studio gives you a window to browse and download open models, and a local server that speaks the OpenAI format at http://localhost:1234/v1. Your prompts and files stay on your machine.

If you prefer a command line with no window, see Ollama instead. Both work the same way in Aldwin.

What you need#

  • A Mac with Apple Silicon and macOS 14 or later, or Linux (see system requirements)
  • At least 8 GB of memory (16 GB or more is better)
  • Aldwin installed (uv tool install aldwin)

Install LM Studio and get a model#

  1. Download LM Studio from lmstudio.ai/download and open it.
  2. Use the search in LM Studio to download a model. For Aldwin, pick one with a hammer badge: that means it calls tools natively. Qwen2.5 Instruct and Llama 3.1 Instruct are good small choices.

LM Studio also has a command line, lms, which is installed with the app. Run the app once first, then lms get <model name> downloads a model and lms ls lists what you have.

Start the server#

Aldwin talks to LM Studio's local server, which is off until you start it.

  • In the app: open the Developer tab and turn on Start server.
  • From a terminal: run lms server start.

Check that it answers:

curl http://localhost:1234/v1/models

LM Studio loads a model the first time Aldwin asks for it, so you don't need to load one by hand. To load one ahead of time with a set context size, run lms load <model> --context-length=32768.

Connect Aldwin#

In the web app#

  1. Make sure LM Studio is running with a model downloaded.
  2. Run aldwin web.
  3. If this is your first time, pick Free, on this computer on the Connect a model page, then Look for local models. Choose a model and select Use this model.
  4. Later, open Settings and choose Models. LM Studio shows under On this computer. Pick one of its models under Model in use, or from the message box in any chat.

In the terminal#

  1. With the server running, start Aldwin with aldwin.
  2. On first launch, Aldwin shows Looking for local models… and lists what LM Studio has. Pick a model and you're done.
  3. Later, type /model. LM Studio appears under Available providers with its model count. Pick it, then pick a model.
  4. You see ✓ Switched to <model> (LM Studio, local).

Each model shows ✓ tools or ✗ chat only where LM Studio reports it, and its context size.

If LM Studio's server uses another port, tell Aldwin in ~/.aldwin/config.yaml:

providers:
  lmstudio:
    base_url: http://localhost:5678/v1

Try it#

aldwin

Ask something that uses a tool:

List the files in this folder.

You should see a list_dir step and then the answer. The first answer can take longer while LM Studio loads the model.

Privacy notes#

  • Prompts, files Aldwin reads, and answers stay on your computer.
  • LM Studio connects to the internet to search for and download models.
  • Details: Privacy.

Troubleshooting#

What Aldwin saysFix
LM Studio (not running) in /modelStart the server: Developer tab, Start server, or lms server start.
LM Studio is not running at http://localhost:1234.Same: start the server, and check the port in LM Studio's server settings.
No models found for LM Studio.Download a model in LM Studio first.
LM Studio isn't running. Start it and try again.The server stopped during the chat. Start it again and resend your message.
The model ... isn't installed in LM Studio. ...The model was deleted in LM Studio. Download it again, or pick another with /model.
Warning: ... does not support tools. ...Pick a model with the hammer badge, marked ✓ tools in Aldwin.
The model answers but never uses toolsModels without native tool support sometimes reply in text instead. Pick a model with the hammer badge.
Long chats stop workingThe model's context is too small. Load it with a bigger --context-length, or type /new.
Was this page helpful?