← Back to selected work

Personal explorations · Data freshness · tooling · evidence

An endpoint can be up. Is its data fresh?

An open source probe that tells an agent whether a response is current, not just available.

Personal project · data freshness

Is this response fresh?

Four signals vote on one response. Pick a case, or set the inputs yourself and watch the verdict move.

A response returns HTTP 200. Four signals (cache headers, content fingerprint, liveness and the policy's maximum age) each vote fresh or stale, and the share of fresh votes decides FRESH, STALE or UNKNOWN.HTTP 200 OKAge20 secondsBodychangesLatencysteadyCache headersweight 0.9freshFingerprintweight 0.8freshLivenessweight 0.7freshPolicy max ageweight 0.95freshVotes4 of 4 fresh30%70%FRESHconfidence 0.84

4 of 4 signals fresh: FRESH, confidence 0.84.

Every signal agrees

The data was modified 20 seconds ago, the body changed between polls, and latency is healthy. All four signals vote fresh, so the agent can act on it.

FRESH with 0.84 confidence: the mean of the four signal weights.

HTTP 200, and still stale

The endpoint answers quickly, so an uptime check would call it healthy. But the data is three hours old, the body never changes between polls, and the policy allows 60 seconds. One signal of four votes fresh.

This is the gap the tool exists for: available is not the same as current.

Honest about doubt

Three hours old is fine for a static asset, so the policy and liveness vote fresh. The header score and the unchanging body vote stale. Two of four is not a majority either way.

UNKNOWN, with confidence cut to 0.50. The tool says it does not know instead of picking a side.

The vote, thresholds and confidence weights are ported from freshprobe's open source verdict code. The endpoint is illustrative.

Up is not the same as current

An agent asks an API for flight prices and gets HTTP 200. The fare changed three hours ago. Nothing in a status code says so.

Four signals, one vote

freshprobe reads the cache headers, fingerprints the body across repeated requests, checks that latency is steady, and compares the data’s age with a policy: 60 seconds for a real-time API, 24 hours for static content. Each signal votes. At least 70% fresh reads FRESH. 30% or less reads STALE.

The decision: say UNKNOWN

Between those thresholds, freshprobe answers UNKNOWN and lowers its confidence. A probe that always picks a side is easier to use, and it is wrong in exactly the cases that matter.

Try “A static file” above. Two signals vote each way, and the honest answer is that it does not know.

Built to be called by agents

It is a single Go binary that runs as a command-line tool, an MCP server, or an HTTP service. The same inputs always produce the same verdict, so an agent can build on it.

Explore the freshprobe repository ↗

Before an agent acts, it should know how old its facts are.

Let’s talk ↗