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
- 70+ built-in tools across filesystem, web, code, vision, voice, data
- Security tiers: read-only auto, write confirm, dangerous must confirm
- Custom tools: YAML for API tools, Python classes for complex logic
- Toolsets: pre-configured tool combinations for specific scenarios
📝 Exercises
- Basic (⭐): Use filesystem and code execution tools, observe the tool call process.
- Intermediate (⭐⭐): Develop a custom YAML tool connecting your API (e.g., GitHub API).
- Advanced (⭐⭐⭐): Create a complete toolset (5+ tools) for your daily work scenario.