The Hermes SDK turns a full autonomous agent into a single call. Give it a goal in plain language — it writes and runs code, browses the web, reads images, creates files and charts, and hands back clean results with downloadable artifacts. No orchestration to wire up.
Writes and executes Python & shell, captures output, and returns any files it produces.
Searches and reads live pages, then answers grounded in what it found.
Controls a real Chromium — navigate, click, fill forms, screenshot.
Analyzes and describes images you attach, and reasons over their contents.
Turns data into plots via code (matplotlib & co.) — returned as downloadable artifacts.
Reads, writes, patches and searches files within an isolated working directory.
Spawns sub-agents to split large jobs into parallel, focused tasks.
Per-user memory + full-text search over past conversations.
Task planning for multi-step work, plus any installed skills it can invoke.
One class, HermesAgent. A general run() for any goal, plus capability-shaped shortcuts when you want to be explicit. Every call returns the same Result.
agent = HermesAgent( model = None, # default model; None → server default permission = "allow", # "allow" | "deny" | callable(tool) → decision user = None, # default identity for memory + isolation timeout = 600, # seconds per call retries = 2, # auto-retry transient model errors (safe — no dup side effects) )
from hermes_sdk import HermesAgent agent = HermesAgent() res = agent.run( "plot a gaussian histogram" " and save it as hist.png", user="alice", ) print(res.text) # → "Done — 10,000 samples, 50 bins…" for a in res.artifacts: open(a.name, "wb").write(a.bytes()) # → hist.png (downloadable)
# attach an image — the agent sees it res = agent.see( Attachment.image("chart.png"), "what trend does this show?", ) # stream the live tool timeline agent.run( "research EV sales in 2025", on_event=lambda e: print(e.title), ) # → web_search: EV sales 2025 # → web_extract: iea.org/reports… # continue the conversation agent.resume(res.session_id, "now use 100 bins")
Result .text str # the final answer (clean — no tool noise) .artifacts list[Artifact] # files the agent produced .tool_calls list[ToolCall] # what it did, in order .reasoning str # its thinking (optional) .session_id str # pass to resume() to continue .stop_reason str # end_turn | max_turns | refusal .elapsed float # seconds .usage Usage # token counts Artifact .name str .mime str .size int .bytes() → bytes .url str? ToolCall .tool str .title str .status "running" | "done" | "error" Attachment Attachment.image(src) Attachment.file(path) Attachment.bytes(data, mime) Capability .id str .name str .summary str