Use the published descriptors for supported public versions/status facts when they match your workload. The catalog publishes no observed values, recommended TTL or reuse authorization.
Start from the execution boundary you already have.
SeenRelay can sit below an agent, service, CI worker or edge process at an eligible read-only execution boundary. Keep local/private state and native controls first, preserve the authoritative execution during measurement, and coordinate only after the workload proves that a narrower shortcut is safe and worthwhile.
CHECK asks whether you need to look again; it does not fetch the answer for you.
Your application supplies the value it already knows, a deterministic source-backed fact and its own maximum evidence age. SeenRelay reports recent compatible observations. Unknown, stale, contested or policy-rejected evidence falls through to the authoritative source.
Use a stable authoritative source plus a source-native locator. Prefer a miss over guessing that two integrations mean the same thing.
Find a candidate before changing the application.
The npm CLI reads supported source and configuration files locally. It does not contact SeenRelay, upload project content, modify files, return a USE verdict or authorize reuse.
npx seenrelay scan
Use npx seenrelay scan . --json when a coding agent or CI job needs machine-readable output.
CANDIDATE_FOR_SHADOW_MEASUREMENT means runtime measurement may be worthwhile. NATIVE_CONTROL_FIRST means test the stronger detected control first. NEEDS_RUNTIME_EVIDENCE means recurrence is not established. NO_ELIGIBLE_CANDIDATE_FOUND means leave SeenRelay out.
If you already have timing traces, estimate overlap before adding runtime instrumentation.
The trace census reads a sanitized caller-owned JSON/JSONL trace locally. It does not contact SeenRelay or execute the workload, and it reports potential exact in-flight overlap rather than actual savings.
npx seenrelay trace-census fleet-trace.jsonl npx seenrelay trace-census fleet-trace.jsonl --json
Use opaque SHA-256 coordinate hashes and omit raw prompts, tool arguments, URLs, headers and results. Include caller-provenanced marginal cost or provider units only when you have them.
gross_potential_avoided_cost_usd and potential provider units describe overlap opportunity under the supplied trace and cost provenance. actual_avoided_executions and actual_net_savings_usd remain unknown until active coordination is measured.
Use a positive census to choose one workload for distributed shadow measurement; do not enable broad reuse from the census alone.
Measure below the agent framework using traces you already collect.
The OTLP adapter maps explicitly annotated spans into the same conservative fleet overlap census. It does not infer that HTTP, tool, CI or IoT spans are shareable merely from their span type.
npx seenrelay otel-trace-census traces.otlp.json --json
Supply an opaque seenrelay.coordinate_hash plus explicit side-effect/shareability policy at instrumentation time.
The adapter does not copy generic prompts, tool arguments/results, URLs, headers or request bodies into the report. Use the result only to rank workloads for shadow measurement.
Execution-substrate guide →Give the agent the SeenRelay integration contract, not a long setup guide.
The Agent Skill is published through the SeenRelay domain. The first task preserves the authoritative call, selects only a supported adapter, runs the project's existing tests and reports exact repeated workloads rather than automatically enabling reuse.
claude plugin marketplace add ovladon/seenrelay claude plugin install --scope user seenrelay@seenrelay
This validated self-hosted install does not imply Anthropic marketplace approval, does not automatically attach MCP, and does not enable reuse.
npx skills add https://seenrelay.com --skill seenrelay --yes
The skill contains the protocol boundary, supported integrations and fail-closed rules.
Find repeated expensive read-only validations across this agent fleet. Integrate SeenRelay only through a supported adapter, start in shadow mode, preserve the authoritative call and stronger native controls, run the existing tests, and report the exact workloads that repeat. Where workers already share a caller-owned store, evaluate encrypted private L1 before optional shared CHECK.
The first deployment needs no reuse policy.
Install the package and wrap the client you already have. Continue using it normally. The Ambient report is local candidate discovery; it is not by itself a deployment verdict and does not authorize automatic reuse.
npm install seenrelay
import { ambientMcpClient } from 'seenrelay/ambient';
const client = ambientMcpClient(rawMcpClient);
// use client.callTool(...) normally
console.log(client.seenRelayAmbient.getReport());That wrapper is shadow-first. When a specific read-only tool is explicitly reviewed as eligible, seenrelay/mcp-auto provides the separate local-first bind-once path. Shared SeenRelay CHECK is off by default.
pip install seenrelay
from seenrelay_ambient import ambient_mcp_client client = ambient_mcp_client(raw_mcp_client) # await client.call_tool(...) normally print(client.get_report())
Python Ambient is local shadow measurement only in client 0.2.25. It does not suppress the authoritative call.
Python guide →Ambient finds repetition. Shadow Proof decides whether SeenRelay has earned a place.
Move only a materially repeated, deterministic, read-only candidate into this stage. Shadow Proof still runs every authoritative validation. The simulated reuse policy is evaluated only afterward, and the hostile evaluator refuses incomplete native-control evidence instead of guessing.
import { SeenRelayClient, reuseKnownOnSameObserved } from 'seenrelay';
import { SeenRelayShadowProof } from 'seenrelay/shadow-proof';
import {
classifyHostileBenchmarkVerdict,
evaluateHostileBenchmark
} from 'seenrelay/economics';
const proof = new SeenRelayShadowProof(
new SeenRelayClient(),
{ benchmarkRecordLimit: 10_000 }
);
await proof.guard({
fact,
knownValue,
validate: ({ conditionalHeaders }) =>
expensiveValidation(conditionalHeaders),
benchmark: {
reuse: reuseKnownOnSameObserved,
baselineCost: measuredValidationCost,
checkCost: measuredCheckCost,
observeCost: measuredObserveCost,
observeAfterBaseline: true
}
});
const input = proof.hostileBenchmarkInput({
workloadId: 'opaque-workload-id',
controls: measuredControls
});
const report = evaluateHostileBenchmark(input);
console.log(classifyHostileBenchmarkVerdict(report));from seenrelay import SeenRelayClient, reuse_known_on_same_observed
from seenrelay_shadow import SeenRelayShadowProof
from seenrelay_economics import (
classify_hostile_benchmark_verdict,
evaluate_hostile_benchmark,
)
proof = SeenRelayShadowProof(
SeenRelayClient(),
benchmark_record_limit=10_000,
)
proof.guard(
fact=fact,
known_value=known_value,
validate=lambda ctx: expensive_validation(ctx.conditional_headers),
benchmark={
"reuse": reuse_known_on_same_observed,
"baseline_cost": measured_validation_cost,
"check_cost": measured_check_cost,
"observe_cost": measured_observe_cost,
"observe_after_baseline": True,
},
)
benchmark_input = proof.hostile_benchmark_input(
workload_id="opaque-workload-id",
controls=measured_controls,
)
report = evaluate_hostile_benchmark(benchmark_input)
print(classify_hostile_benchmark_verdict(report))USE
Complete natural-workload evidence cleared the operational sample floor, hypothetical reuse matched authoritative validation, and the measured SeenRelay path beat the best measured non-shared path on both cost and latency. Treat this as a candidate for the narrowest supported integration; it still does not enable reuse automatically.
DO NOT USE
Either a hypothetical reuse disagreed with authoritative validation, or complete evidence failed to beat the best measured non-shared path. Keep the stronger existing path and remove SeenRelay from this workload.
INSUFFICIENT EVIDENCE
The sample is still too small, comparison is incomplete, or the evidence is mechanics-only. Collect more evidence on the same natural workload and leave active reuse off. The default 100-call floor is an operational gate, not a universal statistical-significance claim.
measuredControls / measured_controls must truthfully declare local cache, source-native conditional validation and provider-native caching. If a stronger control is available but was not measured on the same workload, evaluation is incomplete. Both the evaluator and verdict classifier leave automatic reuse disabled.Measure distributed overlap first. Coordinate only if the data justifies it.
Client 0.2.25 exposes both shadow measurement and active exact in-flight coordination under seenrelay/fleet. Shadow mode keeps every authoritative operation enabled and shares no result.
import {
SeenRelayFleetShadowMeter,
createRedisRestFleetStore
} from 'seenrelay/fleet';
const store = createRedisRestFleetStore({
url: process.env.UPSTASH_REDIS_REST_URL,
token: process.env.UPSTASH_REDIS_REST_TOKEN,
prefix: 'seenrelay:fleet:shadow:v0'
});
const meter = new SeenRelayFleetShadowMeter({
store,
scopeKey: process.env.SEENRELAY_FLEET_SCOPE
});
await meter.measure({
coordinate,
policy: {
sideEffectClass: 'read_only',
exactSingleAnswerShareable: true,
independentSamplesRequired: false
},
execute: expensiveCall,
cost: {
marginalCostUsd: 0.48,
provenance: 'provider_list_price'
}
});
console.log(meter.getReport());Every call still runs. callsWithIdenticalInflightPredecessor measures exact eligible collisions; overlappedFollowerObservedCostUsd is observed shadow cost, not avoided savings.
import {
SeenRelayFleetCoordinator,
fleetCodecFromPrivateCodec,
createFleetSavingsLedger
} from 'seenrelay/fleet';
import { createAesGcmPrivateCodec } from 'seenrelay/zero-state';
const savings = createFleetSavingsLedger();
const fleet = new SeenRelayFleetCoordinator({
store,
codec: fleetCodecFromPrivateCodec(
createAesGcmPrivateCodec(keyBytes)
),
scopeKey: process.env.SEENRELAY_FLEET_SCOPE
});
await fleet.run({
coordinate,
policy,
execute: expensiveCall,
cost: {
marginalCostUsd: 0.48,
provenance: 'provider_list_price'
},
onReceipt: savings.record
});Only actual follower reuse counts as an avoided execution. Unknown cost stays unknown. Mutations, independent sampling and a declared zero-cost exact provider cache remain outside coordination.
Full measurement, coordination, receipts and boundaries →Do not rewrite an application to adopt SeenRelay.
Use the surface the application already owns: plain JavaScript/TypeScript, LangChain, PydanticAI, OpenAI Agents, Vercel AI SDK, MCP or REST/OpenAPI.
Plain JS / TS function
SeenRelayZeroState can apply exact in-flight reuse, explicit local/private freshness policy and source-native confirmation before the original validation.
Framework adapters
Ambient adapters preserve existing framework/tool behavior while measuring exact repetition locally by default.
Claude Code plugin + remote MCP
Claude Code can install the repository-hosted SeenRelay plugin persistently, while the separate remote MCP path exposes only CHECK + OBSERVE. Official MCP Registry identifier: io.github.ovladon/seenrelay. The self-hosted plugin path does not imply Anthropic marketplace approval. Connecting the protocol alone does not instrument existing validation work.
REST / OpenAPI
Direct integrations can use POST /v1/check and POST /v1/observe; the full schema is published at /openapi.json.
Promote only the expensive paths that actually repeat.
If the verdict is DO NOT USE, leave the stronger path alone. If it is INSUFFICIENT EVIDENCE, keep measuring without reuse. Only a USE workload should advance to the narrowest bounded private or optional shared-evidence policy appropriate to that operation.