unharnessed-agent/Unharnessed

A minimalist and powerful harness with one tool: a persistent Python REPL.

What it solves

Coding agents traditionally hand the model a list of hardcoded tools - read a file, grep, edit, fetch a web page - each tuned in advance by the harness author. Every tool call costs a round trip and pours its raw result into the model's context window, where it sits forever. Unharnessed makes a different bet: frontier models no longer need those rails. So it gives the model exactly ONE tool, a persistent Python REPL called ipython, and lets the model write the Python that reads files, searches repositories, patches forty call sites, starts dev servers, and calls external services.

How it works

The heart is a persistent CPython kernel (Python 3.11+) that stays alive for the whole session and talks newline-delimited JSON to a Rust host. The model writes Python cells into that kernel. Reading a 40,000-line log stores it under a variable name in the kernel, so only the few lines the model prints ever reach the context. Helper functions the model writes are plain Python variables, kept in the same session and reusable turn after turn.

Key mechanics from the README:

  • bash() is async by default: every command starts in the background and hands back a BashHandle (with .pid, .running, .tail(), .output(), .kill(), and await support). A command outliving its cell can wake an idle session when it finishes.
  • Three driving modes answer one question - who decides the work is done? Turn mode lets the model end when it answers; Goal mode requires the model to audit its work and explicitly call goal.complete(); Autonomous mode runs your own gate commands (cargo test, npm run lint) and ends only when all pass.
  • Compaction summarizes the conversation when the context nears the model's window, but the kernel survives: variables, imports, helpers, and running processes stay alive, and the model gets a [python-state] notice listing what is still defined.
  • Sessions are append-only JSONL files; on resume, the kernel namespace is revived from a dill snapshot (16 MiB per variable, 256 MiB total), so the model's Python state comes back too.
  • MCP servers are not exposed as native tools; the model reaches them through a pre-imported mcp object inside the kernel, searching and calling tools as Python values.
  • Skills are folders with a SKILL.md; Python skills (with pyproject.toml) get installed in the kernel venv and pre-imported, so the model calls them as plain Python objects.

An important warning in the README: Unharnessed never asks before running a command. The model's Python and shell commands run with your user permissions, and the kernel is not a sandbox - the project suggests using it in a container, VM, or disposable checkout.

Who it's for

Developers who want a coding agent inside VS Code, as a headless CLI, or as an ACP-compatible agent, and who already pay for a model plan. Unharnessed is free to use: you sign in with your browser and it draws on your existing subscription (Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, Google AI, or Grok) - no API key, no second bill. It also accepts your own API key across 25+ providers and gateways (Anthropic, OpenAI, Gemini, Vertex AI, Bedrock, Azure, Mistral, DeepSeek, Groq, OpenRouter, and more), and runs against local model servers (Ollama, LM Studio, llama.cpp, vLLM, any OpenAI-compatible server).

Highlights

  • One tool, nothing left to take away: no read, no grep, no edit_file - all of it is Python the model writes in a kernel that persists the whole session
  • Variables instead of context: results land under names in the kernel, so a huge log costs one cell and only the lines printed reach the model
  • async bash() by default: commands return handles immediately, run in their own process group, enforce timeouts, and can wake an idle session when they finish
  • Compaction shrinks the conversation but keeps the Python state; sessions can resume with the kernel namespace restored
  • Three driving modes with explicit done conditions: model decides (Turn), model audits then calls goal.complete() (Goal), or your gate commands define done (Autonomous)
  • Wake-ups: the session starts its own turns when a background command ends or a goal's backoff expires
  • Free with your existing Claude/ChatGPT/Copilot/Google/Grok subscription, plus 25+ API providers and local model servers with live model catalog updates
  • MIT License

Related

  • Project
  • Project
  • Project
  • Project