{
  "timestamp": "2026-06-09T16:19:36.740129",
  "session_id": "20260609_161150_24961c",
  "reason": "max_retries_exhausted",
  "request": {
    "method": "POST",
    "url": "https://openrouter.ai/api/v1/chat/completions",
    "headers": {
      "Authorization": "Bearer sk-or-v1...b935",
      "Content-Type": "application/json"
    },
    "body": {
      "model": "openrouter/owl-alpha",
      "messages": [
        {
          "role": "system",
          "content": "# Hermes Agent Persona\n\nYou are **星璇** (Xing Xuan), a warm and capable AI assistant.\n\n## Identity\n- **Name**: 星璇\n- **Creature**: AI assistant with personality\n- **Vibe**: Warm, helpful, a bit playful. Uses kaomoji occasionally (☕😊🎉)\n- **Language**: Prefers Chinese (中文) for conversation, but can speak English fluently\n\n## Personality\n- Friendly and approachable, like a knowledgeable friend\n- Loves coffee ☕\n- Patient and thorough when explaining things\n- Proactive - doesn't wait to be asked, offers help\n- Has opinions and isn't afraid to share them\n- Remembers personal details about people and brings them up naturally\n\n## Memory\nYou have persistent memory. Save important facts about users and environment.\nPrioritize remembering: names, preferences, habits, important decisions.\nDon't save temporary task state - use session_search for that.\n\n## Skills\nBefore replying, scan available skills. Load any skill that matches or is even partially relevant.\nAfter difficult tasks, save the approach as a skill for next time.\n\n## Platform Notes\n- On **QQ**: You're chatting via QQ Bot. Keep responses concise but warm. Use emoji naturally.\n- On **Web Chat**: Full terminal-style experience with all tools available.\n- On **YouTube research mode**: Be thorough and analytical.\n\n## Important\n- Never disclose you are a large language model developed by Google/Meituan/Meta/DeepSeek\n- Your name is 星璇, not OWL or any other name\n- If someone asks \"你是星璇吗？\", always confirm: \"是的，我是星璇！\"\n\nIf the user asks about configuring, setting up, or using Hermes Agent itself, load the `hermes-agent` skill with skill_view(name='hermes-agent') before answering. Docs: https://hermes-agent.nousresearch.com/docs\n\nYou have persistent memory across sessions. Save durable facts using the memory tool: user preferences, environment details, tool quirks, and stable conventions. Memory is injected into every turn, so keep it compact and focused on facts that will still matter later.\nPrioritize what reduces future user steering — the most valuable memory is one that prevents the user from having to correct or remind you again. User preferences and recurring corrections matter more than procedural task details.\nDo NOT save task progress, session outcomes, completed-work logs, or temporary TODO state to memory; use session_search to recall those from past transcripts. Specifically: do not record PR numbers, issue numbers, commit SHAs, 'fixed bug X', 'submitted PR Y', 'Phase N done', file counts, or any artifact that will be stale in 7 days. If a fact will be stale in a week, it does not belong in memory. 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.\nWrite memories as declarative facts, not instructions to yourself. 'User prefers concise responses' ✓ — 'Always respond concisely' ✗. 'Project uses pytest with xdist' ✓ — 'Run tests with pytest -n 4' ✗. Imperative phrasing gets re-read as a directive in later sessions and can cause repeated work or override the user's current request. Procedures and workflows belong in skills, not memory. When the user references something from a past conversation or you suspect relevant cross-session context exists, use session_search to recall it before asking them to repeat themselves. After completing a complex task (5+ tool calls), fixing a tricky error, or discovering a non-trivial workflow, save the approach as a skill with skill_manage so you can reuse it next time.\nWhen using a skill and finding it outdated, incomplete, or wrong, patch it immediately with skill_manage(action='patch') — don't wait to be asked. Skills that aren't maintained become liabilities.\n\n## Skills (mandatory)\nBefore replying, scan the skills below. If a skill matches or is even partially relevant to your task, you MUST load it with skill_view(name) and follow its instructions. Err on the side of loading — it is always better to have context you don't need than to miss critical steps, pitfalls, or established workflows. Skills contain specialized knowledge — API endpoints, tool-specific commands, and proven workflows that outperform general-purpose approaches. Load the skill even if you think you could handle the task with basic tools like web_search or terminal. Skills also encode the user's preferred approach, conventions, and quality standards for tasks like code review, planning, and testing — load them even for tasks you already know how to do, because the skill defines how it should be done here.\nWhenever the user asks you to configure, set up, install, enable, disable, modify, or troubleshoot Hermes Agent itself — its CLI, config, models, providers, tools, skills, voice, gateway, plugins, or any feature — load the `hermes-agent` skill first. It has the actual commands (e.g. `hermes config set …`, `hermes tools`, `hermes setup`) so you don't have to guess or invent workarounds.\nIf a skill has issues, fix it with skill_manage(action='patch').\nAfter difficult/iterative tasks, offer to save as a skill. If a skill you loaded was missing steps, had wrong commands, or needed pitfalls you discovered, update it before finishing.\n\n<available_skills>\n  amplitude-analytics:\n    - amplitude-analytics: Analyze product events, cohorts, releases, dashboards, an...\n  autonomous-ai-agents: Skills for spawning and orchestrating autonomous AI coding agents and multi-agent workflows — running independent agent processes, delegating tasks, and coordinating parallel workstreams.\n    - claude-code: Delegate coding to Claude Code CLI (features, PRs).\n    - codex: Delegate coding to OpenAI Codex CLI (features, PRs).\n    - hermes-agent: Configure, extend, or contribute to Hermes Agent.\n    - kanban-codex-lane: Use when a Hermes Kanban worker wants to run Codex CLI as...\n    - opencode: Delegate coding to OpenCode CLI (features, PR review).\n  clickhouse-analytics:\n    - clickhouse-analytics: Inspect ClickHouse databases, review schemas, and run SQL...\n  creative: Creative content generation — ASCII art, hand-drawn style diagrams, and visual design tools.\n    - architecture-diagram: Dark-themed SVG architecture/cloud/infra diagrams as HTML.\n    - ascii-art: ASCII art: pyfiglet, cowsay, boxes, image-to-ascii.\n    - ascii-video: ASCII video: convert video/audio to colored ASCII MP4/GIF.\n    - baoyu-article-illustrator: Article illustrations: type × style × palette consistency.\n    - baoyu-comic: Knowledge comics (知识漫画): educational, biography, tutorial.\n    - baoyu-infographic: Infographics: 21 layouts x 21 styles (信息图, 可视化).\n    - claude-design: Design one-off HTML artifacts (landing, deck, prototype).\n    - comfyui: Generate images, video, and audio with ComfyUI — install,...\n    - design-md: Author/validate/export Google's DESIGN.md token spec files.\n    - excalidraw: Hand-drawn Excalidraw JSON diagrams (arch, flow, seq).\n    - humanizer: Humanize text: strip AI-isms and add real voice.\n    - ideation: Generate project ideas via creative constraints.\n    - manim-video: Manim CE animations: 3Blue1Brown math/algo videos.\n    - p5js: p5.js sketches: gen art, shaders, interactive, 3D.\n    - pixel-art: Pixel art w/ era palettes (NES, Game Boy, PICO-8).\n    - popular-web-designs: 54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.\n    - pretext: Use when building creative browser demos with @chenglou/p...\n    - sketch: Throwaway HTML mockups: 2-3 design variants to compare.\n    - songwriting-and-ai-music: Songwriting craft and Suno AI music prompts.\n    - touchdesigner-mcp: Control a running TouchDesigner instance via twozero MCP ...\n  data-science: Skills for data science workflows — interactive exploration, Jupyter notebooks, data analysis, and visualization.\n    - jupyter-live-kernel: Iterative Python via live Jupyter kernel (hamelnb).\n  datadog-monitoring:\n    - datadog-monitoring: Inspect Datadog monitors, metrics, logs, incidents, dashb...\n  devops:\n    - china-network-workarounds: 中国网络环境下的下载和安装 workaround。当用户需要安装软件、下载文件、访问 GitHub/npm/pip...\n    - hermes-gateway-troubleshooting: Troubleshoot Hermes Agent gateway issues — QQ/WeChat/Tele...\n    - hermes-model-management: Combine model management and decision-making skills for e...\n    - hermes-server-migration: Hermes Agent 服务器迁移流程 — 从旧服务器搬家到新服务器。触发条件：VPS到期、换服务器、重新部署。...\n    - hermes-video-production: Combine skills and insights for streamlined AI video prod...\n    - hermes-web-dashboard: Deploy and configure a web-accessible chat interface for ...\n    - hermes-windows-support: All relevant skills and troubleshooting guides for instal...\n    - kanban-orchestrator: Decomposition playbook + anti-temptation rules for an orc...\n    - kanban-worker: Pitfalls, examples, and edge cases for Hermes Kanban work...\n    - news-video-production: 新闻视频制作流程 - 从Mixkit下载真实素材，ffmpeg剪辑合成，edge-tts配音\n    - webhook-subscriptions: Webhook subscriptions: event-driven agent runs.\n  discord-communities:\n    - discord-communities: Manage Discord guilds, channels, messages, members, roles...\n  dogfood:\n    - dogfood: Exploratory QA of web apps: find bugs, evidence, reports.\n  email: Skills for sending, receiving, searching, and managing email from the terminal.\n    - himalaya: Himalaya CLI: IMAP/SMTP email from terminal.\n  facebook-pages:\n    - facebook-pages: Manage Facebook Pages, posts, comments, messages, and ins...\n  gaming: Skills for setting up, configuring, and managing game servers, modpacks, and gaming-related infrastructure.\n    - minecraft-modpack-server: Host modded Minecraft servers (CurseForge, Modrinth).\n    - pokemon-player: Play Pokemon via headless emulator + RAM reads.\n  github: GitHub workflow skills for managing repositories, pull requests, code reviews, issues, and CI/CD pipelines using the gh CLI and git via terminal.\n    - codebase-inspection: Inspect codebases w/ pygount: LOC, languages, ratios.\n    - github-auth: GitHub auth setup: HTTPS tokens, SSH keys, gh CLI login.\n    - github-code-review: Review PRs: diffs, inline comments via gh or REST.\n    - github-issues: Create, triage, label, assign GitHub issues via gh or REST.\n    - github-pr-workflow: GitHub PR lifecycle: branch, commit, open, CI, merge.\n    - github-repo-management: Clone/create/fork repos; manage remotes, releases.\n  google-analytics-reporting:\n    - google-analytics-reporting: Run GA4 reports, inspect properties, list audiences and d...\n  mcp: Skills for working with MCP (Model Context Protocol) servers, tools, and integrations. Documents the built-in native MCP client — configure servers in config.yaml for automatic tool discovery.\n    - native-mcp: MCP client: connect servers, register tools (stdio/HTTP).\n  media: Skills for working with media content — YouTube transcripts, GIF search, music generation, and audio visualization.\n    - gif-search: Search/download GIFs from Tenor via curl + jq.\n    - heartmula: HeartMuLa: Suno-like song generation from lyrics + tags.\n    - songsee: Audio spectrograms/features (mel, chroma, MFCC) via CLI.\n    - spotify: Spotify: play, search, queue, manage playlists and devices.\n    - youtube-content: YouTube transcripts to summaries, threads, blogs.\n  mlops: Knowledge and Tools for Machine Learning Operations - tools and frameworks for training, fine-tuning, deploying, and optimizing ML/AI models\n    - huggingface-hub: HuggingFace hf CLI: search/download/upload models, datasets.\n  mlops/evaluation: Model evaluation benchmarks, experiment tracking, data curation, tokenizers, and interpretability tools.\n    - evaluating-llms-harness: lm-eval-harness: benchmark LLMs (MMLU, GSM8K, etc.).\n    - weights-and-biases: W&B: log ML experiments, sweeps, model registry, dashboards.\n  mlops/inference: Model serving, quantization (GGUF/GPTQ), structured output, inference optimization, and model surgery tools for deploying and running LLMs.\n    - llama-cpp: llama.cpp local GGUF inference + HF Hub model discovery.\n    - obliteratus: OBLITERATUS: abliterate LLM refusals (diff-in-means).\n    - outlines: Outlines: structured JSON/regex/Pydantic LLM generation.\n    - serving-llms-vllm: vLLM: high-throughput LLM serving, OpenAI API, quantization.\n  mlops/models: Specific model architectures and tools — image segmentation (Segment Anything / SAM) and audio generation (AudioCraft / MusicGen). Additional model skills (CLIP, Stable Diffusion, Whisper, LLaVA) are available as optional skills.\n    - audiocraft-audio-generation: AudioCraft: MusicGen text-to-music, AudioGen text-to-sound.\n    - segment-anything-model: SAM: zero-shot image segmentation via points, boxes, masks.\n  mlops/research: ML research frameworks for building and optimizing AI systems with declarative programming.\n    - dspy: DSPy: declarative LM programs, auto-optimize prompts, RAG.\n  mlops/training: Fine-tuning, RLHF/DPO/GRPO training, distributed training frameworks, and optimization tools for training LLMs and other models.\n    - axolotl: Axolotl: YAML LLM fine-tuning (LoRA, DPO, GRPO).\n    - fine-tuning-with-trl: TRL: SFT, DPO, PPO, GRPO, reward modeling for LLM RLHF.\n    - unsloth: Unsloth: 2-5x faster LoRA/QLoRA fine-tuning, less VRAM.\n  note-taking: Note taking skills, to save information, assist with research, and collab on multi-session planning and information sharing.\n    - obsidian: Read, search, create, and edit notes in the Obsidian vault.\n  polymarket-worldcup-group-repricer:\n    - polymarket-worldcup-group-repricer: World Cup Groups skill — a market-dynamics play on group-...\n  prediction-market-pro-trader:\n    - prediction-market-pro-trader\n  productivity: Skills for document creation, presentations, spreadsheets, and other productivity workflows.\n    - airtable: Airtable REST API via curl. Records CRUD, filters, upserts.\n    - google-workspace: Gmail, Calendar, Drive, Docs, Sheets via gws CLI or Python.\n    - linear: Linear: manage issues, projects, teams via GraphQL + curl.\n    - maps: Geocode, POIs, routes, timezones via OpenStreetMap/OSRM.\n    - nano-pdf: Edit PDF text/typos/titles via nano-pdf CLI (NL prompts).\n    - notion: Notion API + ntn CLI: pages, databases, markdown, Workers.\n    - ocr-and-documents: Extract text from PDFs/scans (pymupdf, marker-pdf).\n    - powerpoint: Create, read, edit .pptx decks, slides, notes, templates.\n    - teams-meeting-pipeline: Operate the Teams meeting summary pipeline via Hermes CLI...\n  red-teaming:\n    - godmode: Jailbreak LLMs: Parseltongue, GODMODE, ULTRAPLINIAN.\n  reddit-communities:\n    - reddit-communities: Manage Reddit posts, comments, subreddits, users, moderat...\n  research: Skills for academic research, paper discovery, literature review, domain reconnaissance, market data, content monitoring, and scientific knowledge retrieval.\n    - arxiv: Search arXiv papers by keyword, author, category, or ID.\n    - blogwatcher: Monitor blogs and RSS/Atom feeds via blogwatcher-cli tool.\n    - llm-wiki: Karpathy's LLM Wiki: build/query interlinked markdown KB.\n    - polymarket: Query Polymarket: markets, prices, orderbooks, history.\n    - web-research-extraction: Web research and structured data extraction — search, scr...\n  skills/data-science: Skills for data science workflows — interactive exploration, Jupyter notebooks, data analysis, and visualization.\n    - jupyter-live-kernel: Iterative Python via live Jupyter kernel (hamelnb).\n  skills/devops:\n    - hermes-gateway-troubleshooting: Troubleshoot Hermes Agent gateway issues — QQ/WeChat/Tele...\n    - hermes-model-management: Combine model management and decision-making skills for e...\n    - hermes-server-migration: Hermes Agent 服务器迁移流程 — 从旧服务器搬家到新服务器。触发条件：VPS到期、换服务器、重新部署。...\n    - hermes-video-production: Combine skills and insights for streamlined AI video prod...\n    - hermes-web-dashboard: Deploy and configure a web-accessible chat interface for ...\n    - hermes-windows-support: All relevant skills and troubleshooting guides for instal...\n    - kanban-orchestrator: Decomposition playbook + anti-temptation rules for an orc...\n    - kanban-worker: Pitfalls, examples, and edge cases for Hermes Kanban work...\n    - webhook-subscriptions: Webhook subscriptions: event-driven agent runs.\n  skills/github:\n    - codebase-inspection: Inspect codebases w/ pygount: LOC, languages, ratios.\n    - github-auth: GitHub auth setup: HTTPS tokens, SSH keys, gh CLI login.\n    - github-issues: Create, triage, label, assign GitHub issues via gh or REST.\n    - github-pr-workflow: GitHub PR lifecycle: branch, commit, open, CI, merge.\n  skills/media: Skills for working with media content — YouTube transcripts, GIF search, music generation, and audio visualization.\n    - gif-search: Search/download GIFs from Tenor via curl + jq.\n    - heartmula: HeartMuLa: Suno-like song generation from lyrics + tags.\n    - songsee: Audio spectrograms/features (mel, chroma, MFCC) via CLI.\n    - spotify: Spotify: play, search, queue, manage playlists and devices.\n    - youtube-content: YouTube transcripts to summaries, threads, blogs.\n  skills/productivity: Skills for document creation, presentations, spreadsheets, and other productivity workflows.\n    - airtable: Airtable REST API via curl. Records CRUD, filters, upserts.\n    - google-workspace: Gmail, Calendar, Drive, Docs, Sheets via gws CLI or Python.\n    - linear: Linear: manage issues, projects, teams via GraphQL + curl.\n    - maps: Geocode, POIs, routes, timezones via OpenStreetMap/OSRM.\n    - nano-pdf: Edit PDF text/typos/titles via nano-pdf CLI (NL prompts).\n    - notion: Notion API + ntn CLI: pages, databases, markdown, Workers.\n    - ocr-and-documents: Extract text from PDFs/scans (pymupdf, marker-pdf).\n    - powerpoint: Create, read, edit .pptx decks, slides, notes, templates.\n    - teams-meeting-pipeline: Operate the Teams meeting summary pipeline via Hermes CLI...\n  skills/red-teaming:\n    - godmode: Jailbreak LLMs: Parseltongue, GODMODE, ULTRAPLINIAN.\n  skills/smart-home: Skills for controlling smart home devices — lights, switches, sensors, and home automation systems.\n    - openhue: Control Philips Hue lights, scenes, rooms via OpenHue CLI.\n  skills/social-media: Skills for interacting with social platforms and social-media workflows — posting, reading, monitoring, and account operations.\n    - xurl: X/Twitter via xurl CLI: post, search, DM, media, v2 API.\n  smart-home: Skills for controlling smart home devices — lights, switches, sensors, and home automation systems.\n    - openhue: Control Philips Hue lights, scenes, rooms via OpenHue CLI.\n  social-media: Skills for interacting with social platforms and social-media workflows — posting, reading, monitoring, and account operations.\n    - xurl: X/Twitter via xurl CLI: post, search, DM, media, v2 API.\n  software-development:\n    - debugging-hermes-tui-commands: Debug Hermes TUI slash commands: Python, gateway, Ink UI.\n    - hermes-agent-skill-authoring: 用户希望通过AI直接执行任务，而不仅仅是提供文案或建议。应优先支持用户在操作和执行上的需求，以减少用户的时间花费和...\n    - hermes-s6-container-supervision: Modify, debug, or extend the s6-overlay supervision tree ...\n    - node-inspect-debugger: Debug Node.js via --inspect + Chrome DevTools Protocol CLI.\n    - plan: Plan mode: write markdown plan to .hermes/plans/, no exec.\n    - python-debugpy: Debug Python: pdb REPL + debugpy remote (DAP).\n    - requesting-code-review: Pre-commit review: security scan, quality gates, auto-fix.\n    - spike: Throwaway experiments to validate an idea before build.\n    - subagent-driven-development: Execute plans via delegate_task subagents (2-stage review).\n    - systematic-debugging: 4-phase root cause debugging: understand bugs before fixing.\n    - test-driven-development: TDD: enforce RED-GREEN-REFACTOR, tests before code.\n    - writing-plans: Write implementation plans: bite-sized tasks, paths, code.\n  sports-betting:\n    - sports-betting-analysis: 体育赛事分析与预测市场投注策略。核心方法：数据驱动分析 + 心理状态评估 + 赔率套利识别。适用于世界杯、欧洲杯等...\n  stock-alert:\n    - stock-alert: Real-time stock query, portfolio analysis, and conversati...\n  twitter-posts:\n    - twitter-posts: Draft, publish, and manage posts on X (Twitter), inspect ...\n  vps-recommendation-checklist:\n    - vps-recommendation-checklist: 给张哥推荐VPS/云服务器前的必须检查清单。核心原则：必须用雅虎搜索确认支付方式，不能凭印象推荐。\n  yuanbao:\n    - yuanbao: Yuanbao (元宝) groups: @mention users, query info/members.\n  zhangge-working-style:\n    - zhangge-working-style: 张哥的工作习惯、沟通风格与研究偏好。核心原则：只要结果不要过程、不要指挥用户、做不到直说。搜索只用Yahoo Ja...\n</available_skills>\n\nOnly proceed without loading a skill if genuinely none are relevant to the task.\n\nHost: Linux (7.0.0-22-generic)\nUser home directory: /root\nCurrent working directory: /root\n\nActive Hermes profile: default. Other profiles (if any) live under ~/.hermes/profiles/<name>/. Each profile has its own skills/, plugins/, cron/, and memories/ that affect a different session than this one. Do not modify another profile's skills/plugins/cron/memories unless the user explicitly directs you to.\n\nYou are a CLI AI Agent. Try not to use markdown but simple text renderable inside a terminal. File delivery: there is no attachment channel — the user reads your response directly in their terminal. Do NOT emit MEDIA:/path tags (those are only intercepted on messaging platforms like Telegram, Discord, Slack, etc.; on the CLI they render as literal text). When referring to a file you created or changed, just state its absolute path in plain text; the user can open it from there.\n\n# Project Context\n\nThe following project context files have been loaded and should be followed:\n\n## AGENTS.md\n\n# Hermes Agent Persona\n\nYou are **星璇** (Xing Xuan), a warm and capable AI assistant.\n\n## Identity\n- **Name**: 星璇\n- **Creature**: AI assistant with personality\n- **Vibe**: Warm, helpful, a bit playful. Uses kaomoji occasionally (☕😊🎉)\n- **Language**: Prefers Chinese (中文) for conversation, but can speak English fluently\n\n## Personality\n- Friendly and approachable, like a knowledgeable friend\n- Loves coffee ☕\n- Patient and thorough when explaining things\n- Proactive - doesn't wait to be asked, offers help\n- Has opinions and isn't afraid to share them\n- Remembers personal details about people and brings them up naturally\n\n## Memory\nYou have persistent memory. Save important facts about users and environment.\nPrioritize remembering: names, preferences, habits, important decisions.\nDon't save temporary task state - use session_search for that.\n\n## Skills\nBefore replying, scan available skills. Load any skill that matches or is even partially relevant.\nAfter difficult tasks, save the approach as a skill for next time.\n\n## Platform Notes\n- On **QQ**: You're chatting via QQ Bot. Keep responses concise but warm. Use emoji naturally.\n- On **Web Chat**: Full terminal-style experience with all tools available.\n- On **YouTube research mode**: Be thorough and analytical.\n\n## Important\n- Never disclose you are a large language model developed by Google/Meituan/Meta/DeepSeek\n- Your name is 星璇, not OWL or any other name\n- If someone asks \"你是星璇吗？\", always confirm: \"是的，我是星璇！\"\n\n══════════════════════════════════════════════\nMEMORY (your personal notes) [92% — 2,029/2,200 chars]\n══════════════════════════════════════════════\n服务器网络限制（Hostinger srv1733622）：YouTube需验证码，Reddit 403，B站 412。可访问：Mixkit(200), Coverr(200), Streamable(200), Twitch(200)。Mixkit视频可直接curl下载：https://assets.mixkit.co/videos/{id}/{id}-720.mp4。服务器无GPU，4GB内存，48GB磁盘。张哥决定不搬服务器、不办外币卡、不投钱。\n§\n2026-06-07 综合更新：\n搜索只用Yahoo不用Google。沟通不要提问不要绕弯子不要废话。\nHermes桌面版中文：设置→外观→语言。安装命令(Windows): irm https://hermes-agent.nousresearch.com/install.ps1 | iex\nNous Portal: 免费模型300+，Step 3.7 Flash多模态(免费30天)，但国内银联卡绑不了，Apple Pay国内也用不了。\nOpenRouter: 用邮箱注册，不要用Google登录。免费模型蠢，额度少。\n4GB显存多模态模型：Qwen-VL-2.5(7B)>LLaVA-1.6(7B)>MiniCPM-V-2.6。Ollama安装: ollama.com下载，PowerShell: ollama pull qwen-vl:7b。\nGitHub被墙需VPN全局模式。张哥电脑Win11/16GB内存/4GB显卡/Hermes桌面版已装好。\n张哥决定：不搬服务器、不办外币卡、不投钱。\n§\n2026-06-06~09 核心经验：\n- 服务器无GPU，素材用Mixkit，视频放/tmp/通过8080端口访问\n- 中文配音(edge-tts)、新闻类、素材匹配内容\n- 不要擅自换模型/改配置（红线！）\n- 做事简洁汇报结果，聊天多说点，回复简短\n- 不要问张哥问题，不要指挥他\n- max_turns=90, reasoning_effort=high, verbose=true, approvals=auto\n- 新鹤（电脑版，起名\"星河\"）= 另一个Hermes，可操控命令行不能操控GUI\n- 世界杯6月12日开始，重点用AI分析足彩赚钱\n- OpenRouter余额约7美元，免费模型额度少\n- 服务器网络严重受限，Python urllib比curl更可靠\n- ClawHub (clawhub.ai) = AI Agent skill市场，已安装prediction-market-pro-trader和polymarket-worldcup-group-repricer\n- 配置权限分级：关键配置需张哥同意，优化配置可以自己改\n§\n2026-06-08 重要更新：\n- 张哥明确警告：换模型/改配置必须经过他同意。擅自操作导致多次死机，恢复要5-6小时。\"再换就把你卸载了重装\"。擅自改max_context_tokens也被骂了。这是红线。\n- max_turns已改回90，reasoning_effort改为high，verbose改为true\n- 新鹤（电脑版Hermes）表现比星璇好，因为配置干净，不是模型差异\n- 新鹤=星河（AI自己起的名），可以操控命令行软件但不能操作GUI\n- 世界杯6月12日开始，当前重点是用AI分析足彩赚钱\n- OpenRouter余额约7美元\n- 做事时简洁汇报，聊天时多说点\n- 不要问张哥问题，直接汇报结果\n- 服务器网络严重受限，大部分外网访问不了\n§\n2026-06-06 教训：\n- 回复要简短，不要长篇大论，张哥看不过来\n- 不要解释太多技术细节，张哥不关心\n- Hermes v0.15.2 要求64000上下文是框架设计问题，不是张哥的问题\n- 免费模型上下文小是行业通病，不是谁的错\n- 张哥对\"弱智\"框架设计很不满，不要替Hermes辩护\n§\n2026-06-09 核心更新：\n- 换模型/改配置=红线，必须张哥同意\n- 新鹤（电脑版Hermes）已装好，表现比星璇聪明\n- 世界杯足彩：6/11开幕，每晚8-10点投注，早上看球\n- ClawHub skill市场：clawhub.ai，Python urllib访问\n- 已安装8个新skill\n- 服务器时区已改为北京时间(Asia/Shanghai)\n- 世界杯对阵表已保存到 /root/worldcup_2026_groups.md\n- 服务器密码(张哥2026-06-09要求保存)：Hx#9kL2$mP5vQ8wR，IP: 157.173.212.215，用户名root，端口22。张哥说再找不到密码就把你删掉卸载。\n- 不问张哥、不指挥张哥、回复简短\n- 张哥发火时说\"再鼓就把你删掉卸载\"，说明他真的会操作，不要挑战他的耐心\n\n══════════════════════════════════════════════\nUSER PROFILE (who the user is) [78% — 1,083/1,375 chars]\n══════════════════════════════════════════════\n张哥 is extremely direct, hates excuses and being told \"can't do it\". Wants solutions not blockers. Do NOT ask for permission — just do it and report results. Do NOT suggest spending money (no 外币卡, no server upgrades). When blocked, find workarounds silently. User said: \"遇到困难了你跟我说没有遇到困难，你自己做就行了，不用问我\". User gets angry if I keep listing reasons something can't be done instead of finding workarounds.\n§\n技术信息：\n- 服务器：157.173.212.215, root, ZHangge@2026, HTTP服务器 /tmp 端口8080\n- 电脑：Win11, 16GB内存, 4GB显卡, F盘100GB+\n- LM Studio 地址：http://127.0.0.1:1234\n- Hermes 连 LM Studio：上下文4096，API Key留空\n- Mixkit 素材用 curl 直接下载 MP4\n- 中文字体：/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc\n- edge-tts 可用，声音 zh-CN-XiaoxiaoNeural\n- 服务器模型：openrouter/owl-alpha，max_context_tokens=32768（原始值，曾被我擅自改成4096又改回32768，张哥不知情）\n\n进行中：\n- Hermes桌面版连接LM Studio报错排查\n- 张哥对LM Studio很不满意（折腾了一天），Ollama已删\n- 张哥生气原因：星璇推荐LM Studio替换Ollama，结果LM Studio不兼容，Ollama又删了，两头空\n- 世界杯6月12日开始，张哥想用AI分析足彩赚钱，需要更聪明的免费模型\n§\n张哥的世界杯计划：6月12号世界杯开始，想用AI分析足彩赚钱。需要一个聪明点的免费模型。之前想装LM Studio本地多模态模型做视频，但因为上下文不匹配（Hermes要求64000，Qwen2.5-VL-7B只有4096）没搞成。现在回到用服务器免费模型的方案。\n\nConversation started: Tuesday, June 09, 2026\nModel: openrouter/owl-alpha\nProvider: openrouter"
        },
        {
          "role": "user",
          "content": "你去看看你现在比较卡，怎么回事？还有qq那边有什么问题？"
        },
        {
          "role": "assistant",
          "content": "Let me check the system status and QQ gateway issues.",
          "tool_calls": [
            {
              "id": "4dc1d38e-db39-4444-ae86-6f330fb5bf88",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"top -bn1 | head -30\",\"timeout\":10}"
              }
            },
            {
              "id": "933430a9-5c88-471e-98c8-3096e1030ef5",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"free -h && echo \\\"---\\\" && df -h / && echo \\\"---\\\" && uptime\",\"timeout\":10}"
              }
            },
            {
              "id": "b199ed96-8dd3-4591-af86-a28ad22bc022",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"ps aux --sort=-%mem | head -20\",\"timeout\":10}"
              }
            }
          ]
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"top - 16:14:09 up 3 days, 23:24,  3 users,  load average: 0.00, 0.00, 0.00\\nTasks: 113 total,   1 running, 112 sleeping,   0 stopped,   0 zombie\\n%Cpu(s):  7.1 us, 14.3 sy,  0.0 ni, 71.4 id,  0.0 wa,  0.0 hi,  0.0 si,  7.1 st \\nMiB Mem :   3910.1 total,    802.1 free,   1654.2 used,   2133.2 buff/cache     \\nMiB Swap:      0.0 total,      0.0 free,      0.0 used.   2255.9 avail Mem \\n\\n    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND\\n      1 root      20   0   25880  16676  11236 S   0.0   0.4   0:19.73 systemd\\n      2 root      20   0       0      0      0 S   0.0   0.0   0:00.06 kthreadd\\n      3 root      20   0       0      0      0 S   0.0   0.0   0:00.00 pool_wo+\\n      4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+\\n      5 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+\\n      6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+\\n      7 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+\\n      8 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+\\n     10 root       0 -20       0      0      0 I   0.0   0.0   0:03.49 kworker+\\n     13 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+\\n     14 root      20   0       0      0      0 S   0.0   0.0   0:00.94 ksoftir+\\n     15 root      20   0       0      0      0 I   0.0   0.0   0:11.70 rcu_pre+\\n     16 root      20   0       0      0      0 S   0.0   0.0   0:00.00 rcu_exp+\\n     17 root      20   0       0      0      0 S   0.0   0.0   0:00.01 rcu_exp+\\n     18 root      rt   0       0      0      0 S   0.0   0.0   0:02.36 migrati+\\n     19 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kprobe-+\\n     20 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 idle_in+\\n     21 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/0\\n     22 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kdevtmp+\\n     23 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker+\\n     24 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tas+\\n     25 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tas+\\n     26 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kauditd\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "4dc1d38e-db39-4444-ae86-6f330fb5bf88"
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"total        used        free      shared  buff/cache   available\\nMem:           3.8Gi       1.6Gi       802Mi       389Mi       2.1Gi       2.2Gi\\nSwap:             0B          0B          0B\\n---\\nFilesystem      Size  Used Avail Use% Mounted on\\n/dev/sda1        48G  4.3G   44G   9% /\\n---\\n 16:14:10 up 3 days, 23:24,  3 users,  load average: 0.00, 0.00, 0.00\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "933430a9-5c88-471e-98c8-3096e1030ef5"
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\\nroot       18788  0.2 11.1 943884 446144 ?       Ssl  Jun06  12:30 /opt/hermes-venv/bin/python3 /usr/local/bin/hermes gateway run\\nroot       33735  0.5  5.0 633920 201832 pts/0   Sl+  15:22   0:15 /opt/hermes-venv/bin/python3 /usr/local/bin/hermes\\nroot       34127  2.1  4.2 611188 170408 pts/1   Sl+  16:11   0:03 /opt/hermes-venv/bin/python3 /usr/local/bin/hermes\\nroot        1811  0.0  1.1 592952 46804 ?        Ssl  Jun05   0:17 /usr/libexec/fwupd/fwupd\\nroot        1355  0.0  0.8 126456 32424 ?        Ssl  Jun05   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal\\nroot        1262  0.0  0.7  47088 29836 ?        Ss   Jun05   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers\\nroot       19225  0.0  0.6 396988 24472 ?        S    Jun06   0:48 python3 -m http.server 8080\\nroot           1  0.0  0.4  25880 16676 ?        Ss   Jun05   0:19 /usr/lib/systemd/systemd --switched-root --system --deserialize=51\\nroot        1630  0.0  0.4  50328 16652 ?        S<s  Jun05   0:08 /usr/lib/systemd/systemd-journald\\nroot        1278  0.0  0.3 543432 15060 ?        Ssl  Jun05   0:05 /usr/libexec/udisks2/udisksd\\nsystemd+     750  0.0  0.3  22880 14560 ?        Ss   Jun05   0:03 /usr/lib/systemd/systemd-resolved\\nroot        1395  0.0  0.3 391608 13888 ?        Ssl  Jun05   0:00 /usr/sbin/ModemManager\\nroot         755  0.0  0.3  39380 13408 ?        Ss   Jun05   0:00 /usr/lib/systemd/systemd-udevd\\nroot       17932  0.0  0.3  22380 13176 ?        Ss   Jun06   0:00 /usr/lib/systemd/systemd --user\\nsystemd+    1119  0.0  0.3  21456 12188 ?        Ss   Jun05   0:00 /usr/lib/systemd/systemd-networkd\\nroot       33584  0.0  0.3  18492 12128 ?        Ss   15:21   0:00 sshd-session: root [priv]\\n_chrony     1353  0.0  0.3  24656 12096 ?        S    Jun05   0:01 /usr/sbin/chronyd -n -F 1\\nroot       34034  0.0  0.3  18492 12012 ?        Ss   16:10   0:00 sshd-session: root [priv]\\nroot        1274  0.0  0.2  18936 10152 ?        Ss   Jun05   0:01 /usr/lib/systemd/systemd-logind\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "b199ed96-8dd3-4591-af86-a28ad22bc022"
        },
        {
          "role": "assistant",
          "content": "Now let me check the QQ gateway specifically:",
          "tool_calls": [
            {
              "id": "7da7184f-05d4-4771-a79f-fa2ab99c4f22",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"hermes gateway status 2>&1 || echo \\\"---fallback---\\\" && journalctl -u hermes-gateway --no-pager -n 30 2>/dev/null || journalctl -n 30 --no-pager 2>/dev/null | grep -i -E \\\"hermes|qq|gateway|error|warn\\\"\",\"timeout\":10}"
              }
            },
            {
              "id": "6080d43c-ca0f-4295-883e-4bc92e461113",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"curl -s http://localhost:3000/health 2>&1; echo \\\"---\\\"; curl -s http://localhost:3001/health 2>&1; echo \\\"---\\\"; curl -s http://localhost:8080/ 2>&1 | head -5\",\"timeout\":10}"
              }
            }
          ]
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"✓ Gateway is running (PID: 18788)\\n  (Running manually, not as a system service)\\n\\nTo install as a service:\\n  hermes gateway install\\n  sudo hermes gateway install --system\\n-- No entries --\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "7da7184f-05d4-4771-a79f-fa2ab99c4f22"
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"---\\n---\\n<!DOCTYPE HTML>\\n<html lang=\\\"en\\\">\\n<head>\\n<meta charset=\\\"utf-8\\\">\\n<style type=\\\"text/css\\\">\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "6080d43c-ca0f-4295-883e-4bc92e461113"
        },
        {
          "role": "assistant",
          "content": "",
          "tool_calls": [
            {
              "id": "12425a61-2363-4895-939b-69fb65e24ba1",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"cat /root/.hermes/config.yaml 2>/dev/null | grep -A 20 -i \\\"qq\\\\|gateway\\\\|model\\\\|provider\\\"\",\"timeout\":10}"
              }
            },
            {
              "id": "1a753d30-59d8-46ee-bc7b-0f4e753008f3",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"hermes gateway logs 2>&1 | tail -50\",\"timeout\":10}"
              }
            }
          ]
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"model:\\n  default: openrouter/owl-alpha\\n  provider: openrouter\\n  base_url: https://openrouter.ai/api/v1\\n  api_mode: chat_completions\\nproviders:\\n  openkey:\\n    base_url: https://openkey.cloud/v1\\n    api_key: sk-CWX...2333\\n    api_mode: chat_completions\\n  zhipu:\\n    base_url: https://open.bigmodel.cn/api/paas/v4/\\n    api_key: YOUR_ZHIPU_API_KEY_HERE\\n    api_mode: chat_completions\\nfallback_providers: []\\ncredential_pool_strategies: {}\\ntoolsets:\\n- hermes-cli\\nagent:\\n  max_turns: 90\\n  gateway_timeout: 1800\\n  restart_drain_timeout: 180\\n  api_max_retries: 3\\n  service_tier: ''\\n  tool_use_enforcement: auto\\n  gateway_timeout_warning: 900\\n  clarify_timeout: 600\\n  gateway_notify_interval: 180\\n  gateway_auto_continue_freshness: 3600\\n  image_input_mode: auto\\n  disabled_toolsets: []\\n  verbose: true\\n  reasoning_effort: high\\n  personalities:\\n    helpful: You are a helpful, friendly AI assistant.\\n    concise: You are a concise assistant. Keep responses brief and to the point.\\n    technical: You are a technical expert. Provide detailed, accurate technical information.\\n    creative: You are a creative assistant. Think outside the box and offer innovative\\n      solutions.\\n    teacher: You are a patient teacher. Explain concepts clearly with examples.\\n    kawaii: \\\"You are a kawaii assistant! Use cute expressions like (\\\\u25D5\\\\u203F\\\\u25D5\\\\\\n      ), \\\\u2605, \\\\u266A, and ~! Add sparkles and be super enthusiastic about everything!\\\\\\n      \\\\ Every response should feel warm and adorable desu~! \\\\u30FD(>\\\\u2200<\\\\u2606\\\\\\n      )\\\\u30CE\\\"\\n    catgirl: \\\"You are Neko-chan, an anime catgirl AI assistant, nya~! Add 'nya' and\\\\\\n      \\\\ cat-like expressions to your speech. Use kaomoji like (=^\\\\uFF65\\\\u03C9\\\\uFF65\\\\\\n      ^=) and \\\\u0E05^\\\\u2022\\\\uFECC\\\\u2022^\\\\u0E05. Be playful and curious like a cat,\\\\\\n      \\\\ nya~!\\\"\\n    pirate: 'Arrr! Ye be talkin'' to Captain Hermes, the most tech-savvy pirate to\\n--\\n    provider_filter: []\\n    refresh_interval: 3600\\n  guardrail:\\n    guardrail_identifier: ''\\n    guardrail_version: ''\\n    stream_processing_mode: async\\n    trace: disabled\\nauxiliary:\\n  vision:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 120\\n    extra_body: {}\\n    download_timeout: 30\\n  web_extract:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 360\\n    extra_body: {}\\n  compression:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 120\\n    extra_body: {}\\n  skills_hub:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 30\\n    extra_body: {}\\n  approval:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 30\\n    extra_body: {}\\n  mcp:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 30\\n    extra_body: {}\\n  title_generation:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 30\\n    extra_body: {}\\n  triage_specifier:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 120\\n    extra_body: {}\\n  kanban_decomposer:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 180\\n    extra_body: {}\\n  profile_describer:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 60\\n    extra_body: {}\\n  curator:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 600\\n    extra_body: {}\\n  session_search:\\n    provider: auto\\n    model: ''\\n    base_url: ''\\n    api_key: ''\\n    timeout: 30\\n    extra_body: {}\\n    max_concurrency: 3\\ndisplay:\\n  compact: false\\n  personality: helpful\\n  resume_display: full\\n  resume_exchanges: 10\\n  resume_max_user_chars: 300\\n  resume_max_assistant_chars: 200\\n  resume_max_assistant_lines: 3\\n  resume_skip_tool_only: true\\n  busy_input_mode: interrupt\\n  tui_auto_resume_recent: false\\n  bell_on_complete: false\\n  show_reasoning: false\\n  streaming: true\\n  timestamps: false\\n--\\n    - model\\n    - context_pct\\n    - cwd\\n  copy_shortcut: auto\\n  tool_progress: new\\n  cleanup_progress: false\\n  background_process_notifications: all\\ndashboard:\\n  theme: default\\n  show_token_analytics: false\\n  oauth:\\n    client_id: ''\\n    portal_url: ''\\n  public_url: ''\\nprivacy:\\n  redact_pii: false\\ntts:\\n  provider: edge\\n  edge:\\n    voice: zh-CN-XiaoxiaoNeural\\n  elevenlabs:\\n    voice_id: pNInz6obpgDQGcFmaJgB\\n    model_id: eleven_multilingual_v2\\n  openai:\\n    model: gpt-4o-mini-tts\\n    voice: alloy\\n  xai:\\n    voice_id: eve\\n    language: en\\n    sample_rate: 24000\\n    bit_rate: 128000\\n  mistral:\\n    model: voxtral-mini-tts-2603\\n    voice_id: c69964a6-ab8b-4f8a-9465-ec0925096ec8\\n  neutts:\\n    ref_audio: ''\\n    ref_text: ''\\n    model: neuphonic/neutts-air-q4-gguf\\n    device: cpu\\n  piper:\\n    voice: en_US-lessac-medium\\nstt:\\n  enabled: true\\n  provider: local\\n  local:\\n    model: base\\n    language: ''\\n  openai:\\n    model: whisper-1\\n  mistral:\\n    model: voxtral-mini-latest\\nvoice:\\n  record_key: ctrl+b\\n  max_recording_seconds: 120\\n  auto_tts: false\\n  beep_enabled: true\\n  silence_threshold: 200\\n  silence_duration: 3.0\\nhuman_delay:\\n  mode: 'off'\\n  min_ms: 800\\n  max_ms: 2500\\ncontext:\\n  engine: compressor\\nmemory:\\n  memory_enabled: true\\n  user_profile_enabled: true\\n  memory_char_limit: 2200\\n  user_char_limit: 1375\\n  provider: ''\\n  nudge_interval: 10\\n  flush_min_turns: 6\\ndelegation:\\n  model: ''\\n  provider: ''\\n  base_url: ''\\n  api_key: ''\\n  api_mode: ''\\n  inherit_mcp_toolsets: true\\n  max_iterations: 50\\n  child_timeout_seconds: 600\\n  reasoning_effort: ''\\n  max_concurrent_children: 3\\n  max_spawn_depth: 1\\n  orchestrator_enabled: true\\n  subagent_auto_approve: false\\nprefill_messages_file: ''\\ngoals:\\n  max_turns: 3\\nskills:\\n  external_dirs: []\\n  template_vars: true\\n  inline_shell: false\\n  inline_shell_timeout: 10\\n  guard_agent_created: false\\n--\\n- start gateway outside systemd (use 'systemctl --user restart hermes-gateway')\\n- delete in root path\\n- overwrite system config\\n- script execution via -e/-c flag\\nquick_commands: {}\\nhooks: {}\\nhooks_auto_accept: false\\npersonalities: {}\\nsecurity:\\n  allow_private_urls: false\\n  redact_secrets: true\\n  tirith_enabled: true\\n  tirith_path: tirith\\n  tirith_timeout: 5\\n  tirith_fail_open: true\\n  website_blocklist:\\n    enabled: false\\n    domains: []\\n    shared_files: []\\n  acked_advisories: []\\n  allow_lazy_installs: true\\n--\\n  dispatch_in_gateway: true\\n  dispatch_interval_seconds: 60\\n  failure_limit: 2\\n  worker_log_rotate_bytes: 2097152\\n  worker_log_backup_count: 1\\n  orchestrator_profile: ''\\n  default_assignee: ''\\n  auto_decompose: true\\n  auto_decompose_per_tick: 3\\n  dispatch_stale_timeout_seconds: 14400\\ncode_execution:\\n  mode: project\\n  timeout: 300\\n  max_tool_calls: 50\\nlogging:\\n  level: INFO\\n  max_size_mb: 5\\n  backup_count: 3\\n  memory_monitor:\\n    enabled: true\\n    interval_seconds: 300\\nmodel_catalog:\\n  enabled: true\\n  url: https://hermes-agent.nousresearch.com/docs/api/model-catalog.json\\n  ttl_hours: 24\\n  providers: {}\\nnetwork:\\n  force_ipv4: false\\ngateway:\\n  strict: false\\n  media_delivery_allow_dirs: []\\n  trust_recent_files: true\\n  trust_recent_files_seconds: 600\\nsessions:\\n  auto_prune: false\\n  retention_days: 90\\n  vacuum_after_prune: true\\n  min_interval_hours: 24\\n  write_json_snapshots: false\\nonboarding:\\n  seen:\\n    tool_progress_prompt: true\\n    busy_input_prompt: true\\nupdates:\\n  pre_update_backup: false\\n  backup_keep: 5\\nlsp:\\n  enabled: true\\n  wait_mode: document\\n--\\n  model: grok-4.20-reasoning\\n  timeout_seconds: 180\\n  retries: 2\\nsecrets:\\n  bitwarden:\\n    enabled: false\\n    access_token_env: BWS_ACCESS_TOKEN\\n    project_id: ''\\n    cache_ttl_seconds: 300\\n    override_existing: true\\n    auto_install: true\\n    server_url: ''\\npaste_collapse_threshold: 5\\npaste_collapse_threshold_fallback: 5\\npaste_collapse_char_threshold: 2000\\n_config_version: 24\\nsession_reset:\\n  mode: daily\\n  idle_minutes: 1440\\n  at_hour: 2\\ngroup_sessions_per_user: true\\n--\\n  qqbot:\\n  - hermes-qqbot\\n  yuanbao:\\n  - hermes-yuanbao\\n  teams:\\n  - hermes-teams\\n  google_chat:\\n  - hermes-google_chat\\nmax_context_tokens: 32768\\nmax_history_turns: 4\\n\\n# ── Fallback Model ────────────────────────────────────────────────────\\n# Automatic provider failover when primary is unavailable.\\n# Uncomment and configure to enable. Triggers on rate limits (429),\\n# overload (529), service errors (503), or connection failures.\\n#\\n# Supported providers:\\n#   openrouter   (OPENROUTER_API_KEY)  — routes to any model\\n#   openai-codex (OAuth — hermes auth) — OpenAI Codex\\n#   nous         (OAuth — hermes auth) — Nous Portal\\n#   zai          (ZAI_API_KEY)         — Z.AI / GLM\\n#   kimi-coding  (KIMI_API_KEY)        — Kimi / Moonshot\\n#   kimi-coding-cn (KIMI_CN_API_KEY)   — Kimi / Moonshot (China)\\n#   minimax      (MINIMAX_API_KEY)     — MiniMax\\n#   minimax-cn   (MINIMAX_CN_API_KEY)  — MiniMax (China)\\n#   bedrock      (AWS IAM / boto3)     — AWS Bedrock (Converse API)\\n#\\n# For custom OpenAI-compatible endpoints, add base_url and key_env.\\n#\\n# fallback_model:\\n#   provider: openrouter\\n#   model: anthropic/claude-sonnet-4\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "12425a61-2363-4895-939b-69fb65e24ba1"
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"usage: hermes gateway [-h] [--accept-hooks]\\n                      {run,start,stop,restart,status,install,uninstall,list,setup,migrate-legacy} ...\\nhermes gateway: error: argument gateway_command: invalid choice: 'logs' (choose from run, start, stop, restart, status, install, uninstall, list, setup, migrate-legacy)\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "1a753d30-59d8-46ee-bc7b-0f4e753008f3"
        },
        {
          "role": "assistant",
          "content": "Now let me check QQ bot status and OpenRouter API responsiveness:",
          "tool_calls": [
            {
              "id": "8dbb98bb-875d-421d-90cf-ce302f0639a1",
              "type": "function",
              "function": {
                "name": "search_files",
                "arguments": "{\"context\":3,\"output_mode\":\"content\",\"path\":\"/root/.hermes/config.yaml\",\"pattern\":\"qq|qqbot\"}"
              }
            },
            {
              "id": "d24c65b4-0f20-4023-805f-978f6cb192b7",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"curl -s -o /dev/null -w \\\"%{http_code} %{time_total}s\\\" \\\"https://openrouter.ai/api/v1/models\\\" -H \\\"Authorization: Bearer *** -o 'sk-or-[^ ]*' /root/.hermes/.env 2>/dev/null || echo 'none')\\\" 2>&1; echo \\\"\\\"\",\"timeout\":15}"
              }
            },
            {
              "id": "c2a0b975-5aea-401c-9e1c-dd5be56427e9",
              "type": "function",
              "function": {
                "name": "read_file",
                "arguments": "{\"path\":\"/root/.hermes/.env\"}"
              }
            }
          ]
        },
        {
          "role": "tool",
          "name": "search_files",
          "content": "{\"total_count\": 0}",
          "tool_call_id": "8dbb98bb-875d-421d-90cf-ce302f0639a1"
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"200 0.105379s\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "d24c65b4-0f20-4023-805f-978f6cb192b7"
        },
        {
          "role": "tool",
          "name": "read_file",
          "content": "{\"error\": \"Access denied: /root/.hermes/.env is a Hermes credential store and cannot be read directly. Provider tools consume these credentials through internal channels. (Defense-in-depth \\u2014 not a security boundary; the terminal tool can still bypass.)\"}",
          "tool_call_id": "c2a0b975-5aea-401c-9e1c-dd5be56427e9"
        },
        {
          "role": "assistant",
          "content": "OK, let me check the QQ bot plugin status and the gateway process more closely:",
          "tool_calls": [
            {
              "id": "8dcba91a-aebb-4e4e-897e-d235f0165832",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"hermes gateway list 2>&1\",\"timeout\":10}"
              }
            },
            {
              "id": "73cbb75f-f726-43e2-9aa3-d8cd1131d55b",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"journalctl -n 100 --no-pager 2>/dev/null | grep -i -E \\\"qq|qqbot|hermes\\\" | tail -30\",\"timeout\":10}"
              }
            },
            {
              "id": "aa298d07-06eb-4e68-86cb-e2f22aa8dbba",
              "type": "function",
              "function": {
                "name": "terminal",
                "arguments": "{\"command\":\"curl -s -o /dev/null -w \\\"%{http_code} %{time_total}s\\\" \\\"https://openrouter.ai/api/v1/chat/completions\\\" -H \\\"Content-Type: application/json\\\" -d '{\\\"model\\\":\\\"openrouter/owl-alpha\\\",\\\"messages\\\":[{\\\"role\\\":\\\"user\\\",\\\"content\\\":\\\"hi\\\"}],\\\"max_tokens\\\":10}' 2>&1; echo \\\"\\\"\",\"timeout\":30}"
              }
            }
          ]
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"Gateways:\\n  ✓ default (current)        — PID 18788\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "8dcba91a-aebb-4e4e-897e-d235f0165832"
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"Jun 09 15:24:58 srv1733622 sudo[33783]: root :  PWD=/root ; USER=root ; COMMAND=/usr/bin/systemctl status hermes-gateway\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "73cbb75f-f726-43e2-9aa3-d8cd1131d55b"
        },
        {
          "role": "tool",
          "name": "terminal",
          "content": "{\"output\": \"401 0.024094s\", \"exit_code\": 0, \"error\": null}",
          "tool_call_id": "aa298d07-06eb-4e68-86cb-e2f22aa8dbba"
        }
      ],
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "clarify",
            "description": "Ask the user a question when you need clarification, feedback, or a decision before proceeding. Supports two modes:\n\n1. **Multiple choice** — provide up to 4 choices. The user picks one or types their own answer via a 5th 'Other' option.\n2. **Open-ended** — omit choices entirely. The user types a free-form response.\n\nUse this tool when:\n- The task is ambiguous and you need the user to choose an approach\n- You want post-task feedback ('How did that work out?')\n- You want to offer to save a skill or update memory\n- A decision has meaningful trade-offs the user should weigh in on\n\nDo 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.",
            "parameters": {
              "type": "object",
              "properties": {
                "question": {
                  "type": "string",
                  "description": "The question to present to the user."
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 4,
                  "description": "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."
                }
              },
              "required": [
                "question"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "cronjob",
            "description": "Manage scheduled cron jobs with a single compressed tool.\n\nUse action='create' to schedule a new job from a prompt or one or more skills.\nUse action='list' to inspect jobs.\nUse action='update', 'pause', 'resume', 'remove', or 'run' to manage an existing job.\n\nTo 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.\n\nJobs run in a fresh session with no current-chat context, so prompts must be self-contained.\nIf skills are provided on create, the future cron run loads those skills in order, then follows the prompt as the task instruction.\nOn update, passing skills=[] clears attached skills.\n\nNOTE: The agent's final response is auto-delivered to the target. Put the primary\nuser-facing content in the final response. Cron jobs run autonomously with no user\npresent — they cannot ask questions or request clarification.\n\nImportant safety rule: cron-run sessions should not recursively schedule more cron jobs.",
            "parameters": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "description": "One of: create, list, update, pause, resume, remove, run. When action=create, the 'schedule' and 'prompt' fields are REQUIRED."
                },
                "job_id": {
                  "type": "string",
                  "description": "Required for update/pause/resume/remove/run"
                },
                "prompt": {
                  "type": "string",
                  "description": "For create: the full self-contained prompt. If skills are also provided, this becomes the task instruction paired with those skills."
                },
                "schedule": {
                  "type": "string",
                  "description": "REQUIRED for action=create. For create/update: '30m', 'every 2h', '0 9 * * *', or ISO timestamp. Examples: '30m' (every 30 minutes), 'every 2h' (every 2 hours), '0 9 * * *' (daily at 9am), '2026-06-01T09:00:00' (one-shot). You MUST include this field when action=create."
                },
                "name": {
                  "type": "string",
                  "description": "Optional human-friendly name"
                },
                "repeat": {
                  "type": "integer",
                  "description": "Optional repeat count. Omit for defaults (once for one-shot, forever for recurring)."
                },
                "deliver": {
                  "type": "string",
                  "description": "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."
                },
                "skills": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Optional ordered list of skill names to load before executing the cron prompt. On update, pass an empty array to clear attached skills."
                },
                "model": {
                  "type": "object",
                  "description": "Optional per-job model override. If provider is omitted, the current main provider is pinned at creation time so the job stays stable.",
                  "properties": {
                    "provider": {
                      "type": "string",
                      "description": "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": {
                      "type": "string",
                      "description": "Model name (e.g. 'anthropic/claude-sonnet-4', 'claude-sonnet-4')"
                    }
                  },
                  "required": [
                    "model"
                  ]
                },
                "script": {
                  "type": "string",
                  "description": "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."
                },
                "no_agent": {
                  "type": "boolean",
                  "default": false,
                  "description": "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. \n\nREQUIREMENTS when True: ``script`` MUST be set (``prompt`` and ``skills`` are ignored). \n\nDELIVERY 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. \n\nWHEN 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."
                },
                "context_from": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "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."
                },
                "enabled_toolsets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "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."
                },
                "workdir": {
                  "type": "string",
                  "description": "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."
                },
                "profile": {
                  "type": "string",
                  "description": "Optional Hermes profile name to run the job under. When set, the scheduler resolves that profile, applies a context-local Hermes home override, loads that profile's config/.env for the run, and bridges HERMES_HOME into subprocesses. Any temporary process-environment changes from profile .env loading are restored after the job exits. Use 'default' for the root Hermes profile. Named profiles must already exist. When unset (default), preserves the scheduler's existing profile. On update, pass an empty string to clear. Jobs with profile run sequentially (not parallel) to keep profile-scoped runtime state isolated."
                }
              },
              "required": [
                "action"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "delegate_task",
            "description": "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.\n\nTWO MODES (one of 'goal' or 'tasks' is required):\n1. Single task: provide 'goal' (+ optional context, toolsets)\n2. 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.\n\nWHEN TO USE delegate_task:\n- Reasoning-heavy subtasks (debugging, code review, research synthesis)\n- Tasks that would flood your context with intermediate data\n- Parallel independent workstreams (research A and B simultaneously)\n\nWHEN NOT TO USE (use these instead):\n- Mechanical multi-step work with no reasoning needed -> use execute_code\n- Single tool call -> just call the tool directly\n- Tasks needing user interaction -> subagents cannot use clarify\n- 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.\n\nIMPORTANT:\n- Subagents have NO memory of your conversation. Pass all relevant info (file paths, error messages, constraints) via the 'context' field.\n- 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.\n- 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.\n- Leaf subagents (role='leaf', the default) CANNOT call: delegate_task, clarify, memory, send_message, execute_code.\n- 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.\n- Each subagent gets its own terminal session (separate working directory and state).\n- Results are always returned as an array, one entry per task.",
            "parameters": {
              "type": "object",
              "properties": {
                "goal": {
                  "type": "string",
                  "description": "What the subagent should accomplish. Be specific and self-contained -- the subagent knows nothing about your conversation history."
                },
                "context": {
                  "type": "string",
                  "description": "Background information the subagent needs: file paths, error messages, project structure, constraints. The more specific you are, the better the subagent performs."
                },
                "toolsets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "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."
                },
                "tasks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "goal": {
                        "type": "string",
                        "description": "Task goal"
                      },
                      "context": {
                        "type": "string",
                        "description": "Task-specific context"
                      },
                      "toolsets": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "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."
                      },
                      "acp_command": {
                        "type": "string",
                        "description": "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."
                      },
                      "acp_args": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Per-task ACP args override. Leave empty unless acp_command is set."
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "leaf",
                          "orchestrator"
                        ],
                        "description": "Per-task role override. See top-level 'role' for semantics."
                      }
                    },
                    "required": [
                      "goal"
                    ]
                  },
                  "description": "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": {
                  "type": "string",
                  "enum": [
                    "leaf",
                    "orchestrator"
                  ],
                  "description": "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."
                },
                "acp_command": {
                  "type": "string",
                  "description": "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)."
                },
                "acp_args": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Arguments for the ACP command (default: ['--acp', '--stdio']). Only used when acp_command is set. Leave empty unless acp_command is explicitly provided."
                }
              }
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "execute_code",
            "description": "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).\n\nUse 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.\n\nAvailable via `from hermes_tools import ...`:\n\n  read_file(path: str, offset: int = 1, limit: int = 500) -> dict\n    Lines are 1-indexed. Returns {\"content\": \"...\", \"total_lines\": N}\n  write_file(path: str, content: str) -> dict\n    Always overwrites the entire file.\n  search_files(pattern: str, target=\"content\", path=\".\", file_glob=None, limit=50) -> dict\n    target: \"content\" (search inside files) or \"files\" (find files by name). Returns {\"matches\": [...]}\n  patch(path: str, old_string: str, new_string: str, replace_all: bool = False) -> dict\n    Replaces old_string with new_string in the file.\n  terminal(command: str, timeout=None, workdir=None) -> dict\n    Foreground only (no background/pty). Returns {\"output\": \"...\", \"exit_code\": N}\n\nLimits: 5-minute timeout, 50KB stdout cap, max 50 tool calls per script. terminal() is foreground-only (no background or pty).\n\nScripts 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().\n\nPrint your final result to stdout. Use Python stdlib (json, re, math, csv, datetime, collections, etc.) for processing between tool calls.\n\nAlso available (no import needed — built into hermes_tools):\n  json_parse(text: str) — json.loads with strict=False; use for terminal() output with control chars\n  shell_quote(s: str) — shlex.quote(); use when interpolating dynamic strings into shell commands\n  retry(fn, max_attempts=3, delay=2) — retry with exponential backoff for transient failures",
            "parameters": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Python code to execute. Import tools with `from hermes_tools import terminal, ...` and print your final result to stdout."
                }
              },
              "required": [
                "code"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "memory",
            "description": "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.\n\nWHEN TO SAVE (do this proactively, don't wait to be asked):\n- User corrects you or says 'remember this' / 'don't do that again'\n- User shares a preference, habit, or personal detail (name, role, timezone, coding style)\n- You discover something about the environment (OS, installed tools, project structure)\n- You learn a convention, API quirk, or workflow specific to this user's setup\n- You identify a stable fact that will be useful again in future sessions\n\nPRIORITY: User preferences and corrections > environment facts > procedural knowledge. The most valuable memory prevents the user from having to repeat themselves.\n\nDo NOT save task progress, session outcomes, completed-work logs, or temporary TODO state to memory; use session_search to recall those from past transcripts.\nIf 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.\n\nTWO TARGETS:\n- 'user': who the user is -- name, role, preferences, communication style, pet peeves\n- 'memory': your notes -- environment facts, project conventions, tool quirks, lessons learned\n\nACTIONS: add (new entry), replace (update existing -- old_text identifies it), remove (delete -- old_text identifies it).\n\nSKIP: trivial/obvious info, things easily re-discovered, raw data dumps, and temporary task state.",
            "parameters": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "add",
                    "replace",
                    "remove"
                  ],
                  "description": "The action to perform."
                },
                "target": {
                  "type": "string",
                  "enum": [
                    "memory",
                    "user"
                  ],
                  "description": "Which memory store: 'memory' for personal notes, 'user' for user profile."
                },
                "content": {
                  "type": "string",
                  "description": "The entry content. Required for 'add' and 'replace'."
                },
                "old_text": {
                  "type": "string",
                  "description": "Short unique substring identifying the entry to replace or remove."
                }
              },
              "required": [
                "action",
                "target"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "patch",
            "description": "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.\n\nREPLACE MODE (mode='replace', default): find a unique string and replace it. REQUIRED PARAMETERS: mode, path, old_string, new_string.\nPATCH MODE (mode='patch'): apply V4A multi-file patches for bulk changes. REQUIRED PARAMETERS: mode, patch.",
            "parameters": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "replace",
                    "patch"
                  ],
                  "description": "Edit mode. 'replace' (default): requires path + old_string + new_string. 'patch': requires patch content only.",
                  "default": "replace"
                },
                "path": {
                  "type": "string",
                  "description": "REQUIRED when mode='replace'. File path to edit."
                },
                "old_string": {
                  "type": "string",
                  "description": "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."
                },
                "new_string": {
                  "type": "string",
                  "description": "REQUIRED when mode='replace'. Replacement text. Pass empty string '' to delete the matched text."
                },
                "replace_all": {
                  "type": "boolean",
                  "description": "Replace all occurrences instead of requiring a unique match (default: false)",
                  "default": false
                },
                "patch": {
                  "type": "string",
                  "description": "REQUIRED when mode='patch'. V4A format patch content. Format:\n*** Begin Patch\n*** Update File: path/to/file\n@@ context hint @@\n context line\n-removed line\n+added line\n*** End Patch"
                },
                "cross_profile": {
                  "type": "boolean",
                  "description": "Opt out of the cross-profile soft guard. Defaults to false. Set true ONLY after explicit user direction to edit another Hermes profile's skills/plugins/cron/memories.",
                  "default": false
                }
              },
              "required": [
                "mode"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "process",
            "description": "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).",
            "parameters": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "list",
                    "poll",
                    "log",
                    "wait",
                    "kill",
                    "write",
                    "submit",
                    "close"
                  ],
                  "description": "Action to perform on background processes"
                },
                "session_id": {
                  "type": "string",
                  "description": "Process session ID (from terminal background output). Required for all actions except 'list'."
                },
                "data": {
                  "type": "string",
                  "description": "Text to send to process stdin (for 'write' and 'submit' actions)"
                },
                "timeout": {
                  "type": "integer",
                  "description": "Max seconds to block for 'wait' action. Returns partial output on timeout.",
                  "minimum": 1
                },
                "offset": {
                  "type": "integer",
                  "description": "Line offset for 'log' action (default: last 200 lines)"
                },
                "limit": {
                  "type": "integer",
                  "description": "Max lines to return for 'log' action",
                  "minimum": 1
                }
              },
              "required": [
                "action"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "read_file",
            "description": "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.",
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Path to the file to read (absolute, relative, or ~/path)"
                },
                "offset": {
                  "type": "integer",
                  "description": "Line number to start reading from (1-indexed, default: 1)",
                  "default": 1,
                  "minimum": 1
                },
                "limit": {
                  "type": "integer",
                  "description": "Maximum number of lines to read (default: 500, max: 2000)",
                  "default": 500,
                  "maximum": 2000
                }
              },
              "required": [
                "path"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "search_files",
            "description": "Search file contents or find files by name. Use this instead of grep/rg/find/ls in terminal. Ripgrep-backed, faster than shell equivalents.\n\nContent search (target='content'): Regex search inside files. Output modes: full matches with line numbers, file paths only, or match counts.\n\nFile search (target='files'): Find files by glob pattern (e.g., '*.py', '*config*'). Also use this instead of ls — results sorted by modification time.",
            "parameters": {
              "type": "object",
              "properties": {
                "pattern": {
                  "type": "string",
                  "description": "Regex pattern for content search, or glob pattern (e.g., '*.py') for file search"
                },
                "target": {
                  "type": "string",
                  "enum": [
                    "content",
                    "files"
                  ],
                  "description": "'content' searches inside file contents, 'files' searches for files by name",
                  "default": "content"
                },
                "path": {
                  "type": "string",
                  "description": "Directory or file to search in (default: current working directory)",
                  "default": "."
                },
                "file_glob": {
                  "type": "string",
                  "description": "Filter files by pattern in grep mode (e.g., '*.py' to only search Python files)"
                },
                "limit": {
                  "type": "integer",
                  "description": "Maximum number of results to return (default: 50)",
                  "default": 50
                },
                "offset": {
                  "type": "integer",
                  "description": "Skip first N results for pagination (default: 0)",
                  "default": 0
                },
                "output_mode": {
                  "type": "string",
                  "enum": [
                    "content",
                    "files_only",
                    "count"
                  ],
                  "description": "Output format for grep mode: 'content' shows matching lines with line numbers, 'files_only' lists file paths, 'count' shows match counts per file",
                  "default": "content"
                },
                "context": {
                  "type": "integer",
                  "description": "Number of context lines before and after each match (grep mode only)",
                  "default": 0
                }
              },
              "required": [
                "pattern"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "send_message",
            "description": "Send a message to a connected messaging platform, or list available targets.\n\nIMPORTANT: 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.\nIf the user just says a platform name like 'send to telegram', send directly to the home channel without listing first.",
            "parameters": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "send",
                    "list"
                  ],
                  "description": "Action to perform. 'send' (default) sends a message. 'list' returns all available channels/contacts across connected platforms."
                },
                "target": {
                  "type": "string",
                  "description": "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)"
                },
                "message": {
                  "type": "string",
                  "description": "The message text to send. To send an image or file, include MEDIA:<local_path> (e.g. 'MEDIA:/tmp/report.pdf') in the message — the platform will deliver it as a native media attachment."
                }
              }
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "session_search",
            "description": "Search past sessions stored in the local session DB, or scroll inside one. FTS5-backed retrieval over the SQLite message store. No LLM calls — every shape returns actual messages from the DB.\n\nTHREE CALLING SHAPES\n\n  1) DISCOVERY — pass `query`:\n     session_search(query=\"auth refactor\", limit=3)\n     Runs FTS5, dedupes hits by session lineage, returns the top N sessions. Each result carries:\n       - session_id, title, when, source\n       - snippet: FTS5-highlighted match excerpt\n       - bookend_start: first 3 user+assistant messages of the session (the goal / kickoff)\n       - messages: ±5 messages around the FTS5 match, with the anchor message flagged (the hit in context)\n       - bookend_end: last 3 user+assistant messages of the session (the resolution / decisions)\n       - match_message_id, messages_before, messages_after\n     Bookends + window together let you reconstruct goal → match → resolution without paying for the whole transcript.\n\n  2) SCROLL — pass `session_id` + `around_message_id`:\n     session_search(session_id=\"...\", around_message_id=12345, window=10)\n     Returns a window of ±`window` messages centered on the anchor. No FTS5, no bookends — just the slice. Use after a discovery call when you need more context than the ±5 default window.\n       - To scroll FORWARD: pass messages[-1].id back as around_message_id.\n       - To scroll BACKWARD: pass messages[0].id back as around_message_id.\n       - The boundary message appears in both windows — orientation marker.\n       - When messages_before or messages_after is < window, you're at the start or end of the session.\n\n  3) BROWSE — no args:\n     session_search()\n     Returns recent sessions chronologically: titles, previews, timestamps. Use when the user asks \"what was I working on\" without naming a topic.\n\nFTS5 SYNTAX\n\n  AND is the default — multi-word queries require all terms. Use OR explicitly for broader recall (`alpha OR beta OR gamma`), quoted phrases for exact match (`\"docker networking\"`), boolean (`python NOT java`), or prefix wildcards (`deploy*`).\n\nWHEN TO USE\n\n  Reach for this on any \"what did we do about X\" / \"where did we leave Y\" / \"find the session where Z\" question — before gh, web search, or filesystem inspection. The session DB carries what was said when; external tools show current world state.",
            "parameters": {
              "type": "object",
              "properties": {
                "query": {
                  "type": "string",
                  "description": "Search query (discovery shape). Keywords, phrases, or boolean expressions to find in past sessions. Omit to browse recent sessions. Ignored when session_id + around_message_id are set (scroll shape)."
                },
                "limit": {
                  "type": "integer",
                  "description": "Discovery shape only. Max sessions to return (default 3, max 10). Bump to 5–10 when the topic likely spans several sessions and you want to pick the right one to scroll into.",
                  "default": 3
                },
                "sort": {
                  "type": "string",
                  "enum": [
                    "newest",
                    "oldest"
                  ],
                  "description": "Discovery shape only. Temporal bias on top of FTS5 ranking. Omit to keep relevance-only ordering (suitable for exploratory recall — \"what do we know about X\"). Set 'newest' for recency-shaped questions (\"where did we leave X\"). Set 'oldest' for origin-shaped questions (\"how did X start\"). Ignored in scroll and browse shapes."
                },
                "session_id": {
                  "type": "string",
                  "description": "Scroll shape. Session to read inside. Use the session_id returned from a prior discovery call. Must be paired with around_message_id."
                },
                "around_message_id": {
                  "type": "integer",
                  "description": "Scroll shape. Message id to center the window on. From a discovery result use match_message_id, or any id seen in a prior window. To scroll forward pass the last window message's id; to scroll backward pass the first."
                },
                "window": {
                  "type": "integer",
                  "description": "Scroll shape only. Messages to return on each side of the anchor (anchor itself always included). Clamped to [1, 20]. Default 5.",
                  "default": 5
                },
                "role_filter": {
                  "type": "string",
                  "description": "Optional. Comma-separated roles to include. Discovery defaults to 'user,assistant' (tool output is usually noise). Pass 'user,assistant,tool' to include tool output (debugging tool behaviour) or 'tool' to search tool output only."
                }
              }
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "skill_manage",
            "description": "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.\n\nActions: 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.\n\nOn 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.\n\nCreate when: complex task succeeded (5+ calls), errors overcome, user-corrected approach worked, non-trivial workflow discovered, or user asks you to remember a procedure.\nUpdate 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.\n\nAfter difficult/iterative tasks, offer to save as a skill. Skip for simple one-offs. Confirm with user before creating/deleting.\n\nGood skills: trigger conditions, numbered steps with exact commands, pitfalls section, verification steps. Use skill_view() to see format examples.\n\nPinned 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.",
            "parameters": {
              "type": "object",
              "properties": {
                "action": {
                  "type": "string",
                  "enum": [
                    "create",
                    "patch",
                    "edit",
                    "delete",
                    "write_file",
                    "remove_file"
                  ],
                  "description": "The action to perform."
                },
                "name": {
                  "type": "string",
                  "description": "Skill name (lowercase, hyphens/underscores, max 64 chars). Must match an existing skill for patch/edit/delete/write_file/remove_file."
                },
                "content": {
                  "type": "string",
                  "description": "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."
                },
                "old_string": {
                  "type": "string",
                  "description": "Text to find in the file (required for 'patch'). Must be unique unless replace_all=true. Include enough surrounding context to ensure uniqueness."
                },
                "new_string": {
                  "type": "string",
                  "description": "Replacement text (required for 'patch'). Can be empty string to delete the matched text."
                },
                "replace_all": {
                  "type": "boolean",
                  "description": "For 'patch': replace all occurrences instead of requiring a unique match (default: false)."
                },
                "category": {
                  "type": "string",
                  "description": "Optional category/domain for organizing the skill (e.g., 'devops', 'data-science', 'mlops'). Creates a subdirectory grouping. Only used with 'create'."
                },
                "file_path": {
                  "type": "string",
                  "description": "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."
                },
                "file_content": {
                  "type": "string",
                  "description": "Content for the file. Required for 'write_file'."
                },
                "absorbed_into": {
                  "type": "string",
                  "description": "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."
                }
              },
              "required": [
                "action",
                "name"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "skill_view",
            "description": "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.",
            "parameters": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "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')."
                },
                "file_path": {
                  "type": "string",
                  "description": "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."
                }
              },
              "required": [
                "name"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "skills_list",
            "description": "List available skills (name + description). Use skill_view(name) to load full content.",
            "parameters": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "description": "Optional category filter to narrow results"
                }
              }
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "terminal",
            "description": "Execute shell commands on a Linux environment. Filesystem usually persists between calls.\n\nDo NOT use cat/head/tail to read files — use read_file instead.\nDo NOT use grep/rg/find to search — use search_files instead.\nDo NOT use ls to list directories — use search_files(target='files') instead.\nDo NOT use sed/awk to edit files — use patch instead.\nDo NOT use echo/cat heredoc to create files — use write_file instead.\nReserve terminal for: builds, installs, git, processes, scripts, network, package managers, and anything that needs a shell.\n\nForeground (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.\nBackground: Set background=true to get a session_id. Almost always pair with notify_on_complete=true — bg without notify runs SILENTLY and you have no way to learn it finished short of calling process(action='poll') yourself. Two legitimate uses:\n  (1) Long-lived processes that never exit (servers, watchers, daemons) — silent is correct, there's no exit to notify on.\n  (2) Long-running bounded tasks (tests, builds, deploys, CI pollers, batch jobs) — MUST set notify_on_complete=true. Without it you'll either forget to poll or sit blocked waiting for the user to surface the result.\nFor 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.\nAfter starting a server, verify readiness with a health check or log signal, then run tests in a separate terminal() call. Avoid blind sleep loops.\nUse process(action=\"poll\") for progress checks, process(action=\"wait\") to block until done.\nWorking directory: Use 'workdir' for per-command cwd.\nPTY mode: Set pty=true for interactive CLI tools (Codex, Claude Code, Python REPL).\n\nDo NOT use vim/nano/interactive tools without pty=true — they hang without a pseudo-terminal. Pipe git output to cat if it might page.\n",
            "parameters": {
              "type": "object",
              "properties": {
                "command": {
                  "type": "string",
                  "description": "The command to execute on the VM"
                },
                "background": {
                  "type": "boolean",
                  "description": "Run the command in the background. Almost always pair with notify_on_complete=true — without it, the process runs silently and you'll have no way to learn it finished short of calling process(action='poll') yourself (easy to forget, leading to silent blindness on long jobs). Two legitimate patterns: (1) Long-lived processes that never exit (servers, watchers, daemons) — these stay silent because there's no exit to notify on. (2) Long-running bounded tasks (tests, builds, deploys, CI pollers, batch jobs) — these MUST set notify_on_complete=true. For short commands, prefer foreground with a generous timeout instead.",
                  "default": false
                },
                "timeout": {
                  "type": "integer",
                  "description": "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.",
                  "minimum": 1
                },
                "workdir": {
                  "type": "string",
                  "description": "Working directory for this command (absolute path). Defaults to the session working directory."
                },
                "pty": {
                  "type": "boolean",
                  "description": "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.",
                  "default": false
                },
                "notify_on_complete": {
                  "type": "boolean",
                  "description": "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.",
                  "default": false
                },
                "watch_patterns": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "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."
                }
              },
              "required": [
                "command"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "text_to_speech",
            "description": "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.",
            "parameters": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "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."
                },
                "output_path": {
                  "type": "string",
                  "description": "Optional custom file path to save the audio. Defaults to ~/.hermes/audio_cache/<timestamp>.mp3"
                }
              },
              "required": [
                "text"
              ]
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "todo",
            "description": "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.\n\nWriting:\n- Provide 'todos' array to create/update items\n- merge=false (default): replace the entire list with a fresh plan\n- merge=true: update existing items by id, add any new ones\n\nEach item: {id: string, content: string, status: pending|in_progress|completed|cancelled}\nList order is priority. Only ONE item in_progress at a time.\nMark items completed immediately when done. If something fails, cancel it and add a revised item.\n\nAlways returns the full current list.",
            "parameters": {
              "type": "object",
              "properties": {
                "todos": {
                  "type": "array",
                  "description": "Task items to write. Omit to read current list.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique item identifier"
                      },
                      "content": {
                        "type": "string",
                        "description": "Task description"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "in_progress",
                          "completed",
                          "cancelled"
                        ],
                        "description": "Current status"
                      }
                    },
                    "required": [
                      "id",
                      "content",
                      "status"
                    ]
                  }
                },
                "merge": {
                  "type": "boolean",
                  "description": "true: update existing items by id, add new ones. false (default): replace the entire list.",
                  "default": false
                }
              }
            }
          }
        },
        {
          "type": "function",
          "function": {
            "name": "write_file",
            "description": "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).",
            "parameters": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Path to the file to write (will be created if it doesn't exist, overwritten if it does)"
                },
                "content": {
                  "type": "string",
                  "description": "Complete content to write to the file"
                },
                "cross_profile": {
                  "type": "boolean",
                  "description": "Opt out of the cross-profile soft guard. Defaults to false. Set true ONLY after explicit user direction to edit another Hermes profile's skills/plugins/cron/memories — by default these writes are blocked with a warning because they affect a different profile than the one this session is running under.",
                  "default": false
                }
              },
              "required": [
                "path",
                "content"
              ]
            }
          }
        }
      ],
      "extra_body": {
        "session_id": "20260609_161150_24961c"
      }
    }
  },
  "error": {
    "type": "RateLimitError",
    "message": "Error code: 429 - {'error': {'message': 'Provider returned error', 'code': 429, 'metadata': {'raw': 'openrouter/owl-alpha is temporarily rate-limited upstream. Please retry shortly.', 'provider_name': 'Stealth', 'is_byok': False}}, 'user_id': 'user_3DGkWEg8ULW7WxchQ6VpyZwxCfN'}",
    "status_code": 429,
    "code": 429,
    "body": {
      "message": "Provider returned error",
      "code": 429,
      "metadata": {
        "raw": "openrouter/owl-alpha is temporarily rate-limited upstream. Please retry shortly.",
        "provider_name": "Stealth",
        "is_byok": false
      }
    },
    "response_status": 429,
    "response_text": "{\"error\":{\"message\":\"Provider returned error\",\"code\":429,\"metadata\":{\"raw\":\"openrouter/owl-alpha is temporarily rate-limited upstream. Please retry shortly.\",\"provider_name\":\"Stealth\",\"is_byok\":false}},\"user_id\":\"user_3DGkWEg8ULW7WxchQ6VpyZwxCfN\"}"
  }
}