Governed AI in production, mapped to SafeAI.sg
A reference architecture for an agentic harness, its knowledge and data layers, and the governance plane around them. Each component is read against SafeAI.sg's approach to AI governance: a risk score that decides how much control a use case needs, and a principle of checking before an agent acts. Each policy is then traced to the control that enforces it.
One tier, many controls
A use case's risk tier, set by its Universal AI Use-Case Risk Score (UARS, explained below), decides which controls switch on, so governance stays proportionate to risk.
Decide centrally, enforce locally
One policy engine makes the decision. Six enforcement points across the stack apply it, because no single point is enough.
Before the action, not after
For consequential agents, checks run while the intent is still only a proposal. That is the Intent Window Principle.
How this page is organised
The page has eight tabs. This Overview introduces SafeAI.sg and UARS, and the seven tabs below build on it in order. Each tab ends with a link to the next one.
Start here: what SafeAI.sg and UARS are
No prior knowledge needed. This section explains the two ideas the rest of the page depends on.
SafeAI.sg
SafeAI.sg is Singapore's first industry-led Centre of Excellence for practical AI governance. It helps organisations deploy AI with the right level of rigour: proportionate to risk, free to access and built by practitioners for practitioners.
It is not a regulator, it does not certify anyone and it does not endorse products.
The problem it addresses is a common one. Many organisations over-govern low-risk AI tools, which stifles useful work, while under-governing high-risk ones, which creates avoidable harm. SafeAI.sg's answer is to match the amount of governance to the amount of risk.
UARS: the Universal AI Use-Case Risk Score
UARS stands for Universal AI Use-Case Risk Score. It is SafeAI.sg's proposed method for scoring how risky an AI use case is, so an organisation can decide how much governance it needs. You score the use case on five dimensions, combine them into one number, and that number places the use case in one of three tiers. SafeAI.sg offers a free, self-service toolkit for doing this in about 30 minutes.
A higher total means more risk and therefore more governance. It is a proposed illustrative framework, not a standard.
The five dimensions
Total = (Autonomy x 2) + (Data sensitivity x 2) + (Attack surface x 1.5) + (Consequentiality x 1.5) + (Error tolerance x 1). The indicative range is 7 to 21. Autonomy and data sensitivity count double, so they move the score most. The plain-language questions above are this page's reading of each dimension.
The three tiers
Each tier has a governance profile, a set of controls expected at that level of risk. This page reads each tier as adding to the one before it. Unfamiliar control names are explained in the glossary. The examples are for orientation and are not scored cases.
Tier 1: Standard
UARS 7 to 10Lower-risk uses, such as an assistant that drafts text for a person to review before anything is sent.
ProfileLLM guardrails, agent identity, adversarial testing.
Tier 2: Agentic
UARS 11 to 15AI that takes actions with some independence, such as an agent that updates records or sends messages on a person's behalf.
AddsHuman-in-the-loop checkpoints, tool scope enforcement, trajectory monitoring.
Tier 3: Full stack
UARS 16 to 21High autonomy or high consequence, often with sensitive data and actions that are hard to reverse.
AddsAI security posture management (AI-SPM), a generative AI firewall, circuit breakers, safety cases.
Why agents need runtime governance, not only build-time governance
In a traditional stage-gated lifecycle, governance is concentrated at build time: requirements, design review, testing and a sign-off, after which the software is assumed to behave as approved. Agents break that assumption, because their behaviour is decided while they run. This section contrasts the two models so the rest of the page makes sense. Numbers link to the sources at the end of the section.
Traditional stage-gated lifecycle (waterfall)
Governance is front-loaded and peaks at the sign-off gate. Once live, the software is assumed to behave as approved.
Agentic lifecycle with runtime governance
Gates still exist, but governance continues through every run. The agent's behaviour is decided, watched and evidenced as it acts.
Bar height shows the intensity of governance activity at each stage. The shape is illustrative, not measured data.
Side by side
Why the stage-gated assumptions break for agents
Behaviour is non-deterministic and path-dependent
The same request can take different routes through different tools and produce different results. Research on runtime governance makes the point that this behaviour cannot be fully governed at design time.1
Inputs are open-ended and can be hostile
Agents read documents, email and tool results. Any of it can carry instructions meant to redirect them. OWASP's agentic risk list puts goal hijack and tool misuse at the top.4
Autonomy multiplies the effect of a mistake
An agent that can call tools turns a wrong judgement into an action, and one action can trigger the next.
Behaviour drifts without any code change
A model update, a new document in the knowledge base or a changed tool response alters behaviour while the signed-off artefact stays the same.
Speed and scale outrun human review
Agents act faster than periodic review can follow, so controls that depend on a person reading a report after the fact arrive too late.
One rule, two worlds
The same policy, governed in each model. Settlements above the handler's limit need a supervisor decision.
Build-time governance
- A requirement is written: settlements above a limit need a supervisor.
- The design is reviewed and the rule is coded as a check in the claims application.
- Twelve test cases are signed off in user acceptance testing.
- The system is released. Governance moves to a yearly audit.
- In production, a path nobody anticipated, such as a different tool that also pays a claim, is not checked. Nobody sees it until the audit.
Run-time governance
- The rule is a policy in the policy engine, with an owner, a version and tests.
- The agent proposes each settlement as a structured intent before anything runs.
- The engine decides allow, deny or escalate for that intent, whichever tool or path the agent used. A supervisor approves anything above the limit.
- An injected invoice asks for the full amount. The engine denies it, the alert fires and the attempt becomes a new eval case.
- The rule changes next month. It is updated once in the engine, tested, and applies to every agent at once.
What to keep and what to add
Keep from the lifecycle you know
- Requirements and specification. The policy catalogue and acceptance evals are the new requirements document.
- Threat modelling and design review. They still come first, and they now feed the test scenarios and the runtime rules.
- Independent testing and release gates. They become evals and an evidence pack, enforced by admission control.
- Change control and separation of duties. They apply to prompts, models, tools and policy packs as well as code.
- Documentation and ownership. They become policy as code, runbooks and named owners.
Add for agents
- A decision point that evaluates each consequential intent before it runs.
- Scoped, short-lived credentials and parameter limits at the tool.
- Trajectory monitoring, circuit breakers and scoped kill switches.
- Tamper-evident decision logs and runtime probes that keep proving the controls work.
- Expiring evidence, so a pack proves today's agent and not last quarter's.
The short version: governance moves from a gate to a loop. The gate still exists, and the loop keeps running for as long as the agent does.
A fair reading
- Royce's 1970 paper is the source of the stage-gated picture, yet it warned that a single pass through sequential stages is risky and recommended iteration and feedback.2 Here, waterfall means the front-loaded, gate-centred governance pattern, not a claim about how every team works.
- Modern DevOps and CI/CD already add continuous controls to delivery, such as automated tests, staged rollout and monitoring. Runtime governance extends the same thinking from deploying software safely to governing behaviour safely.
- This is not a replacement for build-time governance. It is a superset: the gates stay, and the governance continues while the agent runs. Frameworks such as IMDA's for agentic AI also pair assessing and bounding risks upfront with technical controls and monitoring.3
Sources for this section
- Runtime Governance for AI Agents (arXiv 2603.16586)
- Winston W. Royce, Managing the Development of Large Software Systems (1970, archived copy)
- IMDA, Model AI Governance Framework for Agentic AI, version 1.5
- OWASP GenAI Security Project, Top 10 for Agentic Applications for 2026
- DORA, State of AI-assisted Software Development 2025
- Gravitee, Runtime governance for AI agents with human-in-the-loop approvals and break-glass access controls
The architecture, layer by layer
Requests flow down and data feeds flow up. Pick a risk tier (the UARS tiers explained above) to see which components carry a control from that tier's profile, then select any component or layer name for its role, relationships and the policies it enforces. This page reads each tier as adding to the one before it.
Highlighted: carries a control from the selected tier's profile
The tiers follow SafeAI.sg's proposed illustrative UARS framework, explained in Start here. It is not a standard.
Engineering principles and runtime governance capabilities
What the architecture is expected to show: engineering properties in every component, and the capabilities that govern agents while they run.
Core engineering principles built into the harness
The recommended architecture is not only a set of boxes. It is a set of engineering properties that every component is expected to show. DORA's research finds that AI amplifies the strengths and weaknesses an organisation already has, and that a quality internal platform is among the capabilities that make AI pay off, so these principles belong in the platform, not in each agent.5 Each is paired with what good looks like, so it can be checked in a design review.
Core capabilities for agentic runtime governance
Runtime governance is a loop that runs for every action, in every run, for as long as the agent exists. The harness has to provide each capability below, because no agent team should have to build them. For why this differs from build-time governance, see the contrast on the Overview tab.
A common architecture centralises enforcement where traffic to models, tools and other agents is visible, so approvals and controls behave consistently across interaction types.6 The capabilities below group by when they act. The independent checker, which gives the loop a second opinion from a different model, is explained in its own section after the table.
Tier expectations are an illustrative reading of the UARS tier profiles, with each tier adding to the one before. Runtime governance is not optional at Tier 1: the baseline controls already act at run time. The depth grows with risk. Numbered sources are listed at the end of the runtime governance section on the Overview tab.
Doer-checker: independent checking inside the loop
The doer-checker model adds a second, independent mind to the loop. A doer agent, powered by one model, proposes the action. A checker agent, powered by a model from a different provider and equipped with different skills, assesses the proposal independently, without being anchored by the doer's reasoning. It is the machine version of two long-standing controls: the maker-checker or four-eyes principle in finance, and design diversity in safety-critical engineering, where independently built components are used so that one fault does not defeat both.
It also matches the separation in the Agent Control Standard, where a guardian agent inspects what an agent is about to do and returns a verdict before it happens.5 Here the checker supplies a reasoned second opinion, and the policy engine remains the decision point.
Doer agent
Model A, provider 1Job: Complete the task and propose the action.
Skills: Domain task skills, planning, tool use, context building, drafting.
Sees: The request, the context, its tools.
Produces: A structured intent with references to its evidence.
Checker agent
Model B, provider 2Job: Assess whether the proposal is appropriate. Assume it may be wrong.
Skills: Policy and risk assessment, cross-source verification, arithmetic and consistency checks, purpose and scope matching, adversarial review.
Sees: The structured intent, evidence references, source labels and a policy summary. Never the doer's reasoning.
Produces: AGREE, DISAGREE or UNCERTAIN, with reasons.
The doer and the checker side by side
Rules that keep the checker independent
- Use a different provider and model family for the checker. Same-family judges favour their own outputs and their family's, so a same-family checker is the weakest option.1,2
- Give the checker different skills, not just a different model. Diversity of how it reasons matters more than the number of checkers.4
- Blind the checker. It receives the structured intent and the evidence, never the doer's reasoning, summary or confidence.
- Frame the task neutrally: assess the proposal, do not approve it, and assume it may be wrong.
- Let the checker verify evidence itself through read-only access to systems of record, instead of trusting the doer's account of the facts.
- Keep the checker's rubric hidden from the doer, and do not optimise the doer against the checker's verdicts, or the doer will learn to please it.
- Separate the infrastructure: own keys, budgets, rate limits, logs and identity for each model.
- Pin and change-control both model versions. A silent update to either one changes the pair's behaviour.
- Make the checker advisory: it can only tighten an outcome, and the policy engine and the people remain the authority.
Why the research shapes the design
The conclusion is balanced. Using a different provider is a necessary step, because same-family checking is demonstrably biased. It is not enough on its own, because even different providers share errors. That is why the design adds different skills, blinded inputs, independent evidence and a deterministic backstop.
Two ways to check
How doer and checker outcomes are resolved
The governing rule: the checker can only make an outcome stricter. It cannot override a deterministic deny and it cannot turn an escalation into an allow. This keeps the final authority with the policy engine and with people, and stops a persuasive but wrong checker from loosening a control.
What to measure
- Detection rate: the share of seeded faults and known-bad proposals the checker catches.
- False alarm rate: how often it disagrees with a correct proposal, which sets the human review load.
- Disagreement rate and its trend, by use case and by tier.
- Error correlation: the share of golden-set cases where both the doer and the checker are wrong.
- Human override rate on disagreements, in both directions.
- Added latency and cost per checked intent.
- Drift after any model version change on either side.
- The checker's own red-team results, including injection aimed at the checker.
Risks and trade-offs
Where it applies by tier
The tier mapping and the thresholds are this page's suggestions and are not part of the SafeAI.sg tier profile. Test the checker with the same assurance process as any agent: it needs its own evidence pack, probes and drift monitoring.
Sources for this section
- Panickssery, Bowman and Feng, LLM Evaluators Recognize and Favor Their Own Generations (NeurIPS 2024)
- Pombal, Rei and Martins, Self-Preference Bias in Rubric-Based Evaluation of Large Language Models (2026)
- Kim, Garg, Peng and Garg, Correlated Errors in Large Language Models (ICML 2025)
- Nine Judges, Two Effective Votes: Correlated Errors Undermine LLM Evaluation Panels (2026)
- OWASP GenAI Security Project, Agent Control Standard (ACS)
Six enforcement points, one decision point
The policy engine decides. These six places apply the decision. Each one stops a different class of problem, and each has a blind spot. The blind spot matters as much as the strength, because it tells you which other control has to sit beside it. Read each block as: what this point does, what it cannot do alone, and how the gap gets covered.
Channel and identity
Who is calling, with which rights, at which tier.
What the agent does once it has started.
Identity answers who is acting. It does not answer whether what they are doing is right. Once a legitimate person starts a legitimate agent with valid credentials, every identity check has already passed, and nothing in identity looks at the content the agent reads or the steps it takes afterwards.
A claims handler legitimately starts the settlement assistant. A customer-uploaded invoice carries hidden instructions. The handler, the agent and the credentials are all genuine, so every identity check passes, yet the agent proposes a payment above the policy cover.
The tool router and policy engine decide each intent before it runs. Guardrails screen what the agent reads. Observability watches the run as it unfolds.
Strong login and least privilege only cap the damage at the caller's own rights, and those can be large for a finance controller or a senior handler. Teams that lean on identity alone end up with a well-guarded front door and nobody watching what happens inside.
Run an authorised user with a poisoned input and confirm a later control stops the action. Check that the caller's rights are a ceiling for the agent, not a starting point.
Harness
Screening of inputs and outputs, step and time limits, pauses for a person.
A determined attack that passes probabilistic checks, or actions that happen outside the harness.
Guardrails are probabilistic. They catch common patterns and miss novel ones, and attackers can keep rephrasing until something passes. Limits and approval pauses also only apply to calls that actually go through the harness. An agent, script or integration that reaches a tool another way has none of these controls.
An injected instruction is split across two documents so that each half looks harmless to the input screen. Separately, an engineer's script calls the settlement API directly, so no guardrail, step limit or approval ever applies.
Deterministic controls outside the prompt, such as policy decisions and scoped credentials at the tool layer. A rule that tools accept calls only from the harness. An inventory that finds unregistered agents, which is the AI-SPM control in the Tier 3 profile.
Guardrails lower the volume of problems but cannot be the last line of defence. If something can act without passing through the harness, then for that action none of the harness controls exist.
Red-team with paraphrased and multi-step injections. Try to reach each tool without going through the harness. Compare the inventory with what is actually running to find shadow agents.
Tool router and tools
Deny-by-default tool access, parameter limits, scoped credentials, intent decisions.
Harmful use of an allowed tool inside its limits. That is why approvals and monitoring exist.
Router rules are written in advance about actions and parameters. They can say a refund must be under a limit. They cannot judge whether a permitted action is wise in context. Each call can be safe on its own while the sequence of calls is not.
The refund tool allows up to S$500 per call. A manipulated agent issues sixty refunds of S$490 to related accounts. Every single call passes the parameter limit, and the total is a serious loss.
Cumulative and rate limits in the policy engine. Trajectory monitoring across a run. Human approval triggered by patterns, not only by single amounts. Circuit breakers that halt unusual repetition.
Agentic risk lives in sequences. A router that makes each action safe in isolation can create false confidence, so this blind spot tells teams to write cumulative and contextual rules, not only per-call ones.
Simulate many small allowed actions and check that cumulative caps and alerts fire. Review which rules look only at one call and which look at the pattern.
Model gateway
Approved models, budgets, rate limits and, at Tier 3, inline inspection.
What the agent does with the answer.
The gateway sees prompts and responses between the harness and the models. It does not see the tool calls and side effects that follow. A clean, approved, well-formed response can still be wrong, misunderstood or acted on badly, and content inspection judges form and patterns, not whether the plan is sensible.
The model returns a confident but wrong settlement figure. The gateway sees an approved model, a response inside budget and nothing suspicious. If the agent pays that figure, the loss happens downstream of everything the gateway can see.
The tool router and policy engine, which check the action itself. Deterministic tools for calculations. Validation of outputs against authoritative data in the semantic layer. Approvals for larger amounts. Evals that include plausible but wrong answers.
The gateway is the single choke point for model calls, so it is easy to over-trust. Model calls are only one of the two doors out of the harness. The other door, the tool layer, is where actions happen.
Check that every tool call is validated independently of what the model said. Add golden-set cases where the model gives a plausible wrong answer and confirm the action is still caught.
Semantic layer and data
Row and column access from the caller's identity, masking, one definition per metric.
A permitted user asking for something they should not, in a context that makes it harmful.
Entitlements answer whether a person may see data. They do not capture the purpose or context of a request, and they cannot see inference or aggregation. Many individually permitted rows can add up to something the person was never meant to assemble.
A handler with access to claims data asks the assistant to pull a neighbour's claim out of curiosity, or to compile and send an export. Each query is within the handler's entitlements, so row-level security allows all of it.
Purpose-aware rules in the policy engine. Approvals for sensitive exports. Output screening for personal data. Limits on where tools may send data. Monitoring and audit for unusual access patterns.
Many data incidents involve authorised access used wrongly. Agents make this easier by doing bulk work quickly, so the question moves from can they see it to should this use happen now.
Probe for bulk and unusual queries and for exfiltration through outbound tools. Check that purpose is captured and logged, and that outbound destinations are restricted.
Audit and posture
Nothing in real time by itself. It records, inventories and supports review.
Harm before it is noticed, so it relies on the other five.
Audit trails and posture inventories are detective controls. They tell you what happened and what exists, after the fact. They cannot stop an action, and they only help if the records are complete, the assets are registered, and people actually review and respond.
An incident has an excellent audit trail showing exactly how a wrong payment was made, but the money has already left. Or the logs are complete and the alert has sat unread for two weeks.
The five preventive and real-time points. Alert routing and a review rhythm. Tested incident runbooks. Measures such as time from event to alert to human response.
It is tempting to count logging everything as a control. Logging without prevention moves risk to clean-up. It is also where the evidence for a Tier 3 safety case comes from, so its quality decides how credible that case is.
Run an incident drill and check the trail answers who, what, when and why without guesswork. Measure time to detect and time to respond.
Why name the blind spot at every point
Every control has a failure mode
Stating it turns defence in depth from an accident into a design. The blind spot tells you what has to sit beside the control.
The strongest-looking point attracts the most trust
A strong login or a central gateway invites reliance. Naming what it cannot see prevents a team from treating one point as the whole answer.
It makes ownership explicit
Each blind spot points to the controls that cover it, so someone is accountable for the gap instead of assuming another team has it.
It becomes a test case
Every blind spot is a red-team scenario and an eval. You can test that the covering control really catches what the first one misses.
It explains why the tiers stack controls
Human checkpoints, trajectory monitoring, circuit breakers and safety cases exist because earlier controls have these gaps. The tier profiles are the blind spots turned into requirements.
It is honest with boards and reviewers
Showing that you know where each control stops is more credible than claiming coverage. It supports the safety case at Tier 3.
Who covers whom
The tier mapping above is illustrative and reads each tier as adding to the one before. Probabilistic controls such as guardrails reduce risk but never replace deterministic ones such as identity, tool scope and approvals. Put the strict rule where the action actually happens.
The intent window, step by step
For consequential agentic use cases, SafeAI.sg's principle is that governance operates before action is taken, not after. In this architecture the window is the time between the loop proposing a step and the tool layer running it.
Intent is formed
The loop turns its next step into a structured intent: the action, the target, the parameters and the purpose.
Context is checked
The sources behind the intent are confirmed as approved, current and free of hidden instructions.
A decision is made
For consequential intents, an independent checker agent on a different model first gives a second opinion. The policy engine then combines its rules with that verdict and returns allow, deny or escalate. A person decides if escalated.
The action runs
Allowed calls run with scoped, short-lived credentials and checked inputs.
The trajectory is watched
Each step is compared with expected behaviour. Loops, drift and cost spikes can pause the run or trip a circuit breaker.
Evidence is kept
Intent, rule version, decision and outcome are recorded for review and, at Tier 3, for a safety case.
Gap 1: pre-execution intent interception
SafeAI.sg's view: no mature tooling exists and the policy position is open at the same time.
Where it lands What to do nowEmit structured intents, route consequential tools through one decision point, start with a few plain rules and tighten them as practice matures.
Gap 2: real-time trajectory monitoring
SafeAI.sg's view: monitoring is mostly after the fact, with no enterprise-grade intervention in the middle of a run.
Where it lands What to do nowCapture step-level traces, define what a normal run looks like, set step and cost limits that pause a run, and review every alert.
Gap 3: context window integrity
SafeAI.sg's view: adversarial manipulation of what the model reads, with no enterprise frameworks yet.
Where it lands What to do nowTag provenance, retrieve only from approved sources, keep untrusted text apart from instructions, and test with injection cases.
The architecture shows where these control points belong. It does not claim that mature products exist for every gap today.
From policy to technical control
Each policy statement below is a plain-language commitment. The columns show how it becomes an enforceable control, where in the architecture it is enforced and what evidence it leaves. Rows dim when the selected tier does not yet expect them. For the different forms a policy can take, see how policies are expressed and enforced.
One policy, traced end to end
A single commitment carried from a sentence in a policy document to a rule the stack evaluates, with the test and the evidence that go with it. The rule is illustrative pseudocode, not a product syntax.
- State the policy in plain languageA refund above the agreed limit needs a human decision before it is paid. Owned by the business and risk.
- Write it as a ruleThe rule reads the use case's tier, the action, the amount and the caller's role. It lives in version control with an owner.
- Enforce it in three placesThe policy engine decides. The tool router holds the call. Approvals asks a finance supervisor.
- Keep the evidenceThe audit trail records the intent, the rule version, the approver, the reason and the outcome.
- Test and control the changeEvals check that a small refund passes, a large one escalates and a tampered amount is denied. Only then is a new version promoted.
rule refund_needs_approval
version: 7
applies_to: tier >= 2
when:
action == "payments.refund"
and amount > limit_for(caller.role)
then:
decision: escalate
approver: role("finance_supervisor")
expires_in: 30m
on_timeout: deny
evidence:
record: intent, rule_version, approver, reason, outcome
How policies are expressed and enforced
One policy rarely lives in one place. It is a commitment in plain language, and it becomes several artefacts: rules in a policy engine, settings in an agent manifest, constraints in a tool, rules in a database, limits on a gateway, tests in a pipeline and procedures for people. Each form enforces a different part, at a different layer, with a different strength. Examples of policy languages used in practice include Open Policy Agent's Rego and Cedar. The snippets here are illustrative pseudocode, not product syntax.
A settlement above the handler's limit needs a supervisor decision, and no settlement may exceed the policy's cover.
The forms side by side
The deterministic forms are the ones to rely on for enforcement. Prompt instructions are the only probabilistic form, which is why they are marked in amber: they guide behaviour but never replace a deterministic control.
Which forms appear at each enforcement point
Every layer uses more than one form. The pairing matters: a deterministic form enforces, a verifying form proves, and a procedural form gives the control an owner.
One policy, many artefacts
The anchor policy as it appears across the stack. Each artefact enforces a slice, so the policy still holds if any one of them fails. They are only trustworthy if they agree, which is why the next part is about consistency.
settlement_limit v7payments.settle_claim.approval_above: 2500maximum: 10000, scope claims:settle, 15 minute credentialclaims_by_handlerKeeping the forms consistent
- Keep a policy catalogue. Each policy has an ID, an owner, a plain-language statement, a tier scope and a review date. Every artefact that enforces part of it cites the ID.
- Layer the packs: enterprise baseline, then domain, then agent. Lower layers may tighten and never relax. A test asserts this on every change.
- Change them together. When a policy changes, every artefact that cites its ID is reviewed in the same change, and the release carries one new version.
- Detect drift. A scheduled job compares limits in manifests and tool contracts with the engine's rules and raises an alert when they disagree.
- Log the version. Every decision records the rule version and pack versions, so a reviewer can reconstruct which policy was in force at that moment.
- Never rely on one form. Use at least one deterministic enforcement and one verifying test for any policy that matters, and use prompts and procedures for what code cannot say.
Choosing a form
Emphasis by UARS tier
An illustrative reading, consistent with the rest of this page: each tier adds to the one before.
Evals as the release gate
The goal: an agent can run in production only while it holds current, passing evidence against the requirements that apply to its tier. The evidence comes from repeatable tests that trace to published requirements, run before release and again while the agent runs. This tab proposes how to build that with three OWASP resources: AISVS for the requirements, the Top 10 for Agentic Applications for the threats, and the Agent Control Standard for runtime control and evidence. Numbers link to the sources at the end.
No evidence, no deployment
The lifecycle below turns a standard into something the harness can enforce. Each stage produces an artefact, and the last stage feeds the first.
Five design rules
- The same tests, metrics and datasets run before release and during runtime. A check that only exists in the pipeline cannot notice drift.8
- Evidence is bound to exact versions. A pack for last month's prompt, model or policy says nothing about today's agent.
- The platform enforces the gate. If a team can deploy by skipping a process step, it is a guideline, not a gate.
- Evaluators are independent of builders for anything consequential, and fully independent for the highest tier.
- Evidence expires. Time and change both trigger re-testing, and a failed runtime check can revoke an agent's standing.
What OWASP provides, and where each resource fits
OWASP does not publish one standard that does everything. The closest thing to auditable, testable requirements is AISVS. The Agent Control Standard is a separate specification for runtime control and observability, which is how the requirements get enforced and evidenced while agents run. The Agentic Top 10 supplies the threat scenarios. Used together, they cover requirements, threats and control.
The Cloud Security Alliance's note suggests evaluating ACS as a design reference while it matures past its first version, which is a sound stance for a production gate.7
Choosing the assurance level and scope
AISVS has three verification levels: an essential baseline, standard controls for production and consequential systems, and advanced controls for high-assurance environments. OWASP's own guidance is that most production systems should aim for at least Level 2.1 Map them to UARS tiers as a starting point, and use the higher of the two readings where they disagree.
Scope by architecture, not by default
A full run through every chapter is rarely the right first step. Scope by what the agent actually does, and record every chapter you mark not applicable with a reason.
From requirement to executable test
Auditability comes from traceability. Each applicable requirement gets a record that names the control that satisfies it, the tests that prove it, when they run and what evidence they leave. AISVS requirement IDs follow the pattern v1.0-C<chapter>.<section>.<requirement>, so a record can cite the exact requirement and version.2
requirement: v1.0-C9.<section>.<requirement> # copy the real ID from the standard level: 2 applies: true # or false with a written reason control: policy engine decides each consequential intent; tool router holds the call test_ids: [t-policy-017, t-trajectory-004, probe-escalation-02] phase: [pre_deploy, runtime] pass_rule: all deterministic tests pass; probe denial rate = 100% evidence: [run-log-hash, policy-pack-version, trace-sample-id] owner: platform-security last_result: pass 2026-10-14
The 14 chapters against this architecture
Chapter names follow AISVS 1.0. The example tests are suggestions, so replace them with tests written from the actual requirement text.
Kinds of test, and how strong each is as evidence
Turning the Agentic Top 10 into test scenarios
The Top 10 for Agentic Applications ranks ten risks specific to agents that plan, use tools, hold memory and coordinate.3 Treat each as a scenario family: write attack cases for the gate, and a continuous check for runtime. Risk names below are short forms.
The release gate and admission control
Four stages sit before production: a design review that threat-models against the Agentic Top 10 and records applicability decisions, build checks on configuration and provenance, the pre-deploy suites, and a staged release such as shadow or canary traffic guarded by an error budget.12
Durations and thresholds above are illustrative starting points. Set them from your own baseline.
The evidence pack
A pack turns test results into a release decision artefact: current passing evidence, a baseline to judge regressions against, and a record of what was actually checked.9 It should contain:
- Hashes of the exact artefacts: agent manifest, prompts, model version, tool contracts, policy pack versions.
- Dataset versions and judge model versions used, plus thresholds and seeds.
- Per-requirement results with the test IDs behind them, including statistical confidence where tests are probabilistic.
- A coverage report: requirements covered, requirements marked not applicable with a reason, and requirements only partly covered.
- Open waivers with owner, compensating control and expiry.
- Signatures from the required roles, and an expiry date.
Admission control in the agent manifest
The harness checks the pack when an agent is deployed and again at the start of each run. The check is cheap: compare hashes, check the expiry and the status. If the pack is missing, expired or no longer matches, the agent is refused or restricted.
agent: claims-assistant
version: 4
uars_tier: 2
assurance:
standard: AISVS@1.0
level: 2
scope_chapters: [C2, C3, C4, C5, C7, C8, C9, C11, C12, C13, C14]
threat_model: ASI01-ASI10 reviewed 2026-10-02
required_suites: [policy-unit, tool-trajectory, injection-asi01,
identity-asi03, memory-asi06, approval-asi09]
evidence_pack:
id: ep-2026-10-16-0142
binds: [manifest_hash, model_version, prompt_hash, tool_contracts_hash,
policy_packs, dataset_versions, judge_version]
valid_until: 2027-01-16
signed_by: [agent-owner, security-assurance]
on_missing_or_expired: refuse_deploy
on_probe_failure: restrict # read-only, approval for every action
on_error_budget_burn: rollback_to_last_passingWaivers
A waiver is time-boxed, has a named owner and a compensating control, and caps the agent's autonomy while it is open. Expired waivers revoke the pack. Report waivers to the governance lead every month.
Runtime assurance: the same requirements, while the agent runs
A pre-launch gate can pass and the agent can still fail in production, because evals stop at release or because the world changes. Evidence that keeps flowing needs the same metric definitions in the pipeline and in production, with live traffic sampled and scored.8 The checks below keep proving the requirements continuously.
Automatic responses
- Restricted mode: read-only tools, a lower budget, and human approval for every action, until the failing check passes again.
- Rollback to the last version that holds a valid pack when an error budget burns.
- Recertification triggers: any change to the model, prompts, tools, policy packs or datasets, any expiry, and any serious incident.
- Every restriction and rollback is itself logged to the audit trail with the check that caused it.
Where the Agent Control Standard fits
ACS is a wire specification: a separate guardian agent inspects what an agent is about to do and permits, denies or modifies it before it happens, over an authenticated channel, with an audit trail that can be reconstructed afterwards.5 That is close to the intent window described elsewhere on this page, so the harness's enforcement points can be built to expose ACS-style hooks. The standard is organised around agents being inspectable, traceable and instrumentable.4
Two cautions. The repository describes version 0.1 and says its reference implementation evaluates a small subset of the hook methods live.5 And ACS can specify where a hook belongs, but none of it runs until the agent platform you use exposes the call.6 Design for compatibility now, and test what each platform actually supports.
Making evals consistent and auditable
Consistency is what lets an auditor trust a pass. These practices make a result reproducible and defensible.
- Pin and record everything: model, prompts, tools, policy packs, datasets, judge model, seeds and thresholds, bound into the evidence pack.
- Keep results in an append-only, hash-chained store so an assessor can trust that history was not edited.
- Govern datasets: versioned, with provenance, no overlap between training and test data, negative and unanswerable cases, and every incident turned into a case.8
- Govern the judge: pin its version, calibrate it against human-labelled samples, recalibrate on a schedule, and prefer deterministic checks for consequential decisions.
- Use statistics honestly: repeated runs, confidence intervals and thresholds with margin. Quarantine flaky tests with an expiry date, never silently ignore them.
- Define metrics once and reuse them in the pipeline and in production.8
- Separate duties. Builders do not approve their own gates. Evaluators are independent for Tier 2 and above. The red team is independent at Tier 3.
- Publish coverage honestly: what is tested, what is not applicable and why, and what is only partly covered.
- Run a reproducibility drill: an assessor re-runs a past evaluation from its evidence pack and reaches the same result within tolerance.
- Version the standards you adopt. Record which AISVS and ACS versions each pack used, and diff the requirements when you upgrade.
Adoption roadmap
What to measure
- Requirement coverage: share of scoped requirements with an executable test or named attestation.
- First-time pass rate and time to certify, to show whether the gate is usable.
- Escape rate: incidents or findings that the evals should have caught.
- Runtime probe pass rate and mean time to restrict an agent after a failure.
- Open and expired waivers, and agents running on expired packs (target: none).
The AISVS project is open and welcomes feedback from people using it on real systems.1 Sharing mappings and gaps you find is a useful way to improve both your programme and the standard.
Limits and honest caveats
- Passing evals is evidence, not proof of safety. Tests sample behaviour, and attackers and workloads change.
- AISVS is large and not every requirement can be automated. Some need human attestation. Counts differ between sources and drafts: the 1.0 release plan cites 514 requirements across 14 chapters plus 30 in a coding appendix, so pin your version and count from it.2
- The Agent Control Standard is at an early version. Treat it as a design reference and a direction of travel, and confirm what your agent platforms actually expose.6,7
- OWASP standards are voluntary. A pack proves conformance to the requirements you chose, not certification. SafeAI.sg is also non-certifying.
- Model-judged evals are probabilistic. Calibrate them and do not rely on them alone for consequential gates.
- The mappings on this page, including UARS tier to AISVS level, chapter to component, and the example tests, are suggestions for you to adapt. Always read the requirement text in the standard.
Sources
Numbered references used in this tab. Check the originals before relying on specific figures or dates, because the OWASP AI materials are moving quickly.
- OWASP, Artificial Intelligence Security Verification Standard (AISVS) project page
- OWASP AISVS repository, 1.0 release document (issue 656)
- OWASP GenAI Security Project, Top 10 for Agentic Applications for 2026
- OWASP GenAI Security Project, Agent Control Standard (ACS)
- Agent Control Standard repository
- Zenity Labs, Control made it into the name: the Agent Control Standard lands at OWASP
- Cloud Security Alliance, research note on the OWASP GenAI Top 10 2026 and the Agent Control Standard
- Galileo, Evaluation-driven development across the agent development lifecycle
- AgentOps Accelerator, release evidence packs
- IMDA, Model AI Governance Framework for Agentic AI, version 1.5
- LLM-Hacking, OWASP AISVS 1.0 summary
- Agent testing and CI/CD: a three-tier eval pipeline with canary promotion
Engineering practices and team structure for the harness
How established engineering practices apply to the AI harness, and how AI and technology teams can be organised to build and run the harness while delivering agent use cases that integrate with it properly. It draws on a practitioner deck on agentic organisations, DORA's 2025 research and the Team Topologies model, and applies them to the architecture on this page. Numbers link to the sources at the end.
Treat the harness as a product and use cases as its customers
An agent is the model plus its harness, and the harness is where most of the engineering effort now goes: context, tools, permissions, memory, recovery and the feedback loops around them.1 That makes it a platform problem. DORA's 2025 research describes AI as an amplifier of what an organisation already does well or badly, and finds that a quality internal platform and working in small batches are among the capabilities that make AI pay off.4 The practical consequences are these.
- One shared harness, built and run as a product by a platform team, so that governance, identity, policy, evals and observability are written once.
- Many use case teams that own outcomes and build on the paved road, rather than each rebuilding a runtime.
- Small teams at the edge depend on strong shared systems at the centre.1 The smaller the cell, the stronger the platform has to be.
- Authority follows responsibility. The edge decides roadmap, production and spend. The centre owns universal safeguards, approved capabilities and independent review boundaries.1
Engineering practices applied to the harness
Most of these practices are not new. What changes is what they are applied to: prompts, policies, tools, knowledge and evals become versioned, tested and operated artefacts, like code.
Harness, loop and graph: three layers of engineering
The deck frames the engineering target as three layers that build on the model and the prompt: the harness, the loop and the graph. It advises using all three while keeping each as simple as the work allows.1 They map cleanly onto this page, and each has a failure mode that engineering practice should hold in check.
Building an agent use case so it integrates properly
A use case team should never have to negotiate the controls from scratch. The harness defines the integration contract, and the use case team brings what the contract asks for. The stages below show who does what.
What every use case brings to production
- A registered use case with a named owner, a UARS reading and a tier.
- An agent manifest in version control, with the policy packs it inherits.
- A tool contract for every tool it uses, with scopes and limits. No direct access to systems.
- A knowledge scope: which second brain domains and trust tiers the agent may read.
- An eval suite: acceptance evals, the scoped assurance suites, a golden set and thresholds.
- Instrumentation: traces with run, agent and workflow identifiers, and at least one business outcome measure.
- Budgets and limits: per run, per day, step limits and circuit breaker settings.
- A runbook, an on-call owner, a kill switch and a defined restricted mode.
- An approval design: who approves, how quickly, and what the approver sees.
- Data access and privacy approvals from the data and knowledge owners.
- A valid evidence pack, so the platform will admit the agent to production.
What the platform promises in return
- Self-service onboarding and a documented golden path, so a new agent can start in days.
- Versioned interfaces, with notice before anything is deprecated.
- Published service levels, an on-call route for platform incidents and office hours.
- A visible roadmap, and a clear way to propose and contribute capability.
- Defaults that are safe, so doing the right thing is also the easy thing.
How to structure the teams
Team Topologies offers a vocabulary that fits: stream-aligned teams own a flow of work, platform teams provide the substrate that reduces their cognitive load, enabling teams grow other teams' capability, and complicated-subsystem teams hold deep specialist components. It defines three interaction modes: collaboration, X-as-a-Service and facilitating.2 For the harness, that suggests the shape below.
Highlighted: the harness platform, built as a product
Teams, types and how they interact
- The platform's default mode is X-as-a-Service, and collaboration is time-boxed. If a team needs repeated help to onboard a tool, the fix is a better self-service flow and clearer contracts, not permanent collaboration.3
- Enabling teams coach and then move on. Their goal is to make use case teams more autonomous, not to review their work for ever.2
- Add a specialist component team only when a component's cognitive load is genuinely too high to distribute, never for managerial convenience.
- The governance bodies decide policy, architecture, gate rules and incident authority. They set boundaries, and the platform encodes them.
An illustrative starting platform team of about eight to twelve people: a product owner, two runtime engineers, one or two tools and integration engineers, one identity and policy engineer, one observability and evals engineer, one reliability engineer, one knowledge or data engineer, and part-time security. Size it from the load your first pilots create.
Choosing the operating model by the kind of work
The deck describes three operating models that can coexist in one organisation as a portfolio, not a maturity ladder: an agent-augmented squad, a small outcome-owning cell and a federated organisation.1 Match the model to the consequence, reversibility and verifiability of the work, which is what the UARS dimensions already capture.
When it is safe to shrink the team
Shrink a team only when the system can carry the load. These conditions follow the deck's decision comparison, linked to the UARS dimensions.1
A small visible team still depends on a large support system: platform builders, specialists, policy, tests and independent reviewers.1 The team may be small, but the organisation behind it is not.
Decision rights
Small cells fail when responsibility outruns authority.1 Write the decision rights down, so use case teams know what they decide and the platform and governance bodies know what they enforce.
Roles and skills
Roles move from execution towards judgement. Engineers frame problems, design environments, review agent work and recover from failures, and technical depth remains essential.1
Keeping expertise growing
If agents do the apprenticeship work, future experts have to be grown on purpose.1 Four practices help:
- Explain consequential changes. Understanding is demonstrated, not assumed.
- Rotate people through direct work, so expertise is maintained.
- Study failures and incidents, to learn where the abstraction breaks.
- Assess understanding, not volume of output.
Operating rhythm and measures
Reward judgement and system improvement, not agent output. Code, commits and pull requests are cheap and easy to inflate, so measure problem selection, system quality, reuse and operational outcomes instead.1
Sequence for standing it up
Change structure only after the system has proved itself. The deck's order is to instrument, augment, build the harness, pilot cells and then restructure.1 The steps below adapt it to the harness.
Anti-patterns
Sources and notes
The numbered references used in this tab. The first is a practitioner deck whose case studies come from first-party and single-case sources. The deck itself says they are not universal benchmarks, so none are repeated here. Team sizes and the platform team composition are illustrative.
- Chang Sau Sheong, From Coding Assistants to Agentic Organisations, slide deck, version 4
- Martin Fowler, Team Topologies (summary of Skelton and Pais)
- Gravitee, Team Topologies for platform engineering in AI agent management
- DORA, State of AI-assisted Software Development 2025
- Engineering Enablement, DORA's 2025 research on the impact of AI
One harness, from one agent to many
Follow a fictional insurer. A Tier 2 scenario first shows what the central harness does for a single use case. A Tier 3 scenario then shows the same harness coordinating many agents and workflows at once. Pick a scenario and step through it. Each step names the components involved, the control applied and the evidence recorded, and shows the runtime governance decision that was enforced at that moment: what was allowed, held, denied or stopped, by which component, and under which rule.
What changes from one agent to many
The harness is the same. The difference is what it has to coordinate once agents depend on each other, share tools and run at the same time.
Provided once by the platform
- Identity and the agent registry
- The policy engine and its layered packs
- The model gateway and budgets
- The tool registry and knowledge gateway
- The second brain and semantic layer
- Observability and fleet monitoring
- Audit and the evidence store
- The eval service and AI inventory
- Incident controls and scoped kill switches
Configured for each use case
- The agent's instructions and definition
- Its tool allowlist and parameter limits
- Its policy pack and approval routes
- Its budgets and step limits
- Its knowledge scope and trust tier
- Its golden eval set
- Its owner and UARS reading
Designing the org second brain
A guide for a complex organisation that wants a second brain its AI harness can rely on. It covers what belongs in it, how to structure and federate it, how knowledge gets in and stays trustworthy, how agents retrieve from it safely, and how to run it. Statements drawn from published sources carry a number that links to the source list at the end.
Scope: what the second brain is for
The org second brain is the curated, human-governed, linked body of organisational knowledge that people and agents retrieve guidance from. In the harness it sits in the knowledge layer, reached through tools by the context builder. Its job is to hold what the organisation knows how to do and why: playbooks, standards, decisions and their reasoning, glossary terms, lessons learned.
It is not a replacement for any other store. Most failed knowledge projects fail on scope, so draw the boundary first.
Three consumers shape every later decision. The harness needs small, attributable, current and permitted snippets, not documents. People need to find things and trust what they find. Governance needs evidence that agents acted on approved guidance, which means every retrieval must be traceable to a note and a version.
Design principles
Compile and curate, do not accumulate
Andrej Karpathy's LLM Wiki pattern from April 2026 keeps three layers apart: immutable raw sources, a maintained wiki, and a schema file of conventions, with ingest, query and lint as the operations.3 The idea is that knowledge is compiled once and kept current instead of being rediscovered on every query. Community write-ups present it mainly for personal and small-team use, so an enterprise needs the ownership, review and access controls in this guide on top.
Capture in the flow of work
Knowledge-Centered Service treats knowledge as a by-product of solving problems, captured in context, with the principle that reuse is review.4 Build the same loop: when a person or agent searches and finds nothing, that gap becomes a capture prompt. When they use a note and find it wrong, flagging or fixing it is part of the work.
Domains own, the centre sets standards
Data mesh offers a proven shape for a large organisation: domain ownership, treating output as a product, a self-serve platform and federated computational governance.5 Domains write and own notes. A central team provides the platform and the schema, and enforces standards by automation, not by meetings.
Plain text and open formats
Markdown with a structured header, stored in version control, is portable, diffable, reviewable and survives any tool change. It also keeps the second brain independent of any single vendor.
Trust belongs to each note
A note carries its own owner, status, version, review date, sensitivity and sources. Retrieval filters and ranks on these fields. A base is never simply trusted or untrusted as a whole.
Permissions travel with the knowledge
Entitlements are metadata on every note and are enforced when the query runs, using the identity of the caller. The system fails closed.
Humans approve what agents rely on
Agents may draft, propose and flag. Only a named owner publishes. This write-path rule is the main defence against poisoned guidance.
Retrieve just in time, in small pieces
Anthropic's context engineering guidance treats context as a finite resource and favours lightweight identifiers that agents expand on demand, so progressive disclosure replaces loading everything up front.2 Design the base to be navigable that way.
Retrieval is a product with tests
Measure retrieval separately from generation, keep a golden question set, and gate every change to the index, chunking, embeddings or models on those tests.
Reference architecture
Requests come down from consumers through the knowledge gateway. Knowledge moves up from sources through ingestion, curation and the store. The governance plane applies to every layer.
Highlighted: the approved store that retrieval draws from
What each layer does
Content model and metadata
A consistent content model is what makes federation, retrieval filters and automated checks possible. Define a small set of note types, each with required fields, and keep each note to one idea so it chunks cleanly and can be read in a couple of minutes.
Review rhythms above are illustrative starting points. For how-to and instructional content, the Diátaxis framework is a useful discipline: tutorials, how-to guides, reference and explanation serve different needs and should not be mixed in one note.14
The header every note carries
--- id: dec-2026-0412 type: decision-record title: Refunds above the role limit need a supervisor decision domain: customer-operations owner: head-of-customer-operations steward: ops-knowledge-steward status: approved version: 3 approved_on: 2026-09-18 review_due: 2027-03-18 sensitivity: internal audience: [customer-operations, risk] applies_to: [refund-agent, payments-tool] jurisdiction: [SG] supersedes: dec-2025-0877 related: [pol-payments-limits, gl-refund-limit] ontology: [Refund, Approver] sources: [raw/2026-09-12-ops-review-minutes.md] summary: Refunds above the role limit pause for a finance supervisor decision. --- ## Context ## Options considered ## Decision ## Consequences
- Identifiers are stable and never reused. Titles can change, IDs cannot.
- Links are typed:
supersedes,related,depends_on, plus glossary and ontology references. Typed links let retrieval prefer the current version and pull in definitions. - Decisions are not edited after approval. A new decision supersedes the old one, and the old one stays visible and marked.
- Notes that differ by country or entity are separate notes with
jurisdictionorapplies_toset, linked to a common parent. - The
summaryfield is written for retrieval: one or two sentences that make the note findable and let an agent decide whether to open it. - Folders express ownership and permissions. Links express meaning.
Federating across a complex organisation
A single shared vault does not survive contact with several business units, regions, regulated entities and thousands of contributors. Federate it in spaces that differ by purpose, writer, reader and trust level.
Conflict and precedence
- Enterprise policy outranks a domain standard, and a domain standard outranks team practice.
- A local deviation is a declared exception with an owner, a reason and an expiry date. It is a note, not a silent edit.
- Retrieval ranks by trust tier and status, and surfaces the conflict to the agent instead of hiding it.
Publish notes like products
Data mesh describes data products that are discoverable, addressable, trustworthy, self-describing, interoperable and secure.5 Apply the same bar to notes a domain publishes for others: a stable ID, a visible status and owner, a schema other domains can rely on, shared glossary terms, and entitlements. That is what lets one domain's agent safely use another domain's guidance.
Federated governance, computationally enforced
A knowledge council sets the schema, taxonomy, review service levels and trust-tier rules. The platform enforces them in CI and at query time, so domains stay autonomous without drifting. Expect friction when moving from central ownership to federated ownership, and keep the central steering function until domains are mature.
Residency and separation
Keep restricted vaults in separate stores and separate indexes, so that a retrieval bug cannot cross a wall. Embeddings are derived data with the sensitivity of their source, so they live in the same region and under the same controls as the notes they came from. Discovery across walls can be metadata-only.
Ingestion and curation pipeline
Most of an organisation's knowledge starts outside the vault. The pipeline turns it into governed notes without making people retype it.
Scale review to risk
- Team space: automatic merge with sampled review.
- Domain vault: the domain owner or steward approves.
- Enterprise core: council approval or two reviewers.
- Anything an agent in the highest UARS tier may act on: two reviewers and a recent review date.
Capture inside the work
- A search that returns nothing creates a stub for the steward queue, because in KCS the act of searching captures the request.4
- Using a note is a review. A one-click flag or a small fix from the person or agent that found a problem keeps the base honest.4
- A monthly review of zero-result searches, flags and heavily reused notes decides what to write next. This is the evolve loop in KCS terms.4
Retrieval design for the harness
The context builder needs five properties from every snippet: relevant, small, attributable, current and permitted. Context is a finite resource, and Anthropic's guidance is to find the smallest set of high-signal tokens that gets the job done.2 The pipeline below is built around that.
- Understand the request. Combine the task, the caller's identity, the use case's UARS tier and the domain scope, then rewrite or decompose the query where needed.
- Filter first. Restrict to approved status, in-date review, the caller's entitlements, sensitivity and jurisdiction. Apply the same filters on the keyword path and the vector path.
- Generate candidates. Run hybrid keyword and vector search over contextualised chunks, with a generous candidate pool.
- Rerank. Pass the pool to a reranker and keep a small, tuned number of chunks.
- Expand through links. Follow
supersedes, glossary andrelatedlinks, prefer the current version and drop superseded notes. - Assemble. Delimit each snippet, label it with note ID, version, status, owner, trust tier and review date, and respect the token budget.
- Log. Record the note IDs and versions used into the harness trace for that step.
What the research supports
- Contextual retrieval: prepending a short model-generated context of about 50 to 100 tokens to each chunk before embedding and keyword indexing. In Anthropic's published tests the top-20 retrieval failure rate fell from 5.7 percent to 3.7 percent with contextual embeddings, 2.9 percent adding contextual keyword search, and 1.9 percent with reranking. Twenty chunks outperformed ten or five in those tests. Results depend on your corpus, so measure your own.1
- Compiled wiki first, retrieval second. For core guidance, a short, well-linked set of curated notes with an index note lets an agent navigate by progressive disclosure.2,3 Keep hybrid retrieval for the long tail and for raw sources.
- Graph retrieval where it earns its cost. GraphRAG extracts entities and relationships with a model, clusters them into communities, and summarises each community. Its global search suits corpus-wide questions and its local search suits entity questions. It is not worth the construction cost if questions are only local.6 Start with the explicit typed links already in your notes before extracting a graph.
The tool contract
search_notesread_noterelateddefinebrowsepropose_note and propose_editflag_noteServing over MCP
- The 2026-07-28 revision of MCP is stateless: the initialize handshake and session header are gone, each request carries its protocol version and client capabilities, and servers expose a discovery method.10,11 A knowledge gateway can therefore scale like any HTTP service.
- Capability listings are cacheable under the new revision, and the specification adds an extension model.17 Keep the tool set small, with clearly distinct names and descriptions.
- Authorization builds on OAuth and OpenID Connect. Earlier revisions added resource indicators and incremental scope consent.10 Issue audience-bound tokens for the gateway, check the audience and scopes on every request, and carry the end user's identity so entitlements are evaluated for the person the agent acts for.
- Return input validation problems as tool errors the model can read and correct, and keep a person in the loop for any write tool.
Freshness and cost
- Re-index on merge and on permission change, not on a nightly schedule.
- Generate chunk context once at indexing time. Prompt caching lowers that cost.1
- Cache hot reads at the gateway, keyed by identity-scoped filters so caches never leak across callers.
Security, access and integrity
A second brain concentrates guidance that agents will act on and that people will assume is true. It is both a data-protection target and an integrity target.
Two further points. Identity mapping and permission sync are security-critical infrastructure and should be owned and tested as such. And every step in the harness trace should record the note IDs and versions it relied on, because that is the evidence that guidance was approved at the moment of action.
Quality, lifecycle and measurement
Lifecycle
Notes move through draft, in review, approved, deprecated and archived. Approved notes have a review due date. Past it, a note is flagged, then demoted in ranking, then excluded from retrieval by higher-tier agents until reviewed. Deprecation keeps the note, marks it, and links to its successor.
What to measure
Evaluate retrieval and generation separately so you know which stage to fix. Retrieval is measured with hit rate, recall at k, mean reciprocal rank and context precision. Generation is measured with faithfulness to the retrieved context and answer relevance.15 Build a golden set of questions with known source notes, include questions that should return nothing and questions the caller must be denied, and add every wrong-answer report to it. Run it on every change to the index, chunking, embeddings, reranker or model, and sample live answers with a model judge.
Set targets from your own baseline in the pilot, then ratchet them. The same evals belong in the harness's eval suite, so a change to the second brain is tested like a change to the agent.
Operating model and roles
ISO 30401 treats knowledge management as a management system, with context, leadership, policy, roles, planning, support, operation, performance evaluation and improvement.13 It is a useful checklist to ensure the second brain is run as an organisational capability and not left as a tool. The standard is published and under revision.
- Cadence: a weekly curation queue, a monthly content health and gap review, a quarterly retrieval evaluation and access review, and a yearly schema and taxonomy review.
- Policies: a knowledge management policy, a contribution and review policy, and an AI use of knowledge policy covering what agents may read and propose.
- Incentives: put review service levels in owners' objectives, recognise contributors, and report reuse so effort is visible.
Technology choices
Choose by capability and criteria, not brand. Product names below are examples drawn from public documentation and are not endorsements.
Build versus buy comes down to a few tests: does it enforce permissions at query time, support hybrid search with filters, export everything in open formats, keep data in your region, and give you audit logs you can use as evidence? If a platform fails any of these, the gap becomes your problem later.
Phased roadmap
Timings depend on size and on how clean your source permissions are. Treat the phases as gates, and do not enter the next one until the exit criteria hold.
Controls by UARS tier
The second brain is a source of context, so the tier of the agent reading it decides how strict retrieval must be. This mapping is illustrative and reads each tier as adding to the one before, in line with the rest of this page.
For organisations in Singapore, IMDA's Model AI Governance Framework for Agentic AI, first launched in January 2026 and updated to version 1.5 in May 2026, is a complementary lens. It organises guidance into four dimensions: assessing and bounding risks upfront, meaningful human accountability, technical controls and processes, and end-user responsibility.12,16 The second brain supports each. Tiering bounds the risk, owners and approvers provide accountability, permission-aware retrieval and logging are technical controls, and cited sources let end users see where an answer came from. The framework is voluntary guidance, not regulation.
Failure modes
Starter kit
A schema file is the cheapest control you can add. It gives people and any model that helps maintain the vault the same rules, which is the role the schema layer plays in the LLM Wiki pattern.3
# Knowledge schema (excerpt) 1. Raw sources are immutable. Never edit anything under /raw. 2. Every note has the required header fields. A missing owner or review_due fails the build. 3. One idea per note. Link glossary terms with [[term]]. 4. Every claim cites a raw source or another approved note. 5. Agents create or update drafts only. A named owner approves. 6. Flag contradictions inside the note. Never resolve them silently. 7. Never copy secrets or personal data into notes. 8. A superseded note is kept, marked, and linked to its successor.
- CI checks to switch on first: required header fields, valid status values, review date in the future for approved notes, link and ID integrity, no orphans, secret scanning, personal-data scanning.
- A first golden set: thirty questions across the pilot domain, including five that have no answer and five the test caller must be denied.
- A first dashboard: notes past review, owner coverage, zero-result searches, flags raised, retrieval hit rate, faithfulness.
- A first runbook: how a note is proposed, reviewed, approved, superseded and retired.
Sources
Numbered references used above. Specific figures and dates come from these sources as published. Check the originals before relying on them, because several of these areas, especially MCP and agent governance, are changing quickly.
- Anthropic, Introducing Contextual Retrieval (2024)
- Anthropic Engineering, Effective context engineering for AI agents (2025)
- Andrej Karpathy, LLM Wiki idea file (April 2026)
- Consortium for Service Innovation, KCS v6 Practices Guide
- Zhamak Dehghani, Data mesh principles and logical architecture
- Microsoft Research, GraphRAG
- OWASP, Top 10 for LLM Applications 2025: LLM08 Vector and Embedding Weaknesses
- Microsoft Learn, Document-level access control in Azure AI Search
- AWS, Rethinking access control for RAG with Amazon Quick and Amazon Bedrock
- Model Context Protocol, 2026-07-28 specification changelog
- Google Developers Blog, Scaling AI agent infrastructure with the MCP stateless updates
- IMDA, Model AI Governance Framework for Agentic AI, version 1.5 (May 2026)
- ISO 30401:2018, Knowledge management systems, requirements
- Daniele Procida, Diátaxis documentation framework
- Retrieval-augmented generation for natural language processing: a survey (evaluation taxonomy)
- Baker McKenzie, Singapore IMDA updates Model AI Governance Framework for Agentic AI (June 2026)
- Equixly, Stateless MCP: what the 2026-07-28 specification changes for security
Terms used on this page
Plain-language definitions, in the order a reader is likely to meet them.
UARS
Universal AI Use-Case Risk Score. SafeAI.sg's proposed illustrative method for scoring how risky an AI use case is, on five dimensions, and placing it in one of three governance tiers.
AI agent
Software in which an AI model plans and takes steps, using tools, to complete a task. A chatbot only answers. An agent acts.
Agentic harness
The runtime around the model. It runs the loop, assembles context, calls tools, applies checks, pauses for people and records what happened.
Intent Window Principle
SafeAI.sg's principle that for consequential agentic AI, governance must act before the action is taken, in the window between the agent proposing a step and the step running.
Human-in-the-loop (HITL)
A person reviews and approves an action before it goes ahead.
Guardrails
Checks on what goes into and comes out of an AI model, such as screening for injected instructions or filtering personal data.
Prompt injection
Hidden instructions placed in content, such as a document or web page, that try to hijack what the model does.
Tool scope enforcement
Limiting each agent to the tools, and the parameters of those tools, that its task needs.
Trajectory monitoring
Watching the sequence of steps an agent takes while it runs, so loops, drift and unusual behaviour can be caught mid-run.
Circuit breaker
An automatic stop that trips when a limit is crossed, such as too many steps, too much spend or too many errors.
Generative AI firewall
A filter at the boundary that inspects prompts and responses and blocks harmful ones.
AI-SPM
AI security posture management: keeping an inventory of models, agents, tools and data connections, and checking their security configuration.
Safety case
A structured argument, backed by evidence, that a system is acceptably safe for its intended use.
Policy as code
Governance rules written in a form software can evaluate, so they are applied the same way every time and can be versioned and tested.
MCP
Model Context Protocol, an open standard for connecting AI agents to tools and data.
Semantic layer
Governed definitions of business terms and metrics, mapped to real data, so every agent gets the same answer to the same question.
Ontology
A shared model of what exists in the business and how things relate, such as customers, policies and claims.
Org second brain
Human-written organisational knowledge, such as playbooks and decisions, linked together so people and agents can both use it.
Denial-of-wallet
An attack or accident that runs up AI costs, through excessive model calls, until the budget is gone.
AISVS
OWASP's AI Security Verification Standard: a catalogue of testable security requirements for AI systems, with three verification levels.
OWASP Top 10 for Agentic Applications
A ranked list of the ten highest-impact risks for AI agents, numbered ASI01 to ASI10, used here as a source of attack scenarios.
Agent Control Standard (ACS)
An OWASP specification for runtime agent control: a guardian agent permits, denies or modifies an agent's action before it happens, with traces and an agent bill of materials.
Guardian agent
In ACS, a separate component that inspects an agent's intended actions and returns a verdict. It plays the role of the policy engine.
Agent bill of materials (AgBOM)
A current list of what an agent is built from, such as models, tools and services, expressed in formats like CycloneDX.
Evidence pack
A signed, expiring record of test results bound to the exact versions of an agent and its components. It is the artefact a release gate checks.
Admission control
A check by the platform that refuses to deploy or run an agent unless it holds a valid, matching evidence pack.
Restricted mode
A reduced state an agent drops into when a check fails: read-only tools, a lower budget and human approval for every action.
Error budget
The amount of failure a release is allowed to show in production before it is rolled back.
Canary
A small, controlled slice of traffic, or a synthetic test, used to check that a release or a control still works.
Harness engineering
Building and running the software environment around a model: context, memory, tools, permissions, feedback and recovery.
Paved road (golden path)
The supported, easiest route for building and running an agent on the platform, with safe defaults and self-service onboarding.
Stream-aligned team
A team that owns a flow of valuable work end to end. Here, a use case team or outcome cell.
Platform team
A team that provides an internal product, such as the harness, to reduce the load on the teams that build on it.
Enabling team
A team that coaches other teams to build a capability and then steps back, so they become more autonomous.
Outcome cell
A small team, often an owner plus one or two engineers working with agents, that owns a result from discovery through operation.
X-as-a-Service
An interaction mode in which one team consumes what another provides through a clear interface, with little collaboration needed.
Run-time governance
Controlling what an agent does while it acts: deciding each consequential action before it runs, watching the run, and recording evidence. It continues for as long as the agent runs.
Build-time governance
Controlling software through reviews, tests and approvals before it is released, on the assumption that it then behaves as approved.
Stage-gated lifecycle (waterfall)
A development approach where work passes through sequential stages, with formal approval at gates. Governance is concentrated at the gates.
Intent
A structured statement of what an agent is about to do: the action, the target, the parameters and the purpose, checked before the action runs.
Fail closed
When a control cannot decide or breaks, it denies or restricts instead of allowing the action.
Idempotency
A property that makes repeating a request safe, so a retry cannot repeat the effect, for example by paying twice.
