Skip to main content

Component Relationships

How Studio, Server and Hub interact in each deployment mode.

Components​

ComponentPurposeStackDefault port
StudioVisual workflow designerReact, Xyflow, Vite; Electron, Tauri or browser25810 (dev server)
ServerWorkflow execution enginePython, FastAPI, Polars25811
HubTeam orchestration platformFastAPI, React, PostgreSQL25802 (API and web app), 25803 (dev frontend)

Ports follow a 258xx pattern. PostgreSQL uses 25801 in development, and the docs dev server uses 25809.

Execution modes​

Studio's Settings > Execution chooses one of three modes (executionMode in the settings):

ModeMeaningUse case
bundledThe desktop shell runs a Server that ships inside the appOne person, one machine
externalStudio talks directly to a Server you runDevelopment, self-hosted
hubStudio gets a token from Hub, then talks to a Server that Hub picksTeams

Mode 1: Bundled Server​

Both desktop shells come in a Full variant that bundles the Server and a Client variant that does not. Electron ships the Server binary as an extra resource. Tauri ships it as a sidecar. The Tauri Full build is selected at compile time by the bundled-server Cargo feature. The Packaging page has the build details.

How it works:

  1. On launch, the shell starts the Server and injects a random session token (AUTH_MODE=ephemeral, SESSION_TOKEN=<token>) plus writable data paths.
  2. The shell waits for /api/health/.
  3. Studio sends workflows to http://localhost:25811 with the token.
  4. On exit, the shell stops the Server.

Studio's defaults for this mode:

{ executionMode: 'bundled', backend: { url: 'http://localhost:25811', autoStart: true, previewRows: 100 } }

Client connections are stored in the operating system's credential store: Electron safeStorage or the Tauri keyring crate.

Mode 2: External Server​

The user sets the Server URL in Studio. The Server's AUTH_MODE decides what Studio must present:

AUTH_MODEStudio needs
disabledNothing. Development only.
staticThe token that the Server has in SESSION_TOKEN
ephemeralThe token the Server generated at startup (or that SESSION_TOKEN sets)

Configuration of the Server side is in Server Configuration.

Mode 3: Hub​

Details of the current implementation:

  • Server tokens are random opaque IDs kept in a token store (memory by default, PostgreSQL optionally). A token records the user and the Server it is for. It is single-use and expires after SERVER_TOKEN_TTL_SECONDS (300 by default).
  • Studio asks for a fresh token for each request, because each one is consumed when the Server authorizes it.
  • The Server authenticates to Hub's internal endpoint with its own HUB_SERVER_TOKEN, which is the identity Hub registered for it.
  • Hub picks the Server. With no preference it chooses the least-loaded online Server (fewest queued or running executions, ties random).
  • Hub logs capability.token_issued and authorize.* events in its hash-chained audit log.
  • The Server registers with Hub, and re-registers every 30 seconds, when HUB_URL and HUB_SERVER_TOKEN are set. See Server Management.

Hub can also run workflows itself, for schedules and for the Run Now button in its web app. It calls POST /api/workflow/execute on a Server directly, as the triggering user (manual runs) or the schedule creator (scheduled runs). See Hub Architecture and Hub Open Beta.

Studio's settings for this mode:

{ executionMode: 'hub', hub: { url: 'https://hub.example.com', rememberLogin: true, sessionToken: '...' } }

Connection ownership​

OwnerStored inManaged byNotes
clientThe OS credential store on the user's machineThe user, in StudioCredentials are sent to the Server with each request that needs them
hubHub's database, encryptedHub administratorsThe Server fetches credentials from Hub at request time
serverconnections.json on the ServerA Server administratorDeprecated. Prefer Hub connections

Security by mode​

AspectBundledExternalHub
AuthenticationPer-launch tokenStatic token, per-launch token or noneHub session, then single-use Server token
Credential storageOS credential storeOS credential store (client)Hub database (encrypted)
Access controlSingle userNone beyond the tokenRoles, groups and grants
AuditServer request logServer request logHub audit log plus Server request log

When to use each mode​

ModeBest for
BundledIndividuals, desktop work, offline work
ExternalDevelopers, a single shared Server
HubTeams, several environments, shared credentials

See also​