The 'Tribal Dungeon' Problem
Most enterprise processes are trapped in 'tribal dungeons'—knowledge that exists in human-readable formats like screenshots or sequence-of-click SOPs, but lacks the structure required for machine execution. To bridge this gap, engineers must translate these human instructions into formal, executable logic that includes preconditions, decision trees, backend identifiers, and validation steps. The core insight is that while experts own the 'what' of a process, the agent must own the 'how,' and the translation process is where the majority of engineering effort resides.
The Refining Loop as the System
In production-scale AI, the agent loop is not the system; the refining loop surrounding it is. At Maersk, the corpus of process knowledge (the SOPs) outweighs the runtime code by a ratio of 20 to 1. Accuracy is not achieved through initial design or prompt engineering, but through a systematic, long-term feedback loop. Over nine months, the team implemented over 100,000 corrections, using heat maps to cluster failures and prioritize engineering efforts. A correction only qualifies as a production fix once it is codified into an executable change, moving beyond mere 'opinion' or 'vibe-based' adjustments.
Engineering for Reliability and Scale
Production environments require a 'cage' rather than freedom. Guardrails must be explicit and structural—such as classifiers, gates, and preventive measures—rather than relying on vague instructions like 'please be careful.' The team's methodology relies on five core moves:
- Representability: Making work machine-readable.
- Bounded Execution: Ensuring the agent operates within safe, defined limits.
- Observability: Creating shared evidence (traces) that allow engineers and domain experts to review the same case.
- Cheap Correction: Reducing the friction of turning a failure into a fix.
- Compounding Improvement: Systematically folding successful scenarios back into the codebase as composite tools.
By treating the adaptive architecture as the primary asset, the team can roll out improvements across hundreds of global regions simultaneously. This approach favors custom function calling and distilled responses over bloated frameworks like MCP, ensuring total control over the quality and safety of the agent's interactions with legacy backends.