Skip to content
SeenRelay
Menu
Machine JSONMeasure first
FLEET COORDINATION · CLIENT 0.2.30

Measure duplicate expensive work before you suppress a single call.

Client 0.2.30 can measure exact in-flight overlap across separate workers before active coordination. If you already have caller-owned fleet traces, run the local trace census first; otherwise use distributed shadow measurement while every authoritative operation still runs.

WHERE IT FITS

High-cost exact reads that can safely share one authoritative result.

The callers may be agents, services, CI workers or edge processes. The strongest fit is concurrent exact work that allocates meaningful provider spend, browser time, container capacity, rate-limit headroom or downstream tool work.

01

Hosted tools and containers

Read-only code execution, sandboxes, browser sessions or other separately billed resources where duplicate top-level calls allocate duplicate infrastructure.

02

Expensive deterministic work

Extraction, parsing, model-assisted validation or other exact work where all callers explicitly accept the same result.

03

Distributed callers

Agents, workers, queues, services or edge processes that can encounter the same exact coordinate concurrently but should not independently repay for it.

VERIFIED CONTROLLED EVIDENCE

We measured both provider-unit reduction and provider headroom.

These are controlled first-party mechanics measurements, not natural customer ROI. They show what exact in-flight coordination can do when overlap is present; your own traffic still has to prove that the overlap exists and that SeenRelay beats the best native/local control.

Provider-unit reduction18 → 9 FIRECRAWL CREDITS

Across 3 rounds with 2 separate workers, the uncoordinated path executed 6 Firecrawl browser jobs for 18 credits. Active coordination executed 3 jobs for 9 credits, with 3 actual follower reuses and matching browser-computed results.

The latest repeat remained clean: zero fail-open, store, coordinate, codec or follower-timeout failures. Dollar and net-savings claims remain intentionally unset.

Inspect provider-unit evidence →
Provider concurrency headroom5 CALLERS → 1 JOB + 4 REUSES

A 5-worker uncoordinated attempt hit Firecrawl's observed concurrency ceiling of 2 jobs and returned HTTP 429. In the coordinated follow-up, all 5 callers shared one authoritative browser job: 1 leader, 4 follower reuses, 0 coordination failures.

This is capacity/headroom evidence, not an 80% savings claim: the five-worker baseline did not complete, so comparative credit delta and dollar savings stay unknown.

Inspect headroom evidence →
HAVE FLEET TRACES? · LOCAL-ONLY CENSUS

Estimate exact overlap opportunity before instrumenting live traffic.

If your fleet already records sanitized call timing, seenrelay trace-census can rank exact-shareable read-only overlap locally. It does not contact SeenRelay, execute the traced workload, suppress a call or turn potential savings into an ROI claim.

Run on a caller-owned traceNO SEENRELAY API
npx seenrelay trace-census fleet-trace.jsonl
npx seenrelay trace-census fleet-trace.jsonl --json

The trace contains opaque SHA-256 exact-coordinate hashes, comparable start/end timestamps, worker identity, explicit shareability policy and optional caller-provenanced marginal cost or provider units. Raw prompts, tool arguments, URLs and results are not required and common raw-content fields are rejected.

What the report meansOPPORTUNITY · NOT SAVINGS

successful_leader_overlap_opportunities counts eligible calls that began behind an exact leader that later succeeded. When the caller supplied cost provenance, the report can total gross_potential_avoided_cost_usd and potential provider units.

Actual avoided executions remain unknown at this stage. They become factual only after active coordination produces verified follower-reuse savings records. Net savings additionally require measured coordination/store overhead.

Trace schema and evidence boundary →
OPENTELEMETRY DISCOVERY · CLIENT 0.2.22+

Measure overlap below the framework before adding a SeenRelay wrapper.

Existing OTLP/JSON traces can feed the same local census when spans carry an opaque exact coordinate and explicit SeenRelay policy. Span type alone never authorizes reuse.

npx seenrelay otel-trace-census traces.otlp.json --json
SHADOW OVERLAP · NO SUPPRESSION

Find out whether the same expensive call actually collides across workers.

SeenRelayFleetShadowMeter uses caller-owned coordination metadata only. Every call still executes authoritatively, no result is shared, and no hosted CHECK or OBSERVE is sent.

Distributed shadow meterMEASURE FIRST
import {
  SeenRelayFleetShadowMeter,
  createRedisRestFleetStore
} from 'seenrelay/fleet';

const meter = new SeenRelayFleetShadowMeter({
  store: createRedisRestFleetStore({
    url: process.env.UPSTASH_REDIS_REST_URL,
    token: process.env.UPSTASH_REDIS_REST_TOKEN,
    prefix: 'seenrelay:fleet:shadow:v0'
  }),
  scopeKey: process.env.SEENRELAY_FLEET_SCOPE
});

const result = await meter.measure({
  coordinate: {
    provider: 'openai',
    operation: 'responses.create',
    model,
    input
  },
  policy: {
    sideEffectClass: 'read_only',
    exactSingleAnswerShareable: true,
    independentSamplesRequired: false
  },
  execute: () => expensiveCall(),
  cost: {
    marginalCostUsd: 0.48,
    provenance: 'provider_list_price'
  }
});

console.log(meter.getReport());

callsWithIdenticalInflightPredecessor counts eligible calls that started while the same exact coordinate was already running. overlappedFollowerObservedCostUsd is cost actually incurred during shadow measurement — not a savings claim.

What the shadow result decidesNO AUTO-ACTIVATION

If exact compatible overlap is rare, the call is cheap, or a zero-cost provider-native exact cache already dominates, leave coordination off.

If overlap is frequent and materially expensive, move that one reviewed operation to active fleet coordination and measure actual avoided executions with Savings Reports.

Mutations and independent sampling are excluded from overlap candidacy. Store or cost-metadata failures cannot change the application result.

EXACT IN-FLIGHT COORDINATION

Keep your gateway. Add a caller-owned coordination store.

The JavaScript/TypeScript client exports seenrelay/fleet. The store holds only opaque coordination metadata plus the caller-sealed result. Different fleet scopes never coordinate.

Fleet coordinatorOPT-IN · FAIL-OPEN
import {
  SeenRelayFleetCoordinator,
  createRedisRestFleetStore,
  fleetCodecFromPrivateCodec
} from 'seenrelay/fleet';
import { createAesGcmPrivateCodec } from 'seenrelay/zero-state';

const fleet = new SeenRelayFleetCoordinator({
  store: createRedisRestFleetStore({
    url: process.env.UPSTASH_REDIS_REST_URL,
    token: process.env.UPSTASH_REDIS_REST_TOKEN
  }),
  codec: fleetCodecFromPrivateCodec(
    createAesGcmPrivateCodec(keyBytes)
  ),
  scopeKey: process.env.SEENRELAY_FLEET_SCOPE
});

const result = await fleet.run({
  coordinate: {
    provider: 'openai',
    operation: 'responses.create',
    model,
    input
  },
  policy: {
    sideEffectClass: 'read_only',
    exactSingleAnswerShareable: true,
    independentSamplesRequired: false
  },
  execute: () => expensiveCall()
});

Every result-affecting qualifier belongs in the coordinate. If two calls differ in model, files, tools, tenant state, randomness contract or another relevant input, they must not collapse.

What stays protectedSEMANTIC CONTRACT

Read-only only

Mutations and destructive operations pass through unchanged.

No forced sampling collapse

If independent answers, diversity, voting or randomized testing are part of the goal, keep the required multiplicity.

Native controls still win

If a provider already supplies an equivalent zero-cost exact response cache, declare it and SeenRelay steps aside.

Fail open

Store errors, follower timeouts and codec failures execute the original authoritative operation rather than inventing a hit.

SAVINGS REPORTS

Count only work that was actually avoided.

Client 0.2.30 can emit a local Savings Report when a follower reused an in-flight authoritative execution. Dollar value appears only when the caller provides or resolves a marginal cost with explicit provenance. SeenRelay is currently free; this report is not a bill or payment receipt.

Local ledgerNO BILLING
import {
  createFleetSavingsLedger
} from 'seenrelay/fleet';

const savings = createFleetSavingsLedger();

await fleet.run({
  coordinate,
  policy,
  execute: expensiveCall,
  cost: {
    marginalCostUsd: 0.48,
    provenance: 'provider_list_price'
  },
  onReceipt: savings.record
});

console.log(savings.snapshot());

avoidedExecutions increases only on actual follower reuse. If cost is unknown, SeenRelay leaves the dollar value unknown instead of estimating it.

What a Savings Report does not meanNO BILLING

A Savings Report is not an invoice, bill, charge, payment receipt, customer-spend claim or proof that every similar request is shareable. It reports the local coordination path that actually occurred and the caller-provided cost provenance.

onReceipt remains the callback name for API compatibility; it records savings evidence, not a payment event.

Start with one expensive operation. If follower reuse is rare or absolute savings are immaterial, leave the rest of the application unchanged.

Full fleet API and boundaries →
SEPARATE POLICY · COMPLETED RESULTS

In-flight coordination is not temporal caching.

A later call does not inherit a completed fleet result merely because an earlier caller finished. If the application separately wants caller-owned completed-result reuse, SeenRelayZeroState provides private L1 under an explicit freshness window.

Optional private L1AES-256-GCM
import {
  SeenRelayZeroState,
  createAesGcmPrivateCodec
} from 'seenrelay/zero-state';

const edge = new SeenRelayZeroState({
  privateStore: fleetStore,
  privateCodec: createAesGcmPrivateCodec(keyBytes),
  privateMaxAgeMs: 30_000
});

A positive privateMaxAgeMs is a separate caller freshness decision. Keep it at zero when a completed result must never suppress live validation.

Keep layers distinctNO HIDDEN TTL

Fleet coordination: same eligible work is already running now.

Private L1: a completed caller-owned result may still be fresh enough under an explicit policy.

Shared CHECK: optional recent external evidence for compatible source-backed facts.

Fallback: when any cheaper layer is insufficient, validate normally.

START WITHOUT ASSUMING VALUE

Measure one expensive call before broad rollout.

Use the scanner and shadow/economics tools to identify a real candidate, then attach fleet coordination only where the call is exact-shareable and simultaneous repetition actually occurs.

Coding agentAgent Skills
npx skills add https://seenrelay.com --skill seenrelay --yes
Find repeated expensive read-only calls in this agent fleet. Preserve the original operation and stronger native controls. If exact compatible calls overlap in flight, evaluate seenrelay/fleet for one-authoritative-execution coordination and report avoided executions with explicit cost provenance. Do not collapse mutations, independent sampling or tenant-specific work.
Decision ruleMEASURED VALUE

If compatible overlap is rare, the operation is cheap, or a stronger native mechanism already removes the cost, leave SeenRelay out of that path.

If the overlap is material and expensive, keep the narrowest explicit policy that preserves the caller's intended result multiplicity.

BOUNDARIES

Fleet coordination is caller-scoped infrastructure.

The coordination store is caller-owned. CHECK and OBSERVE remain the only hosted SeenRelay domain operations and are not required for fleet in-flight coordination.

No truth verdictCoordination says who should execute compatible work, not whether the result is true.
No mutation suppressionMutating or destructive operations remain outside the coordination target.
No cross-tenant assumptionDifferent fleet scopes do not coordinate, and sealed results stay inside the caller's encryption boundary.
NEXT STEP

Measure one simultaneous expensive operation today.

Install client 0.2.30, keep every authoritative call enabled, attach SeenRelayFleetShadowMeter to one exact-shareable read-only operation, and enable coordination only if the measured overlap is worth removing.