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 themCommands shown · Copy and paste
each shows the source doc it came frompip install git+https://github.com/NousResearch/hermes-agent.gitfrom run_agent import AIAgent; AIAgent(model="anthropic/claude-sonnet-4", quiet_mode=True).chat("Hi")AIAgent(..., skip_memory=True, skip_context_files=True)Going deeper · Related Hermes docs
further reading · not sources of facts shown aboveNext in the series · Episodes that build on this
E48
As an API Server
E46
Batch Processing
E44
Build Your Own Plugin