Developer tools have developed an uncomfortable habit: they want everything you write sent to someone else's cloud. For open-source experiments, that is a minor nuisance. For proprietary codebases under strict nondisclosure agreements, financial algorithms, or internal security tooling, sending raw source code to external API servers is an immediate compliance violation. At 365Finds, we evaluate AI developer tools under a simple rule of risk: once code leaves your local environment, you have lost control over its retention, telemetry, and inspection.
Pieces—formally known as Pieces for Developers—presents a different approach. The tool is structured around a local-first engine designed to capture snippets, track workflow history, and index context without mandatory cloud synchronization. Pairing Pieces with Ollama allows you to run large language models directly on your CPU or GPU, executing code completions and copilot queries entirely within localhost.
Setting this stack up properly requires understanding how Pieces OS partitions data, how Ollama manages model weights, and how current architectural shifts in Pieces affect local model selection.
The Foundation: Why Pieces OS Is Local-First
Most AI coding assistants operate as thin extensions connected to remote cloud backends. Pieces operates through a split architecture:
- Pieces OS: A background daemon running locally on your workstation. It indexes snippets, processes local vector embeddings, manages Long-Term Memory (LTM), and monitors workstream activity across IDEs (VS Code, JetBrains), browsers, and terminal windows.
- Authoritative Local Storage: All indexed data, snippet tags, OCR text, and conversation histories are written directly to your disk (
~/.local/share/com.pieces.os/on Linux,~/Library/com.pieces.os/on macOS, and%LocalAppData%\Mesh Intelligent Technologies, Inc\Pieces OS\on Windows). - Pieces Desktop / Copilot: The user-facing application and editor extensions that interface with Pieces OS via local sockets and ports.
Because Pieces OS manages memory locally, your source code does not leave the machine during snippet indexing or context generation. The only potential leakage point in standard Pieces setups is the copilot model runtime. If the model runtime targets cloud endpoints (such as OpenAI, Anthropic, or Google), prompt payloads travel over the network. Routing that inference layer to Ollama keeps the entire loop offline.
Step-by-Step Setup: Connecting Pieces with Ollama
Running on-device inference with Pieces relies on Ollama handling the local model server while Pieces OS supplies the developer context.
Step 1: Install and Launch Ollama
Ollama acts as the execution backend, bundling model runtimes and hardware acceleration (Metal on macOS, CUDA on NVIDIA, ROCm on AMD).
- macOS / Windows: Download and run the installer from the official Ollama website. Once installed, Ollama runs in the background and appears in your menu bar or system tray.
- Linux: Install via terminal:
curl -fsSL https://ollama.com/install.sh | sh
Confirm that the Ollama daemon is running by checking its version:
ollama --version
By default, Ollama serves an OpenAI-compatible REST API at http://localhost:11434.
Step 2: Pull Code-Optimized Local Models
For development tasks, general conversational models often produce sluggish or inaccurate syntax. At 365Finds, our testing prefers code-specialized models that balance parameter efficiency with structural precision:
- Balanced Everyday Coding:
ollama pull qwen2.5-coder:7b - Lightweight / Low VRAM:
ollama pull llama3.1:8b - Heavier Reasoning (requires 16GB+ VRAM / unified memory):
ollama pull qwen2.5-coder:14b
Verify the pulled weights by running a quick test prompt:
ollama run qwen2.5-coder:7b "Write a Python context manager to measure function execution time."
Once verified, type /bye to return to your shell. The model remains registered and ready in Ollama's local registry.
Step 3: Configure Pieces Copilot Runtime to Local Mode
To direct Pieces away from cloud endpoints:
- Open the Pieces Desktop Application or your active editor extension (such as the Pieces VS Code plugin).
- Open the Copilot / Conversational Search panel.
- Locate the Active Model selector (typically at the bottom-left or within Settings > Copilot).
- Switch the runtime category from Cloud to Local / On-Device.
- Select your downloaded model from the local model list, or confirm the Ollama endpoint target (
http://localhost:11434).
Once selected, Pieces OS passes user queries alongside indexed file snippets directly to Ollama via local HTTP requests. No external network requests are initiated during code analysis.
An Honest Complication: The Agentic Copilot Shift
Any practical guide must address a recent friction point: Pieces has experienced shifting availability for managed local model menus across recent desktop releases.
As Pieces evolved its Copilot from a single-turn conversational assistant into an autonomous, agentic system capable of executing multi-step tool calls, small local models (like 7B or 8B parameter variants) frequently failed to adhere to rigid tool-calling schemas. Hallucinated function outputs and truncated context windows caused pipeline failures. Consequently, Pieces temporarily pulled back direct local-model UI options in specific builds while re-engineering the local agentic runtime (documented in community support issue #1066).
If your installed version of Pieces Desktop has local model selection grayed out or removed, you do not need to abandon your privacy boundary. You have an immediate, fully functional alternative: The Pieces Model Context Protocol (MCP) Server.
The MCP Workaround for Complete Local Sovereignty
Pieces OS features a native MCP server that exposes your local Long-Term Memory, snippets, and project context to external tools. You can bind local developer clients (such as Continue.dev, Cline, or Cursor) to both the Pieces MCP server and your local Ollama instance:
- Enable the Pieces MCP Server inside Pieces Desktop Settings.
- Configure your local coding extension's configuration file to point to:
- Context Provider: Pieces Local MCP endpoint.
- Model Inference Provider: Ollama (
http://localhost:11434/v1).
Under this configuration, Pieces OS continues gathering workflow context locally, while Ollama handles inference on your GPU. Cloud servers are excluded entirely.
Local Ollama vs. Cloud Runtimes in Pieces
Running entirely on-device involves distinct operational trade-offs:
| Evaluation Dimension | Local Ollama Stack | Cloud Model Runtimes (Claude / GPT-4o) |
|---|---|---|
| Code Privacy & Compliance | 100% on-device; zero outbound packets; NDA-safe | Data leaves network; subject to cloud data processing terms |
| Hardware Demands | Requires 16GB+ RAM; dedicated GPU or Apple Silicon unified memory | Minimal local resource consumption; runs on ultrabooks |
| Inference Latency | Hardware-dependent; 20–60 tokens/sec on modern GPUs; slow on pure CPU | Fast, consistent API responses over high-speed networks |
| Complex Multi-File Reasoning | Moderate; 7B–14B models can struggle with multi-step architectural refactoring | High; deep context windows and advanced agentic tool-use |
| Network Dependency | Completely functional offline and in air-gapped systems | Completely dead without internet access |
| Token & Subscription Cost | Zero ongoing inference cost | Incurs API token costs or paid subscription fees |
The 365Finds Recommendation
365Finds recommends running Pieces alongside local Ollama models for any developer working with proprietary source code, regulated client data, or strict IP boundaries. The combination gives you automated workflow tracking without introducing third-party data collection risks.
For optimal local performance, deploy qwen2.5-coder:7b on machines with at least 16GB of unified memory or 8GB of dedicated VRAM. If your version of Pieces Desktop currently limits local runtime menus due to ongoing agentic upgrades, route your local context through the Pieces MCP server into an Ollama-backed editor extension. Local-first data governance remains the only reliable safeguard for sensitive engineering work.