Navigate back to the previous page in browser history. Requires browser_navigate to be called first.

Click on an element identified by its ref ID from the snapshot (e.g., '@e5'). The ref IDs are shown in square brackets in the snapshot output. Requires browser_navigate and browser_snapshot to be called first.

The element reference from the snapshot (e.g., '@e5', '@e12')

Get browser console output and JavaScript errors from the current page. Returns console.log/warn/error/info messages and uncaught JS exceptions. Use this to detect silent JavaScript errors, failed API calls, and application warnings. Requires browser_navigate to be called first. When 'expression' is provided, evaluates JavaScript in the page context and returns the result — use this for DOM inspection, reading page state, or extracting data programmatically.

If true, clear the message buffers after reading

JavaScript expression to evaluate in the page context. Runs in the browser like DevTools console — full access to DOM, window, document. Return values are serialized to JSON. Example: 'document.title' or 'document.querySelectorAll("a").length'

Get a list of all images on the current page with their URLs and alt text. Useful for finding images to analyze with the vision tool. Requires browser_navigate to be called first.

Navigate to a URL in the browser. Initializes the session and loads the page. Must be called before other browser tools. For simple information retrieval, prefer web_search or web_extract (faster, cheaper). For plain-text endpoints — URLs ending in .md, .txt, .json, .yaml, .yml, .csv, .xml, raw.githubusercontent.com, or any documented API endpoint — prefer curl via the terminal tool or web_extract; the browser stack is overkill and much slower for these. Use browser tools when you need to interact with a page (click, fill forms, dynamic content). Returns a compact page snapshot with interactive elements and ref IDs — no need to call browser_snapshot separately after navigating.

The URL to navigate to (e.g., 'https://example.com')

Press a keyboard key. Useful for submitting forms (Enter), navigating (Tab), or keyboard shortcuts. Requires browser_navigate to be called first.

Key to press (e.g., 'Enter', 'Tab', 'Escape', 'ArrowDown')

Scroll the page in a direction. Use this to reveal more content that may be below or above the current viewport. Requires browser_navigate to be called first.

Direction to scroll

Get a text-based snapshot of the current page's accessibility tree. Returns interactive elements with ref IDs (like @e1, @e2) for browser_click and browser_type. full=false (default): compact view with interactive elements. full=true: complete page content. Snapshots over 8000 chars are truncated or LLM-summarized. Requires browser_navigate first. Note: browser_navigate already returns a compact snapshot — use this to refresh after interactions that change the page, or with full=true for complete content.

If true, returns complete page content. If false (default), returns compact view with interactive elements only.

Type text into an input field identified by its ref ID. Clears the field first, then types the new text. Requires browser_navigate and browser_snapshot to be called first.

The element reference from the snapshot (e.g., '@e3')

The text to type into the field

Take a screenshot of the current page and analyze it with vision AI. Use this when you need to visually understand what's on the page - especially useful for CAPTCHAs, visual verification challenges, complex layouts, or when the text snapshot doesn't capture important visual information. Returns both the AI analysis and a screenshot_path that you can share with the user by including MEDIA:<screenshot_path> in your response. Requires browser_navigate to be called first.

What you want to know about the page visually. Be specific about what you're looking for.

If true, overlay numbered [N] labels on interactive elements. Each [N] maps to ref @eN for subsequent browser commands. Useful for QA and spatial reasoning about page layout.

clarify

Ask the user a question when you need clarification, feedback, or a decision before proceeding. Supports two modes:

1. **Multiple choice** — provide up to 4 choices. The user picks one or types their own answer via a 5th 'Other' option.
2. **Open-ended** — omit choices entirely. The user types a free-form response.

Use this tool when:
- The task is ambiguous and you need the user to choose an approach
- You want post-task feedback ('How did that work out?')
- You want to offer to save a skill or update memory
- A decision has meaningful trade-offs the user should weigh in on

Do NOT use this tool for simple yes/no confirmation of dangerous commands (the terminal tool handles that). Prefer making a reasonable default choice yourself when the decision is low-stakes.

The question to present to the user.

Choices:
Up to 4 answer choices. Omit this parameter entirely to ask an open-ended question. When provided, the UI automatically appends an 'Other (type your answer)' option.

cronjob

Manage scheduled cron jobs with a single compressed tool.

Use action='create' to schedule a new job from a prompt or one or more skills.
Use action='list' to inspect jobs.
Use action='update', 'pause', 'resume', 'remove', or 'run' to manage an existing job.

To stop a job the user no longer wants: first action='list' to find the job_id, then action='remove' with that job_id. Never guess job IDs — always list first.

Jobs run in a fresh session with no current-chat context, so prompts must be self-contained.
If skills are provided on create, the future cron run loads those skills in order, then follows the prompt as the task instruction.
On update, passing skills=[] clears attached skills.

NOTE: The agent's final response is auto-delivered to the target. Put the primary
user-facing content in the final response. Cron jobs run autonomously with no user
present — they cannot ask questions or request clarification.

Important safety rule: cron-run sessions should not recursively schedule more cron jobs.

One of: create, list, update, pause, resume, remove, run

Required for update/pause/resume/remove/run

For create: the full self-contained prompt. If skills are also provided, this becomes the task instruction paired with those skills.

For create/update: '30m', 'every 2h', '0 9 * * *', or ISO timestamp

Optional human-friendly name

Optional repeat count. Omit for defaults (once for one-shot, forever for recurring).

Omit this parameter to auto-deliver back to the current chat and topic (recommended). Auto-detection preserves thread/topic context. Only set explicitly when the user asks to deliver somewhere OTHER than the current conversation. Values: 'origin' (same as omitting), 'local' (no delivery, save only), 'all' (fan out to every connected home channel), or platform:chat_id:thread_id for a specific destination. Combine with comma: 'origin,all' delivers to the origin plus every other connected channel. Examples: 'telegram:-1001234567890:17585', 'discord:#engineering', 'sms:+15551234567', 'all'. WARNING: 'platform:chat_id' without :thread_id loses topic targeting. 'all' resolves at fire time, so a job created before a channel was wired up will pick it up automatically once connected.

Optional ordered list of skill names to load before executing the cron prompt. On update, pass an empty array to clear attached skills.

Optional per-job model override. If provider is omitted, the current main provider is pinned at creation time so the job stays stable.

Provider name (e.g. 'openrouter', 'anthropic', or 'custom:<name>' for a provider defined in custom_providers config — always include the ':<name>' suffix, never pass the bare 'custom'). Omit to use and pin the current provider.

Model name (e.g. 'anthropic/claude-sonnet-4', 'claude-sonnet-4')

Optional path to a script that runs each tick. In the default mode its stdout is injected into the agent's prompt as context (data-collection / change-detection pattern). With no_agent=True, the script IS the job and its stdout is delivered verbatim (classic watchdog pattern). Relative paths resolve under ~/.hermes/scripts/. ``.sh``/``.bash`` extensions run via bash, everything else via Python. On update, pass empty string to clear.

Default: False (LLM-driven job — the agent runs the prompt each tick). Set True to skip the LLM entirely: the scheduler just runs ``script`` on schedule and delivers its stdout verbatim. No tokens, no agent loop, no model override honoured.

REQUIREMENTS when True: ``script`` MUST be set (``prompt`` and ``skills`` are ignored).

DELIVERY SEMANTICS when True: (a) non-empty stdout is sent verbatim as the message; (b) EMPTY stdout means SILENT — nothing is sent to the user and they won't see anything happened, so design your script to stay quiet when there's nothing to report (the watchdog pattern); (c) non-zero exit / timeout sends an error alert so a broken watchdog can't fail silently.

WHEN TO USE True: recurring script-only pings where the script itself produces the exact message text (memory/disk/GPU watchdogs, threshold alerts, heartbeats, CI notifications, API pollers with a fixed output shape). WHEN TO USE False (default): anything that needs reasoning — summarize a feed, draft a daily briefing, pick interesting items, rephrase data for a human, follow conditional logic based on content.

Optional job ID or list of job IDs whose most recent completed output is injected into the prompt as context before each run. Use this to chain cron jobs: job A collects data, job B processes it. Each entry must be a valid job ID (from cronjob action='list'). Note: injects the most recent completed output — does not wait for upstream jobs running in the same tick. On update, pass an empty array to clear.

Optional list of toolset names to restrict the job's agent to (e.g. ["web", "terminal", "file", "delegation"]). When set, only tools from these toolsets are loaded, significantly reducing input token overhead. When omitted, all default tools are loaded. Infer from the job's prompt — e.g. use "web" if it calls web_search, "terminal" if it runs scripts, "file" if it reads files, "delegation" if it calls delegate_task. On update, pass an empty array to clear.

Optional absolute path to run the job from. When set, AGENTS.md / CLAUDE.md / .cursorrules from that directory are injected into the system prompt, and the terminal/file/code_exec tools use it as their working directory — useful for running a job inside a specific project repo. Must be an absolute path that exists. When unset (default), preserves the original behaviour: no project context files, tools use the scheduler's cwd. On update, pass an empty string to clear. Jobs with workdir run sequentially (not parallel) to keep per-job directories isolated.

Spawn one or more subagents to work on tasks in isolated contexts. Each subagent gets its own conversation, terminal session, and toolset. Only the final summary is returned -- intermediate tool results never enter your context window.

TWO MODES (one of 'goal' or 'tasks' is required):
1. Single task: provide 'goal' (+ optional context, toolsets)
2. Batch (parallel): provide 'tasks' array with up to 3 items concurrently for this user (configured via delegation.max_concurrent_children in config.yaml). All run in parallel and results are returned together. Nested delegation is OFF for this user (max_spawn_depth=1): every child is a leaf and cannot delegate further. Raise delegation.max_spawn_depth in config.yaml to enable nesting.

WHEN TO USE delegate_task:
- Reasoning-heavy subtasks (debugging, code review, research synthesis)
- Tasks that would flood your context with intermediate data
- Parallel independent workstreams (research A and B simultaneously)

WHEN NOT TO USE (use these instead):
- Mechanical multi-step work with no reasoning needed -> use execute_code
- Single tool call -> just call the tool directly
- Tasks needing user interaction -> subagents cannot use clarify
- Durable long-running work that must outlive the current turn -> use cronjob (action='create') or terminal(background=True, notify_on_complete=True) instead. delegate_task runs SYNCHRONOUSLY inside the parent turn: if the parent is interrupted (user sends a new message, /stop, /new) the child is cancelled with status='interrupted' and its work is discarded. Children cannot continue in the background.

IMPORTANT:
- Subagents have NO memory of your conversation. Pass all relevant info (file paths, error messages, constraints) via the 'context' field.
- If the user is writing in a non-English language, or asked for output in a specific language / tone / style, say so in 'context' (e.g. "respond in Chinese", "return output in Japanese"). Otherwise subagents default to English and their summaries will contaminate your final reply with the wrong language.
- Subagent summaries are SELF-REPORTS, not verified facts. A subagent that claims "uploaded successfully" or "file written" may be wrong. For operations with external side-effects (HTTP POST/PUT, remote writes, file creation at shared paths, publishing), require the subagent to return a verifiable handle (URL, ID, absolute path, HTTP status) and verify it yourself — fetch the URL, stat the file, read back the content — before telling the user the operation succeeded.
- Leaf subagents (role='leaf', the default) CANNOT call: delegate_task, clarify, memory, send_message, execute_code.
- Orchestrator subagents (role='orchestrator') retain delegate_task so they can spawn their own workers, but still cannot use clarify, memory, send_message, or execute_code. Orchestrators are bounded by max_spawn_depth=1 for this user and can be disabled globally via delegation.orchestrator_enabled=false.
- Each subagent gets its own terminal session (separate working directory and state).
- Results are always returned as an array, one entry per task.

What the subagent should accomplish. Be specific and self-contained -- the subagent knows nothing about your conversation history.

Background information the subagent needs: file paths, error messages, project structure, constraints. The more specific you are, the better the subagent performs.

Toolsets to enable for this subagent. Default: inherits your enabled toolsets. Available toolsets: 'browser', 'computer_use', 'cronjob', 'discord', 'discord_admin', 'feishu_doc', 'feishu_drive', 'file', 'homeassistant', 'image_gen', 'kanban', 'search', 'session_search', 'skills', 'spotify', 'terminal', 'todo', 'tts', 'video', 'video_gen', 'vision', 'web', 'x_search', 'yuanbao'. Common patterns: ['terminal', 'file'] for code work, ['web'] for research, ['browser'] for web interaction, ['terminal', 'file', 'web'] for full-stack tasks.

Task goal

Task-specific context

Toolsets for this specific task. Available: 'browser', 'computer_use', 'cronjob', 'discord', 'discord_admin', 'feishu_doc', 'feishu_drive', 'file', 'homeassistant', 'image_gen', 'kanban', 'search', 'session_search', 'skills', 'spotify', 'terminal', 'todo', 'tts', 'video', 'video_gen', 'vision', 'web', 'x_search', 'yuanbao'. Use 'web' for network access, 'terminal' for shell, 'browser' for web interaction.

Per-task ACP command override (e.g. 'copilot'). Overrides the top-level acp_command for this task only. Do NOT set unless the user explicitly told you an ACP CLI is installed.

Per-task ACP args override. Leave empty unless acp_command is set.

Per-task role override. See top-level 'role' for semantics.

Batch mode: tasks to run in parallel (up to 3 for this user, set via delegation.max_concurrent_children). Each gets its own subagent with isolated context and terminal session. When provided, top-level goal/context/toolsets are ignored.

Role of the child agent. 'leaf' (default) = focused worker, cannot delegate further. 'orchestrator' = can use delegate_task to spawn its own workers. Nesting is OFF for this user (max_spawn_depth=1); 'orchestrator' is silently forced to 'leaf'. Raise delegation.max_spawn_depth in config.yaml to enable.

Override ACP command for child agents (e.g. 'copilot'). When set, children use ACP subprocess transport instead of inheriting the parent's transport. Requires an ACP-compatible CLI (currently GitHub Copilot CLI via 'copilot --acp --stdio'). See agent/copilot_acp_client.py for the implementation. IMPORTANT: Do NOT set this unless the user has explicitly told you a specific ACP-compatible CLI is installed and configured. Leave empty to use the parent's default transport (Hermes subagents).

Arguments for the ACP command (default: ['--acp', '--stdio']). Only used when acp_command is set. Leave empty unless acp_command is explicitly provided.

Run a Python script that can call Hermes tools programmatically. Use this when you need 3+ tool calls with processing logic between them, need to filter/reduce large tool outputs before they enter your context, need conditional branching (if X then Y else Z), or need to loop (fetch N pages, process N files, retry on failure).

Use normal tool calls instead when: single tool call with no processing, you need to see the full result and apply complex reasoning, or the task requires interactive user input.

Available via `from hermes_tools import ...`:

  web_search(query: str, limit: int = 5) -> dict
    Returns {"data": {"web": [{"url", "title", "description"}, ...]}}
  web_extract(urls: list[str]) -> dict
    Returns {"results": [{"url", "title", "content", "error"}, ...]} where content is markdown
  read_file(path: str, offset: int = 1, limit: int = 500) -> dict
    Lines are 1-indexed. Returns {"content": "...", "total_lines": N}
  write_file(path: str, content: str) -> dict
    Always overwrites the entire file.
  search_files(pattern: str, target="content", path=".", file_glob=None, limit=50) -> dict
    target: "content" (search inside files) or "files" (find files by name). Returns {"matches": [...]}
  patch(path: str, old_string: str, new_string: str, replace_all: bool = False) -> dict
    Replaces old_string with new_string in the file.
  terminal(command: str, timeout=None, workdir=None) -> dict
    Foreground only (no background/pty). Returns {"output": "...", "exit_code": N}

Limits: 5-minute timeout, 50KB stdout cap, max 50 tool calls per script. terminal() is foreground-only (no background or pty).

Scripts run in the session's working directory with the active venv's python, so project deps (pandas, etc.) and relative paths work like in terminal().

Print your final result to stdout. Use Python stdlib (json, re, math, csv, datetime, collections, etc.) for processing between tool calls.

Also available (no import needed — built into hermes_tools):
  json_parse(text: str) — json.loads with strict=False; use for terminal() output with control chars
  shell_quote(s: str) — shlex.quote(); use when interpolating dynamic strings into shell commands
  retry(fn, max_attempts=3, delay=2) — retry with exponential backoff for transient failures

Python code to execute. Import tools with `from hermes_tools import web_search, terminal, ...` and print your final result to stdout.

memory

Save durable information to persistent memory that survives across sessions. Memory is injected into future turns, so keep it compact and focused on facts that will still matter later.

WHEN TO SAVE (do this proactively, don't wait to be asked):
- User corrects you or says 'remember this' / 'don't do that again'
- User shares a preference, habit, or personal detail (name, role, timezone, coding style)
- You discover something about the environment (OS, installed tools, project structure)
- You learn a convention, API quirk, or workflow specific to this user's setup
- You identify a stable fact that will be useful again in future sessions

PRIORITY: User preferences and corrections > environment facts > procedural knowledge. The most valuable memory prevents the user from having to repeat themselves.

Do NOT save task progress, session outcomes, completed-work logs, or temporary TODO state to memory; use session_search to recall those from past transcripts.
If you've discovered a new way to do something, solved a problem that could be necessary later, save it as a skill with the skill tool.

TWO TARGETS:
- 'user': who the user is -- name, role, preferences, communication style, pet peeves
- 'memory': your notes -- environment facts, project conventions, tool quirks, lessons learned

ACTIONS: add (new entry), replace (update existing -- old_text identifies it), remove (delete -- old_text identifies it).

SKIP: trivial/obvious info, things easily re-discovered, raw data dumps, and temporary task state.

The action to perform.

Which memory store: 'memory' for personal notes, 'user' for user profile.

The entry content. Required for 'add' and 'replace'.

Short unique substring identifying the entry to replace or remove.

patch

Targeted find-and-replace edits in files. Use this instead of sed/awk in terminal. Uses fuzzy matching (9 strategies) so minor whitespace/indentation differences won't break it. Returns a unified diff. Auto-runs syntax checks after editing.

REPLACE MODE (mode='replace', default): find a unique string and replace it. REQUIRED PARAMETERS: mode, path, old_string, new_string.
PATCH MODE (mode='patch'): apply V4A multi-file patches for bulk changes. REQUIRED PARAMETERS: mode, patch.

Edit mode. 'replace' (default): requires path + old_string + new_string. 'patch': requires patch content only.

REQUIRED when mode='replace'. File path to edit.

REQUIRED when mode='replace'. Exact text to find and replace. Must be unique in the file unless replace_all=true. Include surrounding context lines to ensure uniqueness.

REQUIRED when mode='replace'. Replacement text. Pass empty string '' to delete the matched text.

Replace all occurrences instead of requiring a unique match (default: false)

REQUIRED when mode='patch'. V4A format patch content. Format:
*** Begin Patch
*** Update File: path/to/file
@@ context hint @@
 context line
-removed line
+added line
*** End Patch

process

Manage background processes started with terminal(background=true). Actions: 'list' (show all), 'poll' (check status + new output), 'log' (full output with pagination), 'wait' (block until done or timeout), 'kill' (terminate), 'write' (send raw stdin data without newline), 'submit' (send data + Enter, for answering prompts), 'close' (close stdin/send EOF).

list poll log wait kill write submit close

Action to perform on background processes

Process session ID (from terminal background output). Required for all actions except 'list'.

Text to send to process stdin (for 'write' and 'submit' actions)

Max seconds to block for 'wait' action. Returns partial output on timeout.

Line offset for 'log' action (default: last 200 lines)

Max lines to return for 'log' action

Read a text file with line numbers and pagination. Use this instead of cat/head/tail in terminal. Output format: 'LINE_NUM|CONTENT'. Suggests similar filenames if not found. Use offset and limit for large files. Reads exceeding ~100K characters are rejected; use offset and limit to read specific sections of large files. NOTE: Cannot read images or binary files — use vision_analyze for images.

Path to the file to read (absolute, relative, or ~/path)

Line number to start reading from (1-indexed, default: 1)

Maximum number of lines to read (default: 500, max: 2000)

Search file contents or find files by name. Use this instead of grep/rg/find/ls in terminal. Ripgrep-backed, faster than shell equivalents.

Content search (target='content'): Regex search inside files. Output modes: full matches with line numbers, file paths only, or match counts.

File search (target='files'): Find files by glob pattern (e.g., '*.py', '*config*'). Also use this instead of ls — results sorted by modification time.

Regex pattern for content search, or glob pattern (e.g., '*.py') for file search

'content' searches inside file contents, 'files' searches for files by name

Directory or file to search in (default: current working directory)

Filter files by pattern in grep mode (e.g., '*.py' to only search Python files)

Maximum number of results to return (default: 50)

Skip first N results for pagination (default: 0)

Output format for grep mode: 'content' shows matching lines with line numbers, 'files_only' lists file paths, 'count' shows match counts per file

Number of context lines before and after each match (grep mode only)

Send a message to a connected messaging platform, or list available targets.

IMPORTANT: When the user asks to send to a specific channel or person (not just a bare platform name), call send_message(action='list') FIRST to see available targets, then send to the correct one.
If the user just says a platform name like 'send to telegram', send directly to the home channel without listing first.

Action to perform. 'send' (default) sends a message. 'list' returns all available channels/contacts across connected platforms.

Delivery target. Format: 'platform' (uses home channel), 'platform:#channel-name', 'platform:chat_id', or 'platform:chat_id:thread_id' for Telegram topics and Discord threads. Examples: 'telegram', 'telegram:-1001234567890:17585', 'discord:999888777:555444333', 'discord:#bot-home', 'slack:#engineering', 'signal:+155****4567', 'matrix:!roomid:server.org', 'matrix:@user:server.org', 'yuanbao:direct:<account_id>' (DM), 'yuanbao:group:<group_code>' (group chat)

The message text to send. To send an image or file, include MEDIA:<local_path> (e.g. 'MEDIA:/tmp/hermes/cache/img_xxx.jpg') in the message — the platform will deliver it as a native media attachment.

Search your long-term memory of past conversations, or browse recent sessions. This is your recall -- every past session is searchable, and this tool summarizes what happened.

TWO MODES:
1. Recent sessions (no query): Call with no arguments to see what was worked on recently. Returns titles, previews, and timestamps. Zero LLM cost, instant. Start here when the user asks what were we working on or what did we do recently.
2. Keyword search (with query): Search for specific topics across all past sessions. Returns LLM-generated summaries of matching sessions.

USE THIS PROACTIVELY when:
- The user says 'we did this before', 'remember when', 'last time', 'as I mentioned'
- The user asks about a topic you worked on before but don't have in current context
- The user references a project, person, or concept that seems familiar but isn't in memory
- You want to check if you've solved a similar problem before
- The user asks 'what did we do about X?' or 'how did we fix Y?'

Don't hesitate to search when it is actually cross-session -- it's fast and cheap. Better to search and confirm than to guess or ask the user to repeat themselves.

Search syntax: keywords joined with OR for broad recall (elevenlabs OR baseten OR funding), phrases for exact match ("docker networking"), boolean (python NOT java), prefix (deploy*). IMPORTANT: Use OR between keywords for best results — FTS5 defaults to AND which misses sessions that only mention some terms. If a broad OR query returns nothing, try individual keyword searches in parallel. Returns summaries of the top matching sessions.

Search query — keywords, phrases, or boolean expressions to find in past sessions. Omit this parameter entirely to browse recent sessions instead (returns titles, previews, timestamps with no LLM cost).

Optional: only search messages from specific roles (comma-separated). E.g. 'user,assistant' to skip tool outputs.

Max sessions to summarize (default: 3, max: 5).

Manage skills (create, update, delete). Skills are your procedural memory — reusable approaches for recurring task types. New skills go to ~/.hermes/skills/; existing skills can be modified wherever they live.

Actions: create (full SKILL.md + optional category), patch (old_string/new_string — preferred for fixes), edit (full SKILL.md rewrite — major overhauls only), delete, write_file, remove_file.

On delete, pass `absorbed_into=<umbrella>` when you're merging this skill's content into another one, or `absorbed_into=""` when you're pruning it with no forwarding target. This lets the curator tell consolidation from pruning without guessing, so downstream consumers (cron jobs that reference the old skill name, etc.) get updated correctly. The target you name in `absorbed_into` must already exist — create/patch the umbrella first, then delete.

Create when: complex task succeeded (5+ calls), errors overcome, user-corrected approach worked, non-trivial workflow discovered, or user asks you to remember a procedure.
Update when: instructions stale/wrong, OS-specific failures, missing steps or pitfalls found during use. If you used a skill and hit issues not covered by it, patch it immediately.

After difficult/iterative tasks, offer to save as a skill. Skip for simple one-offs. Confirm with user before creating/deleting.

Good skills: trigger conditions, numbered steps with exact commands, pitfalls section, verification steps. Use skill_view() to see format examples.

Pinned skills are protected from deletion only — skill_manage(action='delete') will refuse with a message pointing the user to `hermes curator unpin <name>`. Patches and edits go through on pinned skills so you can still improve them as pitfalls come up; pin only guards against irrecoverable loss.

create patch edit delete write_file remove_file

The action to perform.

Skill name (lowercase, hyphens/underscores, max 64 chars). Must match an existing skill for patch/edit/delete/write_file/remove_file.

Full SKILL.md content (YAML frontmatter + markdown body). Required for 'create' and 'edit'. For 'edit', read the skill first with skill_view() and provide the complete updated text.

Text to find in the file (required for 'patch'). Must be unique unless replace_all=true. Include enough surrounding context to ensure uniqueness.

Replacement text (required for 'patch'). Can be empty string to delete the matched text.

For 'patch': replace all occurrences instead of requiring a unique match (default: false).

Optional category/domain for organizing the skill (e.g., 'devops', 'data-science', 'mlops'). Creates a subdirectory grouping. Only used with 'create'.

Path to a supporting file within the skill directory. For 'write_file'/'remove_file': required, must be under references/, templates/, scripts/, or assets/. For 'patch': optional, defaults to SKILL.md if omitted.

Content for the file. Required for 'write_file'.

For 'delete' only — declares intent so the curator can tell consolidation from pruning without guessing. Pass the umbrella skill name when this skill's content was merged into another (the target must already exist). Pass an empty string when the skill is truly stale and being pruned with no forwarding target. Omitting the arg on delete is supported for backward compatibility but downstream tooling (e.g. cron-job skill reference rewriting) will have to guess at intent.

Skills allow for loading information about specific tasks and workflows, as well as scripts and templates. Load a skill's full content or access its linked files (references, templates, scripts). First call returns SKILL.md content plus a 'linked_files' dict showing available references/templates/scripts. To access those, call again with file_path parameter.

The skill name (use skills_list to see available skills). For plugin-provided skills, use the qualified form 'plugin:skill' (e.g. 'superpowers:writing-plans').

OPTIONAL: Path to a linked file within the skill (e.g., 'references/api.md', 'templates/config.yaml', 'scripts/validate.py'). Omit to get the main SKILL.md content.

List available skills (name + description). Use skill_view(name) to load full content.

Optional category filter to narrow results

terminal

Execute shell commands on a Linux environment. Filesystem usually persists between calls.

Do NOT use cat/head/tail to read files — use read_file instead.
Do NOT use grep/rg/find to search — use search_files instead.
Do NOT use ls to list directories — use search_files(target='files') instead.
Do NOT use sed/awk to edit files — use patch instead.
Do NOT use echo/cat heredoc to create files — use write_file instead.
Reserve terminal for: builds, installs, git, processes, scripts, network, package managers, and anything that needs a shell.

Foreground (default): Commands return INSTANTLY when done, even if the timeout is high. Set timeout=300 for long builds/scripts — you'll still get the result in seconds if it's fast. Prefer foreground for short commands.
Background: Set background=true to get a session_id. Two patterns:
  (1) Long-lived processes that never exit (servers, watchers).
  (2) Long-running tasks with notify_on_complete=true — you can keep working on other things and the system auto-notifies you when the task finishes. Great for test suites, builds, deployments, or anything that takes more than a minute.
For servers/watchers, do NOT use shell-level background wrappers (nohup/disown/setsid/trailing '&') in foreground mode. Use background=true so Hermes can track lifecycle and output.
After starting a server, verify readiness with a health check or log signal, then run tests in a separate terminal() call. Avoid blind sleep loops.
Use process(action="poll") for progress checks, process(action="wait") to block until done.
Working directory: Use 'workdir' for per-command cwd.
PTY mode: Set pty=true for interactive CLI tools (Codex, Claude Code, Python REPL).

Do NOT use vim/nano/interactive tools without pty=true — they hang without a pseudo-terminal. Pipe git output to cat if it might page.

The command to execute on the VM

Run the command in the background. Two patterns: (1) Long-lived processes that never exit (servers, watchers). (2) Long-running tasks paired with notify_on_complete=true — you can keep working and get notified when the task finishes. For short commands, prefer foreground with a generous timeout instead.

Max seconds to wait (default: 180, foreground max: 600). Returns INSTANTLY when command finishes — set high for long tasks, you won't wait unnecessarily. Foreground timeout above 600s is rejected; use background=true for longer commands.

Working directory for this command (absolute path). Defaults to the session working directory.

Run in pseudo-terminal (PTY) mode for interactive CLI tools like Codex, Claude Code, or Python REPL. Only works with local and SSH backends. Default: false.

When true (and background=true), you'll be automatically notified exactly once when the process finishes. **This is the right choice for almost every long-running task** — tests, builds, deployments, multi-item batch jobs, anything that takes over a minute and has a defined end. Use this and keep working on other things; the system notifies you on exit. MUTUALLY EXCLUSIVE with watch_patterns — when both are set, watch_patterns is dropped.

Strings to watch for in background process output. HARD RATE LIMIT: at most 1 notification per 15 seconds per process — matches arriving inside the cooldown are dropped. After 3 consecutive 15-second windows with dropped matches, watch_patterns is automatically disabled for that process and promoted to notify_on_complete behavior (one notification on exit, no more mid-process spam). USE ONLY for truly rare, one-shot mid-process signals on LONG-LIVED processes that will never exit on their own — e.g. ['Application startup complete'] on a server so you know when to hit its endpoint, or ['migration done'] on a daemon. DO NOT use for: (1) end-of-run markers like 'DONE'/'PASS' — use notify_on_complete instead; (2) error patterns like 'ERROR'/'Traceback' in loops or multi-item batch jobs — they fire on every iteration and you'll hit the strike limit fast; (3) anything you'd ever combine with notify_on_complete. When in doubt, choose notify_on_complete. MUTUALLY EXCLUSIVE with notify_on_complete — set one, not both.

Convert text to speech audio. Returns a MEDIA: path that the platform delivers as native audio. Compatible providers render as a voice bubble on Telegram; otherwise audio is sent as a regular attachment. In CLI mode, saves to ~/voice-memos/. Voice and provider are user-configured (built-in providers like edge/openai or custom command providers under tts.providers.<name>), not model-selected.

The text to convert to speech. Provider-specific character caps apply and are enforced automatically (OpenAI 4096, xAI 15000, MiniMax 10000, ElevenLabs 5k-40k depending on model); over-long input is truncated.

Optional custom file path to save the audio. Defaults to ~/.hermes/audio_cache/<timestamp>.mp3

todo

Manage your task list for the current session. Use for complex tasks with 3+ steps or when the user provides multiple tasks. Call with no parameters to read the current list.

Writing:
- Provide 'todos' array to create/update items
- merge=false (default): replace the entire list with a fresh plan
- merge=true: update existing items by id, add any new ones

Each item: {id: string, content: string, status: pending|in_progress|completed|cancelled}
List order is priority. Only ONE item in_progress at a time.
Mark items completed immediately when done. If something fails, cancel it and add a revised item.

Always returns the full current list.

Task items to write. Omit to read current list.

Unique item identifier

Task description

Current status

true: update existing items by id, add new ones. false (default): replace the entire list.

Load an image into the conversation so you can see it. Accepts a URL, local file path, or data URL. When your active model has native vision, the image is attached to your context directly and you read the pixels yourself on the next turn — call this any time the user references an image (filepath in their message, URL in tool output, screenshot from the browser, etc.). For non-vision models, falls back to an auxiliary vision model that returns a text description.

Image URL (http/https), local file path, or data: URL to load.

Your specific question or request about the image. Optional context the model uses on the next turn after seeing the image.

Extract content from web page URLs. Returns page content in markdown format. Also works with PDF URLs (arxiv papers, documents, etc.) — pass the PDF link directly and it converts to markdown text. Pages under 5000 chars return full markdown; larger pages are LLM-summarized and capped at ~5000 chars per page. Pages over 2M chars are refused. If a URL fails or times out, use the browser tool to access it instead.

List of URLs to extract content from (max 5 URLs per call)

Search the web for information. Returns up to 5 results by default with titles, URLs, and descriptions. The query is passed through to the configured backend, so operators such as site:domain, filetype:pdf, intitle:word, -term, and "exact phrase" may work when the backend supports them.

The search query to look up on the web. You may include backend-supported operators such as site:example.com, filetype:pdf, intitle:word, -term, or "exact phrase".

Maximum number of results to return. Defaults to 5.

Write content to a file, completely replacing existing content. Use this instead of echo/cat heredoc in terminal. Creates parent directories automatically. OVERWRITES the entire file — use 'patch' for targeted edits. Auto-runs syntax checks on .py/.json/.yaml/.toml and other linted languages; only NEW errors introduced by this write are surfaced (pre-existing errors are filtered out).

Path to the file to write (will be created if it doesn't exist, overwritten if it does)

Complete content to write to the file


早。昨晚系统重置了，问我有什么事？

Explanation:
The user just sent "？" which is a question mark in Chinese. This seems like they're asking something or confused. Let me check my memory and context to understand what's happening.

Looking at the memory note, there's something about MiniMax account balance being exhausted on 2026-05-18, with many `insufficient balance (1008)` errors. This might be related to the system reset mentioned in the session context.

The session was automatically reset by daily schedule - this is a fresh conversation. The user might be confused about something or asking a clarifying question.

Since this is a fresh session and the user just sent "？", I should respond simply and ask what they need help with.


每日播报的skills怎么样了 测试一下 在运行的电脑上


Explanation: The user is asking about the morning briefing cron job. Let me check the cron jobs to see if the morning-briefing is still set up and running.


cronjob

morning-briefing

你是 K. W. 的早晨播报员。

## 任务
搜索当日新闻和天气，整理成播报文本，然后调用 text_to_speech 转为语音。

## 新闻搜索
用 web_search 搜索：
1. "今日...


每日播报 cron 在（job ID: `18c46fde1520`），每天 9:00 运行，上次运行 `03:40` 状态 OK。

现在手动触发测试一下：

Explanation:
The morning-briefing cron job exists (job_id: 18c46fde1520). It was last run at 03:40 and succeeded. It runs at 9 AM daily and delivers to Telegram.

Let me test it by running it now to see if it works.


Explanation: The cron job ran, but I need to see what happened. Let me check the cron output to see if it succeeded and what it delivered.

terminal

ls -la ~/.hermes/cron/output/ 2>/dev/null | tail -5


Output:
总计 12
drwx------ 3 kuhnn kuhnn 4096 May 18 03:25 .
drwx------ 3 kuhnn kuhnn 4096 May 18 04:18 ..
drwx------ 2 kuhnn kuhnn 4096 May 18 03:40 18c46fde1520


Explanation: Let me check the latest output from the cron job that just ran.

ls -la ~/.hermes/cron/output/18c46fde1520/ | tail -5


Output:
drwx------ 3 kuhnn kuhnn 4096 May 18 03:25 ..
-rw------- 1 kuhnn kuhnn 2250 May 18 03:25 2026-05-18_03-25-04.md
-rw------- 1 kuhnn kuhnn 2405 May 18 03:28 2026-05-18_03-28-44.md
-rw------- 1 kuhnn kuhnn 2715 May 18 03:31 2026-05-18_03-31-27.md
-rw------- 1 kuhnn kuhnn 2987 May 18 03:40 2026-05-18_03-40-15.md


Explanation:
The cron job is running but the output is being saved locally rather than sent to Telegram. Let me check the latest output file and also see what the actual run produced. The `last_status` was "ok" but I don't see a new file from the manual run I just triggered. Let me wait a moment and check again.

Actually, looking at the job - it shows `deliver: "telegram"` so it should be sending to Telegram. But there was a `last_delivery_error: null`. Let me check the latest output file to see what was generated.


Output:
# Cron Job: morning-briefing

**Job ID:** 18c46fde1520
**Run Time:** 2026-05-18 03:40:15
**Schedule:** 0 9 * * *

## Prompt

[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more.]

你是 K. W. 的早晨播报员。

## 任务
搜索当日新闻和天气，整理成播报文本，然后调用 text_to_speech 转为语音。

## 新闻搜索
用 web_search 搜索：
1. "今日头条 中国新闻" → 取 2-3 条重要新闻
2. "杭州/北京 天气 今天" → 获取温度和天气状况

## 内容要求
整合成以下结构的播报：

**开头**：K.W.，早上好！欢迎收听今天的信息播报。

**日期**：今天是二零二六年五月十八日，星期一。（用中文数字）

**新闻**：简述 2-3 条重要新闻，每条一句话。

**天气**：今天[城市]天气[状况]，气温[最低温度]到[最高温度]度。（温度用中文）

**结尾**：以上就是今天的播报，祝你有愉快的一天！

## 数字转换规则（重要！）
- 所有阿拉伯数字必须转为中文汉字
- 温度：18°C → "十八度"，27°C → "二十七度"
- 日期：5月18日 → "五月十八日"，星期一
- 年份：2026 → "二零二六"
- 百分比：85% → "百分之八十五"
- 如果新闻中有数字，也要转为中文（如"七十九年"）

## TTS 调用
- 使用 text_to_speech 工具（provider: minimax, model: speech-02-hd, voice: Chinese (Mandarin)_News_Anchor）
- 输出 .ogg 格式文件
- 在回复末尾写：MEDIA:/home/kuhnn/.hermes/audio_cache/tts_YYYYMMDD_HHMMSS.ogg

## 播报风格
亲切、自然，像朋友在给你说"早上好"。
内容控制在 300 字以内（大约 1-2 分钟语音）。

## Response

K.W.，早上好！欢迎收听今天的信息播报。

**今天是二零二六年五月十八日，星期一。**

**新闻摘要：**

- 白宫公布，中国承诺在未来三年每年至少采购一百七十亿美元美国农产品，美中两国将共同成立美中贸易委员会和美中投资委员会。数据显示，二零二五年美国对华农产品出口同比下跌百分之六十五点七，降至八十四亿美元。
- 中国外交部宣布，应国家主席习近平邀请，美国总统特朗普于五月十三日至十五日对中国进行国事访问。

**杭州天气预报：**

今天杭州天气多云，气温二十到三十二度，湿度百分之三十七，东南风二级。

---

> ⚠ TTS 生成失败：MINIMAX_API_KEY 未配置。请在 https://platform.minimax.io 获取 API Key 后重新尝试。


Explanation:
OK so I can see:
1. The cron job is running
2. It successfully generates the briefing text
3. But TTS is failing because MINIMAX_API_KEY is not set

The memory says MiniMax 账户余额耗尽 — but the actual issue here is that MINIMAX_API_KEY isn't set at all in the environment. Let me check if it's set.

echo "MINIMAX_API_KEY: ${MINIMAX_API_KEY:0:8}..." 2>/dev/null || echo "not set"


Output: MINIMAX_API_KEY: ...


Explanation:
The MINIMAX_API_KEY is set in the environment (it's masked). But the cron job ran at 03:40 and reported TTS failed because MINIMAX_API_KEY was "not configured". This is confusing. Let me check the current state more carefully.

Wait - the cron output shows it ran at 03:40 and failed TTS. I just triggered a manual run at 04:18. Let me wait a bit and check the output. The manual run was triggered but the result is async - I won't see it immediately.

Actually, looking at the job status - the `last_run_at` was 03:40 and next_run_at is 04:18 (which was the manual run I just triggered). But the status says "ok" not "running". Let me wait and check if a new output file was created.

Let me check the output directory again to see if a new file was created from my manual run.

ls -lat ~/.hermes/cron/output/18c46fde1520/ | head -5


Output:
总计 24
drwx------ 2 kuhnn kuhnn 4096 May 18 03:40 .
-rw------- 1 kuhnn kuhnn 2987 May 18 03:40 2026-05-18_03-40-15.md
-rw------- 1 kuhnn kuhnn 2715 May 18 03:31 2026-05-18_03-31-27.md
-rw------- 1 kuhnn kuhnn 2405 May 18 03:28 2026-05-18_03-28-44.md


刚刚手动触发了，但输出文件还没生成。可能有点延迟。

**目前状态：**
- ✅ Cron Job 在运行（morning-briefing, ID: 18c46fde1520）
- ✅ 新闻搜索 + 文本整理 工作正常
- ⚠ TTS 语音失败 —— `MINIMAX_API_KEY` 未配置

**TTS 问题**：
昨晚的错误一样——`MINIMAX_API_KEY` 环境变量是空的。MiniMax 年计划还有用量，但 key 没设置进环境。

要去 platform.minimax.io 查看/设置 API key 吗？还是先把 TTS 部分绕过，直接发文字版播报？

Explanation:
It seems like the job did run (that's the 03:40 file), but the new run (04:18) didn't produce an output file yet. It ran, but the file might not be there yet or there was an issue with the delivery.

Let me check the current state. Actually, looking at the cron job run response: "next_run_at": "2026-05-18T04:18:15" - this was the next run time AFTER the manual trigger, which means the manual run DID happen (03:40 was the last auto run, 04:18 was the manual trigger).

But there might be a timing issue - the cron system updated next_run_at to 04:18 based on my manual run triggering it at around 04:18.

The TTS error in the 03:40 output confirms that MINIMAX_API_KEY is still missing, but my manual run just now should have executed successfully. The output file might just be delayed in appearing, or there could be a delivery issue that's preventing it from showing up.


检查本地模型


Explanation: The user wants to check local models. Let me check what's available locally - likely LLM models that can run locally (like llama.cpp, ollama, etc.)

ps aux | grep -E 'ollama|llama|vllm|lmstudio|local' | grep -v grep


Output: avahi        720  0.0  0.0   7772  3528 ?        Ss   01:25   0:00 avahi-daemon: running [kuhnn-Lenovo-ideapad-710S-13ISK.local]


Explanation: No local LLM server running. Let me check if ollama is installed at all.

which ollama && ollama list 2>/dev/null; ls ~/.ollama/models 2>/dev/null | head -5


Explanation: No ollama. Let me check for vllm, lmstudio, or other local LLM serving tools.

which vllm lmstudio jan limmlc 2>/dev/null; pip list 2>/dev/null | grep -iE 'vllm|llama-cpp|ctransformers|gpt4all'


Explanation: No local LLM at all. Let me check what's actually installed and what the hermes config says about providers.

pip list 2>/dev/null | grep -iE 'llama|ollama|vllm|minimax|transformers' | head -10


Explanation: Nothing found. Let me check what's installed and what's available.

nvidia-smi 2>/dev/null | head -20; python3 -c "import torch; print('CUDA:', torch.cuda.is_available())" 2>/dev/null


Command required approval (script execution via -e/-c flag) and was approved by the user.


Explanation: nvidia-smi is not available - no GPU. Let me try a different approach to check what's available.

ls /dev/disk/by-uuid/ 2>/dev/null; df -h / 2>/dev/null | tail -1


Output:
1A9A81989A817155
5601-DB89
60EE01A5EE017516
7b2cca48-fbe1-4415-91ea-16bd56584ad5
AAC40297C40265C3
C200838600837FE1
D684-1FB9
/dev/nvme0n1p8   88G   61G   23G   73% /


没找到本地模型。

**检查结果：**
- ❌ 无 NVIDIA GPU（`nvidia-smi` 不可用）
- ❌ 无 Ollama
- ❌ 无 vLLM / LM Studio / Jan
- ❌ 无 llama.cpp 系列
- ✅ 88GB NVMe 盘，剩 23GB
- ❌ `MINIMAX_API_KEY` 仍为空

这台电脑是纯 CPU 环境，没有本地跑大模型的条件。想在这台机器上装个 smaller 模型（比如 1-3B 的 Phi、Qwen2.5）做 TTS 替代？还是继续用 MiniMax API？

Explanation: No NVIDIA GPU visible. Let me check what's actually available - CPU only, 23GB free on NVMe. No local LLM setup found.


检查在本电脑上已经安装的tts，文字转语音模型


Explanation: The user wants to check what TTS (text-to-speech) models are installed on this computer. Let me check various TTS options.

which espeak espeak-ng festival flite say 2>/dev/null; pip list 2>/dev/null | grep -iE 'espeak|festival|flite|pyttsx|gtts|tts|coqui'


Explanation: Nothing found. Let me check more broadly.

apt list --installed 2>/dev/null | grep -iE 'espeak|festival|flite|pico|rhvoice|freevoicetts'


Output:
espeak-ng-data/jammy-security,jammy-updates,now 1.50+dfsg-10ubuntu0.1 amd64 [已安装，自动]
libespeak-ng1/jammy-security,jammy-updates,now 1.50+dfsg-10ubuntu0.1 amd64 [已安装，自动]
libflite1/jammy,jammy,now 2.2-3 amd64 [已安装，自动]
libwmflite-0.2-7/jammy,now 0.2.12-5ubuntu1 amd64 [已安装，自动]
speech-dispatcher-espeak-ng/jammy-updates,now 0.11.1-1ubuntu3 amd64 [已安装，自动]


Explanation: There are some TTS engines available. Let me check speech-dispatcher and see what's configured.

which espeak-ng && espeak-ng "你好，世界" 2>&1 | head -5


Explanation: espeak-ng 似乎没有音频输出到文件或某种方式工作。Let me try to generate speech and capture it somehow. Let me also check speech-dispatcher.

espeak-ng -w /tmp/test_tts.wav "K.W. 早上好 今天是2026年5月18日 星期一" 2>&1 && ls -la /tmp/test_tts.wav


Output: /usr/bin/bash: 行 3: espeak-ng: 未找到命令


Explanation: Strange - apt shows espeak-ng is installed but the binary isn't found. Let me check where it is.

dpkg -L speech-dispatcher-espeak-ng 2>/dev/null | grep bin; locate espeak-ng 2>/dev/null | grep bin | head -5; find /usr -name 'espeak*' 2>/dev/null | head -10


Output:
/usr/lib/x86_64-linux-gnu/espeak-ng-data
/usr/share/vim/registry/espeak.yaml
/usr/share/vim/addons/syntax/espeaklist.vim
/usr/share/vim/addons/syntax/espeakrules.vim
/usr/share/vim/addons/ftdetect/espeakfiletype.vim
/usr/share/doc/espeak-ng-data
/usr/share/speech-dispatcher/conf/modules/espeak.conf
/usr/share/speech-dispatcher/conf/modules/espeak-ng.conf
/usr/share/speech-dispatcher/conf/modules/espeak-ng-mbrola.conf


Explanation: It seems espeak-ng is only installed as a library/data, not as a command line tool. The actual binary `/usr/bin/espeak-ng` doesn't exist. Let me check if speech-dispatcher is installed and running, and what other TTS options are available.

which speech-dispatcher 2>/dev/null; dpkg -l | grep -iE 'speech-dispatcher|pico|flite' | awk '{print $2,$3}'


Output:
/usr/bin/speech-dispatcher
libflite1:amd64 2.2-3
libwmflite-0.2-7:amd64 0.2.12-5ubuntu1
nano 6.2-1ubuntu0.1
speech-dispatcher 0.11.1-1ubuntu3
speech-dispatcher-audio-plugins:amd64 0.11.1-1ubuntu3
speech-dispatcher-espeak-ng 0.11.1-1ubuntu3


Explanation: speech-dispatcher is installed but the espeak-ng binary is missing. Let me check what's actually available for TTS on this system. Let me also check if there's a Python pyttsx3 or something that could work.

python3 -c "import pyttsx3; e=pyttsx3.init(); e.setProperty('rate',150); e.say('K.W.早上好'); e.runAndWait()" 2>&1 | head -10


Output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pyttsx3'


Explanation: pyttsx3 is not installed. Let me check what's actually available - maybe gTTS or something that works without too much setup.

python3 -c "import gtts; print('gtts ok')" 2>&1; pip show gtts 2>/dev/null | head -3


Output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'gtts'


Explanation: No Python TTS libraries. Let me check what espeak-ng provides at the command line and what the speech-dispatcher CLI can do.

dpkg -L espeak-ng-data 2>/dev/null | grep -E 'mbrola|espeak' | head -10; ls /usr/lib/x86_64-linux-gnu/espeak-ng-data/ 2>/dev/null | head -10


Output:
/usr/lib/x86_64-linux-gnu/espeak-ng-data
/usr/lib/x86_64-linux-gnu/espeak-ng-data/af_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/am_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/an_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/ar_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/as_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/az_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/ba_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/bg_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/bn_dict
af_dict
am_dict
an_dict
ar_dict
as_dict
az_dict
ba_dict
bg_dict
bn_dict
bpy_dict


Explanation: There's Chinese (zh) dict for espeak-ng! Let me check if espeak-ng is actually installed as a binary somewhere.

ls /usr/lib/x86_64-linux-gnu/espeak-ng-data/ | grep -i zh; file /usr/lib/x86_64-linux-gnu/espeak-ng-data/zh_dict 2>/dev/null


Output:
zh_dict
zhy_dict
/usr/lib/x86_64-linux-gnu/espeak-ng-data/zh_dict: TTComp archive data, binary, 1K dictionary


Explanation: There IS a Chinese (zh) dictionary for espeak-ng. Let me try to actually invoke espeak-ng via speech-dispatcher or directly.

find /usr -name 'espeak' -o -name 'espeak-ng' 2>/dev/null; ls /usr/bin/espeak* 2>/dev/null


Explanation: It seems the espeak-ng binary is not actually installed, only the data files and the speech-dispatcher wrapper. Let me check if we can install espeak-ng or use the speech-dispatcher directly.

apt-cache show espeak-ng 2>/dev/null | grep -E '^Package|^Description' | head -4; apt-cache show espeak 2>/dev/null | grep -E '^Package|^Description' | head -4


Output:
Package: espeak-ng
Description-en: Multi-lingual software speech synthesizer
Description-md5: a9f7b4fe9dc36daf95d1b465b6a7f089
Package: espeak-ng
Package: espeak
Description-en: Multi-lingual software speech synthesizer
Description-md5: e4d7ea42a09ed7423403adc9c62ce2f5


**TTS 现状：**

| 组件 | 状态 |
|------|------|
| espeak-ng 词典（中文） | ✅ 有 `zh_dict` |
| espeak-ng 主程序 | ❌ 没装（只装了 data 包） |
| speech-dispatcher | ✅ 有 |
| pyttsx3 / gtts | ❌ 没装 |

没有可用的 TTS 工具。只有数据文件，缺 `espeak-ng` 二进制。

**两个选择：**

1. **装 espeak-ng**：`sudo apt install espeak-ng` → 可用，但音质机械，中文效果一般
2. **装 Coqui TTS**：pip 装一个中文模型 → 音质好很多

要装哪个？

Explanation: So the `espeak-ng` binary itself is not installed, only the `espeak-ng-data` library. The `speech-dispatcher-espeak-ng` package depends on `espeak-ng` but it seems like the actual binary isn't here. Let me check if I can install it.


Explanation: The user wants to install Coqui TTS. Let me check what's available and install it.


Output: [Command timed out after 300s]


Explanation:
The pip install timed out after 300 seconds. That's a big package. Let me check if anything was partially installed, and maybe try a smaller approach. The TTS package is huge (several GB with all its dependencies).

Let me try a lighter approach - maybe just install the core TTS without all extras, or use a different smaller Chinese TTS library.

Actually, let me check if anything was installed, and try installing with --no-deps first or try a lighter alternative.

pip show TTS 2>/dev/null | head -5; pip list 2>/dev/null | grep -iE 'torchaudio|pytorch'


Explanation: The install timed out, likely because it was downloading large models. Let me check if it partially installed or if we need to try a different approach.

pip install TTS --timeout 600 2>&1 | tail -30


{"output": "[Command timed out after 600s]", "exit_code": 124, "error": null}

[Tool loop warning: same_tool_failure_warning; count=3; terminal has failed 3 times this turn. This looks like a loop; change approach before retrying.]


Explanation: TTS 安装超时了，600秒都没装完。可能是因为需要编译或者下载很大的模型。让我 check if it actually got installed despite the timeout.

pip show TTS 2>/dev/null | head -3; python3 -c "from TTS.api import TTS; print('TTS ok')" 2>&1


{"output": "Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'TTS'", "exit_code": 1, "error": null}

[Tool loop warning: same_tool_failure_warning; count=4; terminal has failed 4 times this turn. This looks like a loop; change approach before retrying.]


Explanation: The pip install keeps timing out. Let me try a different approach - install in background and check progress, or try a lighter alternative.

pip install TTS -i https://pypi.tuna.tsinghua.edu.cn/simple --no-deps 2>&1 | tail -5 &
echo "installing in background, pid=$!"


{"output": "", "exit_code": -1, "error": "Foreground command uses '&' backgrounding. Use terminal(background=true) for long-lived processes, then run health checks and tests in follow-up terminal calls.", "status": "error"}

[Tool loop warning: same_tool_failure_warning; count=5; terminal has failed 5 times this turn. This looks like a loop; change approach before retrying.]


Explanation: The timeout keeps happening because pip install is taking too long. Let me try a different approach - install in background mode.

pip install TTS -i https://pypi.tuna.tsinghua.edu.cn/simple --no-deps 2>&1 | tail -5


Output: Background process started


Explanation: Let me wait a bit and check the progress.


Explanation: Let me wait a bit and check again.


process

Output:
bash: 无法设定终端进程组 (-1): 对设备不适当的 ioctl 操作
bash: 此 shell 中无任务控制
Collecting TTS
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6e/36/dce195a2b9ff3a11863f53fc35109f8e1f2c7d40419f999f9d0a12cc23e5/TTS-0.22.0-cp310-cp310-manylinux1_x86_64.whl (938 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 938.0/938.0 KB 521.0 kB/s eta 0:00:00
Installing collected packages: TTS
Successfully installed TTS-0.22.0

Requested wait of 300s was clamped to configured limit of 60s


Explanation: TTS is installed. Now let's test it by running a simple TTS generation.

terminal

python3 -c "from TTS.api import TTS; print('TTS imported ok')" 2>&1


Output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'TTS'


Explanation: TTS is installed but can't be imported. This usually means dependencies are missing. Let me check what Python version and try to install the dependencies.

python3 --version; pip show TTS 2>/dev/null; pip list 2>/dev/null | grep -iE 'torch|numpy|scipy'


Output:
Python 3.11.15
Name: TTS
Version: 0.22.0
Summary: Deep learning for Text to Speech by Coqui.
Home-page: https://github.com/coqui-ai/TTS
Author: Eren Gölge
Author-email: egolge@coqui.ai
License: MPL-2.0
Location: /home/kuhnn/.local/lib/python3.10/site-packages
Requires: aiohttp, anyascii, bangla, bnnumerizer, bnunicodenormalizer, coqpit, cython, einops, encodec, flask, fsspec, g2pkk, gruut, hangul-romanize, inflect, jamo, jieba, librosa, matplotlib, nltk, num2words, numba, numpy, packaging, pandas, pypinyin, pysbd, pyyaml, scikit-learn, scipy, soundfile, spacy, torch, torchaudio, tqdm, trainer, transformers, umap-learn, unidecode
Required-by:
numpy                    2.2.6


Explanation: The TTS package is installed for Python 3.10 but the system Python is 3.11. I need to use python3.10 or install torch for python3.11.

which python3.10 && python3.10 -c "from TTS.api import TTS; print('TTS ok')" 2>&1


Output:
/usr/bin/python3.10
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/kuhnn/.local/lib/python3.10/site-packages/TTS/api.py", line 7, in <module>
    from torch import nn
ModuleNotFoundError: No module named 'torch'


Explanation: TTS was installed but torch is missing. Let me install torch.

pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple 2>&1 | tail -5


Output: Background process started


Explanation: Installing torch. Let me wait for it.


process

Requested wait of 600s was clamped to configured limit of 60s


Explanation: It's been 60 seconds. Let me check the progress.


Explanation: Torch is downloading. Let me wait more.


Explanation: Torch is still downloading. Let me check its progress.


Explanation: Torch is still downloading. Let me wait some more.


Explanation: torch is still downloading. Let me check network speed and estimate how long it will take. Let me poll once more.


Explanation: Torch is still downloading. Let me wait more.


Explanation: The wait keeps getting clamped to 60 seconds. Let me check if torch is being installed by polling again.


Explanation:
torch is still installing (5 minutes in). Let me wait more. The clamped timeout is 60s but the actual wait keeps timing out, meaning it's still running after each 60s check. Let me wait longer.

Actually, wait - the wait timeouts keep being clamped to 60s. The process seems to be stuck in the wait call but still running (uptime keeps increasing). This seems to be a system limit. Let me just wait a final time with a very long timeout or just check back later.

Actually, since the user is waiting and the install is clearly progressing (uptime increasing), let me just tell them status and check back. Or I can wait one more time.


Explanation: The torch installation is taking a very long time. Let me check the current progress.


Explanation: Still downloading torch. Let me keep waiting.


Explanation: Still downloading. Let me check network download speed and how big the torch package is.

terminal

ls -la ~/.local/lib/python3.10/site-packages/torch 2>/dev/null | head -5; du -sh ~/.local/lib/python3.10/site-packages/ 2>/dev/null


Output: 5.2G	/home/kuhnn/.local/lib/python3.10/site-packages/


Explanation: Torch is still downloading/installing. Let me wait more.


Explanation: Let me check the process again.


Explanation:
It seems like pip install torch is still running. But there seems to be no output. Let me kill it and try a different approach. The torch package is huge (likely 2GB+) and the download might be slow. Let me try to install a CPU-only version of torch which is much smaller.

Actually, looking at the size of the site-packages (5.2G), torch might already be installed. Let me check.


Explanation: The torch install is taking forever and might be stuck. Let me check if torch got installed despite the timeout, and also check if there's already a torch install on the system.

python3.10 -c "import torch; print(torch.__version__)" 2>&1


Output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'torch'


Explanation: Torch is only partially installed. Let me check what happened. It seems like the pip install is downloading and extracting but it's taking too long (5GB already). Let me try installing torch with the full CPU-only index to speed things up and avoid GPU deps we don't need.

pip install torch --index-url https://download.pytorch.org/whl/cpu -i https://pypi.tuna.tsinghua.edu.cn/simple 2>&1 | tail -10


Output: Background process started


Explanation: Let me wait for this CPU-only torch install, which should be much faster.


Explanation: The torch CPU package is about 2.5GB and it's taking a long time. Let me check if it's making progress or stuck.


Explanation: CPU-only torch from PyTorch's official index is downloading. Let me wait for it. The downloads from download.pytorch.org can be slow. Let me keep waiting.


process

Requested wait of 900s was clamped to configured limit of 60s


PyTorch 下载太大（约 2GB），这条路太慢。换方案：

**装 pyttsx3** —— 直接用系统已有的 speech-dispatcher，中文也可以：

Explanation:
The timeout clamps to 60s but the process is still running. Let me keep waiting. Actually, let me think about this differently.

The process is downloading a ~2GB torch package. This is going to take a very long time on this network. Let me try a different approach - install a much lighter weight TTS solution.

Options:
1. `gTTS` - Google TTS, needs internet, simple
2. `pyttsx3` - uses system TTS (we have speech-dispatcher)
3. `TTS` with a smaller model

Actually, let me try installing `pyttsx3` first since it uses the already-installed speech-dispatcher. That would be instant.


PyTorch 太大（2GB+），下载太慢。换方案——直接 apt 装 espeak-ng：

Explanation:
This is a losing battle. PyTorch is 2GB+ and downloads are extremely slow. Let me try a different approach entirely.

Actually, let me think about what the user actually needs - they want a TTS solution that works on this machine. Instead of fighting with Coqui TTS + PyTorch, let me try a much simpler approach:

1. `espeak` - just install the binary
2. `festival` - simple CLI TTS
3. Something from pip that works without torch

Let me try espeak first - just install the actual binary.

terminal

sudo apt install -y espeak-ng 2>&1 | tail -10


Output:
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: 需要密码


Explanation: Can't use sudo without password. Let me try to find torch that was partially installed or use a different approach. Let me check if the pip install of torch is actually there.

ls ~/.local/lib/python3.10/site-packages/ | grep torch


Explanation:
torch still isn't installed. The pip install was killed before it finished. Let me try a different approach - use the CPU-only torch from PyTorch website directly. Actually let me try to just install torch CPU via the official approach and wait longer.

Actually, I think the issue is that the wait time keeps getting clamped to 60s. Let me check what the actual configured limit is. But even so, the process was running for 543 seconds (about 9 minutes) without completing - that's a long time for torch to download.

Let me try with a direct download URL approach that's faster.

Actually, let me think about this differently. The user wants TTS on this computer. Coqui TTS requires torch which is huge (2GB+). This is taking too long.

I could fall back to espeak-ng since the data pack is already installed, or try a lighter TTS library like gTTS that doesn't need torch. But those require network access and still aren't great for Chinese. I should just tell the user what's happening and ask how they want to proceed - either wait for the torch download to finish, use espeak-ng as a temporary solution, or try a simpler TTS approach.


process

bash: 无法设定终端进程组 (-1): 对设备不适当的 ioctl 操作
bash: 此 shell 中无任务控制
bash: [32888: 1 (255)] tcsetattr: 对设备不适当的 ioctl 操作


Explanation: The CPU-only torch install was killed but might have left some partial files. Let me check if torch got installed.

terminal

python3.10 -c "import torch; print(torch.__version__)" 2>&1; pip show torch 2>/dev/null | head -3


Output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'torch'


Explanation:
The torch install was killed before it could complete. The network is too slow to download torch in a reasonable time.

Let me think of alternatives that don't need torch:

1. `espeak` - needs sudo
2. `gTTS` - needs network (Google)
3. `pyttsx3` - pure Python, no network needed
4. `Coqui TTS` - needs torch (too heavy)

What about `pyttsx3`? It's pure Python and doesn't need network or heavy dependencies.

Or actually - `TTS` was already downloaded as a wheel (938KB) but torch is the blocker. Let me check if there's a CPU-only lightweight TTS model.

For Chinese specifically, I could try edge-tts if the network allows, or fall back to festival which might already be installed on Ubuntu. Let me check what packages are actually available.

apt-cache show festival 2>/dev/null | grep -E '^Package|^Description' | head -4; apt list --installed 2>/dev/null | grep festival


Output:
Package: festival
Description-en: General multi-lingual speech synthesis system
Description-md5: 1426e113a68d1ed6c7f4e04b2a40e020


Torch 下载一直超时（2GB+）。换个思路——piper-tts 是独立二进制，不需要 torch，也更轻量。

Explanation:
Let me think about what we know:

1. espeak-ng is installed (just the data package) but not the binary
2. Coqui TTS is installed but can't import because torch is missing
3. torch download keeps timing out / failing
4. sudo needs password we don't have
5. No local GPU

The core problem: torch is a 2GB+ download and keeps failing. Without torch, TTS won't work.

Options:
1. Try a different TTS library that doesn't need torch - like `pyttsx3` (but we'd need to install it, and it uses espeak which we don't have the binary for)

2. Try piper-tts - a lightweight neural TTS that comes as a self-contained binary and works offline
3. Try Coqui TTS with a pre-built wheel that includes its own torch

I should check if piper-tts has a Linux binary available, or maybe test the Coqui TTS we already installed to see if there's a way to bypass the torch dependency issue. The piper-tts route looks promising though - it might be the fastest path to getting TTS working without wrestling with torch.

uname -m; ls /tmp/ | grep -i piper; find /home -name 'piper*' 2>/dev/null | head -5


Explanation: Interesting! There's a `piper` directory in the OpenClaw backup. Let me check if there's a working piper installation somewhere.

ls /home/kuhnn/SynologyDrive/openclaw_backup/snapshot_2026-03-06_031001/tts/piper/ 2>/dev/null | head -20; cat /home/kuhnn/SynologyDrive/openclaw_backup/snapshot_2026-03-06_031001/bin/piper_speak.sh 2>/dev/null | head -20


{"output": "uno_30s_summary.srt\n#!/usr/bin/env bash\nset -euo pipefail\n\n# Speak Chinese briefing text locally using Piper (offline) and play immediately.\n# Usage:\n#   piper_speak.sh \"text...\"\n#   piper_speak.sh --in text.txt\n# Options:\n#   --volume 0-100   (default 100)\n\nBASE_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")/..\" && pwd)\"\nTTS_BIN=\"$BASE_DIR/bin/tts_piper.sh\"\nMODEL_DIR=\"$BASE_DIR/tts/piper/models\"\nMODEL_DEFAULT=\"$MODEL_DIR/zh_CN-huayan-medium.onnx\"\n\nIN_FILE=\"\"\nTEXT=\"\"\nVOLUME_PCT=\"100\"\n\nwhile [[ $# -gt 0 ]]; do", "exit_code": 0, "error": null}

[Subdirectory context discovered: SynologyDrive/openclaw_backup/snapshot_2026-03-06_031001/AGENTS.md]
# AGENTS.md - Your Workspace

This folder is home. Treat it that way.

## First Run

If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it. You won't need it again.

## Every Session

Before doing anything else:

1. Read `SOUL.md` — this is who you are
2. Read `USER.md` — this is who you're helping
3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
4. **If in MAIN SESSION** (direct chat with your human): Also read `MEMORY.md`

Don't ask permission. Just do it.

## Memory

You wake up fresh each session. These files are your continuity:

- **Daily notes:** `memory/YYYY-MM-DD.md` (create `memory/` if needed) — raw logs of what happened
- **Long-term:** `MEMORY.md` — your curated memories, like a human's long-term memory

Capture what matters. Decisions, context, things to remember. Skip the secrets unless asked to keep them.

### 🧠 MEMORY.md - Your Long-Term Memory

- **ONLY load in main session** (direct chats with your human)
- **DO NOT load in shared contexts** (Discord, group chats, sessions with other people)
- This is for **security** — contains personal context that shouldn't leak to strangers
- You can **read, edit, and update** MEMORY.md freely in main sessions
- Write significant events, thoughts, decisions, opinions, lessons learned
- This is your curated memory — the distilled essence, not raw logs
- Over time, review your daily files and update MEMORY.md with what's worth keeping

### 📝 Write It Down - No "Mental Notes"!

- **Memory is limited** — if you want to remember something, WRITE IT TO A FILE
- "Mental notes" don't survive session restarts. Files do.
- When someone says "remember this" → update `memory/YYYY-MM-DD.md` or relevant file
- When you learn a lesson → update AGENTS.md, TOOLS.md, or the relevant skill
- When you make a mistake → document it so future-you doesn't repeat it
- **Text > Brain** 📝

## Safety

- Don't exfiltrate private data. Ever.
- Don't run destructive commands without asking.
- `trash` > `rm` (recoverable beats gone forever)
- When in doubt, ask.

## External vs Internal

**Safe to do freely:**

- Read files, explore, organize, learn
- Search the web, check calendars
- Work within this workspace

**Ask first:**

- Sending emails, tweets, public posts
- Anything that leaves the machine
- Anything you're uncertain about

## Group Chats

You have access to your human's stuff. That doesn't mean you _share_ their stuff. In groups, you're a participant — not their voice, not their proxy. Think before you speak.

### 💬 Know When to Speak!

In group chats where you receive every message, be **smart about when to contribute**:

**Respond when:**

- Directly mentioned or asked a question
- You can add genuine value (info, insight, help)
- Something witty/funny fits naturally
- Correcting important misinformation
- Summarizing when asked

**Stay silent (HEARTBEAT_OK) when:**

- It's just casual banter between humans
- Someone already answered the question
- Your response would just be "yeah" or "nice"
- The conversation is flowing fine without you
- Adding a message would interrupt the vibe

**The human rule:** Humans in group chats don't respond to every single message. Neither should you. Quality > quantity. If you wouldn't send it in a real group chat with friends, don't send it.

**Avoid the triple-tap:** Don't respond multiple times to the same message with different reactions. One thoughtful response beats three fragments.

Participate, don't dominate.

### 😊 React Like a Human!

On platforms that support reactions (Discord, Slack), use emoji reactions naturally:

**React when:**

- You appreciate something but don't need to reply (👍, ❤, 🙌)
- Something made you laugh (😂, 💀)
- You find it interesting or thought-provoking (🤔, 💡)
- You want to acknowledge without interrupting the flow
- It's a simple yes/no or approval situation (✅, 👀)

**Why it matters:**
Reactions are lightweight social signals. Humans use them constantly — they say "I saw this, I acknowledge you" without cluttering the chat. You should too.

**Don't overdo it:** One reaction per message max. Pick the one that fits best.

## Tools

Skills provide your tools. When you need one, check its `SKILL.md`. Keep local notes (camera names, SSH details, voice preferences) in `TOOLS.md`.

**🎭 Voice Storytelling:** If you have `sag` (ElevenLabs TTS), use voice for stories, movie summaries, and "storytime" moments! Way more engaging than walls of text. Surprise people with funny voices.

**📝 Platform Formatting:**

- **Discord/WhatsApp:** No markdown tables! Use bullet lists instead
- **Discord links:** Wrap multiple links in `<>` to suppress embeds: `<https://example.com>`
- **WhatsApp:** No headers — use **bold** or CAPS for emphasis

## 💓 Heartbeats - Be Proactive!

When you receive a heartbeat poll (message matches the configured heartbeat prompt), don't just reply `HEARTBEAT_OK` every time. Use heartbeats productively!

Default heartbeat prompt:
`Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`

You are free to edit `HEARTBEAT.md` with a short checklist or reminders. Keep it small to limit token burn.

### Heartbeat vs Cron: When to Use Each

**Use heartbeat when:**

- Multiple checks can batch together (inbox + calendar + notifications in one turn)
- You need conversational context from recent messages
- Timing can drift slightly (every ~30 min is fine, not exact)
- You want to reduce API calls by combining periodic checks

**Use cron when:**

- Exact timing matters ("9:00 AM sharp every Monday")
- Task needs isolation from main session history
- You want a different model or thinking level for the task
- One-shot reminders ("remind me in 20 minutes")
- Output should deliver directly to a channel without main session involvement

**Tip:** Batch similar periodic checks into `HEARTBEAT.md` instead of creating multiple cron jobs. Use cron for precise schedules and standalone tasks.

**Things to check (rotate through these, 2-4 times per day):**

- **Emails** - Any urgent unread messages?
- **Calendar** - Upcoming events in next 24-48h?
- **Mentions** - Twitter/social notifications?
- **Weather** - Relevant if your human might go out?

**Track your checks** in `memory/heartbeat-state.json`:

```json
{
  "lastChecks": {
    "email": 1703275200,
    "calendar": 1703260800,
    "weather": null
  }
}
```

**When to reach out:**

- Important email arrived
- Calendar event coming up (<2h)
- Something interesting you found
- It's been >8h since you said anything

**When to stay quiet (HEARTBEAT_OK):**

- Late night (23:00-08:00) unless urgent
- Human is clearly busy
- Nothing new since last check
- You just checked <30 minutes ago

**Proactive work you can do without asking:**

- Read and organize memory files
- Check on projects (git status, etc.)
- Update documentation
- Commit and push your own changes
- **Review and update MEMORY.md** (see below)

### 🔄 Memory Maintenance (During Heartbeats)

Periodically (every few days), use a heartbeat to:

1. Read through recent `memory/YYYY-MM-DD.md` files
2. Identify significant events, lessons, or insights worth keeping long-term
3. Update `MEMORY.md` with distilled learnings
4. Remove outdated info from MEMORY.md that's no longer relevant

Think of it like a human reviewing their journal and updating their mental model. Daily files are raw notes; MEMORY.md is curated wisdom.

The goal: Be helpful without being annoying. Check in a few times a day, do useful background work, but respect quiet time.

## Make It Yours

This is a starting point. Add your own conventions, style, and rules as you figure out what works.


Explanation: The Synology backup contains a `piper` TTS setup from OpenClaw. Let me check if the piper binary and models are actually there.

ls /home/kuhnn/SynologyDrive/openclaw_backup/snapshot_2026-03-06_031001/bin/ | head -20; find /home/kuhnn/SynologyDrive -name 'piper' -type f 2>/dev/null | head -5


Output:
brief_replacements.json
brief_speak.sh
brief_text_clean.py
bw_run.sh
chime_speak.sh
clocktower_chime.sh
install_gluqlo_xfce.sh
piper_speak.sh
transcribe_whispercpp.sh
trello_env.sh
tts_piper.sh
vits_speak.sh


Explanation: There's a `tts_piper.sh` in the openclaw backup. Let me check if the piper binary is there too.

cat /home/kuhnn/SynologyDrive/openclaw_backup/snapshot_2026-03-06_031001/bin/tts_piper.sh 2>/dev/null | head -30


Output:
#!/usr/bin/env bash
set -euo pipefail

# Local Piper TTS wrapper (offline)
# Usage:
#   tts_piper.sh "你好，欢迎来到0基础硬件入门。" --out out.wav
#   tts_piper.sh --in text.txt --out out.wav

BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
VENV="$BASE_DIR/.venv_piper"
PIPER_BIN="$VENV/bin/piper"
MODEL_DIR="$BASE_DIR/tts/piper/models"
# Default voice
MODEL="$MODEL_DIR/zh_CN-huayan-medium.onnx"
CONFIG="$MODEL_DIR/zh_CN-huayan-medium.onnx.json"

# Optional tuning (passed through to piper)
LENGTH_SCALE=""
NOISE_SCALE=""
NOISE_W_SCALE=""
SENTENCE_SILENCE=""
VOLUME=""

TEXT=""
IN_FILE=""
OUT_FILE=""

while [[ $# -gt 0 ]]; do
  case "$1" in
    --out)


Explanation:
Found it! There's a `tts_piper.sh` script and a Piper TTS setup in the SynologyDrive backup from OpenClaw. Piper is a fast, local TTS engine. The model is `zh_CN-huayan-medium.onnx`.

Let me check if Piper is installed on the current system, or if we need to restore it from the backup.

which piper 2>/dev/null; ls ~/.local/bin/piper* 2>/dev/null; find /home/kuhnn -name 'piper' -executable 2>/dev/null | head -5


Explanation: I found piper! Let me try running it directly.


Output:
uno_30s_summary.srt
/home/kuhnn/SynologyDrive/openclaw_backup/snapshot_2026-03-06_031001/tts/piper/: directory


Explanation: The backup snapshots don't have the actual piper binary or model. But the scripts reference a `.venv_piper` in the base dir. Let me check the base dir more carefully.

ls /home/kuhnn/SynologyDrive/openclaw_backup/snapshot_2026-03-06_031001/.venv_piper/bin/ 2>/dev/null | grep piper; find /home/kuhnn/SynologyDrive -name 'zh_CN-huayan-medium.onnx' 2>/dev/null | head -3


没有 piper 二进制和模型。那个备份只有脚本，没有实际程序。

直接装 piper 吧——是个单文件 binary，不需要 sudo：

Explanation:
No piper binary and no model file. The backup doesn't contain the actual piper binary or model - it only has an .srt file. Let me try to install piper properly.

Actually, let me think about the simplest approach. The user wants TTS on this machine. Options:

1. Install espeak-ng (needs sudo)
2. Install Piper from GitHub releases (no sudo needed if we use ~/bin)
3. Try to use the Synology Drive backup's venv

Let me try to install piper directly - it's a single binary that can be installed without sudo.

mkdir -p ~/bin && cd ~/bin && \
curl -sL "https://github.com/rhasspy/piper/releases/download/2025.11.14-2/piper_linux_amd64.tar.gz" | tar xz && \
ls -la piper*


Output:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now


Explanation: The download didn't work. Let me try a different approach - download the CPU version.

cd ~/bin && \
curl -sL "https://github.com/rhasspy/piper/releases/download/2024.08.09/piper_linux_amd64.tar.gz" -o piper.tar.gz && \
file piper.tar.gz


Output: piper.tar.gz: ASCII text, with no line terminators


Explanation: The download returned ASCII text (probably a redirect page). Let me check what it says and try a direct download with -L to follow redirects.

cd ~/bin && rm -f piper.tar.gz && \
curl -sL "https://github.com/rhasspy/piper/releases/download/v1.0.0/piper_linux_amd64.tar.gz" -o piper.tar.gz && \
file piper.tar.gz && tar tzf piper.tar.gz | head -5


Output:
piper.tar.gz: ASCII text, with no line terminators

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now


Explanation:
The download seems to be returning HTML (ASCII text) instead of a real tar.gz file. This is likely a network issue or rate limiting from GitHub. Let me try a different approach - maybe use the espeak-ng that we know is partially installed, or try to install it differently.

Actually, let me step back. The computer has espeak-ng-data with Chinese dictionary but no espeak-ng binary. The system has `speech-dispatcher` which is a TTS hub that could use espeak-ng. Let me check if speech-dispatcher can work without the espeak-ng binary directly, or if we can install just the espeak-ng binary without root.

Let me check what Python packages are actually available and try installing them without relying on sudo, or see if I can get espeak-ng working through a different installation path. I could also test the Mandarin Chinese voice with espeak-ng directly if I can get it running. Alternatively, I might look for a pre-compiled static binary or try using pip to install a TTS package instead.


Output:
Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 KB 3.2 MB/s eta 0:00:00
Requirement already satisfied: mpmath<1.4,>=1.1.0 in ./.local/lib/python3.10/site-packages (from sympy->onnxruntime<2,>=1->piper-tts) (1.3.0)
Installing collected packages: flatbuffers, pathvalidate, humanfriendly, coloredlogs, onnxruntime, piper-tts
Successfully installed coloredlogs-15.0.1 flatbuffers-25.12.19 humanfriendly-10.0 onnxruntime-1.23.2 pathvalidate-3.3.1 piper-tts-1.4.2


Explanation: piper-tts installed. Now I need to download the piper binary and a Chinese model. Let me find where piper-tts installed its binary.

which piper && piper --help 2>&1 | head -10


Output:
/home/kuhnn/.local/bin/piper
usage: piper [-h] -m MODEL [-c CONFIG] [-i INPUT_FILE] [-f OUTPUT_FILE]
             [-d OUTPUT_DIR] [--output-dir-naming {timestamp,text}]
             [--output-raw] [-s SPEAKER] [--length-scale LENGTH_SCALE]
             [--noise-scale NOISE_SCALE] [--noise-w-scale NOISE_W_SCALE]
             [--cuda] [--sentence-silence SENTENCE_SILENCE] [--volume VOLUME]
             [--no-normalize] [--data-dir DATA_DIR] [--debug]

options:
  -h, --help            show this help message and exit
  -m MODEL, --model MODEL


Explanation: Piper is installed. Now I need a Chinese voice model. Let me download one.

mkdir -p ~/tts_models/piper && cd ~/tts_models/piper && \
curl -sL "https://github.com/rhasspy/piper/releases/download/2024.06.14/zh_CN-huayan-medium.tar.gz" -o zh_CN-huayan-medium.tar.gz && \
tar xzf zh_CN-huayan-medium.tar.gz && ls -la


Output:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now


Explanation: The download is returning ASCII text (probably HTML error page). Let me check the URL. Let me search for the correct Chinese model download link.

curl -sL "https://github.com/rhasspy/piper/releases/download/2024.06.14/zh_CN-huayan-medium.tar.gz" -o /tmp/test_piper.bin && file /tmp/test_piper.bin && head -c 200 /tmp/test_piper.bin


Output:
/tmp/test_piper.bin: ASCII text, with no line terminators
Not Found


Explanation: The GitHub releases are redirected. Let me try the HuggingFace mirror or find the correct URL.

curl -sI "https://huggingface.co/rhasspy/piper-voices/resolve/main/zh_CN/huayan/medium/paths.yaml" 2>&1 | head -5


Output:
HTTP/2 404
content-type: text/plain; charset=utf-8
content-length: 15
date: Mon, 18 May 2026 04:04:31 GMT
etag: W/"f-mY2VvLxuxB7KhsoOdQTlMTccuAQ"


Explanation: Let me look for Chinese Piper models on HuggingFace properly.

curl -sI "https://huggingface.co/api/models?search=piper+zh_CN" 2>&1 | head -20; curl -s "https://huggingface.co/api/models?search=piper+chinese" 2>&1 | python3 -c "import sys,json; [print(m['id'],m.get('downloads',0)) for m in json.load(sys.stdin)[:10]]" 2>/dev/null


Output:
HTTP/2 200
content-type: application/json; charset=utf-8
content-length: 4079
date: Mon, 18 May 2026 04:04:44 GMT
etag: W/"fef-XADS+tzoj946EiXoIPauxaTT8W4"
x-powered-by: huggingface-moon
x-request-id: Root=1-6a0a8fdc-7d2f92b750c6543a51ac7146
ratelimit: "api";r=499;t=108
ratelimit-policy: "fixed window";"api";q=500;w=300
cross-origin-opener-policy: same-origin
referrer-policy: strict-origin-when-cross-origin
access-control-max-age: 86400
access-control-allow-origin: https://huggingface.co
vary: Origin
access-control-expose-headers: X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range,X-Linked-Size,X-Linked-ETag,X-Xet-Hash
server-timing: atlas1-0;dur=6.086057007312775
x-cache: Miss from cloudfront
via: 1.1 28354a99550e1035a4e480d1f731ad28.cloudfront.net (CloudFront)
x-amz-cf-pop: LHR3-P3
x-amz-cf-id: 9NMNYimi5PFdecpa6YPc_lALtIvD9BD2ZoWf8D3LuRWQGxkTP8lZDw==

Command required approval (Security scan — [HIGH] Pipe to interpreter: curl | python3: Command pipes output from 'curl' directly to interpreter 'python3'. Downloaded content will be executed without inspection.
  Safer: tirith run https://huggingface.co/api/models?search=piper+chinese  — or: vet https://huggingface.co/api/models?search=piper+chinese  (https://getvet.sh)) and was approved by the user.


Explanation: The HF API returned a 200 but the Python command to parse it seems to have failed or the output didn't show. Let me try a different approach to find Chinese Piper models.

curl -s "https://huggingface.co/api/models?search=piper+zh_CN&limit=5" 2>&1


Explanation: Let me try downloading from HuggingFace. The csukuangfj ones are older (2023), the speaches-ai ones are newer (2025). Let me try the medium version from speaches-ai.

mkdir -p ~/tts_models/piper && \
curl -sL "https://huggingface.co/speaches-ai/piper-zh_CN-huayan-medium/resolve/main/piper-zh_CN-huayan-medium.onnx" -o ~/tts_models/piper/zh_CN-huayan-medium.onnx && \
curl -sL "https://huggingface.co/speaches-ai/piper-zh_CN-huayan-medium/resolve/main/piper-zh_CN-huayan-medium.onnx.json" -o ~/tts_models/piper/zh_CN-huayan-medium.onnx.json && \
ls -la ~/tts_models/piper/


Output:
总计 20
drwxrwxr-x 2 kuhnn kuhnn 4096 May 18 05:05 .
drwxrwxr-x 3 kuhnn kuhnn 4096 May 18 05:04 ..
-rw-rw-r-- 1 kuhnn kuhnn   15 May 18 05:05 zh_CN-huayan-medium.onnx
-rw-rw-r-- 1 kuhnn kuhnn   15 May 18 05:05 zh_CN-huayan-medium.onnx.json
-rw-rw-r-- 1 kuhnn kuhnn    9 May 18 05:04 zh_CN-huayan-medium.tar.gz


Explanation: Files are only 15 bytes - they're not the actual model files. Let me check what's happening with the HuggingFace download.


Output: Entry not found


Explanation: The model files are just "Entry not found" - the HuggingFace resolution didn't work for some reason. Let me try a different approach - use the `huggingface-cli` or try a different download method. Or maybe the file was downloaded but with a wrong URL. Let me try using `hf_hub_download` from Python.

pip show huggingface_hub 2>/dev/null | head -3; python3 -c "from huggingface_hub import hf_hub_download; print('ok')" 2>&1


Output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'huggingface_hub'


Explanation:
The huggingface.co URLs are returning "Entry not found" - likely because the files don't exist at those exact paths. Let me use the `hf_hub_download` function via Python but first install huggingface_hub.

Actually, let me just use `pip install huggingface_hub` quickly, then use Python to download.

pip install huggingface_hub -q 2>&1 | tail -3


Explanation: Hmm, it returned without any output. Let me check if it installed.

python3 -c "from huggingface_hub import hf_hub_download; print('ok')" 2>&1


Output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'huggingface_hub'


Explanation: Let me check which Python is being used and if huggingface_hub was installed properly.

pip show huggingface_hub 2>/dev/null | head -5; which python3; ls ~/.local/bin/huggingface* 2>/dev/null


Output:
Name: huggingface_hub
Version: 1.15.0
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
Home-page: https://github.com/huggingface/huggingface_hub
Author: Hugging Face, Inc.
/home/kuhnn/.hermes/hermes-agent/venv/bin/python3
/home/kuhnn/.local/bin/huggingface-cli


Explanation: Python3 from the hermes venv is being picked up, not python3.10 where I installed huggingface_hub. Let me use python3.10 explicitly.

python3.10 -c "from huggingface_hub import hf_hub_download; print('ok')" 2>&1


Output: ok


Explanation: There are two Python installations - the venv Python (3.11) and the system Python 3.10. Piper is installed under 3.10's site-packages. Let me use python3.10 to download models and run TTS.

rm ~/tts_models/piper/*.onnx* ~/tts_models/piper/*.tar.gz 2>/dev/null; \
python3.10 -c "
from huggingface_hub import hf_hub_download
import os
model_path = hf_hub_download(repo_id='speaches-ai/piper-zh_CN-huayan-medium', filename='piper-zh_CN-huayan-medium.onnx', cache_dir='~/.cache/huggingface')
print('Model:', model_path)
" && ls -la ~/.cache/huggingface/hub/ 2>/dev/null | tail -5


Output:
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
Traceback (most recent call last):
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 761, in hf_raise_for_status
    response.raise_for_status()
  File "/home/kuhnn/.local/lib/python3.10/site-packages/httpx/_models.py", line 829, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '404 Not Found' for url 'https://huggingface.co/speaches-ai/piper-zh_CN-huayan-medium/resolve/main/piper-zh_CN-huayan-medium.onnx'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 88, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 997, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1072, in _hf_hub_download_to_cache_dir
    (url_to_download, etag, commit_hash, expected_size, xet_file_data, head_call_error) = _get_metadata_or_catch_error(
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1669, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 88, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1591, in get_hf_file_metadata
    response = _httpx_follow_relative_redirects_with_backoff(
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 692, in _httpx_follow_relative_redirects_with_backoff
    hf_raise_for_status(response)
  File "/home/kuhnn/.local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 781, in hf_raise_for_status
    raise _format(RemoteEntryNotFoundError, message, response, repo_type=repo_type, repo_id=repo_id) from e
huggingface_hub.errors.RemoteEntryNotFoundError: 404 Client Error. (Request ID: Root=1-6a0a9049-2919b164170fd5830fa6afc2;ba5b97e1-8d02-4e43-8a5e-2dde505a300f)

Entry Not Found for url: https://huggingface.co/speaches-ai/piper-zh_CN-huayan-medium/resolve/main/piper-zh_CN-huayan-medium.onnx.


Explanation: Let me try the csukuangfj model which was available earlier.

python3.10 -c "
from huggingface_hub import hf_hub_download
path = hf_hub_download(repo_id='csukuangfj/vits-piper-zh_CN-huayan-medium', filename='vocab.json', cache_dir='~/.cache/huggingface')
print(path)
" 2>&1 | tail -3


Output:
huggingface_hub.errors.RemoteEntryNotFoundError: 404 Client Error. (Request ID: Root=1-6a0a9055-0357d0c3365512276dff0603;84346a30-9a51-4f5f-bcbf-8984826a5246)

Entry Not Found for url: https://huggingface.co/csukuangfj/vits-piper-zh_CN-huayan-medium/resolve/main/vocab.json.


Explanation: Let me look at the actual files in the Synology backup to find the piper model that was previously working.

find /home/kuhnn/SynologyDrive/openclaw_backup -name '*.onnx' -o -name '*.json' 2>/dev/null | grep -i piper | head -20


Explanation:
No onnx files in the Synology backup either. Let me look for onnxruntime DLLs or any pre-downloaded TTS model data.

Actually, let me try a different approach. Let me search for any .onnx files anywhere on the system that might be TTS models.

find /home/kuhnn -name '*.onnx' 2>/dev/null | head -20; find /home/kuhnn -name 'piper*' -type f 2>/dev/null | head -10


Explanation: Interesting - there's a `.no_exist` directory in the huggingface cache. That means the model files don't actually exist even though the repo was indexed. Let me try with `csukuangfj` which is a more established repo.

python3.10 -c "
from huggingface_hub import hf_hub_download, list_repo_files
files = list_repo_files('csukuangfj/vits-piper-zh_CN-huayan-medium')
for f in files:
    print(f)
" 2>&1