Deterministic API mocks for CI and agents

Your CI is red again. Again, it’s not your code.

A vendor sandbox is down, a partner API is throttling your test run, or your agent sent a tool call you never recorded. Gostly records the services you depend on and replays them — deterministic, offline, and it answers requests you’ve never seen. Ship on your schedule, not your dependencies’.

On a structurally new request, most mocks miss — a 404, or a silent call to the real API. Gostly answers it — offline, from a twin it learned from your own traffic.

gostly.internal / payments-api

the actual product · take the upstream offline, the tests stay green

the readiness gap
83% / 29%

of organizations plan agentic AI deployment; 29% feel secure enough to ship it.

Cisco · State of AI Security 2026

the contract gap
17%

of teams contract-test that their API still matches its spec — the other 83% find out in prod.

Postman · 2025 State of the API

the verification tax
45%

of developers say debugging AI-generated code eats real time.

Stack Overflow Developer Survey 2025

─ THE FAILURE MODE

Mocks are an unmaintained interface contract you wrote by hand. Then forgot about.

The contract between your service and someone else's API is the most load-bearing thing in your test suite — and the part with the least engineering rigor. Four failure modes show up on every team that grows past two services.

FIXTURES

Hand-written stubs go stale before the PR merges.

Every team writes the same brittle JSON. “Mocks are static, but reality evolves. The mock becomes a lie.”

DRIFT

Tests pass locally. Production fails because the API changed.

Three-week-old stubs against an upstream that added a new field. CI is green; reality isn’t. Only 17% of teams contract-test that the API still matches its spec (Postman, 2025).

COVERAGE

5xx, 429, timeouts, partial responses get skipped.

Edge-case fixtures are written when a flaky test forces them — at 2 AM, by whoever’s on call. The 5xx that reaches prod is the one no fixture covered.

AGENTS

Multi-step flows are where stateful mocking falls apart.

An agent retrying the same upstream four ways needs the response trajectory to evolve. A static stub set says yes to everything, then the orchestration silently diverges.

─ THE MATCH CASCADE

Four deterministic stages, then a wall. The model is reached only at the edge — served from cache, never in the request path — and only on Pro and Team.

Every request in MOCK mode runs through this cascade. The first stage that produces a match short-circuits the rest. Stages 01 through 04 require zero inference and zero randomness — the same input produces the same byte on every run. The generated stage is served from cache; generation runs in the background, never on the request path. The model is a gap-fill at the edge of the contract, not the spine of it.

FIG. B · MATCH CASCADE · SHORT-CIRCUITS AT FIRST HITNo LLM in the deterministic match cascade.The model is on the far side of a wall the architecture, not the marketing, enforces.REQRESPONSE →01DETERMINISTICsession-verbatimbyte-exact · in-sessionALL TIERSMISS →02DETERMINISTICexactrecorded matchALL TIERSMISS →03DETERMINISTIClinked-mocksstateful · no 404ALL TIERSMISS →04DETERMINISTICsmart-swapstructural · value swapFREE OPT-IN · PRO/TEAMMISS →05AI · PRO/TEAMgeneratedserved from cachePRO · TEAMMISS →06FALLBACKunmatchedconfigurable miss · loggedALL TIERS↳ SERVEDTHE WALLAI ONLY BEYOND THIS LINEstages 01–04 deterministic · 05 served from cacheMost calls short-circuit at the first deterministic hit. Generated responses are pre-warmed in the background and served from cache — the model is never in the request path.

─ ONE PROXY, EVERY CAPABILITY

Everything that ships in the box.

Verbatim replay is the spine. Around it: stateful flows, chaos, drift and repair, fidelity scoring, per-service adapters, TLS and WebSocket capture, PII redaction, webhook capture, and an audit trail — all inside your perimeter.

gostly.internal · tls handshake
encrypted capture ENCRYPTED
→ ClientHello
← ServerHello · certificate chain
✓ local CA trusted — once
🔒 TLS 1.3 established · traffic captured
· · · · · · · · · · · · · · · · · · · ·
→ upstream: client fingerprint matched
✓ HTTP/2 · looks like a real client

TLS capture & impersonation

All tiers
  • Trust the CA once, capture everything
  • Outbound fingerprint impersonation (Pro+)
  • HTTP/2 and HTTP/1.1

§ 08   BUILT FOR THREE ROOMS

Three audiences. One architecture. The same answer in every room.

The platform team wants tests that don't depend on someone else's status page. The agent operator wants a deterministic substitute for the runtime that's suddenly calling production APIs. The regulated buyer wants the architecture to be the answer, not a Trust Pack PDF. Gostly is the same product to all three.

platform team

Tests that don’t depend on someone else’s status page.

When a change passes CI against a stale fixture and still breaks in prod, the fixture was the problem. Gostly replays the recording the operator approved — bit-for-bit. The 2 a.m. flaky run because a third-party rate-limited a build slave stops happening.

API MOCKING USE CASES

agent operator

Verifiable replay for agent loops at machine speed.

Cisco’s 2026 State of AI Security found 83 % of organizations plan agentic AI deployments, but only 29 % feel secure enough to ship. The gap is verifiability. Gostly gives the operator a deterministic substitute — record the conversation once, replay it in evaluations forever. The LLM is not in the substitute’s hot path.

AGENT RUNTIME PATTERNS

regulated buyer

Structural redaction the procurement reviewer can read.

Runs entirely in your own infrastructure — your traffic never leaves your perimeter, and it is never mixed with another customer's data. Single sign-on (SAML and OIDC), role-based access control, and a full audit trail come standard on Team. Credentials are stripped before anything is written to disk. And because it keeps serving even when our platform is unreachable, the architecture — not a Trust Pack PDF — is the answer to “what happens if your vendor goes down?”

SECURITY MODEL

─ PRICING

Self-hosted free. Pro for the gap-fill. Team for the enterprise controls.

Single sign-on (SAML and OIDC), role-based access control, and audit logging are included on Team and above. The full feature matrix lives on the register page.

Free

$0forever

Self-hosted. No license key required.

  • Recording + replay
  • LEARN / MOCK / PASSTHROUGH modes
  • Smart-swap structural matching
  • Unlimited services
  • Dashboard UI
Get started free

Pro

$10/ month

The $10 is locked through Dec 2026 if you sign up before September 1.

  • Everything in Free
  • AI gap-fill on unrecorded fields
  • LoRA fine-tuning on your traffic
  • Drift detection
  • Priority support
Start free trial

Team

$79/ seat / month

For shipping orgs. SAML + OIDC + audit log included.

  • Everything in Pro
  • Multi-user workspace
  • SAML SSO + OIDC
  • RBAC (owner / admin / member / viewer)
  • Team activity log
Start with Team

SELF-HOST COMMERCIAL

$499 / month flat

≤10 seats, 2 environments. For compliance-driven buyers who need to run Gostly entirely inside their perimeter.

Talk to us →

ENTERPRISE

Custom · floor $25K

Custom MSA, data residency, dedicated support. Talk to sales for the trust pack.

Contact sales →

※ The model is optional. With AI generation enabled the inference container needs a few gigabytes of RAM; with it disabled the rest of the cascade runs comfortably in 1 GB. Customers in latency-sensitive or regulated environments often disable generation and rely on exact + structural match alone.

─ READY WHEN YOU ARE

Recorded once. Replayed verbatim. Verifiable by construction.

Drop the proxy in. Run a real workload through it once. Have a byte-stable mock library by the end of the afternoon — plus drift detection, an SSRF-guarded webhook replay, and the audit trail to defend all of it.

Get started freeTry the live demoRuns on real recorded GitHub API traffic — send it a request the recording never saw and watch it answer.