How I Built a Fully Local AI Coding Agent with Qwen 3.8, LM Studio, and Pi (No Paid APIs)
Description and use
The author built a fully local AI coding agent using Qwen 3.8 27B, LM Studio, and Pi Coding Agent to generate, execute, and debug code entirely on a MacBook Pro.
Problem
Build a fully local AI coding agent that can read files, write code, execute commands, and fix errors without sending any requests to external APIs.
Outcome
The author successfully built a React + TypeScript Mission Control dashboard entirely locally, with the agent generating code, executing commands, testing, and fixing errors autonomously.
Workflow
- Install LM Studio and download the 4‑bit quantized Qwen 3.8 27B model
- Load the model in LM Studio and configure a 200,000‑token context length
- Enable LM Studio’s local OpenAI‑compatible API server (default port 1234)
- Install Pi Coding Agent from https://pi.dev/
- Install the pi‑lmstudio extension to discover LM Studio models
- Restart Pi and select the Qwen 3.8 27B model via /model
- Use Pi to issue coding prompts; Pi sends requests to the local LM Studio API, receives tool calls, and executes them locally
Evidence
Using Qwen 3.8 27B, LM Studio, and Pi Coding Agent, I built a fully local AI coding workflow and challenged it to create an entire web application from scratch.
The 4‑bit model I downloaded was approximately 16GB.
LM Studio can expose your local model through an OpenAI‑compatible API.
- Record date: 2026-10-13T16:41:06.729Z