Component ยท Control side
agent-manager-service (AMS)
What it is
The agent-manager-service (AMS) is the central Go service of Agent Manager. It offers the REST API and an MCP endpoint used by the console and the amctl command line, and it holds the business logic for agents, builds, deployments, gateways, LLM and MCP proxies, monitors and agent identities. It lives on the control plane.
AMS is the operations manager who schedules everything but never touches an aircraft.
Why it exists
People and tools need one place to manage AI agents without learning OpenChoreo, gateways and identity servers. AMS coordinates them all.
How it works
- Public API on container port 8080 (service port 9000 in the chart), plus an internal TLS server on port 9243 for gateways.
- Org, project, agent and environment objects live in OpenChoreo, and AMS calls OpenChoreo's API. Its own Postgres holds only Agent Manager data such as gateways, proxies, keys and monitors.
- Request pipeline: CORS, JWT check, org check, per-route scope check, then controller, service and repository layers.
- Background workers run inside it: monitor scheduler, AgentID reconciler, EventHub and the WebSocket manager.
- On Choreo Cloud the same code runs inside the agent-platform shell with cloud adapters added.
Identity and access
AMS has no user table or session. Every call carries a JWT, which AMS verifies against the identity provider's keys. It reads the organization from the token (ouId), never from the URL, and each route demands an amp:<resource>:<action> scope.
Key facts
- Language
- Go
- Public port
- 8080 (service 9000)
- Internal port
- 9243 (TLS)
- Namespace
- wso2-amp (on-prem chart)
- Database
- Postgres
- Side
- Control plane
Talks to (19)
- signs in with Platform ThunderID 1.0.0 AMS validates JWT via KEY_MANAGER_JWKS_URLJWKS fetch HTTP
- calls Platform ThunderID 1.0.0 Users, groups, roles, OUs, flowsHTTP admin API
- calls Env ThunderID (per environment) Agent identities, roles, groups, MCP resource serversHTTP admin API :8090
- calls OpenChoreo 1.2.0 All org/project/component/env/build/release operationsREST (generated client); scheme comes from OPEN_CHOREO_BASE_URL, default http
- reads from Postgres (AMS DB) AMP stateSQL (pgx/GORM) 5432
- calls Secrets path Writes secrets creating SecretReferenceHTTPS OC secret-management API
- calls amp-observer (agent-manager-observer) Monitor run logs onlyHTTP :9098
- calls Argo Workflows Monitor evaluation runsOC WorkflowRun create
- depends on API Platform Gateway runtime (APG) AMS is control plane of gateway (artifacts, keys, manifest)
- calls platform-api (PAS) AMS reaches OpenChoreo through PAS (OPEN_CHOREO_BASE_URL is the internal gateway plus PAS base path)HTTPS via internal API Platform gateway
- reads from WSO2 Policy Hub (external) Console guardrail catalogHTTPS catalog URL
- calls ThunderID management API Roles, agents, resource serversHTTPS admin REST
- calls openchoreo-api All project, component, build, deploy operationsREST (scheme comes from OPEN_CHOREO_BASE_URL, default http)
- calls Component to ReleaseBinding chain Deploy and promoteOC REST generate-release then ReleaseBinding
- calls AM build ClusterWorkflows TriggerBuildOC REST WorkflowRun
- calls EventHub (Postgres-backed) GatewayEventsService publishes gateway events into the EventHub tablesin-process Go call, then SQL insert in one transaction
- calls Upstream MCP server Agent Manager reads the server info and tool list when you create an MCP proxyHTTP MCP initialize and tools/list
- calls OC kgateway (gateway-default) Agent Manager reads an A2A agent's card from the agent's external URL, which OpenChoreo derives from the route host and the port of the data plane ingress gatewayHTTP GET /.well-known/agent-card.json on the agent's external URL
- reads from OpenBao + External Secrets Agent Manager reads a git credential from the workflow plane OpenBao when it lists the branches or commits of a private repositoryHTTP, OpenBao KV v2 read (vault client)
Used by (17)
- called by Console (React SPA) All control-plane API callsHTTP /api/v1; the Service port is 9000 and forwards to container port 8080 (docker-compose publishes host port 9000)
- called by amctl CLI CLI API callsHTTP /api/v1
- called by evaluation-job Publish scoresHTTP POST /api/v1/publisher/monitors/{m}/runs/{r}/scores
- needed by docs-agent-platform (public docs) Public docs describe product
- needed by agent-platform AMS shell Shell injects cloud providers into core via app.OptionsGo module import
- called by platform-api (PAS) Register gateways, push thunder URLHTTPS /api/v1/orgs/{handle}/...
- provides sign-in to Platform IdP (ThunderID private build) SaaS user tokens validated by AMS and by gatewayJWT RS256 JWKS
- called by agent-manager-provisioner Register gateway, thunder-url, identity providerHTTPS org APIs
- deployed by wso2cloud-deployment (Flux/Terraform) SaaS deployment of AMS, console, provisionerFlux GitOps ReleaseBinding
- needed by support-agent-manager Support backport line of coreimages registry.wso2.com
- called by Agent Manager DB migration Job (manual) applies compiled migrationsone-off Job from the AMS image
- needed by Core module and console package pins shell imports the core modulego module
- needed by agent-manager-service (SaaS deployment) SaaS deployment of the shared core module
- called by Gateway bootstrap Job Registers gateway, mints tokenREST /api/v1 (scheme comes from the chart apiUrl value, default http on port 9000)
- read by Policy jwt-auth v1 Key manager agent-manager-serviceHTTP JWKS /auth/external/jwks.json
- called by add-environment.sh Script creates the environment; HTTP 409 is treated as already existingHTTP POST /api/v1/orgs/{org}/environments
- called by add-environment-thunder.sh Registers the environment sign-in handle and stores its system client credentialHTTP PUT /environments/{env}/thunder-url and /thunder-system-client
Inside and around
Part of: Monitor scheduler
Contains: AMS internal server :9243, AgentID reconciler, Agent token manager (JWT signer, JWKS), AMS MCP server (/mcp), RBAC (amp:* scopes)