L5 · MAESTRO
Evaluation and Observability
The monitoring, logging, tracing, alerting, and human-review surfaces that let operators understand what an agent did, detect anomalies, and intervene.
L5 governs the output return path and audit/log emissions: the surfaces that make the system observable after the fact.
The Evaluation and Observability layer covers the monitoring, logging, tracing, alerting, and human-review surfaces that let operators understand what an agent has done, detect anomalies in what it is doing, and intervene when something goes wrong. This layer is not just about post-hoc debugging. It is the operational foundation for every detective and corrective control in the system. In a multi-agent system (MAS), this layer has heightened importance: individual agents may appear normal in isolation while the system as a whole drifts, making distributed and cross-agent observability a distinct engineering requirement.
What lives here
- Distributed tracing pipelines that correlate spans across agent calls, tool invocations, and peer-agent interactions (OpenTelemetry, Jaeger, Zipkin)
- Structured logging of agent inputs, outputs, tool arguments, and decision rationales
- Metrics collection: latency, token consumption, tool call frequency, error rates, semantic drift scores
- Evaluation harnesses that run against agent outputs offline or in canary: LLM-as-judge, embedding-distance drift, human spot-check queues
- Human-in-the-loop (HITL) interfaces: approval queues, audit review dashboards, escalation paths
- Alert rules and anomaly detection that fire when observable behaviour departs from baseline
- Immutable or tamper-evident audit logs: append-only stores, WORM buckets, hash-chained records
- Continuous evaluation pipelines (CI-eval) that run regression suites against deployed agents
- Post-incident forensics tooling: replay of agent traces, attribution of actions to identities
The MAESTRO guide (Cloud Security Alliance, Ken Huang, 2025) identifies a MAS-specific threat at this layer: individual agents may appear to perform normally while collectively exhibiting degradation that only becomes visible in aggregate metrics. This makes cross-agent correlation a first-class L5 requirement, not an optional enhancement.
Concrete example: A financial-analysis platform runs three Semantic Kernel agents (a data-fetcher, an analyst, and a report-writer) connected via OpenTelemetry. Without cross-agent span correlation, a gradual increase in hallucinated figure citations by the analyst agent is invisible in per-agent logs (each response passes its own plausibility check). Only when an L5 evaluation harness computes embedding-distance drift across the full pipeline does the operator see that the analyst’s outputs have shifted 0.4 cosine distance from the established baseline over 72 hours, triggering an alert before the report-writer publishes.
Threats that target this layer
- T8 Repudiation and Untraceability: an agent that can deny or obscure its actions requires that the observability layer capture a complete, tamper-resistant record. Gaps in logging, mutable audit records, or missing action attribution directly enable T8. Every OWASP v1.1 T8 mitigation is primarily an L5 control.
- T10 Overwhelming Human-in-the-Loop: if the human-in-the-loop interface is the primary safety control, it becomes an attack surface: adversarial workloads can generate approval queues large enough that human reviewers approve without adequate scrutiny. Effective HITL design at L5 includes workload management, fatigue-aware routing, and escalation policies.
- T5 Cascading Hallucination Attacks: observability tooling that measures semantic quality (embedding drift, factual consistency scores, downstream citation accuracy) provides the only reliable signal that hallucination rates are elevated above baseline. Without this, a cascade can persist through many agent turns before an operator notices.
Mitigations anchored here
- behavioural divergence monitoring: continuously measure agent output against a declared semantic baseline. Flag statistically significant departures from expected output distribution before they accumulate into visible harm. The primary L5 control for catching T5 and T7 drift early.
- goal-consistency monitoring: at each agent turn, evaluate whether the agent’s declared intent is consistent with its previous turns and its stated objective. Inconsistency is an early signal of goal substitution (T6) or memory poisoning (T1) before the effect is observable in tool calls.
- multi-source verification: for claims the agent makes that will be acted on, corroborate against at least two independent retrieval sources before propagating the claim. Applies both at evaluation time (offline) and in a live canary posture.
- human dual-control: route high-consequence actions through two independent reviewers. Provides a structural check on the human-approval surface (T10) that is independent of whether any single reviewer was fatigued or deceived.
- plan-vs-goal validation: validate agent plans before execution and record the validation decision in the audit log. The audit record is an L5 artifact; the execution guard is an L3 control. Both are required for full coverage.
- legal-hold / WORM retention: when an agent is involved in a regulated action or an incident begins, activate a legal-hold policy that prevents log deletion, rotation, or modification. Preserves the audit record that T8 attacks attempt to erase.
- Sigstore signing: sign pipeline artifacts and evaluation results with Sigstore/Rekor to produce a tamper-evident record of what evaluation ran, when, and what it found. Prevents post-hoc alteration of evaluation results.
How L5 relates to its neighbours
L5 sits directly above L4 Deployment Infrastructure, which provides the substrate (log forwarding agents, metrics exporters, storage backends) that L5 depends on. If L4 is compromised in a way that silences telemetry, L5 loses its visibility. Hardening log infrastructure (immutable storage, network-isolated log collectors) is an L4 concern that serves L5 function.
Below L5 in the MAESTRO stack is L4; above L5 is L6 Security and Compliance, the vertical band. L6 policies determine what must be logged, how long records must be retained, and who may access audit data. L5 provides the mechanism; L6 provides the mandate and the governance accountability structure.
Observability is not a security afterthought in agentic systems. It is a primary control. An agent that cannot be traced, evaluated, or interrupted provides no meaningful safety guarantee regardless of how carefully its model, data, and framework layers were hardened. L5 is where that accountability is operationalised.
Threats at this layer
Every threat whose maestroLayers list includes L5. The prose above may discuss a subset; this list is the complete index.
Controls mapped to this layer
Auto-generated from the mitigation catalog: every mitigation whose maestroLayers list includes L5, sorted by maturity tier (Tier 1 production-canonical first, then Tier 2, then Tier 3 research-stage).
An agent is composed of artifacts produced at different times by different identities: model weights, prompt templates, tool descriptors, MCP server binaries, and audit-log batches. Any of those artifacts can be substituted or tampered with between the moment they are built and the moment they are loaded. Sigstore addresses this by signing each artifact at build time using a short-lived certificate tied to the workload identity that produced it, recording the signature in an append-only public transparency log, and requiring verification against that log before the artifact is loaded or executed.
- Tier 2Behavioural red-teaming(Behavioural red-teaming — adversarial evaluation of agent reasoning and tool use)
An agent exposes more attack surface than a static model: it reasons, plans, selects tools, and acts across multiple turns. Static analysis can characterise that surface, and runtime guardrails can block known-bad patterns, but neither can predict what the agent will do under attacker pressure it has never seen. Behavioural red-teaming addresses that gap through structured adversarial evaluation: probing the agent's reasoning, planning, and tool-use paths with attack strategies before each release.
- Tier 2Blockchain tx guard(Blockchain transaction guard — pre-commit safety checks for every agent-initiated transaction)
A blockchain transaction, once committed, cannot be undone. An agent that signs and broadcasts a transaction without an enforcement layer before it can exceed its authorised value, call a contract it was never provisioned to reach, or drain a wallet in a runaway loop, and by then the funds are gone. A transaction guard intercepts each proposed transaction before signing, checks it against value bounds, a contract allowlist, a gas or compute-unit limit, and a replay-protection nonce, and refuses to sign anything that falls outside declared policy.
- Tier 2Code review gate(Code-generation review gate — human approval before AI-generated code executes or merges)
An AI coding agent produces code that can be executed or merged to a production branch without a human ever reading it. If the agent has been manipulated, its generated code can contain hidden payloads, backdoors, or privilege-escalating logic. A code-generation review gate prevents that: every change attributable to an AI agent must pass automated static analysis and receive explicit human approval before it can merge or execute, and the agent identity that authored the change is structurally barred from also approving it.
- Tier 2Data classification(Data classification with tool-access allow-lists — a sensitivity label on every dataset, enforced at every access seam)
Every dataset, document, and external system an agent can reach carries a classification label. The agent's permitted-class set and the tool's permitted-class set are intersected at the moment of every read or write. When the requested data's class falls outside that intersection, access is denied at the seam. This is the data-side complement to least-privilege: it adds a data-sensitivity constraint that role scoping alone does not provide.
An agent's behaviour can shift gradually over time: tool-selection patterns change, refusal rates drop, output style drifts. No single interaction reveals it, and a single-shot evaluation cannot catch a trend that spans weeks. Behavioural divergence monitoring detects that drift by comparing per-window statistical distributions of observable agent signals against a declared baseline, and alerting when the gap exceeds a threshold.
An AI agent operating with broad authority can propose actions that are irreversible: deleting records, modifying IAM policies, moving funds. A single human reviewer at the approval gate is a single point of failure, one compromised account, one fatigued reviewer, or one successful social-engineering attempt is enough to commit the action. Human dual-control addresses that by requiring two distinct, independent humans to approve before the action commits.
- Tier 2Egress DLP(Output egress DLP — inspection gate for PII, secrets, and IP at the agent boundary)
An agent produces output continuously across multiple channels: user-facing responses, tool-call parameter envelopes, log records, and outbound HTTP requests. Any of those channels can carry sensitive content the agent has retrieved, been fed, or been tricked into including. Output egress DLP places an inspection gate at the boundary so that PII, credentials, and proprietary content are classified and either redacted or quarantined before they leave the trust boundary, regardless of how they got into the output.
An agent that is uncertain about what to do next faces a choice: refuse and ask for clarification, or proceed on its best guess. In low-stakes situations that tradeoff is tolerable. In agentic systems that write, delete, or send, a confident-sounding but wrong output can commit an irreversible action. A fail-closed gate resolves that choice structurally: below a configured confidence threshold, the agent stops and escalates rather than guessing.
- Tier 2Goal consistency(Goal-consistency monitoring — a per-step check that the agent is still pursuing its original objective)
An agent's goal can drift across reasoning steps without any single catastrophic event: a manipulated tool output, a planted instruction in retrieved content, or an incremental semantic shift across many planner outputs can each redirect the agent away from its original objective. Goal-consistency monitoring addresses this by persisting the originally-declared goal, deriving a goal-state signal at each reasoning step, and computing a similarity score between the two. When the score falls below a per-task threshold, the monitor pauses the agent and surfaces the divergence for human review before any irreversible action executes.
- Tier 2Graceful degradation(Graceful degradation — fail closed where it matters, fail open where it's safe)
An agent that encounters a quota trip, a dependency failure, or a timeout faces a choice: continue at reduced quality, or refuse. Getting that choice wrong is the core operational failure. Graceful degradation requires the answer to be declared before the incident, not improvised during it: write-authority paths fail closed and return a refusal; read-only paths fail open and disclose the degraded state explicitly.
- Tier 2HITL calibration loop(HITL feedback-loop calibration — reviewer overrides fed back into agent tuning)
An agent at a human-in-the-loop gate will be overridden when its decisions do not match the reviewer's judgment. Without a return path, those corrections are discarded: the same miscalibration surfaces again in the next review cycle and the one after that. A feedback loop closes that gap by capturing each override event as a structured record, accumulating those records into a calibration dataset, and using patterns in that dataset to drive targeted changes to the agent's system prompt, tool-scope policy, or divergence-monitor thresholds. A well-calibrated agent produces fewer out-of-distribution decisions, so the review queue contracts over time.
- Tier 2Kill switch(Kill switch: human authority to halt one agent, a class, or the entire deployment)
Agentic systems can act faster than a human can intervene through normal channels. A kill switch is the operational guarantee that a named human role can stop agent activity at any scope (single instance, class, or global) through a documented runbook, without requiring a code change or redeployment, and with every invocation written to an audit trail.
- Tier 2Legal hold(Legal hold and WORM retention — immutable audit storage that survives a compromised recorder)
An audit trail is only useful if its records cannot be altered after the fact. Without a storage-layer enforcement mechanism, a sufficiently privileged attacker (or a compromised recorder identity) can overwrite or delete the records that document what happened. Legal hold and WORM retention solve this by placing audit records in storage that the provider itself enforces as immutable: no user, including account root, can modify or delete a locked object within the retention window. Legal hold extends that protection indefinitely for active incidents, lifted only through an out-of-band authority outside the normal operations team.
- Tier 2Loop limit(Reflection-loop depth limit — a ceiling on how often an agent reworks its own answer)
An AI agent can review and rewrite its own answer to improve it. If that review runs too long it ties up resources and stops the agent responding in time, and an attacker can deliberately trigger those endless cycles to stall the system. A reflection-loop depth limit prevents that: it sets how many review rounds an agent may run before it has to stop.
- Tier 2Mem anomaly(Memory anomaly detection — runtime detection of poisoning that slipped past validation)
An agent's memory store can receive adversarial content that passes schema and policy validation because the content is structurally valid but statistically unusual. Memory anomaly detection addresses this by monitoring write rates, embedding distances, provenance tags, and retrieval patterns at runtime, and quarantining writes whose statistical signatures diverge from the established baseline.
- Tier 2Multi-source verify(Multi-source verification — cross-check factual claims against an independent source before commit)
An agent that writes a false claim to memory, passes it to a downstream agent, or returns it to a user has introduced an error that each subsequent step may treat as established fact. The cascade depends on one condition: the false claim goes unchallenged. Multi-source verification breaks that condition by requiring every novel factual assertion to be corroborated by a structurally independent source before it is committed. If the second source cannot corroborate the claim, the assertion is refused or down-weighted before it enters any downstream step.
- Tier 2OOB verify(Out-of-band verification — independent-channel confirmation for irreversible agent actions)
An agent that can propose payments, update banking details, or modify production configuration is, by construction, a manipulation surface. If the only thing standing between a proposed change and its execution is the agent's own UI, a successful prompt injection or RAG poisoning attack requires no additional steps. Out-of-band verification breaks that dependency by routing a one-use confirmation code through a channel that is structurally separate from the agent's primary interaction channel, so an attacker who controls the agent's context cannot complete the approval without also compromising the user's registered secondary device.
An AI agent can produce output that is harmful, deceptive, or factually wrong while still sounding fluent and confident. Output moderation places an independent classifier or moderation model between the agent and its destination, checking every output before it reaches a user or a downstream system. The generating model does not evaluate its own answer; a separate gate does.
Prompt injection succeeds when untrusted content entering an agent's prompt is indistinguishable from trusted instruction. Three layered techniques address that: spotlighting tags untrusted content with a machine-readable origin mark before it reaches the model; delimiter defence rejects input carrying reserved framework tokens before the model is called; and dual-LLM extraction routes attacker-influenceable content through a quarantined model that holds no tool access, so injected instructions cannot reach the model that can act on them.
- Tier 2Plan check(Plan-vs-goal validation — independently check each proposed step against the original goal)
A plan-then-execute agent produces a sequence of steps before acting. If the planner is manipulated, it will emit steps that serve the attacker's goal rather than the user's. Plan-vs-goal validation addresses this by placing an independent validator between the planner and the execution loop: it evaluates each proposed step against the originally-declared goal before the agent is permitted to act on it.
An LLM produces tool-call arguments through generation, not through a type system, and generation is not reliable. The arguments may be wrong in type, out of range, or assembled in a combination that violates business rules. A pre-execution validation gate intercepts the call before it reaches the tool: a schema pass confirms each argument conforms to the declared JSON Schema, and a policy pass confirms the argument combination is permitted for this agent and this action. The tool executes only when both passes clear.
- Tier 2Secret scan(Secret scanning on agent-generated artefacts — detecting credentials before they escape the trust boundary)
An agent produces code, configuration files, tool-call payloads, and log records continuously and at a rate no human reviewer can match. Any of those artefacts may contain a live API key, service token, or private certificate, placed there accidentally through model context, or deliberately through prompt injection or context poisoning. Secret scanning places an inspection gate at every agent output seam: regex patterns match known token formats, entropy analysis detects arbitrary high-entropy strings, and validator calls confirm which candidates are live credentials. The CI-secret-scanning pattern is mature; the agentic specialisation is seam placement, moving the scanner from the repository gate to the agent egress point, where artefacts can be intercepted before they reach any downstream system.
- Tier 2Static analysis(Static analysis on generated code — a pre-execution gate on LLM-emitted artifacts)
An agent that can generate and execute code treats code generation as a tool call and code execution as the outcome. If the generated code contains a known-dangerous pattern, no amount of prompt engineering stops it from running once the execute call goes through. Static analysis closes that gap: it scans every code artifact the agent emits against a rule set before execution is permitted, catching the vulnerability patterns the same tooling already catches in human-written code.
- Tier 3Memory-poison defence(Memory-poisoning defence — embedding-space anomaly detection and retrieval re-ranking)
An agent that reads from a vector store assumes the stored content reflects what was legitimately written. An adversary who can write to that store can inject passages that divert the agent's retrieval toward attacker-controlled content. This control applies two defensive layers: anomaly detection on writes, which quarantines incoming embeddings that are statistical outliers relative to existing cluster centroids; and re-ranking on reads, which uses a cross-encoder or probe-gradient scorer to demote adversarial candidates after dense retrieval. Both layers are research-stage. No turnkey production implementation exists as of catalogue version; deploy additively on top of Tier 2 baseline controls.