Skip to main content

asrs-control

Built - IQVO/asrs-control on develop, released v0.1.2

Classification Generic: AS/RS controllers ship with the hardware; this one is built behind the subsystem-controller interface so a vendor controller could replace it. CloudEvents segment wes. Topics warehouse.asrs-control.events and .analytics. Speaks a fleet-defined telegram protocol over MQTT to the emulated shuttles and lifts. Repository: IQVO/asrs-control, merged 2026-11-20 (plan WCS-02, PR #2): OpenAPI and AsyncAPI contracts, telegram protocol v1 over MQTT, CloudEvents on warehouse.asrs-control.events and .analytics. Verified at develop 9e1dd55 on 2026-12-02: released v0.1.2 (the tag carries cmd/api, cmd/mcp and cmd/a2a, and is the image the k3s cluster runs), applied to the cluster with mcp.enabled: true, a2a.enabled: true and agents.colocate: true (warehouse-infra helm-values/asrs-control.yaml); on 2026-12-02 asrs-control-agents was 1/1 and asrs-control 0/1 Pending (the agent node was NotReady). Agent surfaces: a read-only MCP server (5 L1 tools) and a read-only A2A agent (2 L1 skills), see Agent surfaces.

Purpose​

Store and retrieve containers in the automated storage and retrieval system at the throughput the WCS needs, and own where each container sits inside the rack. To the WMS the whole AS/RS is one logical location (see seam decision 2).

Business capabilities​

CapabilityWhat it does
Storage position assignmentChooses the rack position for a stored container by velocity zone, with depth rules for double-deep racks.
Job schedulingSequences store and retrieve jobs across shuttles and lifts, balancing load across aisles.
Port presentationPresents retrieved containers at output ports in the requested sequence.
ReshufflesMoves a blocking front container out of the way in a double-deep rack.
Equipment stateTracks each shuttle and lift's PackML-style state (Idle, Execute, Held, Suspended, Stopped, Aborted) and faults.

Responsibilities (what it must guarantee)​

  1. One container per rack position, and every stored container is in exactly one position.
  2. A position is never assigned while it is reserved.
  3. A shuttle or lift runs one job at a time.
  4. Retrieved containers reach each output port in the requested sequence.
  5. Every accepted job ends in exactly one of done or StorageJobFailed, with a reason.
  6. Internal moves (reshuffles, re-slotting) are invisible outside: they publish no transport fact and never reach the stock ledger.

What it does not own​

ConcernOwner
SKUs and quantities in a containerinventory-storage
Which container to retrieve, and whenfulfillment-execution and wes-work-planning, through material-flow-control
Transport beyond its own portsmaterial-flow-control and amr-fleet-control
The AS/RS as a location in the buildingfacility-layout (one AutomatedStorage location)

Ubiquitous language​

TermMeaning
Rack, Aisle, LevelThe physical structure of the AS/RS.
RackPositionOne storage position for one container, inside this context only. Not a LocationCode.
Shuttle, LiftThe equipment units that move containers along a level and between levels.
StorageJobOne store or retrieve of one container.
PortAn input or output point of the AS/RS, and a handoff point for material-flow-control.
ReshuffleAn internal move that unblocks a deeper position.
TelegramA message to or from the PLC, with a handshake (SAP EWM's term).

Candidate aggregates​

AggregateInvariants it protects
StorageJob4, 5: sequence at the port, one outcome
StorageMap (one per aisle)1, 2, 6: positions, reservations, internal moves
EquipmentUnit3: one job per shuttle or lift, state

Inbound communication​

FromMessageChannel
material-flow-controlRequest a store or retrieve job; cancel a jobREST
Shuttles and lifts (emulated PLC)Move confirmations, faults, stateMQTT telegrams with handshake

Outbound communication​

ToMessageChannel
Shuttles and liftsMove telegramsMQTT
material-flow-controlContainerStored, ContainerPresentedAtPort, StorageJobFailed, EquipmentStateChanged, AsrsCapacityChangedKafka
exception-managementStorageJobFailed with reason EQUIPMENT_FAULTKafka

Agent surfaces​

asrs-control ships the fleet's two agent adapters over the same read use cases as REST, both read-only at authority L1: ADR 0005, docs/adr/0005-read-only-mcp-server-and-a2a-agent.md (accepted 2026-11-20), and no later ADR in the repository grants a write. Requesting and cancelling a job and confirming a pickup stay on the REST interface material-flow-control calls (relationship 5 of the context map): a write tool or skill would compete with the material-flow scheduler, and adding one is a new ADR at L3 or above. The levels are those of the Agentic Standard v2.

MCP server​

cmd/mcp on port 8090: the official Go SDK, Streamable HTTP only, stateless, at /mcp and /, with /healthz open. Five tools, each annotated readOnlyHint, idempotentHint, openWorldHint: false and declaring _meta["com.warehouse/authority"] = "L1"; the registry is pinned by internal/adapters/inbound/mcp/testdata/tool_registry.golden.json. Tool results carry the REST response shapes; errors carry the REST slugs (asrs-not-found, storage-job-not-found, invalid-parameter) as isError results. One resource template, warehouse://asrs-control/asrs/{asrsId}/storage-jobs/{storageJobId}, and one prompt, review_storage_job (the operator SOP: read the job and its aisle, interpret status and reason, escalate stuck or repeated failures).

|| Tool | Authority | What it reads | || --- | --- | --- | || list_asrs | L1 | The AS/RS ids of the layout file. | || get_asrs_state | L1 | One AS/RS as material-flow-control sees it: per aisle the shuttle-and-lift unit (IDLE, EXECUTE or HELD), whether it is busy, open jobs and free positions; every port with the container presented at an output port; the recommended input port; the capacity. No rack position is exposed. | || get_asrs_capacity | L1 | The capacity snapshot AsrsCapacityChanged publishes: units total and available, positions total and free, open external jobs. | || get_storage_job | L1 | One STORE or RETRIEVE job: container, port, reference, status, the failure reason and the PLC's reason code, accepted and ended times. | || list_storage_jobs | L1 | An AS/RS's STORE and RETRIEVE jobs newest first, optional status filter, keyset-paged (cursor and nextCursor, 1..100, default 20). Internal reshuffles are never listed. |

A2A agent​

cmd/a2a on port 8093: a2a-go v2, JSON-RPC 2.0 at / and /a2a, the Agent Card at /.well-known/agent-card.json, no security scheme. A message-only agent (no task lifecycle) with no outbound A2A client: A2A is the delegation channel, and facts still travel only as CloudEvents on Kafka. Two skills, each tagged read and authority:L1; arguments are decoded strictly (unknown fields refused) and a rejection is answered in-band as an RFC 7807-shaped problem with the REST slugs, never as a transport error.

|| Skill id | Name | Authority | Arguments | What it reads | || --- | --- | --- | --- | --- | || job_status | Storage job status | L1 | asrsId, storageJobId | One STORE or RETRIEVE job as get_storage_job reads it; an unknown AS/RS or job is a 404 problem. | || asrs_capacity | AS/RS capacity | L1 | asrsId | The capacity snapshot as get_asrs_capacity reads it; an unknown AS/RS is a 404 problem. |

Routes and deployment​

REST goes through Kong at /api/asrs-control (the chart's gatewayApi.path, prefix stripped). MCP and A2A go through the Agent Router (Envoy Gateway agent-router in envoy-gateway-system; warehouse-infra ADR 0015 for MCP, 0014 for A2A): /api/mcp/asrs-control is rewritten to /mcp on the asrs-control-mcp Service (:8090), and /api/a2a/asrs-control is rewritten to / on the asrs-control-a2a Service (:8093), so the Agent Card stays reachable under the prefix; on the host the Agent Router is http://localhost:8010. The chart defaults mcp.enabled, a2a.enabled and agents.colocate to false; warehouse-infra helm-values/asrs-control.yaml (read at d12d05f on 2026-12-02) switches all three on, so cmd/mcp and cmd/a2a run as the two containers of one asrs-control-agents Deployment (warehouse-infra ADR 0012). Both binaries load the same layout file as cmd/api and wire the use cases with the Postgres read repositories only: no unit of work, outbox, downlink or MQTT link, so neither can write. Nothing authenticates; the in-cluster boundary is the access control, and L1 documents that the caller needs no gate.