What you will learn
- Name the three things that a new organisation environment needs, and who builds each on Choreo Cloud
- Follow the orchestrator recipe path, step by step, and say what the three recipe steps make
- Follow the older platform-api hook path, and say where it still applies
- Say which flag switches which part, and which environments use which path
- Compare both paths with the on-prem add-environment script
Before you start
- Who talks to whom on Choreo Cloud Not started In progress Done
- Create an environment and its gateway Not started In progress Done
On this page
A new organisation environment needs a gateway for its traffic and an identity service for its agents. On-prem, lesson L4.1.3 showed that you create both with one script. On Choreo Cloud nobody runs a script. Services on cloud-cp build them, and there are two ways they can do it. This lesson follows both.
What has to be built
For one organisation and one environment, three things are needed.
- The environment itself, an OpenChoreo environment with its namespaces and base set.
- An identity data plane, the ThunderID that holds the agents’ identities for that environment (lesson L12.2.4).
- An AI gateway, the API Platform gateway that carries the agents’ traffic and connects back to Agent Manager.
The services that build them run on cloud-cp: the orchestrator runs recipes, platform-api applies hooks, agent-manager-provisioner makes the gateway, and identity-platform-provisioner makes the identity data plane. No Argo Workflow and no Terraform run is part of this in the code read. Terraform only prepares the clusters and databases once, and Argo runs customer builds and evaluations.
Two paths
| Orchestrator path | Older platform-api path | |
|---|---|---|
| Where it applies | dev, stage-v2, prod-v2, prod-v2-eu | stage and prod |
| Who makes the gateway | agent-manager-provisioner, called by the orchestrator | The platform-api gateway hook |
| Trigger | A first sign-in, or a new environment | The creation of an organisation or an environment |
Path A: the orchestrator recipes
The recipe
A RecipeA checklist of setup steps that the orchestrator runs for an organisation and environment. Each step reuses what already exists, so running a recipe twice does no harm.See it in the glossary is a checklist that the orchestrator runs. The one for Agent Manager is called agent-manager, and it has three steps, each depending on the one before.
| Step | Run by | What it makes |
|---|---|---|
| base | platform-api, on the wso2cloud-base control plane | The environment’s namespaces and the base set. No gateway, and no per-environment ThunderID of the older kind. |
| thunder | identity-platform-provisioner | The identity data plane of the environment, which stays with the environment. |
| agent-manager | agent-manager-provisioner | The environment’s AI gateway, registered in Agent Manager. |
Each step is reused when its instance already exists, so running the recipe again converges on the same objects.
What starts it
There are two triggers.
- A first sign-in. Billing announces on NATS that an organisation activated Agent Manager. The provisioner’s durable consumer receives the notice and asks the orchestrator to run the recipe, once for each configured environment, with a unique key so a repeat does not start the work twice. This runs where first sign-in provisioning is on.
- A new environment. When an environment is created, platform-api first decides who provisions it. With the setting
environment_provisioneratorchestrator, the orchestrator does it when the organisation already has an environment to replay. OpenChoreo creates the Environment and platform-api announces it on NATS. A subscriber then calls the orchestrator for the environment recipe and replays the recipes of the organisation’s latest environment, includingagent-manager.
One caution about the replay. The step in which the subscriber replays the organisation’s recipes is read from the recipe file. No run of it is shown in the files, so treat it as how the recipe is written to behave.
What the provisioner does in the agent-manager step
The orchestrator calls the provisioner through the internal gateway, only as a trusted client, with the organisation in X-Impersonate-Org. The call answers at once that it has started, and the provisioner works in the background.
It registers the environment's identity in Agent Manager
It tells Agent Manager where the environment’s identity platform is. It also registers the gateway and the identity provider the gateway trusts. The calls use the client AGENT_MANAGER_GATEWAY_REG with a token that carries the organisation.
It stores the gateway's token
It mints the gateway’s registration token and keeps it, with an encryption key, through secret-manager-api. The provisioner does not carry the token and the key to the gateway itself.
It has OpenChoreo deploy the gateway
It applies the amp-gateway ResourceType, the gateway’s Resource and a ResourceReleaseBinding through platform-api. OpenChoreo renders them into the customer data plane as an APIGateway object.
The operator builds the gateway, and the gateway dials in
The API Platform operator on the data plane creates the gateway controller and runtime. The controller dials Agent Manager, and Agent Manager reports the gateway as active.
The orchestrator checks until it is ready
The orchestrator calls
ready. The provisioner checks in the background until the binding is Synced and the gateway is active, and then announces on NATS that provisioning is done.
Two things to notice. The gateway link is opened by the gateway, not by Agent Manager. And the gateway belongs to one organisation environment: there is no single shared Agent Manager gateway.
Path B: the older platform-api hook
On stage and prod the pinned manifests have no orchestrated flag, so it is off, and platform-api keeps the Agent Manager gateway for itself.
Platform-api applies the gateway objects
When an organisation or an environment is provisioned, the platform-api API gateway hook applies the bootstrap data plane gateway objects for the environment.
It registers the gateway and keeps the token
Platform-api registers the gateway in Agent Manager, mints its token and writes it into a
gateway-cp-tokensecret. The call that registers the gateway and mints its token has a 10 second timeout.It pushes the identity settings
Platform-api also pushes the identity system client and the identity URL to Agent Manager and registers the gateway’s identity provider. The gateway then connects as in the orchestrated path.
When the orchestrated flag is true, platform-api stands down: it applies no legacy Agent Manager gateway, registers none and mints no token. So the two paths do not both build a gateway.
Which flag does what
Three settings decide which path an environment uses. They differ in what they switch.
| Setting | What it switches | On |
|---|---|---|
amp_gateway_orchestrated | Who makes the gateway: the provisioner, or the platform-api hook | dev, stage-v2, prod-v2, prod-v2-eu |
agent_manager_first_login_enabled, with the provisioner replicas | Whether a first sign-in starts the recipe. On stage and prod there is no provisioner at all | dev, stage-v2, prod-v2, prod-v2-eu |
environment_provisioner | Whether the orchestrator creates new environments | dev, stage-v2, prod-v2, prod-v2-eu |
On stage and prod the pinned manifests contain none of the three settings, so the older path applies. Organisation creation goes through the orchestrator on every environment except prod. These are the values read on 20 November 2026, so treat them as a snapshot.
Compared with on-prem
| Step | On-prem, lesson L4.1.3 | Choreo Cloud |
|---|---|---|
| Starting it | You run a command that the console prepares | A first sign-in or a new environment starts it, or a hook runs on its own |
| Creating the environment | The script calls Agent Manager | OpenChoreo creates it, and platform-api announces it |
| Registering the gateway | A setup job in the gateway chart gets a token and registers the gateway | The provisioner (or the older hook) registers it |
| Creating the identity service | The script installs a ThunderID for the environment | The identity-platform-provisioner builds the identity data plane |
| Building the gateway | The chart creates the APIGateway object and the operator builds it | The provisioner applies the objects through platform-api, and the operator builds the gateway |
| Gateway connects back | The controller dials AMS | The same |
What is the same: the gateway software, the APIGateway object, the operator and the direction of the connection. What differs: who runs the steps and how it is triggered.
Your turn
Open Try it. Play flow F36 and find the step that the older path does not have. Then play flow F37 and find the step where platform-api stands down. Last, match each recipe step to what it makes.
Recap
- A new organisation environment needs an environment, an identity data plane and an AI gateway.
- On dev, stage-v2, prod-v2 and prod-v2-eu the orchestrator runs the agent-manager recipe: base, thunder and agent-manager. A first sign-in or a new environment starts it.
- On stage and prod the platform-api gateway hook still makes the gateway, because the orchestrated flag is off there.
- The gateway runs on the data plane for one organisation environment, and it dials Agent Manager.
- On-prem the same steps are done by a script and a setup job. The gateway software and the direction of the connection are the same.
Wrap up
Recap
Tick each one when you could explain it to a colleague.
Finished?
Chapter complete. Every lesson in this chapter is done.
Progress cannot be saved in this browser, so it will be forgotten when you leave this page.
Quick check
Spotted something wrong or unclear in this lesson? Report an inaccuracy (opens GitHub in a new tab)