Skip to content

Architecture

Prologue is deliberately self-contained and has no dependency on Studio. The Extractor and Receiver are ordinary services, while the Interpreter supports two hosting shapes: a run-to-completion batch process and a resumable HTTP service. Only the resumable service mode embeds an Orleans silo; file-based capture and batch interpretation do not require Orleans.

cratis/prologue-interpreter

cratis/prologue-receiver

cratis/prologue-extractor

reverse proxy

JSON capture files

HTTP POST

Extractor

Receiver

Batch mode

Service mode

Orleans silo

Your system

Mounted folder

MongoDB

extraction-result.json

+ .play

SessionResult over HTTP

  • Extractor — a reverse proxy plus a database and telemetry watcher, all in one process. It’s the only piece that has to run continuously, next to the system it’s watching.
  • Receiver — a thin HTTP endpoint (POST /captures, POST /prologues/{id}/captures) that stores whatever the Extractor posts to it in MongoDB via Cratis.Prologue.Storage. It’s optional — the Extractor can write JSON files to a mounted folder instead, with no Receiver or MongoDB involved at all.
  • Interpreter — a job, not a service, by default. It reads a folder of capture files, interprets them, and exits. A second mode embeds Orleans and keeps interpretation running as resumable session grains with state backed by MongoDB.

The shared Cratis.Prologue.Contracts, Cratis.Prologue.Configuration, and Cratis.Prologue.Interpreter.Contracts packages define the canonical capture, configuration, and extraction-result formats. Cratis.Prologue.Interpretation contains the interpretation engine, and Cratis.Prologue.Screenplay converts an extraction result into a .play document.

yes

no

Batch mode (default)

run-to-completion job

Reads /captures folder

Writes extraction-result.json + .play

to /output, then exits

Service mode

--serve or PROLOGUE_MODE=service

Resumable HTTP session

state persisted in MongoDB

Idle beyond timeout,

or awaiting an answer

past the grace period?

Container exits cleanly

— an orchestrator restarts it to resume

Batch mode is what you get from the image by default, and what the Cratis CLI’s cratis prologue interpret drives — a folder of captures in, an ExtractionResult and a Screenplay .play file out, then the container exits. See Running the Interpreter.

Service mode embeds an Orleans silo and hosts interpretation as resumable session grains over HTTP. Session state persists in MongoDB, so a session waiting for answers can resume after the process restarts. This mode is intended for interactive integrations; use batch mode when you only need file-based input and output.

Nothing here requires Studio to be running. If you only want an ExtractionResult and .play file, the Extractor and batch Interpreter are the complete Prologue pipeline; the Cratis CLI provides the corresponding command workflow.