whatisgithub

What is rekon?

tryrekon/rekon — explained in plain English

Analysis updated 2026-05-18

2TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A transparent proxy for the Anthropic and OpenAI APIs that logs token usage, rebuilds conversations, and estimates cost per request.

Mindmap

mindmap
  root((repo))
    What it does
      Proxies Anthropic and OpenAI requests
      Records token usage
      Estimates cost
    Tech stack
      TypeScript
      Cloudflare Workers
      Hono
      React
    Use cases
      Track API token spend across a team
      See which tools consume the most tokens
      Rebuild full conversation sessions from raw API calls
    Audience
      Developers
      Ops teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Track token usage and cost across all requests your app sends to Anthropic or OpenAI

USE CASE 2

See a rebuilt view of full chat sessions from otherwise stateless API calls

USE CASE 3

Identify which specific tool calls inside an agent are consuming the most tokens

What is it built with?

TypeScriptCloudflare WorkersD1HonoReact

How does it compare?

tryrekon/rekon4ssh1/mine-sweeperachawla19/intuitcode-extension
Stars222
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-01-31
MaintenanceMaintained
Setup difficultymoderatemoderatemoderate
Complexity3/52/54/5
Audiencedevelopervibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a Cloudflare account with D1 and Workers for your own deployment, or you can use the hosted tryrekon.com instance instead.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice and state changes you made.

So what is it?

Rekon, also called Token Profiler, is a transparent proxy that sits between your app and the Anthropic or OpenAI APIs, recording how many tokens each request uses and showing that usage in a dashboard. You point your existing AI client at Rekon instead of directly at Anthropic or OpenAI, keep coding exactly as before, and Rekon quietly logs per request token counts, rebuilds full conversation sessions, attributes usage down to individual tools, and estimates the dollar cost of each request based on published list prices. It is built on Cloudflare Workers for the proxy itself, a Cloudflare D1 database for storage, the Hono web framework, and React for the dashboard front end. A hosted version is already running at tryrekon.com, so you can use it without deploying your own copy. Because requests are streamed straight through to the real API and recording happens outside the critical path, the proxy is designed to add no noticeable delay. It also never stores your API keys: your authentication headers are simply forwarded along to the real API on each request, so usage is always billed to your own account. To use it, you create a system in the dashboard, which gives you a unique proxy URL, then set that URL as your ANTHROPIC_BASE_URL or OPENAI_BASE_URL environment variable in whatever client you already use. The system id in that URL also acts as a secret key, so only requests carrying a known id get proxied and forwarded. Running your own deployment involves cloning the repository, installing dependencies, setting up local secrets including an OAuth provider like Google or GitHub, running database migrations, and starting a local development server, with a similar but separate process documented for a full Cloudflare deployment. This tool fits developers who already build with the Anthropic or OpenAI APIs and want visibility into exactly how many tokens their app, or the different tools inside it, are consuming and what that costs, without changing how their client talks to the API. The project is released under the Apache 2.0 license and describes itself as fully open source, with a hosted version as its commercial offering rather than a paid version of the code.

Copy-paste prompts

Prompt 1
Walk me through setting up Rekon locally and pointing my Anthropic client at it
Prompt 2
Explain how Rekon reconstructs conversation sessions from stateless API requests
Prompt 3
Help me deploy my own Rekon instance to Cloudflare Workers
Prompt 4
Show me how to read the tool-level token attribution in the Rekon dashboard

Frequently asked questions

What is rekon?

A transparent proxy for the Anthropic and OpenAI APIs that logs token usage, rebuilds conversations, and estimates cost per request.

What language is rekon written in?

Mainly TypeScript. The stack also includes TypeScript, Cloudflare Workers, D1.

What license does rekon use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice and state changes you made.

How hard is rekon to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is rekon for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.