You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 616e818
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Add Hermes Agent as a CLI Base Agent (acting agent and hermes Evolver) (#107)
* add Hermes as CLI base agent, acting agent and evolver
* hermes: fixes from the post-PR audit of 6c76cca
An independent audit of 6c76cca (general, test and sandbox checklists; findings reproduced
with the real hermes 0.19.0 against a scripted model) found no blocker and these, now fixed:
- A kept home holds only Hermes's sessions, hermit's ledger and the logs between calls
(HERMES_KEPT): a profile Hermes would switch its home to (active_profile, profiles/), a
.env/.op.env, credentials and skills a session left are removed; a home hermit did not
make (no marker) is refused, never cleared.
- context_files false (the Evolver's): the plugin turns off Hermes's subdirectory hints,
which --ignore-rules leaves on (a touched folder's AGENTS.md added to a tool result), and
reports it; a session whose hints stayed on fails.
- A context file Hermes's prompt-injection scan replaced with a [BLOCKED: ...] notice fails
the session, naming it (benign rules match).
- The reply is the model's own: Hermes's verifier footer and completion explainer are off.
- The output limit is the model's max_tokens (Hermes ignores the provider's); a fresh empty
models.dev catalog in the home, so no catalog request; extra_body documented as
chat-completions only.
- Readers stop at the turn's end, so a reply printed after it is never read as events; an
incomplete turn with no reply is no turn limit; the plugin's payload cap raised;
--no-restore-cwd on resume; the plugin's database connection closed.
- Tests: each fix, the "failed request then served" rule, the context-tool and isolate
checks for the host; integration tests for hints, the blocked context and the footer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* hermes: fixes from the dual review
- Rollouts count every usage: the acting agent kept only usage[0], dropping
Hermes's auxiliary calls from cost, tokens and model calls.
- A reply cut at its output limit, which Hermes continues before its hook
reports the request, is counted: the plugin writes hermes.request_start
for every attempt, and a request that neither answered nor failed is an
unreported call (cost unknown); a 400 policy rejection is a failed one.
- A failed turn's auxiliary calls are read from the home's state.db (no
session_end reports them).
- A request after a 503 counts as recovery: a continued reply that ended at
the turn limit is no outage to retry.
- ANTHROPIC_AUTH_TOKEN is dropped; the bound key is kept whatever its name
(HERMES_API_KEY).
- A context file Hermes's scan blocked is reported from the scan itself, on
the Responses and Messages APIs too.
- Docs: hermes-agent[mcp,anthropic]; max_output_tokens on the model; Hermes
loads its own source's .env and a managed .env.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Haizhong Zheng <hzzheng@umich.edu>
<summary>Can I Reuse an Adapter Across Models and Harnesses?</summary>
63
63
64
-
Yes, when the receiving agent supports the exports the adapter needs. Hermit currently generates workspaces for Codex, Claude Code, Pi, mini-swe-agent, OpenCode, and DeepSeek Harness, and converts native plugin packages for Claude Code, Codex, Pi, and Hermes. Each route has different capabilities; a target may refuse unsupported exports.
64
+
Yes, when the receiving agent supports the exports the adapter needs. Hermit currently generates workspaces for Codex, Claude Code, Pi, mini-swe-agent, OpenCode, DeepSeek Harness, and Hermes Agent, and converts native plugin packages for Claude Code, Codex, Pi, and Hermes. Each route has different capabilities; a target may refuse unsupported exports.
65
65
66
66
Compatibility does not guarantee the same performance on a different model, harness, or task. Evaluate the adapter in its new setting. See the [host capability matrix](framework/commands.md#what-each-hosts-plugin-carries) and [compatibility limits](reference/compatibility.md).
Copy file name to clipboardExpand all lines: docs/framework/adapter.md
+37-15Lines changed: 37 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,18 +76,18 @@ id>/`. Paths in the instructions below, and in the adapter's skills and roles, a
76
76
command they give from there." Then each export `exports.yaml` declares is
77
77
connected to the host's own place when the host has one, so that the host loads it; an export the host has no place
78
78
for stays a file of the copy, and the context names it with what to do with it. The rule is the same for every
79
-
host, and for the built-in `codex`, `claude-code`, `pi`, `mini-swe-agent`, `opencode`and `dsh` acting agents, which deploy as `hermit deploy` does: an adapter
79
+
host, and for the built-in `codex`, `claude-code`, `pi`, `mini-swe-agent`, `opencode`, `dsh`and `hermes` acting agents, which deploy as `hermit deploy` does: an adapter
80
80
is deployed as far as the host can take it, and nothing it holds is out of the agent's reach.
| Every file but `.hermit/` and `.git/`| Copy it as it is. |`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|
85
-
|`ADAPTER.md` (always exported) | Insert the line above and its text into a managed instruction block. |`AGENTS.md`|`CLAUDE.md`|`AGENTS.md`| the system template of `mini-swe-agent.yaml`|`AGENTS.md`|`AGENTS.md`|
86
-
|`skills/verify-output/`, through `skills` in `exports.yaml`| Copy the skill directory. |`.codex/skills/verify-output/`|`.claude/skills/verify-output/`|`.pi/skills/verify-output/`| named in the system template (mini-swe-agent loads no skills): name, description, the path of its `SKILL.md`|`.opencode/skills/verify-output/`|`.dsh/skills/verify-output/`|
87
-
|`agents/reviewer.md` (or `agents/reviewer/AGENT.md`), through `agents` in `exports.yaml`| Convert the subagent into native host files: frontmatter gives name and description, the body becomes its instructions. |`.codex/agents/reviewer.toml`, registered in `.codex/config.toml`|`.claude/agents/reviewer.md`| named in `AGENTS.md` (Pi has no subagents): name, description, the path of its instructions | named in the system template (no subagents) | named in `AGENTS.md`, as for Pi | named in `AGENTS.md` (DeepSeek Harness has no role file): name, description, the path of its instructions |
88
-
|`tools.py`, through `tools` in `exports.yaml`| Configure a framework MCP server that loads the source adapter. |`.codex/config.toml`|`.mcp.json`|`.pi/mcp.json`|`environment` in `mini-swe-agent.yaml`: Hermit's environment class answers the `hermit-tool` command |`opencode.json` (`mcp.servers`, `codemode: false`) |`.dsh/hermit.patch.yml`, which a session loads with `--patch`|
89
-
| a hooks file, through `hooks` in `exports.yaml`| Write the hooks the host runs, each command run from `hermit/<id>/`; name the others in the context (a command to run, a `prompt` hook's check to make at that moment); a hook of another type is refused. |`.codex/hooks.json` (command hooks; Codex runs no prompt or agent hooks) |`hooks` in `.claude/settings.json` (command and prompt hooks) | named in `AGENTS.md` (Pi reads no hook file) | named in the system template (mini-swe-agent runs no hooks) | named in `AGENTS.md`| named in `AGENTS.md` (DeepSeek Harness has no hook file of its own) |
90
-
| every other file of the copy | Name it, with its frontmatter description or first line, under "Adapter resources" in the context (up to 60 files; the rest are counted). |`AGENTS.md`|`CLAUDE.md`|`AGENTS.md`| the system template |`AGENTS.md`|`AGENTS.md`|
| Every file but `.hermit/` and `.git/`| Copy it as it is. |`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|`hermit/<id>/`|
85
+
|`ADAPTER.md` (always exported) | Insert the line above and its text into a managed instruction block. |`AGENTS.md`|`CLAUDE.md`|`AGENTS.md`| the system template of `mini-swe-agent.yaml`|`AGENTS.md`|`AGENTS.md`|`.hermes.md`|
86
+
|`skills/verify-output/`, through `skills` in `exports.yaml`| Copy the skill directory. |`.codex/skills/verify-output/`|`.claude/skills/verify-output/`|`.pi/skills/verify-output/`| named in the system template (mini-swe-agent loads no skills): name, description, the path of its `SKILL.md`|`.opencode/skills/verify-output/`|`.dsh/skills/verify-output/`|`.hermes/skills/verify-output/`|
87
+
|`agents/reviewer.md` (or `agents/reviewer/AGENT.md`), through `agents` in `exports.yaml`| Convert the subagent into native host files: frontmatter gives name and description, the body becomes its instructions. |`.codex/agents/reviewer.toml`, registered in `.codex/config.toml`|`.claude/agents/reviewer.md`| named in `AGENTS.md` (Pi has no subagents): name, description, the path of its instructions | named in the system template (no subagents) | named in `AGENTS.md`, as for Pi | named in `AGENTS.md` (DeepSeek Harness has no role file): name, description, the path of its instructions | named in `.hermes.md` (Hermes Agent has no role file), as for DeepSeek Harness |
88
+
|`tools.py`, through `tools` in `exports.yaml`| Configure a framework MCP server that loads the source adapter. |`.codex/config.toml`|`.mcp.json`|`.pi/mcp.json`|`environment` in `mini-swe-agent.yaml`: Hermit's environment class answers the `hermit-tool` command |`opencode.json` (`mcp.servers`, `codemode: false`) |`.dsh/hermit.patch.yml`, which a session loads with `--patch`|`.hermes/hermit.config.yaml` (`mcp_servers`), a part of Hermes's `config.yaml` to merge into your own |
89
+
| a hooks file, through `hooks` in `exports.yaml`| Write the hooks the host runs, each command run from `hermit/<id>/`; name the others in the context (a command to run, a `prompt` hook's check to make at that moment); a hook of another type is refused. |`.codex/hooks.json` (command hooks; Codex runs no prompt or agent hooks) |`hooks` in `.claude/settings.json` (command and prompt hooks) | named in `AGENTS.md` (Pi reads no hook file) | named in the system template (mini-swe-agent runs no hooks) | named in `AGENTS.md`| named in `AGENTS.md` (DeepSeek Harness has no hook file of its own) | named in `.hermes.md` (Hermes Agent runs no hook file of a project) |
90
+
| every other file of the copy | Name it, with its frontmatter description or first line, under "Adapter resources" in the context (up to 60 files; the rest are counted). |`AGENTS.md`|`CLAUDE.md`|`AGENTS.md`| the system template |`AGENTS.md`|`AGENTS.md`|`.hermes.md`|
91
91
92
92
This is how the adapter reaches the acting system. The host reads the generated instruction, skill, role and hook
93
93
files; tool configuration makes the declared tools available through its tool interface. What the adapter does not
@@ -98,6 +98,10 @@ context must fit what the host reads: Codex reads `AGENTS.md` up to its `project
98
98
and drops the rest without a word, so the Codex deployment refuses a longer `AGENTS.md` (`hermit deploy
99
99
--context-limit`, the acting agent's `project_doc_max_bytes`). DeepSeek Harness gives the model at most 65,536 bytes
100
100
of a project's instructions and cuts the rest, so its deployment refuses an `AGENTS.md` that would not fit.
101
+
Hermes Agent reads one project context file, the first it finds of `.hermes.md` (also searched up to the repository's
102
+
root), `AGENTS.md`, `CLAUDE.md` and `.cursorrules`, so its deployment writes `.hermes.md`; Hermes cuts a context file
103
+
past a share of the model's context window unless `context_file_max_chars` is larger, which the deployment's config
104
+
part sets (1,000,000).
101
105
A hook runs in the
102
106
directory the session started in, so the deployment prefixes each command with `cd hermit/<id>` (its absolute path):
103
107
a hook finds the files it names where it found them in training. Interactive Codex asks the user to trust the
@@ -172,14 +176,31 @@ dsh-workspace/
172
176
.hermit-deploy.json
173
177
```
174
178
179
+
```text
180
+
hermes-workspace/ # roles and hooks stay files under hermit/<id>/, named in .hermes.md
0 commit comments