acp
The Harness as an Agent Client Protocol agent for editors such as Zed
harness install acp
- 最新版本
- 0.2.0
- Harness 版本
>=0.58,<2- 平台
- windows, macos, linux
- 依赖
- 无
提供
- 命令
acp
说明
The acp package makes The Harness an agent of the Agent Client Protocol (ACP), so an editor such as Zed drives the agent on this computer from its agent panel. harness acp speaks ACP on stdin and stdout; the editor starts it and talks to it.
Install
harness install acp
Use with Zed
Add the agent to Zed's settings.json:
{
"agent_servers": {
"The Harness": {
"command": "harness",
"args": ["acp"]
}
}
}
Then open a new thread with The Harness in the agent panel. Any other ACP client (JetBrains IDEs, Neovim with CodeCompanion, Emacs with agent-shell) starts the same command: harness acp.
What it does
- Each thread is one conversation of the app's agent in your session host (started when it does not run): the first message starts it, later messages go to it. It is a session like any other, so
harness sessionsand the app list it too. - While the agent works, the editor shows what it says, its thoughts, and a tool call for each program it runs with the program's result.
- When the agent waits for your approval (a program under ask-before-acting, or a step that uses your real mouse and keyboard under the physical-input policy), the editor asks you: Allow once or Reject. Nothing is approved without your answer.
- Stopping the thread in the editor closes the conversation.
harness acp --workspace NAME picks where tasks run, as harness run --workspace does (default auto). Logs go to stderr.
Protocol
ACP version 1: initialize, session/new, session/prompt (text and resource links), session/cancel; the agent sends session/update (agent_message_chunk, agent_thought_chunk, tool_call, tool_call_update) and session/request_permission. A prompt ends with end_turn when the agent has answered, cancelled after a cancel and refusal when the conversation ends in an error. Loading earlier sessions, images, audio and the client's MCP servers are not supported.
版本
| 版本 | Harness 版本 | 依赖 | sha256 | 发布日期 | |
|---|---|---|---|---|---|
| 0.2.0 | >=0.58,<2 |
无 | 96ab658f10e6 |
2026-11-13 | 下载 |
| 0.1.1 | >=0.58,<2 |
无 | bfafdffee5d9 |
2026-11-10 | 下载 |
| 0.1.0 | >=0.58,<2 |
无 | 4a20c56cd6c5 |
2026-11-03 | 下载 |
更新日志
0.2.0
- A conversation goes on until you end it. The agent's answer, a reply in plain text, ends its turn, not the conversation: the next message goes to the same conversation, which keeps its messages, the variables of its programs, its rules, its facts and the environment. What the agent left running goes on after the answer, and the end of a unit or an event starts its next turn without a message. Model calls and time are limits of a turn and begin anew with the next one; a turn that reaches one, fails or is cancelled (
/cancel) ends with that reason and the conversation waits; cost is counted for the whole conversation. Every turn ends with aturn_resultrecord./clearis another name of/new. Sessions are kept on disk as they go (conversation.jsonbeside the trace), and one that ended is continued in its own session id with a new kernel:harness --continue,harness --resume ID,harness run --continue | --session ID "task",harness sessions resume ID,/resume,Host.resume_session(); what lived in the old process (variables, rules, running programs) is gone, and the agent is told so. A sub-agent whose turn ended can be sent another message (send_agent) and goes on with its history. A conversation whose workspace is needed by another is parked, and its next message continues it. A run nobody talks to keeps its conversation as well:harness program CONFIG --continue EPISODE --message "..."gives the episode in that directory one more turn, in its own session, against the worker that runs. What breaks: the prompt no longer teaches<finish>;<finish>andfinish()are still accepted and mean the same as a text answer. In a run without a user (a benchmark), a reply in plain text now ends the run as its answer instead of being sent back as a format error. A frontend that waited forFINISHEDafter an answer waits for theturn_resultrecord instead (the state after it isIDLE, whosereasonis how the turn ended);harness run "task"and the MCP server'srun_taskstill end the session they started after its turn. A sub-agent's report has noquestionand noasksstatus: what it asks is its answer. ACPsession/cancelends the turn and keeps the conversation. A task the agent package gives (harness agent) ends with its turn, so a question it asks comes back as the task's answer. Insummary.json, a conversation closed between turns keeps the status of its last turn;closedis a turn that was cut short. The evaluator's outcome is read when the conversation ends, as before, since a worker evaluates once. A kernel that dies ends the conversation; it is continued with--resume. Esc in the terminal chat still pauses.
0.1.1
- Editor approvals carry the original host request ID. A response to a stale sub-agent request cannot approve a newer request.
0.1.0
- First release:
harness acpserves the agent on this computer to editors over the Agent Client Protocol (initialize, session/new, session/prompt, session/cancel). A prompt streams the agent's messages, its thoughts and a tool call for each program; what a session waits for the user's approval for is asked with session/request_permission.