Skip to main content
AIDiveForge AIDiveForge
Visit PromptShark

Get This Tool

License: MIT Any use incl. commercial
Local-run terms: Self-host via Go build, Docker, or docker-compose under MIT license for any use including commercial.

Share This Tool

Compare This Tool
📋 Embed this tool on your site

Copy this code to embed a compact tool card:

PromptShark

FreeOpen SourceAPISelf-Hosted

Pricing

Model
Free

Summary

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.

Community Performance Report Card

No community ratings yet. Be the first to rate this tool!

Best For: AI agent developers using OpenAI-compatible APIs, Teams monitoring token consumption in real time, Debugging sessions requiring historical replay

Community Benchmarks Community

No community benchmarks yet. Be the first to share a real-world data point.

  • Zero-instrumentation integration via a single base_url swap, so you get full request visibility without touching your agent's codebase or adding an SDK dependency.
  • Automatic infinite tool-calling loop detection, which means runaway agent cycles are flagged before they drain your token budget rather than after you read the invoice.
  • Per-step token usage and USD cost tracking surfaced in real time, so you can attribute spend to specific agent decisions rather than receiving an opaque monthly total.
  • Time-travel replay lets you re-run and edit any past API step without issuing a live request, so iterating on a prompt variant costs nothing in tokens during a debugging session.
  • MIT-licensed and fully self-hostable via Docker, which means your prompts, responses, and API keys remain on your own infrastructure with no third-party data handling.
  • The proxy is scoped to OpenAI-compatible API calls; agents using Anthropic, Google, or other non-OpenAI-format endpoints get no coverage, and teams with a mixed provider setup gain only partial visibility.
  • The docs describe no multi-user access controls or role separation, so the tool cannot be safely exposed across a development team without additional network-layer restrictions — teams beyond a single developer typically add a separate access layer or switch to a purpose-built observability platform.
  • There is no alerting or notification system described in the repository; when a loop fires at 2 AM, the dashboard captures it, but nobody is paged — teams with production monitoring requirements move to a dedicated tracing platform such as LangSmith or Langfuse that integrates with existing alerting pipelines.
  • With only 3 commits and 1 star at the time of curation, the project is early-stage; the community reports no track record of sustained maintenance, which is a real risk if you build a debugging workflow around it and a breaking API change in the upstream OpenAI spec goes unpatched.

Community Reviews

No reviews yet. Be the first to share your experience.

About

Platforms
Cross-platform (Go binary + Docker)
API Available
Yes
Self-Hosted
Yes
Last Updated
2026-06-18T04:37:59.895Z

Best For

Who it's for

  • AI agent developers using OpenAI-compatible APIs
  • Teams monitoring token consumption in real time
  • Debugging sessions requiring historical replay

What it does well

  • Debugging infinite tool-calling loops in AI agents
  • Tracking per-step token usage and USD costs
  • Replaying and editing past API steps without extra charges
  • Inspecting streaming and non-streaming OpenAI calls

Integrations

OpenAI API compatible

Discussion Community

No discussion yet. Sign in to start the conversation.

Compare PromptShark

Spotted incorrect or missing data? Join our community of contributors.

Sign Up to Contribute

Community Notes & Tips Community

Be the first to contribute. General notes, observations, gotchas, and tips from people who use this tool day-to-day.

Frequently Asked Questions

Is PromptShark free?
Yes — PromptShark is fully free to use. There is no paid tier.
Is PromptShark open source?
Yes. PromptShark is open source.
Does PromptShark have an API?
Yes. PromptShark exposes a developer API. See the official documentation at https://github.com/apvcode/promptshark for details.
Can I self-host PromptShark?
Yes. PromptShark supports self-hosting on your own infrastructure.
What platforms does PromptShark support?
PromptShark is available on: Cross-platform (Go binary + Docker).

Hours Saved & ROI Stories Community

Be the first to contribute. Concrete time/cost savings, with context. e.g. "Cut my code review backlog from 4h to 45m per week."

PromptShark

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.