Detect loops in an agent run
denk.halowerk.com/v1/loop-detect
Detect loops in an agent run: identical repeated tool calls, A-B-A-B cycles and stretches without new results. Hashes every tool call (tool name plus canonical arguments) and optional result, then reports exact repeats, periodic cycles of length 2 to 5 that repeat at least three times, and stagnation windows where several consecutive calls return results already seen. Returns the positions, the cy
POST
https://denk.halowerk.com/v1/loop-detectUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://denk.halowerk.com/v1/loop-detect", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"calls":[{"arguments":{"q":"x"},"tool":"search"},{"arguments":{"id":1},"tool":"open"},{"arguments":{"q":"x"},"tool":"search"},{"arguments":{"id":1},"tool":"open"},{"arguments":{"q":"x"},"tool":"search"},{"arguments":{"id":1},"tool":"open"}]}),
});
console.log(await res.json());Example input
{
"calls": [
{
"arguments": {
"q": "x"
},
"tool": "search"
},
{
"arguments": {
"id": 1
},
"tool": "open"
},
{
"arguments": {
"q": "x"
},
"tool": "search"
},
{
"arguments": {
"id": 1
},
"tool": "open"
},
{
"arguments": {
"q": "x"
},
"tool": "search"
},
{
"arguments": {
"id": 1
},
"tool": "open"
}
]
}