§
    αμυiOm  γ                   σ,    d Z ddlZg d’ZddedefdZdS )zGRandom tips shown at CLI session start to help users discover features.ι    N(  zm/background <prompt> (alias /bg or /btw) runs a task in a separate session while your current one stays free.zc/branch forks the current session so you can explore a different direction without losing progress.zH/compress manually compresses conversation context when things get long.u_   /rollback lists filesystem checkpoints β restore files the agent modified to any prior state.zU/rollback diff 2 previews what changed since checkpoint 2 without restoring anything.zJ/rollback 2 src/file.py restores a single file from a specific checkpoint.uU   /title "my project" names your session β resume it later with /resume or hermes -c.zB/resume picks up where you left off in a previously named session.zX/queue <prompt> queues a message for the next turn without interrupting the current one.zE/undo removes the last user/assistant exchange from the conversation.uY   /retry resends your last message β useful when the agent's response wasn't quite right.uG   /verbose cycles tool progress display: off β new β all β verbose.z]/reasoning high increases the model's thinking depth. /reasoning show displays the reasoning.zP/fast toggles priority processing for faster API responses (provider-dependent).zO/yolo skips all dangerous command approval prompts for the rest of the session.uP   /model lets you switch models mid-session β try /model sonnet or /model gpt-5.z7/model --global changes your default model permanently.u^   /personality pirate sets a fun personality β 14 built-in options from kawaii to shakespeare.uN   /skin changes the CLI theme β try ares, mono, slate, poseidon, or charizard.z^/statusbar toggles a persistent bar showing model, tokens, context fill %, cost, and duration.zQ/tools disable browser temporarily removes browser tools for the current session.zP/browser connect attaches browser tools to your running Chrome instance via CDP.z2/plugins lists installed plugins and their status.uY   /cron manages scheduled tasks β set up recurring prompts with delivery to any platform.zD/reload-mcp hot-reloads MCP server configuration without restarting.z?/usage shows token usage, cost breakdown, and session duration.z5/insights shows usage analytics for the last 30 days.zO/paste checks your clipboard for an image and attaches it to your next message.z>/profile shows which profile is active and its home directory.z5/config shows your current configuration at a glance.zB/stop kills all running background processes spawned by the agent.zG@file:path/to/file.py injects file contents directly into your message.z7@file:main.py:10-50 injects only lines 10-50 of a file.z.@folder:src/ injects a directory tree listing.z9@diff injects your unstaged git changes into the message.z<@staged injects your staged git changes (git diff --staged).z4@git:5 injects the last 5 commits with full patches.zB@url:https://example.com fetches and injects a web page's content.uT   Typing @ triggers filesystem path completion β navigate to any file interactively.zVCombine multiple references: "Review @file:main.py and @file:test.py for consistency."z=Alt+Enter (or Ctrl+J) inserts a newline for multi-line input.zICtrl+C interrupts the agent. Double-press within 2 seconds to force exit.uL   Ctrl+Z suspends Hermes to the background β run fg in your shell to resume.zGTab accepts auto-suggestion ghost text or autocompletes slash commands.zKType a new message while the agent is working to interrupt and redirect it.z@Alt+V pastes an image from your clipboard into the conversation.zNPasting 5+ lines auto-saves to a file and inserts a compact reference instead.zZhermes -c resumes your most recent CLI session. hermes -c "project name" resumes by title.uT   hermes -w creates an isolated git worktree β perfect for parallel agent workflows.zOhermes -w -q "Fix issue #42" combines worktree isolation with a one-shot query.zQhermes chat -t web,terminal enables only specific toolsets for a focused session.z=hermes chat -s github-pr-workflow preloads a skill at launch.zEhermes chat -q "query" runs a single non-interactive query and exits.zNhermes chat --max-turns 200 overrides the default 90-iteration limit per turn.z\hermes chat --checkpoints enables filesystem snapshots before every destructive file change.zUhermes --yolo bypasses all dangerous command approval prompts for the entire session.zUhermes chat --source telegram tags the session for filtering in hermes sessions list.zPhermes -p work chat runs under a specific profile without changing your default.zLhermes doctor --fix diagnoses and auto-repairs config and dependency issues.uF   hermes dump outputs a compact setup summary β great for bug reports.z[hermes config set KEY VALUE auto-routes secrets to .env and everything else to config.yaml.z<hermes config edit opens config.yaml in your default editor.zEhermes config check scans for missing or stale configuration options.zGhermes sessions browse opens an interactive session picker with search.zIhermes sessions stats shows session counts by platform and database size.z=hermes sessions prune --older-than 30 cleans up old sessions.zVhermes skills search react --source skills-sh searches the skills.sh public directory.zDhermes skills check scans installed hub skills for upstream updates.zJhermes skills tap add myorg/skills-repo adds a custom GitHub skill source.z`hermes skills snapshot export setup.json exports your skill configuration for backup or sharing.zKhermes mcp add github --command npx adds MCP servers from the command line.zFhermes mcp serve runs Hermes itself as an MCP server for other agents.zLhermes auth add lets you add multiple API keys for credential pool rotation.zYhermes completion bash >> ~/.bashrc enables tab completion for all commands and profiles.zYhermes logs -f follows agent.log in real time. --level WARNING --since 1h filters output.zHhermes backup creates a zip backup of your entire Hermes home directory.zUhermes profile create coder creates an isolated profile that becomes its own command.zXhermes profile create work --clone copies your current config and keys to a new profile.zEhermes update syncs new bundled skills to ALL profiles automatically.zLhermes gateway install sets up Hermes as a system service (systemd/launchd).zXhermes memory setup lets you configure an external memory provider (Honcho, Mem0, etc.).zRhermes webhook subscribe creates event-driven webhook routes with HMAC validation.zWSave money: hermes tools disables unused tools, hermes skills config trims skills down.ur   /reasoning low or /reasoning minimal cuts thinking depth below the default (medium) β faster, cheaper responses.u   hermes models routes vision, compression, and aux tasks to cheaper models β cuts background token cost 85%+ without downgrading your main chat model.zXSet display.bell_on_complete: true in config.yaml to hear a bell when long tasks finish.zUSet display.streaming: true to see tokens appear in real time as the model generates.zQSet display.show_reasoning: true to watch the model's chain-of-thought reasoning.zPSet display.compact: true to reduce whitespace in output for denser information.zSet display.busy_input_mode: queue to queue messages instead of interrupting the agent, or steer to inject them mid-run via /steer.zZSet display.resume_display: minimal to skip the full conversation recap on session resume.zaSet compression.threshold: 0.50 to control when auto-compression fires (default: 50% of context).zPSet agent.max_turns: 200 to let the agent take more tool-calling steps per turn.zOSet file_read_max_chars: 200000 to increase the max content per read_file call.z`Set approvals.mode: smart to let an LLM auto-approve safe commands and auto-deny dangerous ones.zRSet fallback_model in config.yaml to automatically fail over to a backup provider.zZSet privacy.redact_pii: true to hash user IDs and phone numbers before sending to the LLM.zQSet browser.record_sessions: true to auto-record browser sessions as WebM videos.zVSet worktree: true in config.yaml to always create a git worktree (same as hermes -w).zVSet security.website_blocklist.enabled: true to block specific domains from web tools.zYSet cron.wrap_response: false to deliver raw agent output without the cron header/footer.zLHERMES_TIMEZONE overrides the server timezone with any IANA timezone string.zOEnvironment variable substitution works in config.yaml: use ${VAR_NAME} syntax.zQQuick commands in config.yaml run shell commands instantly with zero token usage.zMCustom personalities can be defined in config.yaml under agent.personalities.zVprovider_routing controls OpenRouter provider sorting, whitelisting, and blacklisting.ui   execute_code runs Python scripts that call Hermes tools programmatically β results stay out of context.zdelegate_task spawns up to 3 concurrent sub-agents by default (delegation.max_concurrent_children) with isolated contexts for parallel work.uP   web_extract works on PDF URLs β pass any PDF link and it converts to markdown.uX   search_files is ripgrep-backed and faster than grep β use it instead of terminal grep.zYpatch uses 9 fuzzy matching strategies so minor whitespace differences won't break edits.zEpatch supports V4A format for bulk multi-file edits in a single call.z=read_file suggests similar filenames when a file isn't found.uX   read_file auto-deduplicates β re-reading an unchanged file returns a lightweight stub.ud   browser_vision takes a screenshot and analyzes it with AI β works for CAPTCHAs and visual content.zHbrowser_console can evaluate JavaScript expressions in the page context.zIimage_generate creates images with FLUX 2 Pro and automatic 2x upscaling.uM   text_to_speech converts text to audio β plays as voice bubbles on Telegram.zNsend_message can reach any connected messaging platform from within a session.zNThe todo tool helps the agent track complex multi-step tasks during a session.zGsession_search performs full-text search across ALL past conversations.zXThe agent automatically saves preferences, corrections, and environment facts to memory.zOmixture_of_agents routes hard problems through 4 frontier LLMs collaboratively.zYTerminal commands support background mode with notify_on_complete for long-running tasks.zWTerminal background processes support watch_patterns to alert on specific output lines.z[The terminal tool supports 6 backends: local, Docker, SSH, Modal, Daytona, and Singularity.zTEach profile gets its own config, API keys, memory, sessions, skills, and cron jobs.ub   Profile names become shell commands β 'hermes profile create coder' creates the 'coder' command.zPhermes profile export coder -o backup.tar.gz creates a portable profile archive.zaIf two profiles accidentally share a bot token, the second gateway is blocked with a clear error.u_   Sessions auto-generate descriptive titles after the first exchange β no manual naming needed.uU   Session titles support lineage: "my project" β "my project #2" β "my project #3".zGWhen exiting, Hermes prints a resume command with session ID and stats.zPhermes sessions export backup.jsonl exports all sessions for backup or analysis.zAhermes -r SESSION_ID resumes any specific past session by its ID.u_   Memory is a frozen snapshot β changes appear in the system prompt only at next session start.zXMemory entries are automatically scanned for prompt injection and exfiltration patterns.z]The agent has two memory stores: personal notes (~2200 chars) and user profile (~1375 chars).zUCorrections you give the agent ("no, do it this way") are often auto-saved to memory.zZOver 80 bundled skills covering github, creative, mlops, productivity, research, and more.uW   Every installed skill automatically becomes a slash command β type / to see them all.zYhermes skills install official/security/1password installs optional skills from the repo.uR   Skills can restrict to specific OS platforms β some only load on macOS or Linux.zQskills.external_dirs in config.yaml lets you load skills from custom directories.zLThe agent can create its own skills as procedural memory using skill_manage.zQThe plan skill saves markdown plans under .hermes/plans/ in the active workspace.zWCron jobs can attach skills: hermes cron add --skill blogwatcher "Check for new posts".z[Cron delivery targets include telegram, discord, slack, email, sms, and 12+ more platforms.ud   If a cron response starts with [SILENT], delivery is suppressed β useful for monitoring-only jobs.z`Cron supports relative delays (30m), intervals (every 2h), cron expressions, and ISO timestamps.uT   Cron jobs run in completely fresh agent sessions β prompts must be self-contained.z_Voice mode works with zero API keys if faster-whisper is installed (free local speech-to-text).z`Five TTS providers available: Edge TTS (free), ElevenLabs, OpenAI, NeuTTS (free local), MiniMax.zO/voice on enables voice mode in the CLI. Ctrl+B toggles push-to-talk recording.uX   Streaming TTS plays sentences as they generate β you don't wait for the full response.zNVoice messages on Telegram, Discord, WhatsApp, and Slack are auto-transcribed.zaHermes runs on 18 platforms: Telegram, Discord, Slack, WhatsApp, Signal, Matrix, email, and more.zJhermes gateway install sets it up as a system service that starts on boot.u?   DingTalk uses Stream Mode β no webhooks or public URL needed.z?BlueBubbles brings iMessage to Hermes via a local macOS server.zKWebhook routes support HMAC validation, rate limiting, and event filtering.z^The API server exposes an OpenAI-compatible endpoint compatible with Open WebUI and LibreChat.zQDiscord voice channel mode: the bot joins VC, transcribes speech, and talks back.zQgroup_sessions_per_user: true gives each person their own session in group chats.zB/sethome marks a chat as the home channel for cron job deliveries.uV   The gateway supports inactivity-based timeouts β active agents can run indefinitely.zZDangerous command approval has 4 tiers: once, session, always (permanent allowlist), deny.zVSmart approval mode uses an LLM to auto-approve safe commands and flag dangerous ones.z\SSRF protection blocks private networks, loopback, link-local, and cloud metadata addresses.zYTirith pre-exec scanning detects homograph URL spoofing and pipe-to-interpreter patterns.uW   MCP subprocesses receive a filtered environment β only safe system vars pass through.z_Context files (.hermes.md, AGENTS.md) are security-scanned for prompt injection before loading.zVcommand_allowlist in config.yaml permanently approves specific shell command patterns.uf   Context auto-compresses when it reaches the threshold β memories are flushed and history summarized.zGThe status bar turns yellow, then orange, then red as context fills up.u`   SOUL.md at ~/.hermes/SOUL.md is the agent's primary identity β customize it to shape behavior.zbHermes loads project context from .hermes.md, AGENTS.md, CLAUDE.md, or .cursorrules (first match).z^Subdirectory AGENTS.md files are discovered progressively as the agent navigates into folders.zNContext files are capped at 20,000 characters with smart head/tail truncation.zYFive browser providers: local Chromium, Browserbase, Browser Use, Camofox, and Firecrawl.uT   Camofox is an anti-detection browser β Firefox fork with C++ fingerprint spoofing.ub   browser_navigate returns a page snapshot automatically β no need to call browser_snapshot after.zSbrowser_vision with annotate=true overlays numbered labels on interactive elements.uW   MCP servers are configured in config.yaml β both stdio and HTTP transports supported.z`Per-server tool filtering: tools.include whitelists and tools.exclude blacklists specific tools.u\   MCP servers auto-generate toolsets at runtime β hermes tools can toggle them per platform.zMMCP OAuth support: auth: oauth enables browser-based authorization with PKCE.uQ   Checkpoints have zero overhead when no files are modified β enabled by default.zHA pre-rollback snapshot is saved automatically so you can undo the undo.z_/rollback also undoes the conversation turn, so the agent doesn't remember rolled-back changes.u`   Checkpoints use shadow repos in ~/.hermes/checkpoints/ β your project's .git is never touched.zWbatch_runner.py processes hundreds of prompts in parallel for training data generation.uY   hermes chat -Q enables quiet mode for programmatic use β suppresses banner and spinner.zYTrajectory saving (--save-trajectories) captures full tool-use traces for model training.zQThree plugin types: general (tools/hooks), memory providers, and context engines.zHhermes plugins install owner/repo installs plugins directly from GitHub.zU8 external memory providers available: Honcho, OpenViking, Mem0, Hindsight, and more.zvPlugin hooks include pre/post_tool_call, pre/post_llm_call, and transform_terminal_output for output canonicalization.zRPrompt caching (Anthropic) reduces costs by reusing cached system prompt prefixes.uW   The agent auto-generates session titles in a background thread β zero latency impact.zESmart model routing can auto-route simple queries to a cheaper model.zMSlash commands support prefix matching: /h resolves to /help, /mod to /model.zPDragging a file path into the terminal auto-attaches images or sends as context.zQ.worktreeinclude in your repo root lists gitignored files to copy into worktrees.zThermes acp runs Hermes as an ACP server for VS Code, Zed, and JetBrains integration.zMCustom providers: save named endpoints in config.yaml under custom_providers.zYHERMES_EPHEMERAL_SYSTEM_PROMPT injects a system prompt that's never persisted to history.z]credential_pool_strategies supports fill_first, round_robin, least_used, and random rotation.zKhermes login supports OAuth-based auth for Nous and OpenAI Codex providers.zWThe API server supports both Chat Completions and Responses API with server-side state.zVtool_preview_length: 0 in config shows full file paths in the spinner's activity feed.zIhermes status --deep runs deeper diagnostic checks across all components.zdCron jobs can attach a Python script (--script) whose stdout is injected into the prompt as context.uk   Cron scripts live in ~/.hermes/scripts/ and run before the agent β perfect for data collection pipelines.zkprefill_messages_file in config.yaml injects few-shot examples into every API call, never saved to history.u`   SOUL.md completely replaces the agent's default identity β rewrite it to make Hermes your own.zdSOUL.md is auto-seeded with a default personality on first run. Edit ~/.hermes/SOUL.md to customize.zm/compress <focus topic> allocates 60-70% of the summary budget to your topic and aggressively trims the rest.zeOn second+ compression, the compressor updates the previous summary instead of starting from scratch.z`Before a gateway session reset, Hermes auto-flushes important facts to memory in the background.uj   network.force_ipv4: true in config.yaml fixes hangs on servers with broken IPv6 β monkey-patches socket.zdThe terminal tool annotates common exit codes: grep returning 1 = 'No matches found (not an error)'.zcFailed foreground terminal commands auto-retry up to 3 times with exponential backoff (2s, 4s, 8s).ug   Bare sudo commands are auto-rewritten to pipe SUDO_PASSWORD from .env β no interactive prompt needed.znexecute_code has built-in helpers: json_parse() for tolerant parsing, shell_quote(), and retry() with backoff.uo   execute_code's 7 sandbox tools (web_search, terminal, read/write/search/patch) use RPC β never enter context.zdReading the same file region 3+ times triggers a warning. At 4+, it's hard-blocked to prevent loops.zkwrite_file and patch detect if a file was externally modified since the last read and warn about staleness.u^   V4A patch format supports Add File, Delete File, and Move File directives β not just Update.uf   MCP servers can request LLM completions back via sampling β the agent becomes a tool for the server.zlMCP servers send notifications/tools/list_changed to trigger automatic tool re-registration without restart.z_delegate_task with acp_command: 'claude' spawns Claude Code as a child agent from any platform.uk   Delegation has a heartbeat thread β child activity propagates to the parent, preventing gateway timeouts.zjWhen a provider returns HTTP 402 (payment required), the auxiliary client auto-falls back to the next one.uo   agent.tool_use_enforcement steers models that describe actions instead of calling tools β auto for GPT/Codex.zkagent.restart_drain_timeout (default 60s) lets running agents finish before a gateway restart takes effect.u   agent.api_max_retries (default 3) controls how many times the agent retries a failed API call before surfacing the error β lower it for fast fallback.uk   The gateway caches AIAgent instances per session β destroying this cache breaks Anthropic prompt caching.uq   Any website can expose skills via /.well-known/skills/index.json β the skills hub discovers them automatically.zcThe skills audit log at ~/.hermes/skills/.hub/audit.log tracks every install and removal operation.z`Stale git worktrees are auto-cleaned: 24-72h old with no unpushed commits get pruned on startup.uf   Each profile gets its own subprocess HOME at HERMES_HOME/home/ β isolated git, ssh, npm, gh configs.zgHERMES_HOME_MODE env var (octal, e.g. 0701) sets custom directory permissions for web server traversal.zdContainer mode: place .container-mode in HERMES_HOME and the host CLI auto-execs into the container.up   Ctrl+C has 5 priority tiers: cancel recording β cancel prompts β cancel picker β interrupt agent β exit.z_Every interrupt during an agent run is logged to ~/.hermes/interrupt_debug.log with timestamps.ug   BROWSER_CDP_URL connects browser tools to any running Chrome β accepts WebSocket, HTTP, or host:port.zdBROWSERBASE_ADVANCED_STEALTH=true enables advanced anti-detection with custom Chromium (Scale Plan).zLThe CLI auto-switches to compact mode in terminals narrower than 80 columns.zlQuick commands support two types: exec (run shell command directly) and alias (redirect to another command).zpPer-task delegation model: delegation.model and delegation.provider in config route subagents to cheaper models.zPdelegation.reasoning_effort independently controls thinking depth for subagents.zidisplay.platforms in config.yaml allows per-platform display overrides: {telegram: {tool_progress: all}}.u]   human_delay.mode in config simulates human typing speed β configurable min_ms/max_ms range.uk   Config version migrations run automatically on load β new config keys appear without manual intervention.zcGPT and Codex models get special system prompt guidance for tool discipline and mandatory tool use.zlGemini models get tailored directives for absolute paths, parallel tool calls, and non-interactive commands.zhcontext.engine in config.yaml can be set to a plugin name for alternative context management strategies.zfBrowser pages over 8000 tokens are auto-summarized by the auxiliary LLM before returning to the agent.zuThe compressor does a cheap pre-pass: tool outputs over 200 chars are replaced with placeholders before the LLM runs.zZWhen compression fails, further attempts are paused for 10 minutes to avoid API hammering.zjLong dangerous commands (>70 chars) get a 'view' option in the approval prompt to see the full text first.uq   Audio level visualization shows βββββββ bars during voice recording based on microphone RMS levels.uj   Profile names cannot collide with existing PATH binaries β 'hermes profile create ls' would be rejected.zohermes profile create backup --clone-all copies everything (config, keys, SOUL.md, memories, skills, sessions).u]   The voice record key is configurable via voice.record_key in config.yaml β not just Ctrl+B.z[.cursorrules and .cursor/rules/*.mdc files are auto-detected and loaded as project context.uq   Context files support 10+ prompt injection patterns β invisible Unicode, 'ignore instructions', exfil attempts.zOGPT-5 and Codex use 'developer' role instead of 'system' in the message format.zjPer-task auxiliary overrides: auxiliary.vision.provider, auxiliary.compression.model, etc. in config.yaml.ul   The auxiliary client treats 'main' as a provider alias β resolves to your actual primary provider + model.zShermes claw migrate --dry-run previews OpenClaw migration without writing anything.ug   File paths pasted with quotes or escaped spaces are handled automatically β no manual cleanup needed.uf   Slash commands never trigger the large-paste collapse β /command with big arguments works correctly.zjIn interrupt mode, slash commands typed during agent execution bypass interrupt logic and run immediately.zEHERMES_DEV=1 bypasses container mode detection for local development.ziEach MCP server gets its own toolset (mcp-servername) that can be toggled independently via hermes tools.uj   MCP ${ENV_VAR} placeholders in config are resolved at server spawn β including vars from ~/.hermes/.env.zmSkills from trusted repos (NousResearch) get a 'trusted' security level; community skills get extra scanning.z`The skills quarantine at ~/.hermes/skills/.hub/quarantine/ holds skills pending security review.Ϊexclude_recentΪreturnc                 σ4    t          j        t          ¦  «        S )zReturn a random tip string.

    Args:
        exclude_recent: not used currently; reserved for future
            deduplication across sessions.
    )ΪrandomΪchoiceΪTIPS)r   s    ϊ4/home/ubuntu/.hermes/hermes-agent/hermes_cli/tips.pyΪget_random_tipr
   T  s    υ =ΡΤΠσ    )r   )Ϊ__doc__r   r   ΪintΪstrr
   © r   r	   ϊ<module>r      sZ   πΨ MΠ Mΰ πFπ Fπ FπR
π  3π ¨sπ π π π π π r   