Hermes Agent: Tools and Toolsets

Last updated: 2026-08-31

The tool system is Hermes's hands — a brain (LLM) alone isn't enough; you need hands (tools) to actually get things done. 70+ built-in tools let it read/write files, search the web, execute code, and understand images.

💡 Tip: Hermes's tool system is extensible — 70+ built-in tools work out of the box, and you can develop custom tools. All tools run in sandboxes for safety.

📋 Prerequisites: Lesson 7 — Skills System

1. What You Will Learn

# Content
70+ built-in tool categories
Core tool usage explained
Tool permissions and security
Custom tool development
Toolset management

2. Story

(1) Pain Point: AI Can Only Talk, Not Act

Bob asks ChatGPT "check today's weather" — AI says "I can't access the internet." Asks to "run this code" — can't do it either.

(2) Solution: 70+ Tools Let the Agent Actually Work

BASH
me: Check Beijing's weather today
Agent: [web_search] [web_scrape]
       Beijing today: Sunny, 26°C, air quality excellent

me: Run this Python code
Agent: [code_python]
       Code executed successfully, output: Hello World

3. Built-in Tool Categories

Category Tools Count
Filesystem fs_read, fs_write, fs_list, fs_search, fs_move, fs_delete 10+
Web web_search, web_scrape, web_download, web_api 8+
Code Execution code_python, code_shell, code_node 5+
Vision vision_analyze, vision_ocr, vision_screenshot 5+
Voice voice_tts, voice_stt 4+
Data db_query, json_parse, csv_process 10+
Communication email_send, msg_send 8+
System sys_info, process_run 5+

4. Core Tools

(1) Filesystem

BASH
me: Read src/main.py
Agent: [fs_read("src/main.py")]
       ```python
       from fastapi import FastAPI
       app = FastAPI()
       ```

me: Find files using deprecated APIs
Agent: [fs_search("deprecated", path="src/", type="py")]
       Found 3 files...

(2) Code Execution

BASH
me: Calculate Fibonacci(20)
Agent: [code_python]
       ```python
       def fibonacci(n):
           if n <= 1: return n
           return fibonacci(n-1) + fibonacci(n-2)
       print(fibonacci(20))
       ```
       Result: 6765

(3) Vision

BASH
me: [Upload screenshot] What's wrong with this page?
Agent: [vision_analyze]
       1. Nav text truncated
       2. Button contrast insufficient (WCAG AA fail)
       3. Mobile layout broken

5. Tool Security

Level Tools Confirmation
Read-only fs_read, web_search ❌ Auto-execute
Write fs_write, email_send ✅ Confirm
Dangerous fs_delete, code_shell ✅ Must confirm
YAML
tools:
  sandbox: true
  code_execution:
    max_time: 30
    max_memory: "512MB"
    network_access: false
  filesystem:
    allowed_paths: ["~/projects"]
    denied_paths: ["~/.ssh"]
    allow_delete: false

6. Custom Tool Development

(1) YAML Tool Definition

YAML
name: "jira_search"
description: "Search Jira issues"
category: "communication"
parameters:
  - name: "query"
    type: "string"
    required: true
execution:
  type: "api"
  method: "GET"
  url: "${JIRA_URL}/rest/api/2/search"
  headers:
    Authorization: "Bearer ${JIRA_TOKEN}"

(2) Python Tool

PYTHON
from hermes import Tool, ToolResult

class CustomMetricsTool(Tool):
    name = "custom_metrics"
    description = "Get project custom metrics"
    
    parameters = {
        "metric": {"type": "str", "required": True},
        "time_range": {"type": "str", "default": "7d"}
    }
    
    def execute(self, metric: str, time_range: str = "7d") -> ToolResult:
        data = self.fetch_metric(metric, time_range)
        return ToolResult(success=True, data=data)

7. Toolsets

YAML
toolsets:
  frontend-dev:
    tools: [fs_read, fs_write, code_node, code_shell, web_search, vision_analyze]
    config:
      fs_write.allowed_extensions: [".ts", ".tsx", ".css", ".html"]
BASH
hermes chat --toolset frontend-dev
/toolset data-analysis

❓ FAQ

Q Tool call latency?
A Filesystem and code execution <1s, Web depends on network 2-10s, Vision 3-8s.
Q Is code execution safe?
A Default Docker sandbox with network and filesystem restrictions. Configurable security levels.
Q Custom tools hard to develop?
A Simple API calls just need YAML. Complex logic uses Python Tool class.

📖 Summary


📝 Exercises

  1. Basic (⭐): Use filesystem and code execution tools, observe the tool call process.
  2. Intermediate (⭐⭐): Develop a custom YAML tool connecting your API (e.g., GitHub API).
  3. Advanced (⭐⭐⭐): Create a complete toolset (5+ tools) for your daily work scenario.
Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏