GRD-ACT-02Tier IGuardrails & Safety Layers

Topic Confinement

Restrict the agent's conversational and functional scope to its declared domain: a banking agent refuses to write code; a code assistant refuses to give medical advice.

Runtime: ActAgentOps: DeploySee on the matrix →
TOPIC CONFINEMENT Request In-Scope?domain classifier In-scope · Proceednormal flow Out-of-scope · Refusewith scope explanation Borderline · Clarifyask before actingRefuse is standardised and explains what the agent CAN do and where else to go.
In Plain English

This page is the complete instruction page for one pattern called "Topic Confinement." It explains the problem this pattern solves, the idea behind the solution, when you should (and should not) use it, and what happens afterward, both the good effects and the costs.

This matters because building AI agents is not just about making them clever. It is also about making them safe and predictable. Following a well-tested pattern like this one helps avoid common mistakes, and shows you exactly which safety rules and regulations it connects to, listed under "Standards Mesh" on this page.

Context

Generalist models can do everything; specialist agents should not. Out-of-scope engagement wastes resources, confuses users, and creates liability.

Problem

Unconfined agents drift into topics outside their governance envelope.

Forces

  • User experience of refusal vs scope discipline
  • Brittleness vs clarity

Solution

At input, classify whether the request is in-scope. If not, respond with a scope-aware refusal that explains what the agent can help with and where to go for the off-topic need. Classifier is cheap; refusal pattern is standardised.

Placement

Where this pattern acts in the two lifecycles

Runtime Cognitive
01Perceive
02Reason / Plan
03Decide
04Act
05Observe
06Reflect / Learn
07Terminate

04 Act. Tool call, API invocation, environment mutation. 15 of 61 catalogue patterns act at this stage.

AgentOps Lifecycle
01Design & Scope
02Build & Integrate
03Evaluate & Red-Team
04Deploy
05Operate & Monitor
06Iterate & Adapt
07Decommission

04 Deploy. Staged rollout, sandboxing, whitelisting. 9 of 61 catalogue patterns act at this stage.

Stages and counts from the catalogue data. The Runtime lens is the loop the agent runs each turn; the AgentOps lens is the lifecycle the team runs the agent through. See the Matrix for every pattern at each stage.

Applicability

  • Specialist agents
  • Regulated-sector agents
  • Customer-facing agents with clear domains

Anti-Patterns

  • Agent that answers everything because the user insists
  • Classification entirely inside the main prompt

Consequences

  • +Clear scope
  • +Reduced regulatory exposure
  • −Occasionally unhelpful on edge cases
  • −Classifier requires maintenance