# Section 15 · Beyond the application, the shared building blocks Everything above addresses one application: a domain, its ports, its adapters. But some capabilities are the adapter of no application in particular: they are shared by several, by nature. A connector library, a skill catalog, a cross-application memory, a delivery and evaluation chain, an agent identity: these are enterprise building blocks. This section fixes their principles; the landscape of locations and offerings, shifting by nature, is deliberately left outside these pages, which retain only what holds whatever the vendors. ## The shift, and the rule that does not move Housing a shared building block inside an application condemns it to duplication; housing it elsewhere does not leave the model. The block leaves the application, but the application still consumes it through a port, a stable contract; what changes is that the adapter behind that port points to an enterprise service instead of a local structure. The question is therefore never port or no port: it is which location behind the port, existing infrastructure, dedicated platform, or managed service. This location trade-off is reversible precisely because the contract itself does not move. > Diagram : APPLICATION · domain + orchestrator · use cases · PORTS · MODEL GATEWAY · tier routing, governance · SHARED MEMORY · invariant static + variable · CONNECTOR LIBRARY · tools via the tool protocol · SKILL CATALOG · versioned artifacts + catalog · IDENTITY AND SECRETS · access management, vault, in place · DELIVERY AND EVALUATION · existing pipeline + eval gates · The block leaves the application; the application still consumes it via a port, a stable contract. ## The locations, and the criteria that decide Behind each port, five location families. In the application itself: a local adapter, simple but duplicated as soon as a second application appears. Existing infrastructure, API gateway, artifact repository, integration pipeline, access management: sovereign and amortized, but not designed for the agentic. The dedicated internal platform: control and reuse, at the price of building and operating it. The managed service from an infrastructure provider: mature and fast, less sovereign, dependent. The managed runtime from a model provider: maximum velocity and the strongest dependency, the one on the supplier of the central component, with partial sovereignty when tool execution stays in-house. Six criteria decide, and they alone are stable: sovereignty and control, reuse across applications, implementation velocity, cost and dependency, reuse of the existing estate, compliance. The grid is durable; filling it in depends on a dated landscape and context, deliberately outside these pages. ## The recursive motif: contract, index, implementation At the scale of one application, the adapter is local. At the scale of an infrastructure, since the block is shared, the adapter becomes a thin client that resolves the capability through a common index, then calls it by its contract. It is the direct extension of the two-adapter registry (section 05): the motif is recursive. Three things remain distinct and must never merge: the contract, which states what the block promises; the index, which publishes and makes discoverable; the shared implementation, which honors the contract. It is not the adapters that become the index: it is their discovery that goes through an index. > Diagram : Application · adapter, discovery client · resolves · DISCOVERY INDEX · publishes and resolves, does not orchestrate · calls · Shared building block · consumed through its contract · Contract, index, implementation: three distinct things. The index is not a brain. ## The guards, amplified at scale Two guards of this doctrine apply as they stand and become more critical at platform scale. The first: the index, or the catalog, stays an index, not a brain; it publishes and makes discoverable, it does not orchestrate, on pain of recreating the bloated integration bus (section 05). The trap takes a precise form here: letting the delivery chain or the catalog decide at runtime which skill to call. Delivery delivers; the application's orchestrator decides. The second: a third-party skill or connector is an untrusted input; least privilege, approval on the action, and the triad breaks on the context window (section 11). A shared catalog amplifies this surface: curation and security review are not optional there. ## The durable execution engine, one adapter among others When turns grow long, waits, recoveries, compensations, a durable execution engine can carry these properties as a shared building block: step journal, retry, suspension and wake-up. It remains an adapter behind the ports, and the guard is the same as for the index: it carries control flow and durability, never reasoning or business logic. The model call remains an activity whose output is recorded: it is reread, not replayed (section 07). Letting the orchestration engine decide business logic would, here again, amount to rebuilding the bloated bus. ## The building-block matrix As with the decision matrix of section 13, each block has a sober default and an explicit trigger; the default applies as long as no trigger commands a change. | Block | Recommended default | Switch when | | --- | --- | --- | | Model gateway | The existing API gateway, seen as the model port | Agentic functions (tier routing, cost governance) outgrow it. | | Connector library | Existing infrastructure carries transport and security | It caps out on tool semantics and discovery: dedicated or managed block. | | Skill catalog | Existing artifact repository for the versioned package | Curation and security review demand it: dedicated catalog, never without curation. | | Shared memory | In the application for working memory | A real cross-application need, not a distant target. | | Discovery registry | In-memory table (section 05) | Crossing a process boundary: shared registry (section 07). | | Durable execution | Simple loop in the application | Long turns, approval waits, recovery after failure: durable engine, which never carries business logic. | | Delivery and evaluation | Existing integration pipeline plus evaluation gates | Guarded continuous evaluation (section 12) outgrows the pipeline: dedicated evaluation block. | | Observability | Existing stack for trace transport | Regulated data: self-hosted, because traces are data. | | Identity and secrets | Existing access management and vault | Agent identity and bounded delegation required (section 11): dedicated block. | ## Sovereignty is graduated by class of data Sovereignty is not a switch, it is a gradient: it is decided per class of data, not wholesale. The rule that follows: sovereign by default wherever sovereignty costs only operations, gateway, memory, registry, execution, access control; the only tier where it can cost quality is the model, and the model port makes precisely its sensitivity-based routing local and reversible, best available engine for ordinary data, sovereign engine for regulated data. A consequence often forgotten: execution traces contain the prompts and the outputs, hence data; they follow the same gradient, and exporting them to a third-party service is an exfiltration like any other (section 10). ## Compliance consumes the architecture Regulatory compliance is not a separate workstream: it is a layer that consumes the primitives already in place, immutable logging, human oversight, least privilege, memory governance and erasure, provenance. One extension is enough to equip it: the discovery registry extends into a usage registry, which carries, per deployment, the risk class, the data classes, and the owner, under an identified responsible party and a periodic review. Because risk is classified per deployment, not per platform: the same foundation, reused for a sensitive use, tips that particular deployment into a more demanding regime, without the architecture changing. ## The lesson of the layers A history lesson, to close. Infrastructures sediment: each generation deposits a layer of abstraction on top of the previous one, and every layer ends up commoditized while a new one stacks above it. At each transition, the systems that consumed the layer below through a contract crossed it; those that had welded themselves to it paid dearly. The building blocks of this section will not escape the rule: they will be commoditized in their turn. That is precisely why one consumes them behind ports and does not weld to them: the discipline of contracts does not only protect against a change of vendor, it carries you across the layers themselves. **Key takeaways** - Some building blocks are shared by nature; consumption stays through a port, the question is the location behind the port, and that trade-off is reversible. - The motif is recursive: the adapter becomes a thin client that resolves via an index; contract, index, and implementation remain three distinct things. - The index is not a brain; delivery delivers; the orchestrator decides; a third party is an untrusted input, curation is not optional. - The durable engine carries control flow, never reasoning; the model call remains a reread activity. - Five location families behind each port; six stable criteria decide, filling them in is a dated exercise. - Each block has a sober default and a switch trigger: the building-block matrix extends the decision matrix. - Sovereignty is graduated by class of data; only the model tier can cost quality; traces are data. - Compliance consumes the architecture; the usage registry is its centerpiece, and risk is classified per deployment. - Every layer ends up commoditized: consume it through a contract, do not weld yourself to it; the discipline of ports carries you across the transitions. --- © Thibault Souris, 2026 · Creative Commons BY-ND 4.0 (https://creativecommons.org/licenses/by-nd/4.0/) · the work’s text unaltered, as plain text for this page; the PDF version is the reference: https://runward.dev/docs/en/reference/doctrine/Designing-and-Running-Agentic-Systems-2026.pdf