Architecture

Gostly architecture

Trace selected API requests, the data Gostly retains, and the optional model connections your team chooses.

The self-hosted system

Gostly self-hosted systemYour application or external agent exchanges HTTP requests and responses with the self-hosted proxy. In LEARN and PASSTHROUGH the proxy forwards eligible requests to the configured upstream. A browser or API client accesses the web app, which manages the proxy, PostgreSQL records and shared local files. The proxy also reads and writes shared local files. Optional local API-response inference handles selected model work and calls its local response model. Studio instead uses a separately configured compatible model endpoint, described below the core map. Upstream and control clients are outside the self-hosted boundary.YOUR SELF-HOSTED DEPLOYMENTHTTP request / responseLEARN / PASSTHROUGHControl / reloadBackgroundmodel workModel operationsManaged recordsShared filesCapture / replayYour app / agentCaller + own harnessHTTP proxyRoutes, records andserves selected callsConfigured upstreamCurrent API behaviorYour browserOr API clientWeb appDashboard + control APISeparate processesPostgreSQLManaged recordsShared local storageCapture, replay and artifactsLOCAL RESPONSE MODELSLocal response inferenceLocal llama.cpp model
Your application or agent

HTTP requests and responses with the proxy; your harness judges the application.

Your browser or API client

Management requests to the web app.

Your self-hosted deployment

HTTP proxy

Routes, records and serves selected calls.

Control and reload

Web app

Dashboard + control API, running as separate processes.

PostgreSQL
Managed records read and written by the API.
Shared local storage
Capture, replay and artifacts. The proxy and web app use these shared files.

Optional · Local response models

Local response inference local llama.cpp model

The proxy queues selected background response work; the API manages response-model operations.

Proxy forwarding in LEARN / PASSTHROUGH
Configured upstream

Current API behavior

Studio model connection

Configured separately from local API-response inference.

Control APIconnects withConfigured compatible model endpoint

The endpoint can be customer-hosted or remote. Your chosen connection determines where selected scenario context goes.

  • HTTP traffic
  • Management and stored data
  • Optional response-model work
Self-hosted HTTP environment · Core request, management and storage relationships. Local response-model services are optional. Studio uses its separately configured model connection; other selected external contacts are described below.

Inside the deployment

HTTP proxy
Receives selected application requests, resolves the configured service and operating mode, and serves a response or forwards the request upstream. It records supported exchanges and reads the loaded replay library.
Web app
Runs the dashboard and control API as separate processes in one container. The API manages services, libraries and workflows, reads captured files, writes managed records and sends control or reload requests to the proxy.
PostgreSQL
Stores managed records, including response-library rows, workflow configuration and audit history. It has its own persistent storage, separate from the shared local files.
Shared local storage
Holds captured traffic, replay files and model artifacts used by the stack. These files are distinct from processed database records and from temporary session memory.
Local response models (Full)
Full adds local API-response inference and service-specific adapter workflows, backed by a local llama.cpp model. Background response work is separate from serving an already available response. Lite omits these local response services.
Studio model connection
Studio authors reviewable linked scenarios through a configured compatible model endpoint, which can be customer-hosted or remote. Review, export and import are distinct actions. Optional isolated checks require separate execution setup.

The technical architecture reference describes the generated Compose stack, its published interfaces and internal networks.

Use For AI to distinguish scenario authoring, local response specialization and your external application's evaluation work.

Operating modes

LEARN
Forwards eligible requests to the configured upstream and captures supported exchanges. Capture is conditional and bounded; an upstream response alone does not establish a retained recording.
MOCK
Serves eligible loaded responses and configured behavior. An ordinary HTTP miss returns a configured local response rather than automatically calling the upstream.
PASSTHROUGH
Forwards eligible requests to the configured upstream without building the ordinary recorded library.

Library processing also has a temporary transitioning state, during which ordinary traffic can be refused. Service-specific modes can differ. Use record and replay for capture, library-building and readiness procedures.

A response can have different sources

MOCK can answer from eligible active-session captures, loaded library entries, supported resource state and authored lifecycle behavior. Structural matching can adjust a recorded response, while eligible prepared generated responses have a separate origin.

Routing, admission and configured faults can affect the response before ordinary source selection. Optional background generation may prepare a future response; queuing that work does not supply the current answer. The match cascade reference explains ordering, eligibility and response-origin signals.

Illustrative order lookup

Follow one selected request.

  1. Select the service. The application or agent looks up Mara's fictional order through its configured API route.
  2. Follow the mode. LEARN or PASSTHROUGH can forward to the configured upstream. MOCK selects an eligible stored or modeled response.
  3. Judge the application result. The caller receives the response; your harness checks the order view or agent decision it produces.

Storage and redaction boundaries

Active-session memory can retain supported response headers and cookies for replay. That temporary buffer ends on restart or the next recording window. Local captured history and replay files have a different lifetime and can retain original bodies and URL data.

Processed database rows and retained revisions are separate copies. Transition processing does not rewrite all local replay files into the processed database copy. Credential-header handling does not establish that bodies or URLs have been scrubbed, and a processing marker does not prove every sensitive value disappeared.

Imports, exports and archives have their own processing paths. Review the selected data and retained copies before sharing a library. Security and the security model describe these boundaries in more detail.

Connections and access

Self-hosting does not make every connection local. Upstream forwarding, connected licensing, usage reporting, identity providers and selected model or analysis providers have separate purposes and network behavior. Review the installation requirements for your configuration.

Studio sends selected scenario context through its configured compatible model connection. That endpoint's placement is a separate choice from local API-response inference. The Studio documentation explains model and execution setup.

Operator tracing exports supported operation metadata to a collector you configure. It is distinct from Gostly's vendor usage reporting and does not establish complete distributed tracing. Review operator configuration separately from the usage-reporting controls.

Licensed capabilities and request permissions are separate controls. Authentication, roles and resource scope still govern operations. The architecture reference and SSO and access-control documentation explain the mechanics.

Continue with one HTTP dependency

Your application and test harness decide whether a response produces the right behavior. Follow the Quick Start to prepare a request, or use the worked client-bug example to connect a response to an application assertion.

Resources

Explore the system and its requirements

Technical architecture

Container boundaries, interfaces, storage and the detailed operating model.

Read the architecture reference

Install in your environment

Prepare the supported stack and review its network requirements.

Read installation requirements

Review data handling

Understand retained copies, processing boundaries and configured external contacts.

Read Security

Run Gostly in your environment.

Start with the supported stack and one dependency your application uses.