If you've ever built an AI agent using function calling (tool use), you probably know the exact feeling of pure panic. You test your agent, it seems fine, you go grab a coffee, and come back to see it got stuck in an infinite loop—calling the exact same tool, failing, and retrying 500 times.
Suddenly, your OpenAI API balance is completely drained. 💸
After burning my own credits one too many times, I decided enough was enough. I built PromptShark—an open-source MITM proxy designed specifically to catch these loops, save your wallet, and make debugging agents painless.
PromptShark is a drop-in local proxy that sits between your code and the LLM provider. The best part? Zero code changes required.
You don't need to rewrite your agent or install heavy SDKs. Just change your base_url to http://localhost:8080/v1 and keep your API key as is. PromptShark intercepts the traffic and does the magic.






