Governing agents is mostly an engineering problem, not a prompting problem. That is the message of a November 19, 2026 post on the AWS Machine Learning Blog, How the BMW Group governs hundreds of agents across thousands of developers. BMW R&D lays out how it builds, governs and operates agents at scale in a regulated industry, and which rules live in code instead of in a prompt.
The scale is real. The post says more than 12,500 developers work on about 500 million lines of vehicle software code. The BMW Connected Vehicle backend has more than 1,300 microservices behind digital services for 24 million vehicles. Hundreds of globally distributed teams build agents.
TL;DR: BMW's five practices
| Practice | What BMW says |
|---|---|
| Govern proactively | Rules sit at an MCP gateway, a central registry and an orchestration boundary, not inside each agent |
| Graduated trust | Autonomy levels 0, 1 and 2, assigned per workflow step |
| Deterministic enforcement | Permission checks, policy-as-code and compliance validation gate every deployment in CI/CD |
| Compose, then specialize | MCP tools, then skills, then flows; split agents that grow too broad |
| Codify everything | Terraform or CloudFormation, least-privilege roles, policy-as-code as pipeline gates |
Why governance cannot be an afterthought
The post names a "governance dichotomy." Teams need freedom to experiment fast. The enterprise needs standards for safety, security, composability and cost. Without balance, BMW warns of "a fragmented landscape of AI islands and costly duplicate work."
Its premise is to "build agents that can cooperate from the start." The architecture centers on the agent harness: a runtime layer around a large language model that provides the execution loop, tool dispatch, memory management and observability hooks. BMW compares the need for reusable blueprints to how the AWS Well-Architected Framework standardized cloud design.
This fits a wider pattern we have tracked. AWS published a reusable-assets library for agent builders, a registry for runtime tool discovery, and guidance on scoping agent autonomy. BMW supplies a large customer's version of the same ideas.
Practice 1: govern outside the agent
BMW wants three properties.
Framework-agnostic and externalized. Authentication, authorization, rate limiting and content filtering are enforced at the integration layer, including a Model Context Protocol (MCP) gateway and a central registry. Governance then survives "framework migrations, model swaps, and team reorganizations."
Domain-sensitive and graduated. Drafting documentation, updating customer records and writing to a production database are different risks. BMW uses three levels:
- Level 0, human-in-the-loop: every action needs explicit approval. This is the start for new agents and high-risk work.
- Level 1, human-on-the-loop: the agent acts and surfaces decisions for asynchronous review. It suits medium-risk tasks with defined inputs, outputs and rollback.
- Level 2, autonomous within guardrails: the agent works inside strict policy boundaries enforced deterministically, not by prompt instructions. It is reserved for low-risk operations with verified track records.
The key rule: assign trust per step, not per agent. One workflow can mix all three levels, and autonomy rises as evaluation data builds confidence.
Deterministically enforced. Governance runs as code outside the agent's reasoning loop, mainly in CI/CD. Permission checks, policy-as-code rules and compliance validations gate every deployment before production. Because they run separately, neither the agent nor its prompts can override them. Egress controls such as recipient allowlisting and outbound secret scanning stop an agent holding confidential data from leaking it through a legitimate call.
That last point matters. Several incidents we covered, such as an agent forwarding email in a misalignment report, came from legitimate channels used wrongly. See also our MCP security guide.
Practice 2: instrument, verify, evaluate
BMW says the question is no longer whether a service returned HTTP 200, but whether the agent produced a faithful, policy-compliant output that execution traces can show. It recommends three dimensions:
- Intent tracing. Capture reasoning steps, tool calls and context retrievals for each run, using OpenTelemetry spans to build lineage from request to output.
- Verification and evaluation as CI. Any change, whether a prompt edit, new tool or model swap, triggers the pipeline. Verification runs first with automated regression tests. Evaluation runs second and scores non-deterministic output against a ground-truth dataset, gated on quality thresholds. Evaluations only run on a passing build.
- Model tiering and routing telemetry. When agents route between models, log the decision and its justification. Tier choices come from evaluation results per task type, and poor outcomes feed back as new evaluation cases.
The post says this cannot be retrofitted. Agents without instrumentation fail validation before evaluation runs.
Practice 3: start focused, design for composition
Before orchestration code, BMW says teams produce five artifacts: scope definition, interaction model, unambiguous tool definitions, a ground-truth dataset and evaluation criteria. This targets a common failure: agents that take on too much and gather bloated prompts, which lowers accuracy and raises latency.
Then comes a three-tier hierarchy:
| Tier | What it is |
|---|---|
| MCP tools | Atomic integration contracts, one capability each, no workflow assumptions |
| Skills | Bundled, domain-specific compositions of tools, such as a code-review skill chaining static analysis, a style check and an LLM step |
| Flows | End-to-end orchestrations of skills, such as a full pull request review pipeline |
Each tier is tested separately in CI/CD: component tests for tools and skills, interaction tests for flows. The tiers connect through open standards: MCP and Agent Skills for tools, an agent-to-agent protocol, and OpenTelemetry for observability.
Practice 4: specialize as you learn
Real usage drifts from design assumptions. BMW's answer is to split complex agents into specialized ones. The post lists concrete gains:
- Evolve independently: updating a requirements agent does not touch the coding agent.
- Scale individually: well-defined interfaces let each agent scale alone.
- Contain failures: one agent's hallucination does not cascade across the workflow.
- Cut cost: a narrow agent can often run on a smaller model.
Complexity is reduced two ways. Within an agent, move capabilities into skills, because tools and few-shot examples use context on every call. Across agents, delegate work outside an agent's domain to a specialist peer over the A2A protocol. BMW's phrase: "An agent should grow in capability, not in context." Narrow scope also supports least privilege, a compliance need in regulated industries.
The registry: discovery, governance, security, deduplication
To avoid AI islands, BMW keeps a centralized registry of agents, tools and skills. It serves four jobs:
- Discovery from metadata stored at build time.
- A governance checkpoint that confirms approval for production and keeps an audit trail.
- A security checkpoint with automated checks, such as for prompt injection, before approval.
- A deduplication safeguard that flags equivalent capabilities other teams already maintain.
The metadata per agent includes identifier, name, description, version, business and IT owners, capabilities, status (plan, active or deprecated), a link to the specification, and hosting mode. It adds service-level targets (availability, P95 response time, support model) and data governance flags: information classification, personal data processed, retention, whether payloads are logged, whether PII is redacted, and whether a human in the loop is required for high-impact or irreversible actions.
The four-phase deployment pipeline
BMW describes a reference pipeline that runs in order:
- Fast deterministic checks: approved registries only for supply chain security, component and interaction tests, evaluation library references, and observability instrumentation.
- Security and governance in parallel: static analysis, security tests against an isolated staging environment, egress and least-privilege validation, a check that the declared autonomy level matches actual permissions, and policy-as-code rules. A governance agent checks the agent against standards and flags findings such as scope creep, prompt bloat, tool misuse and performance degradation.
- Evaluation as a running system: a ground-truth gate plus latency and token consumption.
- Duplicate check and registration of the agent, its sub-agents, tools and skills.
If a step fails or metrics worsen, deployment stops and logs support root-cause analysis. If all pass, the agent ships as a containerized workload. The governance agent only recommends. Recommendations "require human confirmation before being applied," keeping a four-eyes principle, and accountable humans own the decisions.
At runtime: drift and escalation
BMW watches for two kinds of drift. Data drift appears as new query patterns or changed upstream APIs. Model drift appears as rising error rates or falling tool-selection accuracy. Alerts for drift, declining evaluation scores or a customer flag trigger a staged response, are logged and go to human review. Teams can also run the governance agent continuously.
What the post does not say
- No numbers on results. BMW says reusable templates and shared infrastructure reduced development costs and sped up production, but gives no percentages, costs or agent counts.
- No failure stories. There are no examples of an agent blocked by the pipeline, or of a level 2 agent that was later demoted.
- No tool names for the registry or gateway. The text names Terraform, CloudFormation, AWS Config and Open Policy Agent as examples, not BMW's actual stack.
- It is an AWS-hosted post. Treat it as a customer's account of its practice, not an independent audit.
What to do with this
Builders: Put your agent checks in the pipeline, not the prompt. Start with three gates: least-privilege roles, an egress allowlist, and an evaluation threshold on a ground-truth set. Label every workflow step with an autonomy level.
Founders and engineering leads: Ask whether you can list every agent running in your company, its owner and its data class. If not, a registry comes before more agents. For sandboxing choices, see our comparison of agent sandboxes, and for identity, Okta cross-app access with AgentCore Gateway.
Security teams: BMW's rule that governance code runs outside the reasoning loop is the part to copy. If a runtime control matters to you, make sure the agent cannot switch it off.
Sources and related reading
- AWS Machine Learning Blog, How the BMW Group governs hundreds of agents across thousands of developers (November 19, 2026)
- Model Context Protocol and OpenTelemetry, the open standards BMW names
- AWS agent registry and runtime tool discovery
- AWS trust in depth for agent autonomy
- AWS Marketplace x402 and AgentCore payments
