{"slug": "hlock-harness-portability-for-agent-configs", "title": "HLock: Harness Portability for Agent Configs", "summary": "A tool called hlock was released to package and portably restore AI agent harnesses — the harness version, models, MCP servers, skills, plugins, instruction files and config — into a single hashed harness.lock file that can be committed to git and rehydrated on any machine. Installed via pip, uv or pipx, hlock offers pin, check, sync, launch and run commands modeled on uv and npm, keeps API keys and tokens out of the lock as HLOCK_SECRET_* placeholders, and supports per-contributor locks at .hlock/locks/harness.<handle>.lock for team repositories. The tool also provides hlock migrate to move a lock between harnesses such as Claude Code and Codex, hlock localize to convert a lock to an open-source harness with models served by Ollama or LM Studio, and hlock meta, which hands install, bootstrap-evals and update jobs to an agent and checks every result.", "body_md": "# Your agent harness\n\nmade portable.\n\nYour agent is more than a model. It's a harness, MCP servers, skills, and config,\nhand-tuned on one machine. `hlock` is the missing harness packaging layer:\n`harness.lock` tracks all of its dependencies, so you can commit it to git and restore\nit anywhere.\n\n```\npip install hlock\nuv add hlock            # add to a project\nuv tool install hlock   # or install the CLI globally\nuvx hlock --help\npipx install hlock\n```\n\n## Lock the harness you already have[¶](#lock-the-harness-you-already-have)\n\nIf you've used `uv`, `cargo`, or `npm`, you already know the shape of `hlock`:\n\n| You know this from package managers | In `hlock` | \n|---|---|\n| `uv.lock` /`Cargo.lock` | **`harness.lock`** , the[lockfile](reference/lockfile/) : every dependency of your harness, pinned and hashed | \n| `pip freeze` | **[`hlock pin`](guides/pin/)** : record the setup you already have, and re-pin as it grows | \n| `--locked` check | **[`hlock check`](guides/pin/#keep-it-honest-with-check)** : show what changed since the pin | \n| `uv sync` /`npm ci` | **[`hlock sync`](guides/sync/)** : rehydrate the locked setup on any machine | \n| `uv run` | **[`hlock launch`](guides/launch/)** and**[` hlock run`](reference/cli/#run)** : start sessions and run prompts on the locked setup | \n\n- \n**Pin everything**\n The harness version, models, MCP servers, skills, plugins, instruction files, and config, each with a digest. [Claude Code, Codex, Pi, OpenCode, autonomous agents like\nOpenClaw, and more](reference/harnesses/) .\n- \n**Secrets stay out**\n API keys and tokens become `HLOCK_SECRET_*` placeholders, so the lock is safe to\ncommit. You supply the values when you sync.\n- \n**Rehydrate anywhere**\n `hlock sync` restores the setup on a new machine, in an isolated directory, or in a\nDocker image, and tells you exactly what it can't do for you.\n- \n**Launch from the lock**\n `hlock launch` starts your harness in an isolated environment that matches the lock,\nwith none of the unlocked config on your machine.\n\n## Manage your team's agents[¶](#manage-your-teams-agents)\n\nContributors to one repository rarely share an agent setup: one uses Claude Code with\nhand-written skills, another uses Codex with a different model. Each person can commit their own\nlock to `.hlock/locks/harness.<handle>.lock`, next to the code it was used on. Anyone with a clone\ncan then try a teammate's setup in isolation with `hlock launch --lock`, or\n[`hlock pull`](guides/pull/) it from outside the repository. Add the\n[hlock badge](project/badge/) to your README to point readers at the locks. See\n[Team repositories](guides/teams/) for the layout and the commands.\n\n```\nhlock pin -o .hlock/locks/harness.alice.lock         # your harness and model, with the repo's setup\nhlock launch --lock .hlock/locks/harness.bob.lock    # try a teammate's, isolated from yours\n```\n\n## Switch harnesses, or go local[¶](#switch-harnesses-or-go-local)\n\n[`hlock migrate`](guides/migrate/) moves a lock onto another harness, Claude Code to Codex\nsay: skills, MCP servers, and instructions go where the new harness reads them, and models\nmove to a provider it supports.\n\n[`hlock localize`](guides/localize/) turns any lock into an equivalent on an open-source\nharness and models served by a local runtime like Ollama or LM Studio. It's like\ncross-compiling: your MCP servers, skills, and instructions come along. Give it an\n[eval pack](guides/eval-packs/), and it measures the local candidates against your tasks.\n\n## Let an agent do the busywork[¶](#let-an-agent-do-the-busywork)\n\nSome jobs need judgment, not a script. [`hlock meta`](guides/meta/) hands them to an\nagent, the **meta harness**, and checks every result:\n\n- **`install`** : installs what the sync plan leaves to you, then runs` hlock sync --yes` .\n- **`bootstrap-evals`** : fills your eval packs with real tasks from your repo.\n- **`update`** : moves skills, MCP servers, and plugins to their latest releases.`--pin` records it in the lock.\n\nUse the agent built into hlock, or a harness you already have (Pi, Codex, Goose, OpenCode,\nHermes), on your API key or, with `--local`, open-weight models. It asks before every\ncommand, or runs `--headless` against an allowlist.\n\n## Then make it better[¶](#then-make-it-better)\n\nA locked harness is a baseline. Once your setup is reproducible, you can measure it: every\nlock `hlock resolve` writes records its success rate, cost, and latency on your own tasks.\nThe tools will look familiar:\n\n| You know this from | In `hlock` | \n|---|---|\n| a test suite | **[`hlock evals init --from-traces`](guides/eval-packs/#draft-a-pack-from-your-traces)** : draft an eval pack from the requests you've made to your agent | \n| `pyproject.toml` | **`harness.toml`** , the[manifest](reference/manifest/) : the models, decision models, and harnesses to try, and what \"best\" means | \n| `uv lock` | **[`hlock resolve`](guides/resolve/)** : measure every combination on your evals, and lock the winner with its evidence | \n| `uv lock --upgrade` | **[`hlock upgrade`](guides/upgrade/)** : try newer models, and keep them only if they hold up | \n| profile-guided optimization | **[`hlock tune`](guides/tune/)** : tune prompts, hyperparameters, and small models on your evals | \n\n- \n**Find the best stack for your tasks**\n Draft an [eval pack](guides/eval-packs/) from the sessions your agent already\nlogged, list the models and harnesses to try in`harness.toml` , and[`hlock resolve`](guides/resolve/) locks the winner with its evidence.\n- \n**Tune what's inside**\n [`hlock tune`](guides/tune/) goes past model choice into prompts, hyperparameters,\nand fine-tuned small models, on your evals. Run it offline, on this machine, on a\nFlyte cluster for GPUs, or on[a backend you write](guides/backends/) .\n\n## Where to next[¶](#where-to-next)\n\n- **New here?** Start with[Installation](getting-started/installation/) and the[Quickstart](getting-started/quickstart/) .\n- **Want the mental model?** Read[How it works](concepts/) .\n- **Sharing a repository?** See[Team repositories](guides/teams/) .\n- **Already using APM?** See[Coming from APM](getting-started/apm/) : keep`apm.yml` ,\n  and add what hlock locks and measures on top.\n- **Comparing tools?** See[hlock and related tools](concepts/related/) : APM, chezmoi,\n  Nix, promptfoo, DSPy, and where each one fits.\n- **Want an agent to do the setup?** See[Delegating to the meta harness](guides/meta/) .\n- **Looking something up?** See the[CLI](reference/cli/) ,[Python API](reference/python-api/) , or[`harness.toml`](reference/manifest/) reference.", "url": "https://wpnews.pro/news/hlock-harness-portability-for-agent-configs", "canonical_source": "https://docs.hlock.ai/", "published_at": "2026-10-29 02:01:20+00:00", "updated_at": "2026-10-29 02:12:12.483409+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "agent-protocols", "developer-tools", "ai-infrastructure"], "entities": ["hlock", "Claude Code", "Codex", "OpenClaw", "Ollama", "LM Studio", "MCP"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/hlock-harness-portability-for-agent-configs", "markdown": "https://wpnews.pro/news/hlock-harness-portability-for-agent-configs.md", "text": "https://wpnews.pro/news/hlock-harness-portability-for-agent-configs.txt", "jsonld": "https://wpnews.pro/news/hlock-harness-portability-for-agent-configs.jsonld"}}