Skip to content

feat: implement Hermes Agent as sandbox external agent (#2421) - #2500

Merged
yannickmonney merged 13 commits into
mainfrom
tale/xx72kevn5xsrz9xkmgdfzz0qdx89ykt8
Jul 6, 2026
Merged

yannickmonney merged 13 commits into
mainfrom
tale/xx72kevn5xsrz9xkmgdfzz0qdx89ykt8

Conversation

@larryro

@larryro larryro commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add agentKind: hermes as a first-class external sandbox runtime alongside Claude Code and Cursor.
  • Ship a Hermes adapter (buildExec + NDJSON parser), tale-hermes-run wrapper, sandbox image tooling (pinned hermes-agent PyPI), built-in chat composer entry, and docs/i18n.
  • Managed runs route through the platform LLM gateway via OpenAI-compatible OPENAI_BASE_URL + session virtual key; BYO uses user-injected provider credentials.

Closes #2421

Test plan

  • bun run test -- lib/agent-adapters (82 tests, includes Hermes parse chunked-read fixture)
  • Schema accepts agentKind: hermes for external-agent agents
  • CI green on PR checks

@larryro
larryro force-pushed the tale/xx72kevn5xsrz9xkmgdfzz0qdx89ykt8 branch from 8821bbe to dea244c Compare July 5, 2026 14:06
Tale Agent and others added 8 commits July 5, 2026 14:32
'--prompt <text>' broke on prompts starting with '-' (argparse read
them as flags) and leaked the prompt to process lists, violating the
exec contract in agent-adapters/types.ts. The adapter now ships the
prompt and optional system prompt as one JSON object on stdin
(close-mode write + EOF), and tale-hermes-run reads stdin to EOF and
validates the payload before starting the run.
BYO model translation was slug-agnostic: every runtime received the
catalog entry's vendor-native id (nativeModelId). Hermes BYO
authenticates against an OpenRouter-style backend (OPENROUTER_API_KEY),
which speaks the catalog's vendor-prefixed ids — the Anthropic-native
translation (claude-sonnet-4-6) is rejected there.

Each adapter now declares which id dialect its BYO backend speaks
(credentialPolicy.byoModelIdSource: vendor-native | catalog), and
exec_model picks the catalog id or the native id accordingly; raw
user-typed ids still pass through unchanged.
Nothing in CI verified the AIAgent(...) call in tale-hermes-run against
the pinned hermes-agent wheel. The image conformance test now ast-parses
the wrapper (proving it is valid Python), collects every kwarg it passes
to AIAgent(...) and run_conversation(...), and asserts the installed
package's real signatures accept them — a version bump that renames or
removes a kwarg fails the image test instead of the first real run.
The external-agent page claimed gateway-managed Hermes ships Claude
Fable 5 and falls back automatically to Claude Opus 4.8 — but the
shipped hermes agent carries Sonnet 4.6 / Opus 4.8 and its adapter arms
no fallback chain. Scope the Fable default + automatic fallback to
Claude Code and state Hermes runs the whole turn on the picked model.
Also brings the de/fr pages up to the EN Hermes coverage (gateway
credential route, BYO paragraph, cost accounting), phrased natively.
tool_call_end emitted zero-token usage events that only polluted
metering, and mapRunStatus treated ANY error mentioning 'max' (e.g.
'max_tokens exceeded') as an exhausted turn cap. Emit no usage rows and
match only max-turns/max-iterations wording.
The hermes accept case replaced the cursor+byo one instead of being
added alongside it.
@yannickmonney
yannickmonney merged commit ad23c9d into main Jul 6, 2026
17 of 18 checks passed
@yannickmonney
yannickmonney deleted the tale/xx72kevn5xsrz9xkmgdfzz0qdx89ykt8 branch July 6, 2026 22:53
yannickmonney added a commit that referenced this pull request Jul 7, 2026
…leet

The budget was set at 4400 MB when the image was ~4.0 GB; the six external
agent CLIs added since (Cursor #2481, Hermes #2500, Gemini #2535, Codex
#2536, Pi #2550, OpenClaw #2555) grew it to ~4.9 GB and none of those PRs
updated the budget, so the Validate images gate is red on main too. Document
the fleet as a named cost and restore the ~10% headroom convention at 5400.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Implement Hermes Agent as a sandbox external agent (Claude Code parity)

2 participants