How-To Series · Episode 47 / 59 · Module 7: Power Tools

Hermes · Python Library

Import it. Call it. Ship it inside your app.

After this videoYou can now embed Hermes inside your own Python software.

Hermes is a library, not just a CLI. from run_agent import AIAgent, create AIAgent(model=..., quiet_mode=True), and agent.chat("...") runs the full tool loop and returns a string. Always set quiet_mode=True when embedding, or CLI spinners pollute your output. For more control, run_conversation() returns a dict with final_response and messages; pass conversation_history back for stateful multi-turn. enabled_toolsets / disabled_toolsets control capabilities; skip_memory and skip_context_files make a clean stateless endpoint. It drops straight into a FastAPI route, a Discord bot, or a CI step. One gotcha: an AIAgent holds state, so create a fresh one per thread or task, never shared.

About these resources. Every command in this video comes from the Using Hermes as a Python Library guide.

Sources · What this video distills

1 docs page · every command below traces to one of them
Primary · AIAgent import, chat()/run_conversation(), quiet_mode, toolset + skip flags, integration examples, thread safety
Using Hermes as a Python Library
Read ↗

Commands shown · Copy and paste

each shows the source doc it came from
pip install git+https://github.com/NousResearch/hermes-agent.git
from run_agent import AIAgent; AIAgent(model="anthropic/claude-sonnet-4", quiet_mode=True).chat("Hi")
Stateless app flagsfrom source ↗
AIAgent(..., skip_memory=True, skip_context_files=True)

Going deeper · Related Hermes docs

further reading · not sources of facts shown above

Next in the series · Episodes that build on this

E48
As an API Server
E46
Batch Processing
E44
Build Your Own Plugin