When lots of of brokers serve hundreds of builders, enterprise governance can’t be an afterthought.
On the BMW Group’s R&D, greater than 12,500 builders work on roughly 500 million strains of car software program code. This software program is augmented by the BMW Related Automobile backend, a cloud-based system of greater than 1,300 microservices offering digital providers for twenty-four million autos within the area. In regulated {industry}, the bar for (software program) high quality, stability, and governance compliance is exceptionally excessive.
Whereas analysis, frameworks, and pointers now facilitate constructing brokers, industrializing and working high-quality brokers in an environment friendly, scalable method stays a major problem.
Scaling agentic AI throughout a big group can’t be achieved by remoted groups. It requires collective effort, regionally pushed experimentation, and energetic information sharing throughout the enterprise. This creates a basic governance dichotomy: Improvement groups want the liberty to innovate quickly, whereas the enterprise should implement requirements for security, safety, composability, and cost-efficiency. With out that stability, organizations threat a fragmented panorama of AI islands and dear duplicate work. This presents an actual problem given lots of of worldwide distributed groups constructing brokers throughout the BMW Group.
On this submit, we element the practices and patterns that help BMW’s R&D groups in constructing, governing and working brokers at scale with out sacrificing velocity, high quality or compliance.
Resolution
Our premise is easy: construct brokers that may cooperate from the beginning. This requires an structure that makes range composable, governable, and automatable, with out requiring a single framework or toolchain.
Central to this structure is the agent harness, a runtime layer wrapped round a big language mannequin (LLM). It gives the execution loop, software dispatch, reminiscence administration, and observability hooks for autonomous operation.
Simply because the AWS Nicely-Architected Framework standardized cloud infrastructure design, agentic programs want equal patterns, reusable blueprints encoding governance, composability, and operational greatest practices from the beginning.
We arrange our resolution round 5 interlocking practices, drawn from hands-on expertise constructing and working agentic programs at enterprise scale since 2023. Every follow is codified as infrastructure as code (IaC), making adoption repeatable, auditable, and enforceable throughout groups with out blocking DevOps velocity.
Govern proactively, not retroactively
Governance have to be structural from the beginning and maintained throughout the total lifecycle. We advocate for 3 properties of efficient agentic governance:
Framework-agnostic and externalized: Governance guidelines corresponding to authentication, authorization, charge limiting and content material filtering are enforced on the integration layer. This features a Mannequin Context Protocol (MCP) gateway, a central agent registry and orchestration boundary, somewhat than inside particular person agent codebases. This implies governance survives framework migrations, mannequin swaps, and group reorganizations.
Area-sensitive and graduated: Not each agent motion carries the identical threat: drafting documentation, updating buyer information, and manufacturing database writes demand very completely different ranges of oversight. We implement graduated belief by way of per-step autonomy ranges:
- Degree 0 (Human-in-the-loop): Each motion requires express human approval. That is the place to begin for brand spanking new brokers and high-risk operations.
- Degree 1 (Human-on-the-loop): The agent executes autonomously however surfaces selections for asynchronous human evaluate. Appropriate for medium-risk duties with outlined inputs, outputs, and rollback choices.
- Degree 2 (Autonomous inside guardrails): The agent operates independently inside strictly outlined coverage boundaries, enforced deterministically somewhat than by way of immediate directions (see under). Reserved for low-risk, well-understood operations with verified observe information.
Assign belief ranges per step, not per agent. A single workflow can embrace steps in any respect three ranges, so groups can begin conservatively and incrementally enhance autonomy as confidence builds, grounded in measurable analysis knowledge, not assumptions.
Deterministically enforced: Governance runs as deterministic code outdoors the agent’s reasoning loop. In follow, this occurs primarily within the CI/CD pipeline. Permission checks, policy-as-code guidelines, and compliance validations gate each deployment there, earlier than an agent reaches manufacturing. As a result of these checks run individually from the agent, neither the agent nor its prompts are ready to override them. Egress controls (recipient allowlisting, outbound secret scanning) assist stop an agent holding confidential knowledge from disclosing it by way of an in any other case reliable name.
Instrument, confirm, and consider repeatedly
Observability in agentic programs goes past conventional utility monitoring. The true query is not whether or not a service returned an HTTP 200 standing, however whether or not an agent produced a devoted, policy-compliant output, and the way this may be demonstrated by way of observable execution traces. Answering that requires a ground-truth dataset protecting widespread queries and edge circumstances. This dataset is used for analysis from day one, so high quality is measured in opposition to consultant and appropriately ruled analysis datasets for analysis, not artificial prompts.
This infrastructure can’t be retrofitted and have to be a part of the preliminary design. The continual integration and steady supply (CI/CD) pipeline enforces this, so brokers missing instrumentation fail validation earlier than analysis runs.
We suggest instrumenting three dimensions:
- Intent tracing: Seize the observable agent trajectory (reasoning steps, software invocations, and context retrievals) for every execution. OpenTelemetry spans create a queryable lineage from consumer request to ultimate output.
- Verification and analysis as CI: Any change to the agent (immediate edits, software additions, mannequin swaps) triggers the pipeline. Verification runs first with automated regression exams protecting agent parts after which their interactions. As most harness parts are deterministic, these exams are quick and totally automatable. Analysis runs second, scoring non-deterministic output in opposition to the ground-truth dataset, gated on high quality thresholds. This sequencing is deliberate: Verification acts as a gate, so evaluations solely run on a passing construct.
- Mannequin tiering and routing telemetry: When brokers route between fashions, seize the routing determination and its justification, not simply the result. Tier assignments are derived from analysis outcomes per activity kind and poor outcomes circulate again as new analysis circumstances.
Begin targeted, design for composition
For distributed cloud programs, the {industry} solved the complexity of end-to-end workflows by adopting architectural patterns corresponding to microservices or service meshes. The evolution of agentic programs must observe an identical trajectory, transferring from monolithic, generalist brokers towards a number of collaborating specialised brokers.
Groups ought to outline the issue earlier than contemplating brokers’ performance. Earlier than writing any orchestration logic, they need to produce 5 concrete artifacts:
- Clear scope definition: what the agent ought to and shouldn’t do.
- Interplay mannequin: how customers and different brokers will invoke it.
- Unambiguous software definitions: every software and parameter exactly outlined.
- Floor-truth dataset: the analysis reference described above, established earlier than any implementation begins.
- Analysis standards: high quality thresholds and benchmarks the agent will likely be measured in opposition to.
This self-discipline prevents the commonest failure modes we observe: brokers that tackle too many duties accumulate bloated prompts, lowering accuracy and growing latency.
As soon as a single agent is well-scoped, it have to be designed as a composable constructing block. Due to this fact, we outline a three-tier composition hierarchy:
- MCP instruments are atomic integration contracts. Every software wraps a single functionality (for instance, an API name or a database question) with out encoding workflow assumptions. That is the steady, reusable layer.
- Expertise are bundled, domain-specific compositions of MCP instruments. A code evaluate talent, for instance, would possibly chain a static evaluation software, a style-check software, and an LLM-based reasoning step. Expertise encode area logic however stay transportable throughout workflows.
- Flows are end-to-end orchestrations of abilities, representing full enterprise processes (for instance, a complete PR evaluate pipeline or a requirements-to-deployment cycle).
Every tier is validated independently within the CI/CD pipeline. Part exams cowl instruments and abilities, interplay exams cowl their composition into flows.
These tiers are linked by way of open requirements: MCP and Agent Expertise for software integration, the protocol for agent-to-agent communication, and OpenTelemetry for observability throughout the ensuing interactions.
Determine 1 exhibits how the three tiers construct on one another, from particular person MCP instruments on the base to finish flows on the prime.
Specialize as you be taught
In manufacturing, even well-scoped brokers can break down as real-world utilization diverges from what was anticipated at design time: question patterns shift, tool-selection logic struggles, and efficiency degrades unpredictably.
The best response is to decompose complicated brokers into a number of specialised ones, every with clearer directions, less complicated software units, and extra targeted reasoning. The advantages are concrete:
- Evolve independently: updating a necessities engineering agent doesn’t require touching the coding agent.
- Scale individually: when scope and interfaces are well-defined, particular person brokers will be scaled independently with out redeploying or resizing the broader system.
- Minimized scope: a failure or hallucination of 1 agent doesn’t cascade throughout the whole workflow.
- Value financial savings: A narrowly scoped agent can usually run on a smaller mannequin, which cuts inference and internet hosting prices.
Complexity will be lowered alongside two axes:
- Inside an agent: decompose capabilities into abilities since instruments and few-shot examples eat context on each invocation whereas degrading accuracy and growing price. Decide granularity empirically: merge abilities the agent hardly ever selects and break up abilities that produce completely different conduct relying on the enter.
- Throughout brokers: delegate work outdoors an agent’s area to a specialised peer over the A2A protocol somewhat than extending the present agent. An agent ought to develop in functionality, not in context.
Critically, since every specialised agent solely accesses the info and instruments required for its position, this structure helps to implement least-privilege by design, a compliance requirement in regulated industries.
Realizing these advantages, nonetheless, requires that brokers can discover and interoperate with one another. To stop the emergence of AI islands, we keep a centralized registry of brokers, instruments, and abilities. This registry serves as:
- Discovery mechanism: cataloging obtainable brokers, instruments, and abilities based mostly on metadata saved throughout construct.
- Governance checkpoint: confirming approval of the asset varieties for manufacturing use and sustaining an audit path.
- Safety checkpoint: automated safety checks are utilized earlier than approval, corresponding to immediate injection and comparable points.
- Deduplication safeguard: figuring out equal capabilities already maintained by different groups to keep away from duplicate work. This examine runs routinely at registration, flagging duplicates earlier than approval.
Scale by way of codification
The shift from managing particular person brokers to governing an agent fleet requires agent architectures to be codified. Utilizing Infrastructure-as-code frameworks corresponding to Terraform or AWS CloudFormation, groups provision and handle agent infrastructure with the identical rigor utilized to any manufacturing system:
- High-quality-grained least-privilege roles: scoped per agent or software.
- CI/CD pipelines: constant, validated deployments throughout accounts and areas, with automated deployment stops on failed exams or metric deterioration.
- Coverage-as-code: guidelines (for instance, AWS Config, Open Coverage Agent) scanning deployed brokers for compliance with organizational requirements.
All three are enforced as pipeline gates, validated earlier than registration, not audited after the actual fact.
The adoption mannequin is intentionally bottom-up with central curation. Particular person groups construct abilities and MCP instruments to unravel their instant issues. All groups can contribute by sharing their belongings by way of the registry. A central group builds automated governance checks as a part of the CI pipeline to uphold requirements. To help improvement groups and foster shift-left, the central group moreover gives constructing blocks as governance-as-code modules.
This stability avoids each centrally mandated architectures and unmanaged experimentation. Consequently, when new operational considerations come up, groups can lengthen present patterns somewhat than redesign their architectures.
Operationalizing greatest practices throughout the agent lifecycle
Architectural patterns and governance requirements are solely efficient if they’re embedded into the workflows groups use to construct and function brokers earlier than and at runtime.
Earlier than deployment
Governance begins earlier than a single line of orchestration logic is written. Groups are supplied with reference structure patterns and examples drawn from the registry. These pre-validated blueprints cowl widespread agent configurations, software integration patterns, and composition buildings, which speed up improvement whereas encoding confirmed defaults. Earlier than something reaches manufacturing, standardized CI/CD controls implement these practices. Determine 2 exhibits the 4 phases of a reference pipeline, which run so as from left to proper.
Part 1 from Determine 2 runs quick, deterministic checks: provide chain safety (authorized registries solely), element and interplay testing, analysis library references, and observability instrumentation.
Part 2 runs safety and governance checks in parallel. Static evaluation scans the code for points, and safety exams probe the agent in an remoted staging setting. The pipeline additionally validates egress controls and least-privilege permissions. Two extra checks affirm that the agent’s declared autonomy stage matches its precise permissions and that its configuration passes the policy-as-code guidelines. A governance agent accelerates audits by checking the agent in opposition to established requirements and flagging findings for human evaluate, corresponding to:
- Scope creep: working past initially outlined objective or permissions.
- Immediate bloat: pointless complexity in directions.
- Software misuse: calling instruments outdoors their meant use case.
- Efficiency degradation: declining accuracy, latency, or cost-efficiency.
Determine 3: Instance governance agent workflow
This evaluation surfaces concrete, actionable measures that groups can apply instantly, somewhat than summary suggestions. Determine 3 exhibits the governance agent’s dashboard for an agent maturity evaluation. The governance agent gives proof and actionable suggestions, whereas accountable people personal governance selections. Suggestions require human affirmation earlier than being utilized, sustaining a four-eyes precept for accountability. Findings replace the agent’s governance standing within the registry, whereas full particulars are logged individually in a central information base for audit and traceability.
Part 3 evaluates the agent as a operating system: the ground-truth analysis gate (scores outputs in opposition to benchmarks established at design time) and agent efficiency (latency, token consumption). Determine 4 particulars the metrics, scoring standards and the relationships between them.
Part 4 checks for duplicates earlier than registering the agent, its sub-agents, instruments, and abilities. The next desk exhibits the metadata fields saved per agent within the registry.
| Agent metadata |
Core knowledge:
|
Service stage settlement knowledge:
|
Knowledge governance flags:
|
Desk 1: Instance agent metadata saved within the registry
If any step fails or metrics deteriorate, the deployment stops with logs for root trigger evaluation. If all checks cross, the agent is packaged and deployed as a containerized workload, producing constant, reproducible deployments. This prevents ungoverned brokers from reaching manufacturing, automates compliance checks, and retains the registry correct.
At runtime
At runtime, observability has to catch two sorts of drift. Knowledge drift exhibits up as new or shifting consumer question patterns, or modifications in upstream APIs. Mannequin drift exhibits as rising error charges or falling tool-selection accuracy. When a buyer flags a response, that additionally triggers an investigation. Alerts for drift, distribution shifts, declining analysis scores, or direct buyer flags immediate a staged response. These occasions are logged and forwarded to human evaluate. Moreover, groups can run the governance agent repeatedly to flag drift and operational points for the accountable group to research.
Abstract
Constructing and working brokers at scale is an engineering self-discipline, not an experimentation train.
Efficient governance have to be structural from the beginning, externalized, domain-sensitive, and deterministically enforced. We launched a three-tier composition hierarchy (MCP instruments, abilities, and flows) because the architectural basis for reusable, composable, and interoperable brokers, decomposed into specialised brokers to comprise complexity and scope. We confirmed how verification and analysis in each CI/CD run make high quality assurance a part of on a regular basis improvement, and the way defining agent infrastructure as code lets groups apply the identical governance guidelines to each agent within the fleet. Lastly, we operationalized these patterns throughout the agent lifecycle, from pre-validated reference architectures and structured pipelines to a runtime governance agent that repeatedly evaluates deployed brokers.
Our expertise has proven these practices repay in a couple of methods. Reusable templates and shared infrastructure lowered improvement prices. Groups additionally bought brokers to manufacturing quicker, thanks to plain interplay fashions and automatic deployment. High quality improved too, as a result of the pipeline enforces confirmed patterns at each stage of the lifecycle.
Scaling agentic governance is an industry-wide crucial. The shift towards AI and generative-AI-supported workflow automation is already reshaping how engineering organizations function. The winners will likely be those that transfer past experimentation and set up the self-discipline to control autonomous agent networks at scale. With these practices in place, BMW engineers can concentrate on fixing the issues that matter: Constructing the final word driving machine.
To use these concepts to your personal brokers, begin with the AWS Nicely-Architected Framework. This submit used it because the mannequin for reusable agent blueprints. To see how BMW codifies governance throughout its AWS setting, learn How BMW Group makes use of automation to realize end-to-end compliance at scale on AWS.
Outlook and subsequent steps
The patterns and practices described on this submit are a basis, not a end line. We’re actively extending them throughout a number of fronts:
- Enhance architectural steering: publishing greatest follow guides on architectural trade-offs, composition patterns, and anti-patterns for groups constructing brokers.
- Develop infrastructure-as-code templates: offering agent blueprints as usable IaC modules with built-in safety and governance requirements by default.
- Deepen governance compliance testing: including CI/CD take a look at circumstances verifying governance compliance.
- Automate requirements enforcement: increasing automated checks and managed compliance-scanning guidelines throughout pre-deployment and runtime levels.
- Prolong agentic FinOps: Govern the right-sizing of fashions and power calls.
- Agentic consumer steering: integrating described patterns into Archimedes, BMW’s architectural steering agent, to offer contextual architectural suggestions.
Acknowledgements
The authors want to thank (in alphabetical order) Alexander Stark, Alexander Zimmer, Dr. Céline Laurent-Winter, Dominik Segl, Florian Seidel, Hugo Lerias, Dr. Lars Lewerenz, Mark Neumann, Ralf Bottesch, Ramona Weber, Satish Vasireddy, Samuel Voss, Xagarey-Louis Meyer.
Concerning the authors




