-
Notifications
You must be signed in to change notification settings - Fork 10.8k
feat: add Hermes Agent integration (with review fixes) #2651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6a17aab
feat: add Hermes Agent integration
Zhaoxiaoguang001 cd91046
feat: add Hermes Agent integration
Zhaoxiaoguang001 e83cd54
feat: add Hermes Agent integration
Zhaoxiaoguang001 541b278
feat: add Hermes Agent integration (with review fixes)
majordave f19a57e
feat: write Hermes skills directly to global ~/.hermes/skills/
majordave 70f5732
fix: address Copilot review feedback on Hermes integration
majordave a5fd163
Merge upstream/main into feat/hermes-integration (local only, no push)
majordave 6e9af2b
fix: address second Copilot review round — 6 remaining observations
majordave 3da5e0b
fix: add first-class global/home-based agent dir support in CommandRe…
majordave b938619
fix: address remaining 3 Copilot review observations (round 3)
majordave a90862b
fix: address Copilot round 4 — home-relative dir resolution + project…
majordave File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
feat: add Hermes Agent integration
- Loading branch information
commit 6a17aabd9f2b6ae7bfda2b0b49d66d5b0100696d
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| """Hermes Agent integration — skills-based agent. | ||
|
|
||
| Hermes Agent (https://github.com/NousResearch/hermes-agent) is an open-source | ||
| AI agent framework by Nous Research. It uses the ``.hermes/skills/`` directory | ||
| for agent skills, following the same ``speckit-<name>/SKILL.md`` layout as | ||
| Claude Code and Codex. | ||
|
|
||
| Usage:: | ||
|
|
||
| specify init my-project --integration hermes | ||
| specify init --here --ai hermes | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from ..base import IntegrationOption, SkillsIntegration | ||
|
|
||
|
|
||
| class HermesIntegration(SkillsIntegration): | ||
| """Integration for Hermes Agent skills.""" | ||
|
|
||
| key = "hermes" | ||
| config = { | ||
| "name": "Hermes Agent", | ||
| "folder": ".hermes/", | ||
| "commands_subdir": "skills", | ||
| "install_url": "https://github.com/NousResearch/hermes-agent", | ||
| "requires_cli": True, | ||
| } | ||
| registrar_config = { | ||
| "dir": ".hermes/skills", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": "/SKILL.md", | ||
| } | ||
| context_file = "AGENTS.md" | ||
|
|
||
| @classmethod | ||
| def options(cls) -> list[IntegrationOption]: | ||
| return [ | ||
| IntegrationOption( | ||
| "--skills", | ||
| is_flag=True, | ||
| default=True, | ||
| help="Install as agent skills (default for Hermes Agent)", | ||
| ), | ||
| ] | ||
|
|
||
| def build_exec_args( | ||
| self, | ||
| prompt: str, | ||
| *, | ||
| model: str | None = None, | ||
| output_json: bool = True, | ||
| ) -> list[str] | None: | ||
| """Build Hermes CLI invocation for programmatic dispatch. | ||
|
|
||
| Uses ``hermes chat -q`` for one-shot queries, mapping slash-command | ||
| invocations to the appropriate skill-based dispatch. | ||
| """ | ||
| args = [self.key, "chat", "-Q"] | ||
|
|
||
| if model: | ||
| args.extend(["-m", model]) | ||
| if output_json: | ||
| args.append("--json") | ||
|
|
||
| # If prompt starts with a slash command, pass it directly | ||
| # so Hermes can dispatch to the appropriate skill. | ||
| if prompt.startswith("/"): | ||
| command, _, remainder = prompt[1:].partition(" ") | ||
| args.extend(["-s", command]) | ||
| if remainder: | ||
| args.extend(["-q", remainder]) | ||
| else: | ||
| args.extend(["-q", prompt]) | ||
|
|
||
| return args | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.