Architecture
Server, worker, queue, database, and blob storage — how the pieces fit.
Components
UI server — The Next.js app and the only entry point: it forwards API calls under /api/hub
to the server, which is reachable on the internal network only.
Server — HTTP API, request validation (OpenAPI), cron scheduler, SSE streaming. It enqueues jobs and applies their results to its own tables.
Worker — A Node process that claims jobs from Postgres: deploy indexing, build
agent prompts, and flow runs, which it executes in its flow-sandbox. See
Flow execution.
PostgreSQL — Source of truth for flows, executions, schedules, and API tokens, and the job
queue: workers claim jobs with SELECT … FOR UPDATE SKIP LOCKED and write their output as job
events, which the server streams to SSE clients.
Blob storage — Flow bundles, uploaded files and finished runs' output.