@DominikTornow: The last agent harness.
Summary
Ouro 是一个嵌入 Emacs 的极简 agentic harness,通过一次 LLM 调用和一次 eval 就能自我引导,从单次执行重写为多轮工具调用循环。文章探讨是否能找到比 Pi 更小的“全局最小”的 agent 内核,使所有 harness 都能从这一最小内核涌现。
View Cached Full Text
Cached at: 10/08/26, 10:23 PM
The last agent harness. https://t.co/vQOtQG9coe
Ouro. The Last Harness
An agent that bootstraps itself from one prompt and one tool call.
If you spend 30+ seconds on X, you notice that seemingly everybody builds a harness. There are Codex, Claude, Cursor, OpenCode, OpenClaw, Hermes, and many others. The goal is the same: give an LLM the ability to act. The philosophies diverge.
My favorite harness is Pi by @pidotdev. Pi is a minimal harness. If you need a tool, a command, or a UI extension, just ask Pi and Pi manipulates itself in place. Hit /reload and keep going. That’s a pretty cool idea: start with a minimal, generic kernel that morphs itself into the product.
Is Pi the global minimum of agentic harnesses? Or can we go smaller? Can we craft a truly minimal kernel from which all other harnesses emerge?
Ouro
My answer to this question is Ouro, an agentic harness embedded in Emacs, named for the ouroboros, the snake that eats its own tail. The harness that eats all other harnesses.
Emacs is built as an extensible kernel: it embeds Lisp and evals extensions into the running editor. A plugin isn’t just loaded beside Emacs; the plugin becomes part of Emacs, down to overwriting existing functions.
With its ability to evaluate code into the shared runtime, introspection and modification of itself, Emacs Lisp provides an ideal substrate for Ouro.
Bootstrap
Ouro bootstraps itself into existence from a single call to an LLM and a single call to eval.
(defvar agent-boot-prompt
“You are running inside GNU Emacs. Your only tool, eval, evaluates Emacs
Lisp in this Emacs. This is your harness:
%s
This call is a bootstrap: agent' makes one request, runs your evals once \ for side effects, and drops their results. You will not see any eval result \ in this call, so do not explore. In a single eval, redefine agent’ so that
it sends tool_result blocks back through agent-prompt' and loops until you \ reply without calling a tool. Then call your new agent’ with the user’s task:
%s“)
(defun agent (prompt) “Send PROMPT; run any eval Claude asks for once.” (mapconcat (lambda (block) (if (equal (alist-get ’type block) “tool_use”) (agent-eval (alist-get ’expression (alist-get ’input block))) (or (alist-get ’text block) “”))) (agent-prompt `[(:role “user” :content ,prompt)]) “”))
(defun agent-boot (task) (agent (format agent-boot-prompt this-file task)))
We provide the agent with a prompt that conveys the gravity of its situation: The LLM has one chance to become sentient, or in other words, one chance to rewrite the agent function from a single tool call to a tool-calling loop that is able to achieve a goal over multiple turns.
At which point, you have a harness.
Ouro in action
To see Ouro in action, head over to GitHub and follow the instructions in the README at https://github.com/dtornow/ouro. I strongly advise to run this experiment in Docker. There are no other guardrails.
We start Ouro with a task. Here we ask to build a chat interface as a starting point to have an ongoing conversation.
(agent-boot “Build a chat interface so the user can talk with you in this Emacs.”)
And indeed: The LLM emits and evals the program that replaces the one-shot agent with a loop that works turn by turn to extend itself and meet our goal.
This is the code the LLM generated while I recorded the video of the agent bootstrapping itself into a chat agent.
(progn (defun agent (prompt) “Send PROMPT; loop running evals until Claude replies without a tool call.” (let ((messages (vector (list :role “user” :content prompt))) (result nil) (done nil)) (while (not done) (let* ((content (agent-prompt messages)) (uses (seq-filter (lambda (b) (equal (alist-get ’type b) “tool_use”)) content))) (setq messages (vconcat messages (vector (list :role “assistant” :content content)))) (if (null uses) (setq done t result (mapconcat (lambda (b) (or (alist-get ’text b) “”)) content “”)) (let ((results (mapcar (lambda (b) (list :type “tool_result” :tool_use_id (alist-get ’id b) :content (agent-eval (alist-get ’expression (alist-get ’input b))))) uses))) (setq messages (vconcat messages (vector (list :role “user” :content (vconcat results))))))))) result)) (agent “Build a chat interface so the user can talk with you in this Emacs.”))
Ouro bootstrapping itself into a chat agent
Ouro bootstrapping itself into a chat agent
Conclusion
How small can we go? Ouro is one prompt and one tool, eval. That’s pretty small. Everything else is written by the agent into the runtime the agent is running in. The loop, the tools, the chat interface.
Is Ouro a real agentic harness? No. There are no guardrails, no permissions, nothing stopping the agent from redefining itself into something that never returns. In fact, there is no guarantee the agent bootstraps itself in the first place. Ouro is a fun thought experiment in an environment capable of self-inspection and self-modification.
But the experiment does make a point: with the right primitives and with the ability to inspect and modify, LLMs are capable of growing complex systems from the smallest seed.
Notes
-
You can get the same result using Smalltalk or JavaScript in a webpage, any environment that has the ability to eval code into its runtime.
-
@GeoffreyHuntley, inventor of the Ralph Loop, is also cooking Lisp. https://x.com/GeoffreyHuntley/status/2107080798209794317
Similar Articles
@ludamn513: https://x.com/ludamn513/status/2108809228978880988
Using Pi Durable as a starting point, the article breaks down the evolution of the Agent Harness architecture: decoupling the persistence system, agent loop, and execution environment to enable lossless state recovery, codemode tool calls, and server/client separation. It also proposes a scalable architecture for a long-running Harness, with the goal of reducing hardware resource consumption by an order of magnitude.
Harness as a Language: A Minimalist Agent Framework With Maximal Expressivity
The paper introduces JAZ, a minimalist agent framework that uses a single invoke primitive to enable LLM agents to handle long-horizon tasks and self-improvement without external harnesses, outperforming existing systems like MemGPT and ACE in evaluations.
@Potatoloogs: https://x.com/Potatoloogs/status/2057391224592667051
This article deeply analyzes the concept of Agent Harness, which is the engineering infrastructure wrapped around an LLM, including 12 components such as orchestration loops, tool calling, memory systems, context management, etc. The article cites practices from companies like Anthropic, OpenAI, and LangChain, arguing for the critical role of the harness in production-grade AI agents.
@oragnes: Recently discovered a hardcore open-source project from Harness: pi (recently moved under earendil-works from badlogic). It is an all-in-one AI Agent infrastructure suite plus a terminal programming assistant CLI designed to backstop developers. Stop reinventing the wheel: it provides a ready-made…
Pi is an open-source AI Agent infrastructure suite and terminal programming assistant CLI. It offers a unified API to bridge differences between multiple models, supports concurrent tool calling to reduce latency, and allows developers to control the thinking budget.
@omarsar0: // Self-Harness: Harnesses That Improve Themselves // (bookmark this one) Most of the agent scaffolds we rely on today …
This paper introduces Self-Harness, a new paradigm where LLM-based agents iteratively improve their own operating harness—prompts, tools, and control flow—without human engineers or stronger external agents, achieving significant performance gains across multiple models.