返回 html-video
hermes.ts
根目录 / packages / runtime / src / defs / hermes.ts
1 /**
2 * Hermes (Python CLI by Hermes Agent project) as a local agent runtime.
3 *
4 * hermes chat -q "<prompt>" -Q
5 *
6 * `-Q` (quiet) prints just the response text to stdout, prefixed with one
7 * `session_id: ...` header line. We strip that line in the studio prompt
8 * code path so the user doesn't see it.
9 *
10 * Hermes default backend is OpenRouter — same provider Joey already uses,
11 * so any model-side outage that hits Anthropic also hits hermes via the
12 * same route. Useful as a parallel comparison agent rather than a
13 * fundamentally redundant one.
14 */
15 import type { AgentDef } from '../types.js';
16
17 export const hermes: AgentDef = {
18 id: 'hermes',
19 name: 'Hermes (local CLI)',
20 bin: 'hermes',
21 versionArgs: ['version'],
22 buildArgs(prompt) {
23 // hermes -q reads its query from argv (not stdin). argv length on
24 // macOS is ~256KB which fits any reasonable prompt.
25 return ['chat', '-Q', '-q', prompt];
26 },
27 streamFormat: 'plain',
28 installUrl: 'https://hermes.agentinfo.dev',
29 };
30
30 lines TYPESCRIPT