Agentmetry
Free · Open source
SOC and DevSecOps teams
An AI agent burns through your token budget in minutes because it called the same tool forty times in a loop, and you had no visibility until the bill arrived — PromptShark exists to catch that before it costs you.
PromptShark is a local MITM proxy written in Go and C++ that sits between your agent and any OpenAI-compatible API endpoint. Every request and response pair is captured, logged, and surfaced in a real-time dashboard — no changes to your agent code, just a single base_url swap. The loop detector flags infinite tool-calling cycles automatically. The time-travel replay feature lets you re-run or edit any historical API step without firing a live request, which means no extra token spend during debugging. The self-hosted, MIT-licensed architecture means your prompts and API keys never leave your own infrastructure.
Bottom line: The right fit for a solo developer or small team debugging a runaway agent on local infrastructure — not a replacement for production-grade observability tooling when you need multi-tenant access controls, alerting pipelines, or audit logs at scale.
Find your fit
More options in LLM Observability. Compare pricing, platforms, and features side by side.
Free · Open source
SOC and DevSecOps teams
Freemium
Developers building GenAI apps and agents
PromptShark is a transparent local proxy that intercepts every call between your AI agent and an OpenAI-compatible API. The integration surface is a single configuration change: point your agent’s base_url to http://localhost:8080/v1. From that point, the proxy captures request/response pairs, tracks per-step token usage and USD cost, and streams everything into a real-time dashboard. No SDK wrapper, no code instrumentation, no agent-side modifications required.
The standout capability is what the docs describe as time-travel replay. Past API steps can be re-examined and re-executed — with edits — without issuing new live requests to the upstream API. For debugging sessions where you need to test a prompt variation without burning tokens on repeated live calls, this changes the iteration loop from expensive to nearly free. Combined with the built-in infinite loop detector, which automatically flags when an agent repeatedly calls the same tool, the tool addresses the two most common sources of unexpected token burn during agent development.
PromptShark fits tightly into a local or self-hosted development workflow. The repository ships with a Dockerfile and docker-compose configuration, so standing up the proxy is a container command rather than a manual dependency chain. The MIT license means there are no usage restrictions. Where it breaks down is at the boundary of team-scale observability: the docs describe no multi-user access controls, no alerting or notification hooks, and no persistence layer designed for high-volume production traffic. A team that has moved past prototype debugging and needs centralized logging, role-based access, or integration with an existing monitoring stack will find that PromptShark does not cover that surface.
The implementation is Go and C++ with a CMakeLists.txt build configuration. API access is available, and the proxy is designed specifically for OpenAI-compatible endpoints, so agents already targeting that interface require no additional adaptation beyond the base_url change.
Sign in to rate this tool or suggest an edit.