The deployment pipeline
Splitting a backend into seven services only pays off if shipping them stays cheap. That is where most of the engineering went: making seven services as cheap to ship as one.
Swae deploys through twelve GitHub Actions workflows arranged as a workflow_run dependency chain, so a push turns into a deployment without anyone babysitting it.
A push to the staging branch starts the chain. The build workflow runs a change-detection script that diffs the push and selects only the services that actually changed, then builds those images across a matrix and pushes them to Artifact Registry.
When it finishes green, GitHub fires the next workflow on its workflow_run completion event. That one runs tofu plan and tofu apply against GCS-backed remote state to roll the new revisions onto Cloud Run. Its success triggers the gateway workflow, which recomposes the supergraph and redeploys Hive Gateway, but only after the services it depends on report healthy. A final workflow publishes the gateway revision.
Two details carry most of the weight. First, authentication: every stage talks to GCP through Workload Identity Federation, exchanging a GitHub OIDC token for a short-lived, scoped credential. There is no service-account key stored anywhere, so there is nothing to leak and nothing to rotate.
Second, ordering: the chain encodes the real dependency between services and the gateway. The supergraph is only valid once its subgraphs exist, so gating the gateway deploy on healthy services prevents the classic federation failure where the router advertises a schema its backends cannot answer.
Production mirrors the same chain off the main branch, scoped to a separate GCP project, with a manual approval gate before apply. The promotion path from a laptop to staging to production is the same shape every time. That is the property you actually want when you are the one on call for it.
The AI plane
The agent service is where retrieval and reasoning live. It runs a set of LangGraph graphs (chat, journal, and review flows) over a hybrid RAG pipeline: embeddings in Qdrant, plus structured pulls from the other domain services through typed clients. Vision and NLP handlers process uploaded images and free text into something the graphs can use. The retrieval step is isolated behind a single seam, currently served by Qdrant.
Where We’re Going
The gateway makes the next step small. Turning Swae into an agentic Health OS takes two passes: first a conversation layer that sits in front as a client, then a set of skills that let it read and write Swae through the same typed supergraph every other client already uses. The first pass is in progress.