How Captain Works in Your Cloud
This install is Captain File Search running in a Google Cloud project that belongs to you, and your team runs it. It serves the same API as hosted Captain, so an application written for one works against the other, but everything the install stores and every model call it makes stays in your project. Captain supports the install by preparing and delivering patches and new versions, and once the health report is on it receives basic health telemetry about the install's pods, but it never receives logs or any of your data.
This page describes this install in particular. The Captain BYOC pages cover the edition in full: Installation, the Security Model, Model Endpoints and Data, Operations, Compliance and the Security FAQ. An install runs on Google Cloud (GKE) or AWS (EKS). The names below are the Google Cloud ones. For AWS, contact your Captain team.
How it works
An install is built up in three layers, and your team creates all three with one installer:
-
Cloud resources: The installer uses Terraform to create the network, the GKE cluster, the Postgres database, the bucket, the identities, the secrets and the encryption keys in your Google Cloud project, and it reserves the one private address that people and applications use to reach the install.
-
Software: The installer then installs one Helm chart onto the cluster, taking every image from a registry in your own project. It contains the API, the web app, the workers, the parser and Captain Vector DB, and it finishes with a check that calls every part once.
-
Models: Indexing and search call the model endpoints your team chose. By default that is Vertex AI in the same project, reached on Google's private addresses with each pod's own identity, so no model key is stored anywhere.
Your team runs the installer under its own Google identity, and each new version arrives as an offline bundle that your team loads into its own registry. Captain prepares each patch and new version, and it is applied by your team or by Captain's support team with access you grant for that purpose, limited to the install and revocable at any time.
These are the components the software layer installs:
| Component | What it does | Runs as |
|---|---|---|
| API | Collections, indexing, search, sync, evaluations and parsing. It is also the sign-in issuer | Deployments captain-api and captain-api-query (searches) |
| MCP server | Serves the same collections to agents, with API keys | A container beside the API |
| Web app | The signed-in application: API keys, playground, documents, sync, activity, settings | Deployment captain-app |
| Workers | Read, chunk, tag and embed files. One worker type per kind of file | One Deployment per worker type |
| Captain workflows (Temporal) | Run indexing, evaluation and parse jobs. A job carries on from its last finished step after a restart | Temporal's own pods |
| Parser | Turns PDFs into text, tables and figures with your vision model | Deployment captain-parser |
| Word converter | Converts Word files to PDF before parsing | Deployment, reachable by the document worker only |
| Captain Vector DB | Stores vectors, chunk text and the keyword index | StatefulSet, two replicas by default |
| Postgres (Cloud SQL) | Accounts, collections, documents, jobs, activity, audit records and settings | Managed by Google, private address only |
| Bucket (Cloud Storage) | Uploaded files, parser output, indexing work files and Captain Vector DB snapshots | Managed by Google |
| Outbound proxy | Reads sources in SharePoint, AWS or Azure | Deployment captain-sync-proxy, when such a source is configured |
| Docs | These pages, with every example pointing at this install's own addresses | Deployment captain-docs |
Every component is reached through one private address, and Networking explains how to reach it from your networks.
How a file becomes searchable
A file arrives by upload, as text in the request, or from a bucket in Cloud Storage, Amazon S3, Azure Blob Storage or Cloudflare R2, and each request returns a job id that GET /v2/jobs/{job_id} reports on. A Captain workflow hands each file to the worker for its kind. Word files are converted to PDF, the parser reads each PDF page with your vision model, spreadsheets are cut into bands of rows with the header repeated, and images are described by your vision model. The content is then cut into chunks along its headings, paragraphs, tables and figures, and each chunk is tagged, embedded and written to Captain Vector DB. When the last chunk is written, the new content is searchable.
A sync keeps a collection current with its source. Google Cloud Storage changes arrive through Pub/Sub in your project within seconds, and Amazon S3, Azure Blob Storage and SharePoint are read through their own change queues and a scheduled pass.
How search works
A search is one request to POST /v3/collections/{name}/query, and the install answers it in four steps:
- Keyword search finds chunks whose words match, which suits part numbers, names and codes.
- Vector search finds chunks that answer the question in different words.
- Fusion merges the two lists, weighted by
semantic_ratio(0.5by default). - Rerank puts the best candidates in order with your rerank model, which is Google's ranking service in your project by default.
A search returns chunks with their text, their source document, their page range and their metadata, so your application stays in control of what is shown. The web app's chat searches the same way and then asks your chat model to answer from the chunks it found.
What Captain sees
Captain receives basic health telemetry about the install's pods, so it can support the install, and nothing else. Your team switches the health report on during the install, together with the Captain team, and an Admin can also download the same report and send it by hand.
| What Captain receives | Examples |
|---|---|
| Health status | Which pods are running, their readiness and restarts |
| Resource use | Pod and node counts, memory and disk use, and worker pool sizes |
| Install metadata | A random install id, and the versions and image builds installed |
| Counts | Captain workflows and their outcomes, errors by code, and model calls by job and provider |
Captain never receives logs, file contents, file names or paths, collection names, queries, chat, chunk text, metadata values, the names of people, model names or keys. The Monitoring page shows the exact report as it would be sent, and keeps every report that was sent or downloaded with who made it.
Everything else stays in your project. Files and parser output are in the install's bucket, chunks and vectors in Captain Vector DB, accounts and activity in Postgres, secrets in Secret Manager, and logs in a log bucket of the install's own. Page images, chunk text and queries go only to the model endpoints you chose, which by default is Vertex AI in your own project.
If your team names its address, the install also reads Captain's signed release list every few hours, so Settings can say when a newer version exists. That request sends nothing about the install.
Find a request in the logs
Every Captain service writes its logs to Cloud Logging as JSON, one line per event. Each line carries the install's name, the service that wrote it (captain-api, captain-worker, captain-parser and so on), and the ids of the request, job and organization it belongs to, and no line holds document text or query text. Every API response returns its request id in the X-Request-ID header. Your application can also send its own UUID in that header, and the install then uses it, so a request your application logged can be found here later.
To see everything one request caused, including the job it started and the workers' and the parser's steps for that job, search for its id:
gcloud logging read --order=asc --freshness=1d \
'resource.type="k8s_container" AND resource.labels.namespace_name="captain" AND jsonPayload.request_id="<request id>"' \
--format='table(jsonPayload.time, jsonPayload.service, jsonPayload.level, jsonPayload.event, jsonPayload.message)'A job id, the one GET /v2/jobs/{job_id} takes, works the same way with jsonPayload.job_id. The API logs each call it makes to Captain Vector DB with the request id, and Captain Vector DB's own lines are selected with labels."k8s-pod/app_kubernetes_io/name"="captain-vector-db".