A local guard to stop AI agents from wasting tokens in loops

Orkaia is an tool for reducing waste when AI agents keep retrying the same failed action with small wording changes. It checks the tool being used and the cleaned-up input values, so a rephrased retry can still be recognized as the same repeated action. When the same action happens too many times, Orkaia stops the run before the total spending limit is reached.

It also records token use for each action, making it easier to see which step caused the cost. It runs fully on the user’s own machine, installs with pip install orkaia, and does not require an API key, signup, or sending data out. It is released under the .

One known next step is better handling of cases where an agent alternates between two actions, such as A→B→A→B.

Key points

  • Orkaia stops AI agents when they repeat the same failed action too many times.
  • It compares the tool and cleaned-up inputs, not just the raw wording.
  • It tracks token use for each action so cost problems are easier to find.
  • It without an API key, signup, or outside .
  • Alternating loops such as A→B→A→B are still being worked on.

Sources covering this story (5)

Read original