Check that a result-cache key contains every input that changes the result, and nothing volatile
Given the inputs of a cached computation (each declared as influencing the output or not, optionally volatile) and the list of inputs the cache key is built from, finds influential inputs missing from the key (stale or wrong hits), volatile inputs inside it (the cache never hits), unknown-influence inputs left out, and, for private results, a missing tenant dimension (cross-tenant leak). When values are given it also returns a deterministic key digest (RFC 8785 JSON + SHA-256). Does not inspect code to find what influences the output: that is declared by the caller.
What you get
A cache key that omits one input serves one user's answer to another; one that includes a timestamp is a cache that never hits.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/cache-key-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/cache-key-check \
-H 'content-type: application/json' \
-d '{"inputs":[{"name":"query","influencesOutput":"yes","value":"shoes"},{"name":"locale","influencesOutput":"yes","value":"de-DE"},{"name":"requestId","influencesOutput":"no","volatile":true,"value":"r-1"}],"keyParts":["query"],"scope":"search:v3"}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
inputs | array<object>; max 100 items | yes | |
keyParts | array<string; length 1..200>; max 100 items | yes | Names of the inputs the key is built from. |
scope | string; length 0..200 | no | Namespace mixed into the digest. |
private | boolean | no | The result is per-tenant or per-user. |
tenantInput | string; length 1..200 | no | Name of the input that identifies the tenant or user; required in the key when private. |
Example request body
{
"inputs": [
{
"name": "query",
"influencesOutput": "yes",
"value": "shoes"
},
{
"name": "locale",
"influencesOutput": "yes",
"value": "de-DE"
},
{
"name": "requestId",
"influencesOutput": "no",
"volatile": true,
"value": "r-1"
}
],
"keyParts": [
"query"
],
"scope": "search:v3"
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
missing | array<string> | no | Influential inputs absent from the key. |
unclassifiedMissing | array<string> | no | Unknown-influence inputs absent from the key. |
volatileInKey | array<string> | no | |
unknownKeyParts | array<string> | no | Key parts that are not declared inputs. |
keyDigest | string | no | Present when every key part has a value. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent