HeadlinesBriefing favicon HeadlinesBriefing.com

Sherlock: Debug Your LLM Tools with a MitM Proxy

Hacker News: Front Page •
×

A new MitM proxy called Sherlock allows developers to inspect the traffic their LLM tools send to APIs. Built to understand what Claude Code was transmitting, the tool provides a real-time terminal dashboard. It displays token usage, monitors context window limits, and automatically saves prompts as markdown and JSON. This is crucial for optimizing costs and understanding how your prompts are processed.

Sherlock works by intercepting HTTPS traffic to LLM APIs. It offers a visual token usage gauge and saves every prompt for debugging. Installation requires Python 3.10+ and Node.js. Developers can easily configure it using proxy environment variables. The tool supports providers like Anthropic and plans to add support for OpenAI and Google Gemini, addressing the need for transparency.

This tool matters because understanding the inner workings of LLM interactions is becoming increasingly important. As developers build more complex applications, the ability to monitor and debug API calls is vital. Developers can use it to track costs, optimize prompts, and better understand how their applications interact with LLMs.

Looking ahead, expect more tools like Sherlock to emerge as AI development continues to grow. The ability to see the data exchanged between your application and the LLM is essential. These tools will enable developers to optimize their use of LLMs, saving money and improving application performance. The project is open-source and welcomes contributions.