ahwurm/localharness
Acerca de
An open-source, coding agent harness designed specifically for local LLMs. Designed as everything a user needs to jumpstart their own harness (detailed event steams, logs, and performance data) or quickly replace closed source one (featuring out of the box plugins for web search, image gen, memory, auto research and more in dev).
Herramientas de desarrolloCrecimiento de estrellas medido
- in 24h
- +1
- in 7 days
- +3
- in 15 days
- +5
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Original
LocalHarness
Run AI agents on the models you already run locally.
LocalHarness is an open-source, self-hosted agent harness for local LLMs. It connects to a model you serve over an OpenAI-compatible API (vLLM, llama.cpp, Ollama or LM Studio), or starts one for you, and gives it agents, defined in YAML, with tools, MCP servers, a permission gate in front of every tool call, and helper agents that each work in a fresh context with only the tools they are allowed. A small core runs the agent loop; memory, the phone app, Discord, image generation, the self-improvement loop and a headless browser for JavaScript-rendered pages are plugins that you turn on or off with one command. Use it as a coding and research agent on your own machine, with no account and no telemetry.

Why an agent harness for local models
- Built for local models and consumer hardware. It sizes a launch from the model's own files and sizes an appropriate context window: it reads the served, trained and fitted context windows, prices a llama.cpp launch from the GGUF tensor table, keeps an MoE's experts in RAM when the GPU cannot hold them, refuses a model that fits nowhere, and will not launch below the window the agent loop needs. A model without native tool calling gets an XML fallback.
localharness startfinds a model or offers one to fetch, serves it and remembers your choice;/modelswitches in place, and a turn survives a server restart. - Complete event bus. Own every reasoning trace, model choice and harness setting, with out-of-the-box, configurable security gating for actions and untrusted contexts. The event stream and logs stay on your disk (a
--privatesession keeps none of them), and plugins, tool hooks and the phone app use the same event bus and public plugin API as the bundled plugins. One permission gate stands in front of every tool call, helper agents included. An agent that reads untrusted content, a web page or an MCP result, is not given tools that change your machine; the check fails closed. The endpoint, credential and allowed senders are set in machine-level config, which a cloned repository cannot change. Threat model: SECURITY.md. - Zero telemetry. Period. LocalHarness never collects user data. All sessions and session logs are stored locally in a
.localharnessfolder (where your data lives). No account (whatstartcontacts); web search runs over DuckDuckGo with no key. Memory is SQLite in your home directory, config is YAML, and bench results stay on your disk. MIT licensed. - Optimized for task completion. Features a metaharness with tools and subagents designed to uplevel local model performance on longer and more complex tasks.
/task new <objective>runs bigger work as a pipeline of fresh agents, a plan and then each step, with critics after each. A fresh agent per unit reads only the docs it needs, which is meant to keep a small model sharp late in a long task: docs/metaharness.md.
Quick start
Python 3.12 or later and uv. You do not need a running model server: the first localharness start finds a model on your machine or offers one to fetch.
uv tool install 'localharness[embeddings,mobile]' # memory's CPU model + the phone app's dependencies (`plugins enable mobile` turns it on)
localharness start # finds a model (or offers one), sets up, opens a session
localharness plugins list # every plugin and whether it is on
localharness plugins disable autoresearch
localharness plugins enable image --set comfyui_url=http://127.0.0.1:8188
localharness update # the latest release from PyPI
plugins enable and plugins disable write overrides.yaml and leave your config.yaml alone; --workspace changes a bundled plugin for one project only. Inside a session, /plugins enable <name> asks what the plugin needs, checks it, and restarts with your conversation kept. Keyboard shortcuts and multi-line input: docs/terminal-keys.md.
localharness start --private keeps nothing of the session when it ends: no conversation, memory, logs, task documents, pictures or saved pages, and no answer to a permission question. Files you have the agent write into your project are yours and stay, the way a private browser window keeps your downloads. The session's own state lives in a folder in your project, .localharness/run/<id>/ (in the config folder's run/ when there is no project or another account can write it), that is deleted when it ends; a .localharness/run/ it made in the project stays, holding only a .gitignore. The agent cannot write the files a later session would load, such as CLAUDE.md. Four things to know:
- a crash leaves that folder until the next session in this project;
- settings you change stay;
/modelpointed at a remote endpoint sends the chat there;- a private chat on the phone (the
Private chatbutton inlocalharness mobile) stays on the machine, asleep, until you end it orlocalharness mobilestops.
What it does not hide is listed in SECURITY.md.
What agents can do
Agents are YAML. A project's agents live in its .localharness/agents/ and yours in ~/.localharness/agents/, the project's file winning a shared name; the model is told about both and sees a new one as soon as it is used or created, and localharness agent list shows where each comes from. The built-in tools are read, write, edit, glob, grep, bash, python, web search and fetch, delegation to helper agents, and MCP servers, so a session works as a coding agent or a research agent. Drive it from the terminal, from Zed (localharness acp), from your phone on your own network (localharness mobile) or from Discord (--channel discord). On Discord a session can also run in the background as a user service that starts at login (--autostart on), message you first, and run an agent's schedule once you approve it at the terminal. With a vision model, drop a screenshot on the terminal, paste one into Zed or the phone page, or attach one on Discord. Every reply to a turn that used a tool passes a panel of critic agents before it reaches you, and /task new <objective> runs bigger work as a pipeline of fresh agents, a plan and then each step, with critics after each: docs/metaharness.md.
Supported runtimes
Point it at vLLM, llama.cpp, Ollama or LM Studio; the agents, tools, permission gate and plugins are the same on all four. Every runtime is reached through one OpenAI-compatible client, and init can attach to an endpoint that is already running. Live-validated means run on the DGX Spark reference machine; recorded bench runs exist for vLLM only. Strata is a fifth, narrower case: a third-party server for one model family (Swift Qwen3.8 Flash-Next) that the harness offers only for that model's files, launching an install you confirmed; it is validated with the IQ3_XXS GGUF build.
| Runtime | Harness starts the server | Tool calling | Token counting | Live-validated |
|---|---|---|---|---|
| vLLM | docker or binary | native | exact | reference machine and bench |
| llama.cpp | spawns llama-server |
XML / Hermes fallback | exact | reference machine |
| Ollama | spawns ollama serve |
native | exact with the exact-tokenizer extra, else estimated |
CPU round-trip |
| LM Studio | drives headless lms |
native | exact with the exact-tokenizer extra, else estimated |
CPU round-trip |
| Strata | launches the install you confirmed | native | estimated | RTX 5090 workstation, IQ3_XXS GGUF (reference) |
A session with no temperature set sends none, so the server's sampling defaults apply; pin one on the server (llama-server's --temp, vLLM's --generation-config). Setup: llama.cpp, Ollama, LM Studio, Strata, vLLM (reference architectures); the code is the provider layer.
Plugins
| Name | What it does | Default | How to switch |
|---|---|---|---|
image |
makes pictures with ComfyUI | off | localharness plugins enable image --set comfyui_url=<url> |
mobile |
Mobile: the phone page, served with its event API by localharness mobile |
off; needs localharness[mobile] |
uv tool install 'localharness[mobile]' (name the other extras you use too: a reinstall keeps only the ones it names), then localharness plugins enable mobile --set public_url=<url> |
memory |
persistent memory: facts recalled into each turn, memory tools, background consolidation | on | localharness plugins disable memory |
dispatch |
chat: Discord | off; needs localharness[dispatch] |
uv tool install 'localharness[dispatch]' (name the other extras you use too: a reinstall keeps only the ones it names), then localharness plugins enable dispatch --set discord.token=… --set discord.allow=<your user id> |
autoresearch |
experiment loop | on | localharness plugins disable autoresearch |
browser |
reads JavaScript-rendered pages through a sandboxed headless Chromium and clicks through them anonymously | off; needs localharness[browser] |
uv tool install 'localharness[browser]' (name the other extras you use too: a reinstall keeps only the ones it names), then localharness plugins enable browser |
Pages: image · mobile · memory · dispatch · autoresearch · browser, and on the site: image · mobile · memory · dispatch · autoresearch · browser.
Installed plugins live on your machine, not inside a project: a Python package with a localharness.plugins entry point beside LocalHarness, or a folder ~/.localharness/plugins/<name>/. None of its code is imported until localharness plugins enable <name>, which only your machine-level config can do. A plugin you turn on is trusted code that runs with your privileges: read SECURITY.md before you enable one.
Plugins written for Claude Code, in its plugin layout, install with localharness plugins install <folder-or-git-url> [--path <subfolder>] --enable: the copy goes to ~/.localharness/external-plugins/<name>/, none of its code runs, and a fit report prints one line per component before one question. Once on, its skills and commands load as skills, its agents become helper agents, each of its MCP servers runs in an agent of its own, and its session-start commands run at the start of every session, in the folder you start in, with a timeout, their output added to the model's context. Not carried over: every other hook event (a plugin built on tool hooks, such as claude-mem, does not work), parallel, background and worktree agents (ruflo), sign-in (OAuth) servers, marketplaces and auto-update, and a project carrying or turning on a plugin; localharness plugins info <name> shows the fit report again and localharness plugins update <name> reinstalls one. Its commands and servers run with your privileges and the approval gate does not see them: read SECURITY.md before you turn one on.
Write a plugin
Copy the example plugin: one tool, one command, one slash command, one doctor check and two settings, tested in CI. The API is plugins/api.py; its version is "1", and changes since its first release have only added optional fields. Plugins written for the previous plugin API no longer load; the example plugin says how to port one.
Skills
A skill is a folder holding a SKILL.md in the open Agent Skills format: a name, a one-line description of when to use it, and a procedure. LocalHarness reads a project's .localharness/skills/ and .agents/skills/, ~/.localharness/skills/ and the bundled set. The model sees one line per skill and loads the procedure with its skill tool when a request matches. The model may not pick a skill up on its own; /<name> asks it to. When the memory plugin is on, the harness may also cue a skill from the request, shown in the terminal as a dim hint to the model: skill <name> line, with whatever embedding model the memory plugin uses. From the next start after that model is on this machine, the harness measures the cue's threshold in the background, yielding to your turns (a few minutes of CPU), and the cue starts once that is done; an upgrade that changes the labelled set, or a new embedding model, measures once more. There is nothing to run; localharness doctor shows the state. Turning the memory plugin off also turns the cue off. The root's prompt also carries a short map of where the project, its skills and its agents live and how a skill or an agent call enters a task.
localharness skills lists what was found and why anything was skipped, and /skill-creator writes a new one with you, one approval per file. A skill is text: it grants no tool and installs nothing. A project's skills load with its config, so read them in a repository you did not write: SECURITY.md.
Status
Early stage (v0.30.0, pre-1.0). Interfaces and config schema may change without notice. Each release's known limitations are listed in the CHANGELOG.
Links
- SECURITY.md: trust boundaries, the permission gate, the prompt-injection threat model
- src/localharness/: the source, one package per component; the CLI is
cli/ - docs/metaharness.md: the critics that read a reply after a turn that used a tool, and the task pipeline
/taskdrives - docs/reference-architectures/: tested hardware and setup notes
- docs/running-agents-locally.md: where LocalHarness fits among local agent tools, and where it is behind
- LocalShift: the companion project that moves a headless Claude Code job onto LocalHarness once a local model proves good enough
- localharness.dev
License
Explorar proyectos relacionados
Cargando…