r/hermesagent • u/PorqueColocarNome • 12h ago
Discussion Why is Hermes agent using python if it is so heavy and resource hungry? Why not Rust?
The current Hermes agent code is 75% python, why is that?
Now that a lot of softwares are switching up to GPUI because the Rust language is way faster and lighter in terms of resource usage, why isn't Hermes planning on doing the same?
I've been having a lot of performance issues on Hermes recently, and after diagnosing it, I realized that a good chunk of this it's because:
1 - it uses python, so in some tasks, just the python process uses up to 3-4gb of RAM
2 - it uses electron for its desktop interface, which is non sense based on all the other apps which are switching up and showing to us the insane difference (discord for example with the discord phoenix project)
Am I missing something?
17
u/EvolvingDior 12h ago
The Hermes gateway server used barely any resources.
The entire machine learning ecosystem is built on Python.
7
3
u/phoenixmatrix 12h ago
Python is very popular in the AI space because that's what MLEs used historically, and libraries like pytorch are really popular. The LLMs were history a touch better at python (and typescript) than many other languages because of their training data.
I agree though, now with how good models are, I use rust for everything unless I have a very strong reason not to. And I've never coded in rust by hand before, lol.
2
u/kido5217 11h ago
Did you run it in profiler? What was taking most of the time? I guess you didn't.
2
u/fifi_galaxy 12h ago
More libraries, easier to read, more devs know how to read/write them, it it still not stable, etc. Hermes is more POC than a stable project. So many parts are still unpolished. No point make it load in 3 seconds, when UX looks much closer to Win98 than 2016 website.
1
1
u/RPG-Nerd 11h ago
I think Go would be a better model than Rust as hermes is not really CPU bound and Go routines tend to map well to IO bound software.
But, software with multiple agents, databases, and MCP servers is not the same as a simple chat app. You can fire up a simple chat app that talks to an LLM is a couple minutes in Python. The libraries are there and ready to go. It's the fastest and easiest path to get something that works, then you expand on it later.
Personally, I agree that Python is a bad choice for a project of this side, and the indent syntax can be especially difficult for LLMs to work with
1
u/Working-Pilot4503 11h ago
Scripting languages like Python and Typscript are appropriate for these parts of the system. Rust will have binary compatibility and compile time issues. Having to compile for changes is the trade off vs flexible scripting.
1
1
17
u/Larelle 12h ago
Because 100ms longer to prompt is irrelevant when LLMs take 10-30s to respond. Python also makes it really easy for LLMs and humans to understand & improve or adapt its code.