Architecture
How the system fits together
Start with the big picture, then go one level deeper.
Loading the diagram...
Loading the diagram...
Plain list of the components on this page (128 components), the big picture first
This list is generated from the same data files and works without scripts.
The big picture (9 parts)
- Console and CLI the front door
- Identity (ThunderID) who is allowed
- Agent Manager the service that decides
- Database Agent Manager records
- OpenChoreo control plane that builds and deploys
- AI Gateway every AI call passes here
- Observability traces and logs
- Agents where your agents run
- Builds turns code into images
Control side
- AgentID reconciler Retries AgentID provisioning rows.
- Agent token manager (JWT signer, JWKS) Signs RS256 agent JWTs; serves /auth/external/jwks.json.
- agent-manager-service (AMS) Central Go REST API, business logic, gateway control plane, MCP server.
- AMS internal server :9243 TLS server for gateway WebSocket and internal REST, api-key auth, no JWT.
- OC cluster-agent Dials out to the control plane over mutual TLS. A plane is registered with a certificate authority, not a kubeconfig.
- EventHub (Postgres-backed) Event log in Postgres polled and fanned out to gateway WebSockets.
- Identity Platform CP / org-mgt Control plane for per-org ThunderID (api-identity-platform), which also fills each organization identity data plane. Agent Manager calls it for agent identities only in CP_MANAGED mode.
- Monitor scheduler 1 min tick, advisory lock, creates WorkflowRuns for monitors.
- OC authz (ClusterAuthzRoleBinding on client_id) Authorizes service accounts by client_id claim.
- OC control plane OC API :8080, controller, kgateway, cluster-gateway.
- OpenChoreo 1.2.0 K8s internal developer platform AMP is built on.
- Platform IdP (ThunderID private build) SaaS IdP with Google/GitHub federation, urn:wso2:cloud RS.
- Env ThunderID (per environment) Holds agent identities and issues AgentID tokens.
- Platform ThunderID 1.0.0 IdP for humans and service accounts; resource server urn:wso2:amp.
- cloud-dp-oc-cp (customer control plane) K3s cluster (EC2 on stage and prod) hosting the customer OpenChoreo control plane, the plane cluster-gateway, secret-manager-api and one namespace per org (wc-<org8>-<hash8>).
- openchoreo-api OpenChoreo REST and MCP server. Agent Manager calls it for organisations, projects, components and releases; authorization uses a ClusterAuthzRoleBinding on the claim client_id.
- OC claim patches (client_id) setup-openchoreo.sh patches openchoreo-api-config and observer-auth-config entitlement claim from sub to client_id.
- OpenChoreo cluster-gateway WebSocket hub that plane cluster-agents dial out to over mTLS. cluster-gateway-ca is the control plane's own CA, copied into each plane namespace as a ConfigMap; by default each plane makes its own CA for its agent certificate (stored in cluster-agent-tls) and that CA is registered on the plane resource as clientCA.
- ComponentType agent-api workloadType proxy; renders SandboxTemplate, SandboxWarmPool, HPA, Service, 2 HTTPRoutes, ConfigMaps, ExternalSecrets; 5 allowed traits, 3 allowed workflows.
- OpenChoreo controller-manager Reconciles OpenChoreo resources, renders a RenderedRelease from each ReleaseBinding and reaches the planes only through the cluster-gateway.
- ProjectType default Creates the cell Namespace for a project and environment via ProjectReleaseBinding.
- Component to ReleaseBinding chain Component, ComponentRelease (immutable), ReleaseBinding (<component>-<env>), RenderedRelease applied in the data plane through the cluster-gateway.
- Trait api-configuration Patches agent HTTPRoute so traffic goes to the API Platform gateway backend and applies RestApi policies.
- Workload publisher identity Client openchoreo-workload-publisher-client with ClusterAuthzRole amp-workload-deployer; used by generate-workload step.
- amp-thunder-bootstrap ConfigMap Declarative YAML documents 50 to 73: clients, resource server urn:wso2:amp, roles, group, user type, defaultResourceServer, cors, csp.
- ThunderID four SQLite databases configdb, entitydb, runtime_transient, runtime_persistent on a 1Gi PVC; Postgres or Redis for HA.
- Thunder defaultResourceServer config server_config resource binding scoped client_credentials requests without resource param to amp-resource-server; avoids invalid_target.
- add-environment-thunder.sh Installs upstream thunderid chart per environment, wires trusted issuer to platform Thunder, creates amp-system-client, stores secret in AMS.
- ThunderID flow engine and executors Login/registration as JSON node graphs via POST /flow/execute; one executor per task; AM uses default-flow.
- ThunderID Gate login SPA Login UI served at /gate; drives /flow/execute.
- ThunderID management API JWT-protected admin REST (applications, agents, roles, resource-servers, ou, import, server-config); needs system permission.
- ThunderID OAuth2/OIDC server authorize, token, JWKS, discovery, introspect, DCR, PAR, device, CIBA; grant handlers incl. token_exchange.
- Thunder token exchange grant (RFC 8693) Implemented in Thunder; trusted-issuer and audience checks, single resource binding, act claim for agents; no AM caller (OBO DESIGN-ONLY).
- identity-platform-provisioner The service that builds an organization environment identity data plane. The orchestrator calls it. It registers the data plane on the Identity Platform control plane, and applies the widp-dp ResourceType, Resource and binding through platform-api.
- org-mgt-service A component of the Identity Platform control plane. The /iam/v1 gateway route sends project, environment and promotion paths to it, which Agent Manager uses when it activates or promotes an agent identity in CP_MANAGED mode.
- Identity Platform data plane (widp-dp) The per-organization, per-environment ThunderID that runs on the customer data plane. It starts empty and the Identity Platform control plane fills it with promoted versions. It is created by the identity-platform-provisioner.
Data side
- Agent workload (internal) User agent rendered as Agent Sandbox objects.
- API Platform Gateway runtime (APG) Envoy router + policy engine on 22893; LLM/MCP/agent/OTLP policies.
- Argo Workflows Runs builds and eval jobs.
- OC kgateway (gateway-default) Host-routed ingress on 19080 for agents.
- evaluation-job Python job: fetch traces, run evaluators, publish scores.
- External agent Agent running outside; only ConfigMap in OC, token for traces/keys.
- APG gateway-controller Dials AMS over WebSocket, serves xDS to router and policy engine.
- gateway-operator 0.11.0 Reconciles APIGateway/RestApi CRs.
- amp-observer (agent-manager-observer) Read-only facade for traces, logs, build logs, metrics; MCP at /mcp.
- OC data plane cluster-agent, gateway-default, gateway-operator, sandbox controller; agents run here.
- OC observer OpenChoreo query API for logs, metrics and traces. It reads them through adapter services.
- OC observability plane OpenSearch, collector, fluent-bit, Prometheus, OC observer, amp-observer.
- OC workflow plane Argo Workflows, registry; builds and evaluation runs.
- OpenSearch Index otel-traces plus logs.
- OTel collector OTLP/HTTP 4318 to OpenSearch and span count to Prometheus.
- Prometheus Metrics and amp_agent_trace_spans.
- Container registry Stores built images (host port 10082 in dev).
- cloud-dp-oc-ci (workflow plane) Argo Workflows plane for customer builds and Agent Manager evaluation runs; no Gateway API; pushes images to the customer ECR. cloud-cp has an Argo Workflows of its own, for Choreo Cloud's own CI/CD.
- cloud-dp-oc-dp (customer data plane) Runs customer agents, per-org API Platform and Agent Manager gateways, per-org ThunderID data-plane halves, OpenBao (and legacy Vault on stage and prod), Valkey. Dev RKE2, stage and prod EKS.
- cloud-dp-oc-ob (observability plane) OpenSearch, Prometheus, OTel collector, OC observer, cloud-obs-proxy, agent-manager-observer, agent-manager-metering, cost-api. Hostnames *.obs.dp.<base>.
- Gateway controller SQLite store SQLite on a 100Mi RWO PVC at ./data/gateway.db; reason the controller is single replica with Recreate strategy.
- APG gateway builder Build tool that compiles the policy set in build.yaml into the runtime image; six phases.
- HTTPRoute <gw>-gw-route Catch-all route on kgateway for the gateway hostname to runtime Service :22893, with ReferenceGrant.
- RestApi <gw>-otel-restapi RestApi context /otel, POST /v1/traces only, jwt-auth header x-amp-api-key, upstream OTel collector :4318.
- APG policy engine Go ext_proc server running compiled-in policy chains; zero built-in policies; admin 9002, metrics 9003; fails closed.
- APG python executor Optional gRPC sidecar over UDS for Python policies (granite-guardian, nemoguard, prompt-compressor).
- APG router (Envoy 1.39.0) Data-plane proxy; listener 22893 HTTP and 22894 HTTPS, admin 9901; filter order ext_proc, lua, router; all config via xDS.
- APIGateway CR CR watched by gateway-operator; points at AMS :9243 and the token Secret; configRef ConfigMap carries gateway Helm values.
- Gateway bootstrap Job Helm pre-install/upgrade/rollback hook: waits for AMS, gets Thunder token, registers gateway, mints registration token Secret.
- Gateway registration token Secret Secret <release>-token holding the <uuid>-<random> token; AMS stores sha256 with salt; annotated with gateway id and org.
- agent-sandbox runtime Runs agents as SandboxTemplate + SandboxWarmPool; gVisor and Kata tiers via runtimeClassName.
- AM build ClusterWorkflows amp-docker, amp-gcp-buildpack, amp-ballerina-buildpack; steps checkout, build, publish-image, generate-workload (creates Workload, release, first binding).
- Policy api-key-auth v1 Checks X-API-Key against gateway hash store; used on LLM, MCP and agent routes.
- Policy jwt-auth v1 JWT signature, issuer, expiry, optional audience via key managers agent-manager-service and ThunderKeyManager; authentication only.
- Policy mcp-auth v1 OAuth challenge and JWT validation for MCP; requiredScopes is advertisement only in AM usage.
- Policy mcp-authz v1 Per-tool scope rules: any-of inside a rule, AND across matching rules, no matching rule means allow (upstream main).
- Rate limit policies (token, advanced, llm-cost) token-based-ratelimit, advanced-ratelimit, llm-cost-based-ratelimit plus llm-cost; backend memory by default, redis optional.
- WSO2 Policy Hub (external) Hosted catalog of gateway policies; AM console reads the AI/Guardrails catalog from configured URLs.
- External caller Any client application that invokes a deployed agent over HTTP through its public address. It sits outside the platform and is not managed by it.
- Fluent Bit Log collector that ships container logs to OpenSearch. The setup scripts generate machine ids and add tolerations for it.
- Per-organization gateways One API Platform gateway controller and runtime pair for each organization environment on cloud-dp-oc-dp. The provisioner applies an APIGateway object and the operator builds the pair. The gateway dials Agent Manager.
- Harbor registry (dev) The container registry on the dev workflow plane cluster, where built images are pushed. The AWS environments use ECR instead.
Clients and shared parts
- amctl CLI Go CLI with PKCE login, agent lifecycle, raw API.
- OBO (planned) DESIGN-ONLY Token exchange design; not in AMS main.
- Console (React SPA) Web UI; pnpm workspaces, TanStack Query, @thunderid/react auth.
- OpenBao + External Secrets Local quick-start install: OpenBao (dev mode) in the openbao namespace, used as the Workflow Plane secret store through an External Secrets ClusterSecretStore, and the default OpenBao URL of the Agent Manager chart. The store behind the OpenChoreo secret API on SaaS or on a production on-premises install is not shown in the repository files.
- Postgres (AMS DB) 40 AMP tables, 47 migrations on OSS main.
- scout-agent (OBO reference) Agent-side RFC 8693 token exchange POC.
- Central monitoring cluster Standalone EKS cluster: Thanos Receive/Store/Query/Ruler, Alertmanager, Perses dashboards (open only to allow-listed IP addresses). Receives remote-write from every environment cluster. No promotion flow.
- paasplane (fourth DP spoke) Choreo Labs PaaS service plane for databases and Temporal consumed by WC products; not Agent Manager specific.
- Private Data Plane (PDP) in a customer AWS account One-click CloudFormation stack: private EKS, ECR, RDS, SSM bastion, CodeBuild bootstrap, OpenBao; own DR runbook.
- wso2-enterprise/agent-platform (SaaS shell repo) Imports the core Go module and console package, adds cloud adapters, owns SaaS images (service, console, provisioner, metering, observer, e2e) and vhotfix-* tags.
- wso2cloud-deployment (GitOps source of truth) Manifests on main; thin env branches pin which commit of main each cluster syncs; Terraform modules (tags vX.Y.Z) and deployments per env branch; runbooks; RCAs.
- add-environment.sh Orchestrator script behind the console Create Environment command: creates the environment through Agent Manager, runs the env ThunderID install script, then installs the gateway chart.
- Upstream MCP server The MCP server that an MCP proxy fronts. Agent Manager reads its tool list through a separate probe call before you create the proxy, and the gateway forwards tool calls to its URL.
Choreo Cloud services
- agent-platform AMS shell Imports core module, injects cloud adapters.
- billing-service Subscriptions, entitlements, metering Collector.
- Choreo Cloud console Platform switcher entry, sample deploy, marketing consent.
- cloud-obs-proxy Scopes observability queries to the caller's organisation; trusted machine clients can name the organisation in a header.
- agent-manager-metering Hourly usage publisher Prometheus to billing Collector.
- NATS JetStream WSO2CLOUDEVENTS CloudEvents bus for org lifecycle and subscription events.
- orchestrator-api Recipe engine; recipe agent-manager.
- platform-api (PAS) CP API proxy to OpenChoreo with hooks, admin BFF, provisioning.
- agent-manager-provisioner Orchestrator CP: org component types, per-env amp-gateway.
- secret-manager-api Facade over OC Secret API.
- Env pin: base.yaml GitRepository ref wso2cloud-controlplane/kustomizations/base.yaml (and dataplane equivalents) holding ref.commit, plus a ref.branch on stage and prod only; the pinned configuration is what an environment is built from. Promotion and hotfix change only this.
- hotfix-manifests-<tag> branch and deploy-side vhotfix tag Created by manual-deploy-hotfix; the env pin points at this branch's commit. Deploy-side tags are an independent sequence from source-repo tags.
- Image tag vhotfix-YYYYMMDD-N Hotfix image tag equal to the source-repo git tag; immutable.
- Platform ECR (system/<name>) Single image registry for platform images, repo path system/<name>; customer build output goes to a separate customer ECR in each DP account.
- Promotion and hotfix PRs Bot PRs promote-<env>-<epoch> ('[promotion]: sync ...') and hotfix-update-<env>-<epoch> ('HOTFIX: Pin <env> base configurations to commit <sha12> (tag <tag>)').
- cloud-cp (cloud control plane) OpenChoreo single cluster (all four planes) that runs Choreo Cloud's own services: PAS, Platform IdP, billing, orchestrator, consoles, Agent Manager service, console and provisioner. Dev is Rancher RKE2; stage and prod are private-endpoint EKS. The STAGE cloud-cp also runs all CI/CD for every environment.
- Choreo Cloud environment: dev WD env branch 'dev'. OC system Environment 'development', with its own dev base domain. Infra: on premises, managed with Rancher (RKE2, and one imported k3s). Release pointer: tracks WD main live.
- Choreo Cloud environment: prod WD env branch 'prod'. OC system Environment 'production', base domain cloud.wso2.com. Infra: AWS us-east-2 (wso2-cloud-prod-us-*). Release pointer: a pinned commit, with the name of the hotfix-manifests branch that holds it.
- Choreo Cloud environment: prod-eu Named in some notes, in one README and in one script example. The deployment repository has no 'prod-eu' branch in the clones read, so no pin, base domain or infrastructure can be read for it. The live EU environment is prod-v2-eu.
- Choreo Cloud environment: prod-v2 WD env branch 'prod-v2'. Live customer environment for the USA. Base domain cloud.choreolabs.com, customer console at console.cloud.choreolabs.com. Infra: AWS us-east-2 (choreolabs-cloud-prod-us-*). Nothing in it is changed directly: a promotion is requested through a CR (change request) that is handed to the SRE team, who make the change. Release pointer: pinned commit.
- Choreo Cloud environment: prod-v2-eu WD env branch 'prod-v2-eu'. Live customer environment for the EU, with its own cluster setup next to the USA one. Base domain eu.cloud.choreolabs.com. Infra: AWS eu-west-1 (choreolabs-cloud-prod-eu-*). Nothing in it is changed directly: a promotion is requested through a CR (change request) that is handed to the SRE team, who make the change. Release pointer: pinned commit.
- Choreo Cloud environment: stage WD env branch 'stage'. OC system Environment 'stage', base domain stg.cloud.wso2.com (v1 family). Infra: AWS us-east-2 (wso2-cloud-stg-us-*). Stage has a scheduled-suspension feature. Release pointer: a pinned commit, with the name of the hotfix-manifests branch that holds it.
- Choreo Cloud environment: stage-v2 WD env branch 'stage-v2'. OC system Environment 'stage-v2', base domain stg.cloud.choreolabs.com, customer console at console.stg.cloud.choreolabs.com. Infra: AWS us-east-2 (choreolabs-cloud-stg-us-*). Release pointer: pinned commit, and pins a commit.
- build-pipeline (build, scan, push, bump) On push to main of a source repo: reads .cicd/*.yaml, builds matched components (Kaniko or buildpacks), Trivy, pushes system/<name>:main-<sha> to the platform ECR, commits 'Bump workload images' to WD main.
- dev-deploy-pipeline Triggered by pushes to WD main: regenerates ComponentReleases (occ componentrelease generate), repoints ReleaseBindings, commits back to main; dev Flux picks it up.
- autobuild-hotfix-image On a vhotfix-YYYYMMDD-N tag push to a source repo: builds the components that change detection selects, scans each image before it is pushed, and pushes <ecr>:<tag>. A Google Chat card then announces the images. Tags are immutable.
- manual-deploy-hotfix Run by the SRE team after a CR (change request) is handed over: Scenario 1 hotfixImages or Scenario 2 gitopsTag+gitopsTagSha, targetEnvironment stage|prod|stage-v2|prod-v2|prod-v2-eu; builds on the env's current pin, creates a hotfix-manifests-<tag> branch and deploy-side tag, then opens a pull request against the environment branch that moves the pin to the commit that carries the new tag.
- pr-check-pipeline On PR open or sync: simulate merge, gitleaks, kustomize build, terraform fmt/TFLint/Trivy IaC, OpenChoreo admission validation (WD) or changed-component build and Trivy scan with publish=false (app repos). Reports GitHub checks.
- manual-promote-environment ClusterWorkflow that the SRE team runs after a CR (change request) is handed over: creates a promote-<env>-<timestamp> branch that bumps the base.yaml pins on the target env branch to a chosen commit of the source branch, then opens a pull request against the target branch.
- propagation-notify On pushes to stage, stage-v2 and prod env branches comments on every PR newly included in the env's pinned revision.
- release-candidate (promotion gate) Freezes dev deployments by suspending the GitRepository, pins one commit, runs the suites that are enabled (cap 3 h), verifies no drift, posts PROMOTABLE, FAILED, DRIFT or NOT PINNED with the full SHA.
- Change request via GitHub issue and ServiceNow A change request (CR) is the change-request issue form in the wso2cloud repository, titled [CR]:. A workflow checks its required fields and applies a CR/ class label plus validation-passed or validation-failed, and comments that the case will be created in the CSM portal; a notifier workflow posts CR state changes from the portal back to the issue.
- agent-manager-service (SaaS deployment) OpenChoreo Component with traits api-configuration (agent-manager-api, auth, config, mcp, oauth-metadata) and bff-api; image system/agent-manager-service; DB agent_manager_db; ~60 env vars via release-binding substitutions.
- OpenChoreo cluster-gateway and plane cluster-agents Hub that plane agents dial out to over WSS with mTLS; mesh root CA openchoreo-mesh-root signs per-plane intermediates.
- API Platform gateways on cloud-cp The API Platform gateways api-platform-default and api-platform-internal on cloud-cp. The first carries external traffic, the second carries calls between Choreo Cloud services, such as Agent Manager calling platform-api.
- Valkey (cloud-cp) The Valkey instance in the cloud-system namespace. Agent Manager service uses it as a shared cache of gateway manifests between its replicas.
- API Platform product services (apip) The Choreo API Management product: apip-platform-api, apip-cloud-integrator and others. The files show no call to them from Agent Manager. The link to API Platform is its gateway software.