You are helping somebody set up OpenBot: on their own machine, on a server, or on a Kubernetes
cluster.

Read this whole file before running anything. Every claim in it was checked against the code in
this repository; if something here disagrees with what you see, trust the repository and say so.

ASK THIS BEFORE YOU DO ANYTHING ELSE

There are three supported paths, and they are different jobs:

  A. They want a server/container deployment. Use the published Docker image and an env file.
  B. They want to try OpenBot on their own machine, change OpenBot itself, or edit a tenant package
     from source. Use the clone.
  C. They want OpenBot on a Kubernetes cluster (EKS, GKE, AKS or their own). Use the Helm charts
     published with each release.

There is also a desktop app, OpenBot Personal Edition, for somebody who only wants to use OpenBot
on their own computer, not deploy it or change it. It runs the workspace and CopilotKit
Intelligence locally. Send them to its installer instead of any path below:

  Mac (Apple silicon)  https://downloads.copilotkit.ai/latest/OpenBot-mac-arm64.dmg
  Mac (Intel)          https://downloads.copilotkit.ai/latest/OpenBot-mac-x64.dmg
  Windows (x64)        https://downloads.copilotkit.ai/latest/OpenBot-windows-x64-setup.exe

OpenBot is a template to make your own and white-label, not a hosted product somebody signs up for.
The container runs it as released, and so do the charts, on a cluster; the clone is for running
it locally and for changing the product, tenant package, Bots, channels, skills, or branding.

A. SERVER OR ONE-CONTAINER DEPLOYMENT

Use this when they are deploying a container.

  docker run -p 3001:3001 --env-file .env \
    -e EMBEDDED_POSTGRES=on -v openbot-data:/var/lib/postgresql \
    ghcr.io/copilotkit/openbot:latest

One port. The app is on 3001 as well, so open http://localhost:3001, not 3010. `latest` is the most
recent release; a version tag such as `:v1.0.1` pins one.

The env file still needs INTELLIGENCE_API_KEY, a model credential, a real KEY_ENCRYPTION_KEY, and
either an identity provider or OPENBOT_SINGLE_USER=true. Start from `.env.example` in this
repository, or write the handful by hand. `EMBEDDED_POSTGRES=on` runs PostgreSQL inside the
container, creates the database and the `vector` extension the first time, and applies migrations on
every start. With your own DATABASE_URL, leave EMBEDDED_POSTGRES off and enable the `vector`
extension in that database.

Mount the volume at `/var/lib/postgresql`, the parent, not `/var/lib/postgresql/data`. `initdb` will
not initialize into a directory that already contains `lost+found`.

The one-container image does not carry the separate framework Bot images that `docker-compose.yml`
starts. Leave MANAGED_AGENT_AG_UI_URL unset unless a Bot endpoint is actually reachable from this
container. If their `.env` sets it to the laptop address `http://127.0.0.1:4201/`, unset it for
this path. See docs/deployment.md for platform notes, sizing and migrations.

The server starts only with a CopilotKit license in COPILOTKIT_LICENSE_TOKEN, or with none and an
Intelligence key that the Intelligence at INTELLIGENCE_API_URL accepts. Managed Intelligence issues
no license, so there the key is enough.

B. CLONE: RUN OPENBOT LOCALLY, CHANGE IT, OR EDIT A TENANT PACKAGE

Use this to run OpenBot from source on their machine, or to edit code or configuration.

Requirements for the clone path:
- Bun 1.4.3. The repository pins it in package.json.
- Docker CLI plus Docker Compose, or a compatible `docker` command/socket. `scripts/start.sh`
  calls `docker compose` for PostgreSQL, the API server, the Bots' computers and the shipped Bot;
  Podman works only when it is exposed through that Docker-compatible command path. The server,
  the computers and the supervisor run from the published OpenBot images, which start.sh pulls at
  the tag in backend-images.env. Only the app runs from the clone.
- Node/npx, only for the CopilotKit CLI.
- A CopilotKit account. Free is enough.
- A model credential. The current source tree supports OpenAI or Anthropic for the example built-in
  Bots and the LangGraph framework Bot. Use the provider-specific key and model variables below.
  Google is supported by the LangGraph framework Bot, not by the example built-in package model.

Fresh clone setup needs a CopilotKit sign-in and a model credential (OPENAI_API_KEY by default).
`.env.example` leaves the two Intelligence addresses and the key empty. By default the CopilotKit
CLI fills all three for an Intelligence on their own machine (LOCAL, below). For a managed project
(MANAGED, below) they write the two managed addresses and the setup helper writes the key and the
Learning container assignment. Ask which they want; on macOS with Docker Desktop, local is the
default.

`scripts/start.sh` fills the local secrets it owns: COMPUTER_TOKEN has a dev default, and
MANAGED_AGENT_TOKEN plus AGENT_TOOL_TOKEN are generated and written back into `.env`.
Everything else in `.env.example` is either already correct, optional, or generated. Do not walk the
person through every blank line.

The clone commands are:

  cp .env.example .env
  bun install

MANAGED. They set these two lines in `.env`, which the example leaves empty:

  INTELLIGENCE_API_URL=https://api.intelligence.copilotkit.ai
  INTELLIGENCE_GATEWAY_WS_URL=wss://realtime.intelligence.copilotkit.ai

then run:

  npx --yes copilotkit@latest login           # opens a browser
  npx --yes copilotkit@latest project select  # selects the managed project
  bun scripts/setup-learning.ts             # provisions its key and openbot Learning container

`login` opens a browser on their machine. Where there is none (over SSH, in a container), they run
`npx --yes copilotkit@latest login --device` and enter its code in a browser on any device.
`project select` asks in the terminal and needs a TTY; without one, name the project:
`npx --yes copilotkit@latest project select --project <slug or id> --json`
(`npx --yes copilotkit@latest project list --json` lists them).

The helper preserves custom targets and refuses to replace an existing INTELLIGENCE_API_KEY.
For fresh self-hosted setup, set INTELLIGENCE_API_URL to its HTTPS API origin (or HTTP on
localhost) and run only
bun scripts/setup-learning.ts after bun install; skip the managed npx commands. Chrome or Edge
must be installed. Sign in through the isolated browser window and choose an accessible project;
the helper creates or reuses openbot and writes that project's new runtime key and assignment.
Existing key-only setups use authenticated Intelligence administration to create a container and
assign it in OpenBot Admin. Automatic Learning defaults on;
collection and delivery require an assigned container. OpenBot starts and chats without one. Administrators
can assign a default container, override or exclude individual Bots, or pause Learning at
Admin → Automatic Learning. Open Intelligence to review and publish proposed skills. Containers
belong to the same project; changing a mapping applies to new threads and does not move or backfill
old evidence. Operators may seed a default with CPK_INTELLIGENCE_LEARNING_CONTAINER_ID on the API server;
CPK_INTELLIGENCE_SKILLS_REVISION optionally pins a published revision. Saved Admin settings take
precedence, including off. Keep the project key server-side and use the existing Intelligence UI
for management (a runtime project key cannot authorize those writes). See docs/automatic-learning.md.

LOCAL, the default. Intelligence runs on their own machine, installed by the CopilotKit CLI: see
https://docs.copilotkit.ai/intelligence/self-hosting-local. It is a preview for macOS with Docker
Desktop, not a production installation, and the free Developer plan qualifies. They run, from the
OpenBot root where `.env` is, after `cp .env.example .env` and `bun install`:

  npx copilotkit@latest login
  npx copilotkit@latest local setup
  npx copilotkit@latest local connect --approve-connection

`local connect` writes INTELLIGENCE_API_URL, INTELLIGENCE_GATEWAY_WS_URL and
CPK_INTELLIGENCE_API_KEY to `.env`. OpenBot reads those values directly; do not copy or rename
the key. INTELLIGENCE_API_KEY remains a legacy fallback when the CLI key is empty or absent.
When both are set, the non-empty CLI key takes precedence. The local license lasts 30 days;
`npx copilotkit@latest local renew` renews it as often as needed while the account is in good
standing. Skip the managed `project select` and setup-learning commands on this path.

There is no license step for managed Intelligence. `copilotkit license` still exists for self-hosted Intelligence, and
COPILOTKIT_LICENSE_TOKEN is honoured when set, but managed Intelligence needs only the cpk- key.

For manual key-only setup, put the `cpk-...` key in `.env` as INTELLIGENCE_API_KEY. For the default
OpenAI path, put the model key in OPENAI_API_KEY. For Anthropic, set both lines:

  ANTHROPIC_API_KEY=...
  BOT_PROVIDER=anthropic

BOT_MODEL is optional. docker-compose leaves it empty when unset; then the API server's model list
defaults to the middle of the provider's current line (a Claude Sonnet model) and the LangGraph Bot
uses claude-sonnet-5-5, the Anthropic default in shared/model-providers.json. Set BOT_MODEL only to
name a model. For a compatible endpoint, set OPENAI_BASE_URL, OPENAI_API_KEY if that endpoint needs
one, and BOT_MODEL to the model name the endpoint publishes. Do not paste ChatGPT or Claude
browser-session tokens into `.env`.

Then:

  bash scripts/start.sh

It starts Docker services, starts the API on 3001 from the published OpenBot server image (at the
tag in backend-images.env), which applies its own migrations as it starts and fires routines itself,
starts the app from the clone on 3010, and waits for each service to answer its own health route. Open http://localhost:3010. The
server's log is `docker compose logs server`.

`bash scripts/stop.sh` takes down the app, API server, Docker services, and each Bot's
computer. Pass `--keep-computers` only when they deliberately want browser sessions left signed in.
Nothing is deleted either way: the database, files and browser profiles are volumes.

C. KUBERNETES: THE HELM CHARTS

Use this when they are deploying to a Kubernetes cluster. Each GitHub release publishes two charts,
with their dependencies inside, and no Helm repository or registry:

- `openbot-bundle-<chart version>.tgz`: OpenBot and CopilotKit Intelligence together, on one
  PostgreSQL server. Intelligence is self-hosted, with its own Redis and object storage, and the
  chart makes OpenBot's organization, project and key in it. Nobody signs in to Intelligence.
  v1.1.0 attaches openbot-bundle-0.1.0.tgz.
- `openbot-<chart version>.tgz`: OpenBot alone, pointed at an Intelligence that already runs,
  managed or self-hosted, by `config.intelligence.apiUrl`, `config.intelligence.gatewayWsUrl` and a
  project key. v1.1.0 attaches openbot-0.3.0.tgz.

Ask which they want. Somebody with no Intelligence yet wants `openbot-bundle`; somebody on managed
Intelligence, or with a self-hosted one already running, wants `openbot`. Each chart's full guide
comes with it:

  helm show readme https://github.com/CopilotKit/OpenBot/releases/download/v1.1.0/openbot-bundle-0.1.0.tgz
  helm show readme https://github.com/CopilotKit/OpenBot/releases/download/v1.1.0/openbot-0.3.0.tgz

Either way OpenBot runs two API replicas and one shared Bot computer. Its server migrates its own
database as it starts and does the scheduled work itself: there is no migration Job and no CronJob.

What the cluster needs first:
- kubectl and Helm pointed at the cluster they mean. Check `kubectl config current-context` with
  them before installing anything.
- amd64 or arm64 nodes. The OpenBot image is published for both. The embeddings server
  `openbot-bundle`'s Intelligence runs for Memory is amd64 only: on arm64 nodes add
  `--set intelligence.embeddings.enabled=false` to the install, and Memory recalls by keyword.
- A default StorageClass (`kubectl get sc` marks it default). Every volume the install asks for uses
  it unless a `storageClass` value names another. A cluster made with eksctl has none marked
  default; the chart README shows the gp3 class to create.
- For `openbot-bundle`, about 3.15 vCPU of requests while it runs, plus about 0.4 vCPU while the
  install Jobs run. On EKS, two t3.large nodes come out short and the last pod stays Pending; use
  three, or larger nodes. `openbot` alone requests about 1.1 vCPU.
- For `openbot-bundle`, a CopilotKit license for its self-hosted Intelligence. They run,
  themselves:

  npx --yes copilotkit@latest login
  npx --yes copilotkit@latest license --print

  For `openbot` on managed Intelligence, the runtime key instead, which they print themselves with
  `npx --yes copilotkit@latest project select` after the login. The license is then optional.
- A model key: OpenAI, or Anthropic.

1. They write the secrets into a file outside the repository that is never committed. You write
   the skeleton; they fill in the values. For `openbot-bundle`, OpenBot's values go under
   `openbot:`:

  cat > ~/openbot-values.yaml <<EOF
  openbot:
    config:
      singleUser: true
    secrets:
      licenseToken: "<their CopilotKit license>"
      modelApiKey: "<their OpenAI API key>"
  EOF

   For `openbot` on managed Intelligence, the same values sit at the top level, with Intelligence's
   addresses, the runtime key and OpenBot's bundled PostgreSQL (`postgresql.enabled`, off in the
   chart's own defaults):

  cat > ~/openbot-values.yaml <<EOF
  config:
    singleUser: true
    intelligence:
      apiUrl: https://api.intelligence.copilotkit.ai
      gatewayWsUrl: wss://realtime.intelligence.copilotkit.ai
  postgresql:
    enabled: true
  secrets:
    intelligenceApiKey: "<their cpk-... runtime key>"
    modelApiKey: "<their OpenAI API key>"
  EOF

   With Anthropic, use `anthropicApiKey` in place of `modelApiKey`, and add `provider: anthropic`
   under `config.model` (`openbot.config.model` for the bundle) in the same file.

2. Install, with the chart they chose:

  helm install openbot https://github.com/CopilotKit/OpenBot/releases/download/v1.1.0/openbot-bundle-0.1.0.tgz \
    --namespace openbot --create-namespace \
    --values ~/openbot-values.yaml \
    --timeout 15m

   (or `.../v1.1.0/openbot-0.3.0.tgz` for OpenBot alone). The chart generates the rest and reads it
   back on every upgrade: the key encryption key and the computer token in the Secret
   `openbot-secrets`, and the database password. `openbot-bundle` also generates every
   credential Intelligence needs, in Secrets named `openbot-intel-*`, OpenBot's Intelligence key
   among them (`openbot-intel-api-key`). All are kept on uninstall. Anybody restoring a backup of
   this database elsewhere needs the key encryption key: tell them it is `key-encryption-key` in
   `openbot-secrets`, and do not read it out yourself.

   A first install takes several minutes. `kubectl -n openbot get pods,jobs` shows it coming up.
   Each OpenBot server pod waits in its `wait-for-database` init container until the database
   accepts its connection, then migrates the database as it starts; the replicas take turns
   (`kubectl -n openbot logs deploy/openbot-server -c wait-for-database` says what it waits for).
   With `openbot-bundle`, Intelligence's migrations Job retries until the database is up, and the
   log of the `openbot-intelligence-bootstrap-1` Job says what Intelligence set up.

3. Open it:

  kubectl -n openbot port-forward svc/openbot-server 3001:3001

   Then http://127.0.0.1:3001. Single-user mode makes whoever reaches the server its administrator,
   so it is reached only through that port-forward. The chart refuses `config.singleUser` with a `config.publicUrl` or with a
   LoadBalancer that has no source ranges; it does not refuse an Ingress or an HTTPRoute, so do not
   add either to a single-user install.

For a team, leave out `config.singleUser` and write their own values file with sign-in (under
`openbot:` for the bundle):
- One provider: `config.auth.google.clientId`, `config.auth.microsoft.clientId` (set `tenantId` to
  their directory; the default `common` admits personal Microsoft accounts), or
  `config.auth.okta.clientId` with `config.auth.okta.issuer`. Its client secret goes in
  `secrets.googleClientSecret`, `secrets.microsoftClientSecret` or `secrets.oktaClientSecret`.
- `secrets.betterAuthSecret`, at least 32 characters (`openssl rand -base64 32`).
- `config.publicUrl`, the https address people reach; the OAuth callback comes back to it.
- `config.initialAdminEmails`, comma-separated. Nothing else grants the administrator role.
- An Ingress (`ingress.enabled`, `ingress.className`, which has no default, `ingress.hosts`,
  `ingress.tls`) or a Gateway API route (`httpRoute.enabled`, `httpRoute.parentRefs`,
  `httpRoute.hostnames`), not both. With an Intelligence in the cluster, as `openbot-bundle` runs,
  the route sends Intelligence's gateway socket (`/client/websocket`) to Intelligence and everything
  else to `openbot-server`, so one host is enough. Managed Intelligence's gateway the browser
  reaches by itself.
- A database: the bundled one, or their own (below).

The database. The bundled one is not production-grade: no backups, failover or point-in-time
recovery. A real deployment points at RDS, Cloud SQL, Azure Database or its own server, with
credentials in a Secret rather than a values file, and keeps `?sslmode=require` (or
`parameters: sslmode=require`): managed databases refuse unencrypted connections. With a database
of their own the chart no longer generates the key encryption key or the computer token, so
`secrets.keyEncryptionKey` (`openssl rand -base64 32`) and `secrets.computerToken`
(`openssl rand -hex 32`) are required (under `openbot.` for the bundle), and they must keep the key
encryption key, because every stored credential is encrypted with it.

- `openbot-bundle` puts both products' databases on that server. The server needs pgvector 0.8.0 or
  later and an administrative role that can create roles, databases and extensions; neither product
  ever connects with it. They put its URL in a Secret:

  kubectl create namespace openbot
  kubectl -n openbot create secret generic openbot-database-admin \
    --from-literal=admin-url='postgres://ADMIN:PASSWORD@db.example.com:5432/postgres?sslmode=require'

  Then `postgresql.enabled: false`, `externalDatabase.host`, `externalDatabase.parameters:
  sslmode=require`, `externalDatabase.adminUrlSecret.name: openbot-database-admin` (key `admin-url`)
  and `openbot.database.inRelease: false`. A setup Job creates each product's database and role
  there before anything else installs.
- `openbot` reads OpenBot's database URL from a Secret:

  kubectl create namespace openbot
  kubectl -n openbot create secret generic openbot-database \
    --from-literal=database-url='postgresql://USER:PASSWORD@HOST:5432/openbot?sslmode=require'

  Then `database.existingSecret: openbot-database` and `postgresql.enabled: false`. The role in
  the URL must own the `vector` extension: the first migration creates it and a later one drops it,
  and only its owner can. Let that role create it (grant `rds_superuser`, `cloudsqlsuperuser` or
  `azure_pg_admin`), or create it after `SET ROLE` to that role; never pre-create it as an
  administrator. Otherwise the server stops as it starts with "must be owner of extension vector".

Intelligence:
- `openbot-bundle`'s needs the license. Given once as `openbot.secrets.licenseToken`, it reaches
  OpenBot (as COPILOTKIT_LICENSE_TOKEN) and Intelligence. With the license in a Secret of their own,
  also set `intelligence.appApi.licenseSecret.existingSecret` and `.key` to it.
- Its Secrets have fixed `openbot-intel-*` names, so install one bundle per namespace.
- Automatic Learning is on and spends their model key: `openai/gpt-5.5` on
  `openbot.secrets.modelApiKey`, or `anthropic/claude-sonnet-5-5` on `openbot.secrets.anthropicApiKey`
  when that is the only key; `learning.model` names another. Intelligence's dashboard is not
  installed; proposed skills are reviewed in OpenBot at Admin → Automatic Learning.
- `openbot` points at managed Intelligence (https://api.intelligence.copilotkit.ai and
  wss://realtime.intelligence.copilotkit.ai) or a self-hosted one by its own addresses, with
  `secrets.intelligenceApiKey`, the `cpk-...` key that `npx --yes copilotkit@latest project select`
  prints. The license is then optional. Learning runs in that Intelligence. A further `openbot`
  release can share the bundle's Intelligence with a project of its own; the bundle's guide shows
  how.

Bot computers, `computers.mode`:
- `shared`, the default: one computer for every person's Bots. Each person keeps a browser profile
  and folder per Bot, but one Bot's shell can read another's files.
- `sandbox`: a computer per person and per Isolated Bot, suspended when idle and resumed with its
  logins. The chart refuses to install until the agent-sandbox controller is in the cluster:

  kubectl apply --server-side -f \
    https://github.com/kubernetes-sigs/agent-sandbox/releases/download/v0.5.6/sandbox-with-extensions.yaml

- `external`: `computers.url` names one computer somebody else runs, shared like `shared`.

Scheduled work has nothing to configure: the server does it, in whichever replica is leading. It
fires due routines, deletes staged attachments nobody sent once they are 24 hours old
(`attachments.culler.olderThanHours`), and in `sandbox` mode suspends computers idle for 30 minutes
(`computers.sandbox.idleAfter`).

Upgrades: `helm upgrade openbot <the new release's chart> --namespace openbot`, the same chart they
installed, with the same `--values` files and `--timeout 15m`. With `image.tag` empty the image is
`v` plus the chart's appVersion (appVersion 1.0.1 deploys ghcr.io/copilotkit/openbot:v1.0.1);
`image.digest`, from the release's `container-images.json`, pins the exact image. Never use
`--reuse-values`: it drops the new chart's defaults, so new settings never arrive. After a failed
upgrade, pass the same values files again, because Helm reuses the values of the last revision that
succeeded. Each new server pod migrates the database as it starts while the old pods keep serving.

From the 0.2 chart, which installed Intelligence with OpenBot (`intelligence.enabled`, on by
default) and ran CronJobs and a migration Job: a release that still runs that Intelligence is
refused at upgrade to the `openbot` 0.3 chart, before anything in the cluster changes, because the
upgrade would delete that Intelligence and its conversations. The refusal gives the choice: keep the
release on the 0.2 chart, or install `openbot-bundle` as a new release in a namespace of its own. A
0.2 release that already pointed at an Intelligence of its own (`intelligence.enabled: false`)
upgrades to 0.3; the upgrade removes its CronJobs and migration Job, and a stored
`migrations.enabled: false` is refused, so they remove `migrations` from their values or add
`--set migrations=null`.

docs/kubernetes-upgrades.md covers `bun scripts/update.ts kubernetes plan|apply|gitops`, which
promotes a release of the `openbot` chart with a backup step; the Upgrades section of each chart's
guide covers the rest.

WHAT YOU MUST NOT DO FOR THEM
- Do not run `copilotkit login` or `copilotkit license --print`; the first signs in as them and the
  second prints their license. Tell them to run both.
- Do not put their API keys into any file you did not just tell them about, and do not echo
  values back.
- Do not type addresses into INTELLIGENCE_API_URL or INTELLIGENCE_GATEWAY_WS_URL for a local
  Intelligence: `copilotkit local connect` writes them, and each installation has its own ports.
  Only the two managed addresses, or a self-hosted deployment's own, are written by hand.
- Do not run `helm install` or `helm upgrade` before they confirm the cluster and namespace.
- Do not put a license, model key, client secret or database URL into a values file in the
  repository, or into any file that gets committed.
- Do not put a single-user install behind an Ingress, an HTTPRoute or a LoadBalancer.

FAILURES YOU WILL ACTUALLY SEE
The server refuses to start rather than running half-configured. The message names the variable.

- "OpenBot can't start without a licence, so set COPILOTKIT_LICENSE_TOKEN ... or
  CPK_INTELLIGENCE_API_KEY ..." No Intelligence key and no license: almost always the key was
  skipped. Run the setup helper, or set the key.

- "Intelligence at INTELLIGENCE_API_URL didn't accept CPK_INTELLIGENCE_API_KEY ..." (or naming
  INTELLIGENCE_API_KEY): the key belongs to another Intelligence than the address names, or was
  revoked. "OpenBot couldn't reach Intelligence at INTELLIGENCE_API_URL ...": that address did not
  answer for the whole wait.

- "COPILOTKIT_LICENSE_TOKEN isn't a valid CopilotKit licence ..." or "The licence in
  COPILOTKIT_LICENSE_TOKEN expired on ...": a license that is set must be valid. Replace it, or on
  managed Intelligence remove the line so the server starts on the key.

- "OpenBot needs Intelligence <version> or later, and the one at INTELLIGENCE_API_URL is missing
  ...": a self-hosted Intelligence older than this OpenBot needs. Update Intelligence.

- "CopilotKit Intelligence is required and is not configured. Missing: ..."
  Almost always INTELLIGENCE_API_KEY was skipped.

- "No identity provider is configured. Set GOOGLE_OAUTH_* ... or set OPENBOT_SINGLE_USER=true"
  `.env.example` already sets OPENBOT_SINGLE_USER=true. On a laptop, put it back. On a shared URL,
  configure real sign-in instead.

- "KEY_ENCRYPTION_KEY must be a base64-encoded 32-byte key"
  Generate one with `openssl rand -base64 32`. The example value is local-only.

- "Model credential is not configured for <Bot>. Add the package credential or set OPENAI_API_KEY."
  or the same sentence naming ANTHROPIC_API_KEY. Set the key for the provider the deployment is
  actually using.

- A port is taken: start.sh names the port and process. Re-run with APP_PORT=<free port> or
  SERVER_PORT=<free port>, or stop the other process.

- `.env is missing`: they skipped `cp .env.example .env`.

On Kubernetes each chart refuses a bad install before creating anything, and names the value:
- "Intelligence is self-hosted here and needs the CopilotKit licence." (`openbot-bundle`)
  `openbot.secrets.licenseToken` is missing, usually because their secrets file was not passed.
- "OpenBot requires CopilotKit Intelligence. Set config.intelligence.apiUrl and
  config.intelligence.gatewayWsUrl, and a project key ..." (`openbot`) One of the two addresses
  or the key is missing.
- "No database." They installed `openbot` without `postgresql.enabled` and named no database.
- "Nobody could sign in." Neither `config.singleUser` nor an identity provider is set.
- "secrets.keyEncryptionKey is required with a database of your own" or "A computer needs a
  token": an external database needs `secrets.keyEncryptionKey` and `secrets.computerToken`.
- "This release still runs the Intelligence an earlier version of this chart installed with it
  ...": a 0.2 release with its bundled Intelligence, upgraded to the `openbot` 0.3 chart. Nothing
  changed. Keep it on the 0.2 chart, or install `openbot-bundle` as a new release in a namespace of
  its own.
- "migrations.enabled is false, and there is no migration Job left for it to switch off ...":
  remove `migrations` from their values, or add `--set migrations=null` to an upgrade that reuses
  the stored ones.

After the install:
- A pod stays Pending: `kubectl -n openbot describe pod <pod>`. "Insufficient cpu" means another
  node; a volume claim that never binds means no default StorageClass.
- ImagePullBackOff on the embeddings image: arm64 nodes; install with
  `--set intelligence.embeddings.enabled=false`. On the OpenBot image: a wrong `image.tag`, a
  missing pull secret, or arm64 nodes on a release up to 1.0.2, which published amd64 only.
- The server stops as it starts, or waits in `wait-for-database`, with "no pg_hba.conf entry for
  host ... no encryption": add `?sslmode=require` to the database URL. With "must be owner of
  extension vector": another role owns the extension; see "Your own database" in the `openbot`
  chart's guide.
- OpenBot logs `intelligence-entitlement-not-ready`: the self-hosted Intelligence has no valid
  license.
- With `openbot-bundle`, an upgrade stops with UPGRADE FAILED and the
  `openbot-intelligence-learning-queue-migration-<n>` Job ran out of time while the PostgreSQL
  server restarted: run `helm upgrade` again once that pod is Ready.

HOW TO KNOW IT WORKED

For a clone, `curl -s 127.0.0.1:3001/api/v2/organizations/default/deployment` should return JSON
with an `"edition"`. On Kubernetes, `curl -s 127.0.0.1:3001/api/copilotkit/info` answers through
the port-forward, and `kubectl -n openbot get pods` shows nothing Pending, crash-looping or failing to pull. Then use the
app, not just curl: ask a Bot to open a public site in its
browser, report something visible on the page, and show a small chart. A plain text/math answer is
not enough for the main path because it does not prove browser tools or component rendering.

WHEN THEY WANT TO MAKE IT THEIRS

The Bots, channels and skills are configuration: `examples/fintech` is a worked example pointed at
by TENANT_PACKAGE_DIR. Copy it, edit `agents.yaml`, and point TENANT_PACKAGE_DIR at the copy.
The server runs from `/app/server` in its image, so TENANT_PACKAGE_DIR is relative to that; the
default is `../examples/fintech`, not `examples/fintech`.

Further reading: README.md, docs/development.md, docs/deployment.md, each chart's guide
(`helm show readme`) and docs/kubernetes-upgrades.md for Kubernetes, and docs/configuration.md for
every variable.
