Hermes · Code Execution
Skip ten tool calls. One Python block does it all.
The execute_code tool lets Hermes write a Python script that calls its own tools, with from hermes_tools import ..., collapsing many tool calls into one turn. The win: only the script's print() output returns to the model, intermediate tool results never enter the context window, a huge token saving on bulk work. The classic pipeline is search → extract → summarize. Inside a script you get web_search, web_extract, read_file, write_file, search_files, patch, and terminal (foreground), each over a Unix-socket RPC back to Hermes. Use it for tool calls with logic between them; use terminal for shell commands. Sandboxed: 300s timeout, 50-call cap, stripped env, no recurse/delegate/MCP. Linux + macOS only.
Sources · What this video distills
1 docs page · every command below traces to one of themCommands shown · Copy and paste
each shows the source doc it came fromfrom hermes_tools import web_search, web_extractcode_execution.mode: project · timeout: 300 · max_tool_calls: 50