What you will learn
- Say what the Agent Manager service does and what it leaves to OpenChoreo
- Name its three port numbers and what each one is for
- Walk down the layers of the service from a route to a database table or a client
- List the background workers that run inside the same process
Before you start
- What is Choreo Agent Manager? Not started In progress Done
- A tour of the control side and the data side Not started In progress Done
On this page
Almost every part of Agent Manager ends up talking to one service. The console and amctl call it. Each gateway connects to it. It speaks to OpenChoreo, to the identity servers and to its own database. That service is AMS (agent-manager-service)The central Go service of Agent Manager. It offers the REST API used by the console and amctl and coordinates OpenChoreo, gateways and identity.Analogy:The operations manager who schedules everything but never touches an aircraft.See it in the glossary, and this lesson is a quick tour of what is inside.
What it does
AMS is a service written in Go. It offers the REST API that the console and amctl use, and an MCP endpoint for AI assistants. It holds the business logic for agents, builds, deployments, gateways, LLM and MCP proxies, monitors and agent identities. It is also the place gateways come to for their configuration, which is why it counts as the control plane of the gateways.
It runs on the control side. The quick-start install puts it in the wso2-amp namespace.
Two doors, three ports
One process serves two sets of callers. It has two listening ports, and the on-prem chart adds a third number, the port of a Kubernetes Service.
| Port | What it is |
|---|---|
| 8080 | By default, the container port of the public API. |
| 9000 | The port of the chart’s Service amp-api, which passes traffic on to 8080. |
| 9243 | By default, the port of the internal server, used by gateways. The chart gives it a Service of its own, amp-api-gateway-manager. |
The next lesson takes the two doors apart. For now, remember that people and tools use the first, and gateways use the second.
The layers
A request that arrives at the public API passes down a stack of layers. The code is arranged the same way.
Routes
Each public route is registered together with the permission it needs.
Middleware
Before a handler runs, AMS checks the token. Where a route needs it, AMS also checks the organisation and the ScopeA named permission carried in a token. In Agent Manager it has the form amp:resource:action, for example amp:agent:create.Analogy:One key on a key ring. Each door checks for the one key it needs.See it in the glossary. Lesson L4.1.2 follows a request through these checks.
Controllers
A controller reads the request and turns the result into an HTTP answer. By design it holds no business rules.
Services
A service holds the business rules and the order of steps. A deploy, a build or a monitor run is planned here.
Repositories and clients
A repository reads and writes AMS’s own Postgres tables. A client calls someone else: OpenChoreo, the identity server, the secret store or the observer.
What it keeps and what it asks
AMS keeps two kinds of things in its own Postgres database: the data that only Agent Manager needs, and the bookkeeping of its own background work. That is about 40 tables, created by 47 migrations. There is no table for organisations, projects, agents or users. Organisations, projects and agents live in OpenChoreo, users live in the identity server, and the token tells AMS who is calling.
Everything else is a question to a client.
- OpenChoreo. AMS has no Kubernetes client of its own. It sends its requests to the OpenChoreo API. On-prem it signs in to OpenChoreo as a service account, with a client credentials grant.
- ThunderID. AMS manages the identities of agents through the identity server of each environment.
- The secret store. In the open source service, an agent’s secret values go to the secret store through OpenChoreo’s secret API.
- The observer. The telemetry service that sits in front of the stored traces and logs.
Work that happens without a request
Some work does not wait for a caller. These run inside the same process.
- The monitor scheduler starts evaluation runs on its schedule.
- The AgentID reconciler retries identity provisioning, when provisioning is enabled.
- Two more reconcilers work on A2A agent publications and agent cards.
- EventHubAMS's small event log in Postgres. AMS writes an event when something changes for a gateway, and a polling loop passes new events down the gateway's WebSocket.See it in the glossary, a small event log in Postgres, tells connected gateways what changed. A polling loop checks it every 2 seconds.
In Choreo Cloud
Choreo Cloud builds on the same service code. Choreo Cloud’s own program imports it as a module and adds cloud parts for sign-in, entitlements, organisation set-up, secrets and more. Calls to OpenChoreo then go through platform-api and carry the signed-in person’s token instead of a service account’s. Background jobs can use a limited service token.
Your turn
Under Try it, click AMS in the diagram and read its card. Then click Postgres. What does its card say it does not hold? Play the matcher to sort the layers, and scroll the story to the scene where AMS asks OpenChoreo.
Recap
- AMS is the central Go service. It does the business logic and asks OpenChoreo for everything that happens in a cluster.
- By default it has a public API on 8080 (service port 9000 in the chart) and an internal server for gateways on 9243.
- The layers run from routes and middleware through controllers and services to repositories and clients.
- Its own Postgres holds about 40 tables and no organisation, project, agent or user.
- Background workers, including the monitor scheduler and EventHub, run in the same process.
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)