Run a local coding agent with LM Studio + OpenPilot
说明与用途
LM Studio 简化了 OpenPilot 的本地模型配置,提供模型浏览、上下文调整和本地 OpenAI 兼容服务器,快速实现安全的编码辅助。
问题
Need a local coding agent that can edit files, run shell commands, and ask for approval before sensitive actions, without relying on external terminals or cloud models.
结果
LM Studio streamlines local model usage with OpenPilot, reducing setup steps, providing memory‑aware context management, and enabling quick, safe coding assistance.
工作流
- 1. In LM Studio’s model search, download a Qwen 3 model (e.g., Qwen 3 8B or 27B).
- 2. Load the model and increase the context length above the default to accommodate file contents and tool results.
- 3. Start the local server via the Developer tab or run
lms server start; note the base URL (default http://localhost:1234/v1). - 4. Install OpenPilot (Windows: .exe, macOS: .dmg, Linux: clone, npm install, npm start).
- 5. On first launch, connect the model in OpenPilot: set Name to the LM Studio model identifier, Base URL to http://localhost:1234/v1, and API key to a placeholder or LM Studio token if authentication is enabled.
- 6. Pick a folder (preferably git‑tracked) and issue a concrete task, e.g., “Look at package.json and add a Scripts section to README.md explaining each one.”
- 7. Review the file reads, edits, and shell commands presented as cards, approving or denying any sensitive actions.
证据
OpenPilot is a small open‑source desktop app I built because I wanted something Cursor‑style that would run on whatever model I picked, including local ones.
LM Studio does most of the work.
When you load the model, raise the context length above the default.
Open the Developer tab and switch on "Start server", or from a terminal: lms server start
- 记录日期: 2026-10-17T06:40:58.011Z