Add an optional Decision Gate to speed up routine agent decisions
Every user message in the agent currently goes to the large language model to decide what the message means, whether a tool is needed, and what to do next. For a simple message this still costs one to three seconds and real money, even when the answer needs no heavy thinking at all. Over a long session these small decisions add up to a lot of wasted time and cost.
The idea is to put a small, fast decision model at the front door of the agent. This small model does not write text. In one quick pass it returns typed answers with confidence scores, such as whether the message needs a tool, whether it can be answered from what is already known, and what the primary intent is. A simple routing layer then sends each message to the cheapest correct path, and when the small model is unsure it falls back to the full model exactly as today. The agent is never worse, only faster when the decision is obvious. Because the decision models are small and open, this can run on ordinary hardware, even a CPU.
The change is safe to adopt. It is off by default, so a user who does nothing sees the exact current behavior. When it is turned on it runs in shadow mode first, which means it only classifies the turn and logs its recommendation through the existing logger. It does not change routing, it does not skip the model call, and it does not alter any user-visible behavior. It also fails open, so on any error, timeout, or bad response it simply says nothing and the agent continues as if the gate were never there.
I would like to contribute this as an optional feature. I have a small, self-contained increment ready on a branch: a gate module plus a shadow-mode hook at the entry of the conversation loop, using the httpx client the project already depends on and no new heavy dependency. Acting on the route is a later, separately validated step.
The concept and the reference implementation are by Andrea Bruno and are released under Creative Commons Attribution 4.0. If the project adopts the idea or the code, we kindly ask to keep a short credit to Andrea Bruno and a link to the harness-superfast white paper (https://github.com/Andrea-Bruno/harness-superfast). The decision models themselves, Von, OpenJev, and Laya, are third-party open models; only the integration architecture and the routing method are ours.
Source: HKUDS/OpenHarness