You’ve downloaded LM Studio and grabbed a powerful local model like Qwen3.5-9B. Chatting with it in the app is great, but how do you actually use it in real-world workflows?
The magic lies in LM Studio’s Local Server. It is intentionally designed to act exactly like the official OpenAI API. But instead of sending your private data to the cloud and paying per token, all requests route to your own GPU.
Here are 5 awesome tools you can connect to your local AI server today.
Prerequisites: Start the Local Server
No matter what project you are building below, you always need the server running first:
- Open LM Studio and make sure you have loaded a model (like
qwen3.5-9b). - Click the ↔️ Developer tab on the left sidebar.
- Click the Start Server button at the top.
By default, the server will start running on port 1234.
1. Write Custom Python Scripts 🐍
Because the LM Studio server mimics OpenAI, any Python script built for ChatGPT will work with your local model. You just need to change one line of code.
We will use uv, a blazing fast Python package manager, to handle our virtual environment and dependencies cleanly.
- Initialize a new project: Open your terminal, navigate to where you want your project to live, and run:
1 2uv init my-ai-project cd my-ai-project - Add the OpenAI package: This command will create a virtual environment (
.venv), lock the dependencies, and install the official OpenAI library:1uv add openai
Step 2: Run the Python Code
Now open the hello.py file that uv created for you (or create your own like chat.py) and replace its contents with the following code.
The magic happens in the client initialization — we point the base_url directly to your local machine instead of OpenAI’s servers.
| |
Finally, run the script using uv:
| |
You will see Qwen’s response print directly to your terminal.
Just like that, you have a private AI API running entirely on your own GPU.
4. Get a ChatGPT-like Web Interface (Open WebUI) 🌐
While LM Studio has a great built-in chat, sometimes you want a dedicated, beautiful web interface that feels exactly like ChatGPT, complete with chat history, folders, and markdown support. Open WebUI is the community-standard frontend for this.
- Install Open WebUI: The easiest way is via Docker (
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main). - Open the App: Navigate to
http://localhost:3000in your browser. - Connect to LM Studio: Go to Settings → Connections. Under OpenAI API, add
http://host.docker.internal:1234/v1(if using Docker) orhttp://127.0.0.1:1234/v1as the base URL. Enterlm-studioas the API key.
Now your fully private LM Studio models are available in a gorgeous web interface that you can access from any device on your Wi-Fi network!
5. Build a Multi-Agent AI Team (CrewAI) 🤖👔
Why settle for one AI when you can have a whole team? CrewAI is a massively popular Python framework that lets you create role-playing AI agents (like a “Researcher”, “Writer”, and “Editor”) that work together to accomplish complex tasks.
Because CrewAI supports the OpenAI standard, hooking it up to LM Studio is trivial. You just need to set two environment variables in your terminal before running your CrewAI script:
Mac/Linux:
| |
Windows (PowerShell):
| |
Now, when your CrewAI agents “think” and talk to each other, they are actually communicating entirely through your local GPU via LM Studio!
2. Connect a Free AI Coding Assistant (Continue.dev) 💻
Why pay $20/month for GitHub Copilot when you can run an AI coding assistant locally? Continue.dev is an open-source extension for VS Code and JetBrains that connects directly to LM Studio.
- Install the Extension: Search for “Continue” in the VS Code extensions tab and install it.
- Open Settings: Click the gear icon in the Continue sidebar to open its
config.json. - Add LM Studio as a Provider: Add this block to your
modelsarray:
| |
Now you can highlight code in your editor, press Cmd/Ctrl + L, and ask your local LM Studio model to explain or refactor it!
3. Chat with Your Private PDF Documents (AnythingLLM) 📚
If you have sensitive company documents, tax returns, or personal medical files, you absolutely should not upload them to ChatGPT. Instead, use AnythingLLM to build a 100% offline document chatbot.
- Install AnythingLLM: Download the desktop app.
- Setup the LLM Provider: Go to Settings → LLM Provider.
- Select LM Studio: AnythingLLM has native support for LM Studio. Just select it from the dropdown, verify the URL is
http://127.0.0.1:1234, and pick your loaded model. - Upload and Chat: Create a workspace, drag and drop your PDFs into AnythingLLM, and start asking questions. The app will extract the text, send it to LM Studio, and give you an answer based only on your files.
Bonus: Build an Autonomous Agent with OpenClaw 🤖
If building scripts isn’t enough, you can give your local AI hands and feet using OpenClaw. It is an open-source autonomous agent that can execute tasks, read files, edit code, and browse the web directly on your computer.
Here is how to connect them:
- Locate your OpenClaw Config: Find your
openclaw.jsonconfiguration file (usually located in~/.openclaw/or your user directory). - Update the Configuration: Edit the file to point OpenClaw’s provider to your local server.
| |
- Verify the Connection: Run
openclaw doctorin your terminal.
Once configured, OpenClaw will route all its “thinking” through your local GPU, giving you a completely private, uncensored, and highly capable desktop assistant!
