MarkTechPost ★ 90 7 min

Best Open-Source Agent Harnesses for Local LLMs in 2026

Agentic AIAI AgentsHarnessTop

🔗 https://www.marktechpost.com/2026/09/18/best-open-source-agent-harnesses-for-local-llms-in-2026/

📌 2026年本地LLM代理框架怎麼選?11款開源Harness實測盤點

TL;DR:MarkTechPost 依授權、本地執行文件完整度與維護狀態,評比 11 款開源 agent harness,本地部署前必讀。

「模型」只是 agent 的一半,另一半是「harness」:負責跑工具、管狀態、控權限、把結果餵回模型。當你把模型換成跑在自己機器上的本地 LLM,這個差異會被放大——因為本地模型的 context window 通常較小、tool calling 能力也較弱,harness 設計上的任何缺陷都會被直接暴露出來。

🤔 為什麼本地部署更吃 harness 的設計

MarkTechPost 這篇整理,於 2026 年 9 月 18 日直接從各專案 GitHub 讀取事實,依 OSI 核可授權、是否記載本地執行方式、維護狀態與安全控管四項標準排名 11 款工具。文中特別點出兩個容易被忽略的前置動作:一是拉高 context window,Ollama 官方文件指出預設值依 VRAM 而定(24 GiB 以下為 4k、24–48 GiB 為 32k、48 GiB 以上才到 256k),但 agent/coding 類工具建議至少要有 64,000 tokens,一行指令 OLLAMA_CONTEXT_LENGTH=64000 ollama serve 即可調整;二是要挑選支援 tool calling 的模型,Goose 文件說明不支援 tool calling 的模型只能做純聊天,llama.cpp 則要靠 --jinja 參數才能啟用相容的 chat template。

🧩 各家 harness 的定位差異

  • OpenCode:文件記載 Ollama、LM Studio、llama.cpp 的 llama-server 三條本地路徑,均透過 @ai-sdk/openai-compatible 搭配本地 baseURL,宣稱總計支援 75 家以上 provider;內建 build(完整權限)與 plan(唯讀、執行 bash 前需詢問)兩種 agent。
  • Pi:走極簡路線,README 只給模型四個工具——read、write、edit、bash,刻意不做 MCP、子代理、plan mode 與權限彈窗,這些功能改用 TypeScript 擴展補上;原生支援 llama.cpp 的 router server,可用 /llama 管理多個 GGUF 模型。值得注意的是 Pi 沒有內建權限系統,直接沿用使用者權限執行,README 建議搭配 Docker 或 micro-VM 隔離。舊網址 badlogic/pi-mono 已轉址至 earendil-works/pi,Earendil 於 2026 年 4 月收購 Pi,創作者 Mario Zechner 也加入該公司;據 The Pragmatic Engineer 報導,Pi 是 OpenClaw 的技術基礎。
  • Goose:文件記載的本地執行環境最多,涵蓋 Ollama、LM Studio、Docker Model Runner、Ramalama、Atomic Chat,vLLM 與 KServe 則透過 OpenAI 相容介面串接。治理面也是亮點:Linux Foundation 於 2025 年 12 月 9 日成立 Agentic AI Foundation,Block 將 goose 捐贈進去,專案現位於 aaif-goose/goose,以 Rust 撰寫,README 宣稱擁有 70 個以上 MCP 擴展。
  • Cline:本地指南建議務必開啟「Use Compact Prompt」,並搭配專注型任務與定期開新 session;預設每次檔案編輯與指令執行都需人工核准,也可切換自動核准,並以 Plan/Act 模式分離策略與執行。要注意的是,其 JetBrains 外掛並未開源,只有 VS Code 擴展、CLI 與 SDK 採用 Apache-2.0 授權。
  • OpenHands:本地指南最具體,建議 Qwen3.6-35B-A3B 作為首選本地模型(截至 2026 年 5 月 21 日),量化版本至少需 24GB VRAM,或 64GB 統一記憶體的 Apple Silicon Mac;context length 建議至少 22,000、理想為 32,768,並直接點名 Ollama 4,096 的預設值連 system prompt 都放不下。Linux 使用者要注意 LM Studio 預設只綁定 127.0.0.1,容器化的 OpenHands 需開啟「Serve on Local Network」才能連上。
  • Aider:以 whole/diff 兩種 edit format 因應 tool calling 較弱的模型,並在每次請求附上程式碼庫的符號地圖;其 Ollama 文件特別警告 Ollama 會靜默捨棄超出 context window 的內容,因此 Aider 會依請求動態調整視窗大小並預留 8k tokens 給回覆。維護狀態是隱憂,PyPI 顯示 0.86.2 版發布於 2026 年 2 月 12 日,前一版則停留在 2025 年 8 月。
  • Codex CLI:Apache-2.0 授權,內建 ollama(11434 埠)與 lmstudio(1234 埠)兩個本地 provider,codex --oss 預設使用 gpt-oss:20b;硬性限制是只支援 Responses API(/v1/responses),原始碼會拒絕 wire_api = "chat",本地伺服器必須提供對應端點。
  • Qwen Code:README 列出 OpenAI、Anthropic、Gemini、Qwen 四種協定,本地模型指向 Ollama 與 vLLM;專案源自 Google Gemini CLI v0.8.2,在 v0.1 後停止同步上游。
  • Kilo:README 說明 Kilo CLI 是 OpenCode 的 fork,最早則源自 2025 年的 Roo fork,2026 年 4 月 2 日推出重建版 VS Code 擴展;本地模型文件涵蓋 Ollama、LM Studio、Atomic Chat,並提醒本地模型通常缺乏 prompt caching 與 computer use 能力。
  • Hermes Agent:Nous Research 出品的通用型 agent,而非程式碼工具,README 描述一套能從經驗中生成技能的學習迴圈,Ollama 頁面指出內建 70 個以上技能與跨 session 記憶,並支援 Telegram、Discord、Slack、WhatsApp、Signal、Email 等訊息閘道。
  • OpenClaw:本清單中星數最高的專案,Ollama 將其描述為透過中央閘道橋接訊息服務與 AI agent 的個人助理,本地模型建議至少 64k context window;首次啟動會顯示安全提示,說明工具存取的風險,因為它會連接使用者的訊息帳號。

🎯 實務啟示

部署本地 agent harness 前,先確認三件事:context window 是否拉到至少 64k、模型是否真的支援 tool calling、記憶體規劃是否誠實對應模型量級(Cline 文件建議 16–32GB RAM 配小型量化模型、32–64GB 配中型 coding 模型、64GB 以上才上大模型)。若目標是純 coding 場景,OpenCode 或 Aider 的文件最務實;若要做容器化長任務,OpenHands 的硬體指引最直接;若在意治理與長期維護,Goose 掛在 Linux Foundation 底下相對穩健。

🔗 來源

#OpenSource #LLM #AIAgent #LocalLLM #Ollama #LLMOps #DeveloperTools #ToolCalling #AgentHarness #EdgeAI

原始資料 MarkTechPost · 收集於 2026-09-18
來源原標題
Best Open-Source Agent Harnesses for Local LLMs in 2026
作者
Asif Razzaq
原始標籤
Agentic AI · AI Agents · Editors Pick · Harness · Staff · Top
原始連結
https://www.marktechpost.com/2026/09/18/best-open-source-agent-harnesses-for-local-llms-in-2026/

摘要原文

An agent is a model and a harness. The harness runs tools, holds state, manages permissions, and feeds context back to the model. With a local model, the harness matters more. Small context windows and weaker tool calling expose every design flaw. This guide ranks 11 open-source harnesses by how well they document local inference. All repo facts were read from GitHub on September 18, 2026. The ranking weighs 4 things: OSI-approved license, documented local runtimes, maintenance status, and safety controls. 1. Raise the context window first : Per Ollama’s context length docs , defaults depend on VRAM: 4k under 24 GiB, 32k from 24 to 48 GiB, and 256k at 48 GiB or more. The same page says agents and coding tools should get at least 64,000 tokens. The fix is one line: OLLAMA_CONTEXT_LENGTH=64000 ollama serve . 2. Pick a model that supports tool calling : Goose’s provider docs state that models without tool calling can only do chat completion. With llama.cpp, Pi’s docs note the --jinja flag enables compatible chat templates and tool calling. 3. Budget memory honestly : Cline’s local guide maps 16 to 32GB RAM to small quantized models, 32 to 64GB to mid-size coding models, and 64GB or more to larger models. Ollama’s Hermes page lists gemma4 at about 16 GB VRAM and qwen3.6 at about 24 GB VRAM. OpenCode documents 3 local paths in its own provider docs : Ollama, LM Studio, and llama.cpp’s llama-server . Each uses the @ai-sdk/openai-compatible package with a local baseURL . The docs claim support for 75+ providers overall. Setup can be one command. Ollama’s OpenCode page shows ollama launch opencode . It recommends a context window of at least 64k tokens. OpenCode’s own docs add a practical tip. If tool calls fail, raise num_ctx to around 16k to 32k. It ships 2 built-in agents. build has full access. plan is read-only and asks before running bash commands. Best for: Developers who want the widest documented local setup in one terminal tool. Pi is the minimalist pick. Its README gives the model 4 tools: read , write , edit , and bash . It deliberately skips MCP, sub-agents, plan mode, and permission popups. Those features arrive through TypeScript extensions and packages. Pi has native support for the llama.cpp router server . The router discovers multiple GGUF files and loads them on demand. You manage models inside Pi with /llama . Ollama supports it too . ollama launch pi installs Pi, configures the provider, and opens a session. One caveat matters for local use. Pi has no built-in permission system. It runs with your user’s permissions. The README recommends Docker, a micro-VM extension, or a policy sandbox for isolation. The old badlogic/pi-mono URL now redirects to earendil-works/pi . Earendil acquired Pi in April 2026 , and creator Mario Zechner joined the company. The Pragmatic Engineer reports that Pi is the foundation OpenClaw is built on. Best for: Small local models, where a short tool list leaves more context for code. Goose documents the most local runtimes of any harness here. Its provider docs list Ollama, LM Studio, Docker Model Runner, Ramalama, and Atomic Chat. vLLM and KServe work through the OpenAI-compatible provider. Custom providers can skip the API key for local servers. Governance is a differentiator. The Linux Foundation formed the Agentic AI Foundation on December 9, 2025, with Block contributing goose. The repo now lives at aaif-goose/goose . Goose is written in Rust and ships a desktop app, a CLI, and an API. The README cites 70+ MCP extensions. Ollama setup is short. Run goose configure , select Ollama, and enter a model name. Best for: General automation beyond code, under neutral foundation governance. Cline is the strongest editor-based option. Its local guide recommends one setting above all: enable “Use Compact Prompt” for local inference. It also advises focused tasks and fresh sessions when context grows. Every file edit and command needs approval by default. Auto-approve is optional. Plan and Act modes separate strategy from execution. One licensing detail deserves attention. Cline’s own README says the JetBrains plugins are not open-sourced. The VS Code extension, CLI, and SDK are in the Apache-2.0 repo. Best for: VS Code users who want human-in-the-loop approvals with a local model. OpenHands publishes the most specific local guidance. Its local LLM guide recommends Qwen3.6-35B-A3B as the first local model to try, as of May 21, 2026. Hardware needs are stated plainly. Quantized variants need at least 24GB of VRAM, or an Apple Silicon Mac with 64GB of unified memory. Context guidance is equally direct. Set context length to at least 22,000 tokens, with 32,768 recommended. The guide warns that Ollama’s 4,096 default cannot even fit the system prompt. Linux users face one trap. LM Studio binds to 127.0.0.1 by default, so a Dockerized OpenHands cannot reach it. Enabling “Serve on Local Network” fixes it. Best for: Containerized, longer-running tasks on a workstation or server GPU. Aider handles weak tool calling differently. Its edit formats have the model return edits as text. The whole format returns full files. The diff format returns search and replace blocks. Aider also sends a repository map of key symbols with each request. Its Ollama docs flag a real hazard. Ollama silently discards context beyond the window. Aider counters this by sizing the window per request, plus 8k tokens for the reply. Note that the page still cites an older 2k Ollama default. Maintenance is the concern. PyPI shows version 0.86.2 on February 12, 2026. The prior release was August 13, 2025. Best for: Git-native pair programming with models that struggle at function calling. Codex CLI is Apache-2.0 and ships 2 built-in local providers. The source code defines ollama on port 11434 and lmstudio on port 1234. Per Ollama’s Codex page , codex --oss defaults to gpt-oss:20b. The -m flag selects another model. There is one hard constraint. Codex now speaks only the Responses API at /v1/responses . The source rejects wire_api = "chat" and points to this discussion . Your local server must expose that endpoint. The repo includes dedicated sandbox crates for Linux and Windows. Best for: Teams standardized on gpt-oss who want built-in sandboxing. Qwen Code’s README lists OpenAI, Anthropic, Gemini, and Qwen protocols. It names Ollama and vLLM for local models. The project began from Google Gemini CLI v0.8.2. It stopped syncing upstream at v0.1. The npm install requires Node.js 22 or newer. Best for: Pairing open-weight Qwen models with a harness tuned by the same lab. Kilo’s README states that the Kilo CLI is a fork of OpenCode. Kilo says it started as a Roo fork in 2025. It shipped a rebuilt VS Code extension on April 2, 2026. Its local model docs cover Ollama, LM Studio, and Atomic Chat. The same page warns that local models often lack prompt caching and computer use. Best for: Former Roo Code users who want a maintained path with local support. Hermes Agent from Nous Research is a general-purpose agent, not a coding tool. Its README describes a learning loop that creates skills from experience. Ollama says it ships with 70+ skills and cross-session memory. Setup points Hermes at http://127.0.0.1:11434/v1 , and context length can auto-detect. Messaging gateways include Telegram, Discord, Slack, WhatsApp, Signal, and Email. Best for: A persistent personal agent running on local models. OpenClaw is the most-starred project in this guide. Ollama describes it as a personal assistant that bridges messaging services to AI agents through a central gateway. For local models, Ollama recommends at least a 64k context window. First launch shows a security notice explaining the risks of tool access. Take it seriously. This harness connects to your messaging accounts. Best for: Messaging-first assistants, for users prepared to manage the security surface. The post Best Open-Source Agent Harnesses for Local LLMs in 2026 appeared first on MarkTechPost .

由 claude-code/sonnet 自動生成