Juust — code, books, and the open sea

Hermes Learning Agent

AI memory game

I spent the last days on and off working on a learning agent. I put v0.0.0 (minus 1?) online, last weekend, I am sorry about that. It was not even half working. I spent till 03:00 that night and enough pleasurable hours next days fixing it up.

All tests are green, and it should work now. I’m collecting baseline data at the moment. Once that’s done, we switch to ‘Agent Whisperer’ mode and I’ll know from the data wether Hermes improves more than the baseline, with this setup.

The app mainly uses logs and stats. I stick to the ISO9001 method. I log workflow run data and step data. I get the stats from the run logs. The average time of steps of that choice is the ‘expected time’ for that choice in the next workflow run. Each actio or option in a choice-set has it’s own stats, and you pick the one (given the situation) that promises the best results, that’s your agent’s choice and action.

Hermes’ actions are toolcalls.

We wrapped the original source as plugin, so we can hook into Hermes. Hermes has a set of pre- and post-toolcall hooks. So I can hook code in, and read and log the results after the toolcall. Next workflowrun, I can hand the stats to Hermes before the toolcall. I can then enforce a soft policy or a hard gated one. I log the context, before the toolcall, with the main factors influencing the choice, so I can use that for a contextual bandit algorithm later on.

With each choice and action being logged, Hermes ‘learns’ from that and the results and will adapt.

That is my idea of creating a learning agent. Maybe it’s just an old and poorly executed idea. But maybe, just maybe, with a little attention and tweaking, it will work. Basic business standards.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top