Simon's Blog

Agent harness is the new web framework

August 16, 2026

Today I finally tried out pi, the agent harness that OpenClaw is based on.

Using the intstructions on https://llama.app/ I had Pi running very quickly connected to my self-hosted Gemma 4E4B. I asked it to refactor a telegram bot I had created in Python that allows me to easily download and track arvix papers. It was excrutiatingly slow compared to the blistering speed I'm used to having with frontier models at work, but it worked in the end!

This got me thinking about how I approached the agentic loop within the bot. It was a while loop with a hardcoded limit for tool calls to avoid the agent running away with itself. Each tool had to be added manually in code and the whole agent be redeployed to update.

That is when I realised I was missing out. Having a good agent harness and providing it with an MCP server separated the concerns cleanly in the same way I had been doing for years with frameworks such as flask. I ever rarely had to think about the internals of how the web framework worked, I just added my @request.get decorator to my function, made sure the parameters were correct and I got a web server without any of the hassle associated with processes, TCP, HTTP, routing, request/response marshalling and so on.

These architectural patterns are still in their infancy but their potential cannot be denied. In the meantime, I have a telegram bot to refactor...