Home / Courses / Running AI Agents Safely: Containment and Controls for SMEs
Free course · Self-paced
Running AI Agents Safely: Containment and Controls for SMEs
Keep AI agents inside safe limits with least privilege, default deny, human approval, an external stop button and logs the agent cannot touch.
0 of 16 lessons complete
About this course
An advanced, practical course for businesses that use or build AI agents that can act: send email, edit records, pay invoices or run code. It adapts the Canadian AI Safety Institute's Technical Guidelines for AI Agent Containment (2026) for small and mid-sized organizations. You will learn why most agent incidents come from set-up errors and why guardrails are not enough, then apply the containment policies: clear rules of engagement, least privilege, default deny, human-in-the-loop with an external stop, observability, defence in depth and enforcement from above. It covers controls in everyday tools, network limits, pre-run checks, change control and incremental relaxation, roles and stop conditions, incident response, risk assessment and a 90-day plan. It is general guidance, not legal or specialist security advice. It is an independent adaptation, not an official version of the guidelines, and is not affiliated with or endorsed by ISED or CAISI.
Who it is for
- Owners and managers deploying AI agents or automations that take actions
- The person who builds or looks after agents, automations or the AI platform
- IT providers and consultants setting up agents for small businesses
- Anyone who has completed an introductory course on AI agents
What you will be able to do
- Explain why agent containment is needed and why most failures are set-up failures
- Write an agent charter and split actions into allowed, approval and blocked
- Apply least privilege, default deny, defence in depth and enforcement from above
- Set up human approval, an external stop and tamper-evident logging
- Verify agents before they run and control changes with incremental relaxation
- Respond to agent incidents, assess risk and run a 90-day containment plan
Course structure
- Module 1: Why Containment (4 lessons). What containment means, why most failures are set-up failures, why guardrails are not enough, and clear rules of engagement.
- Module 2: The Containment Policies (4 lessons). Least privilege and default deny, human-in-the-loop and an external stop, observability, and defence in depth.
- Module 3: Putting It in Place (4 lessons). Controls in everyday tools, network limits, checking before every run, and change control with incremental relaxation.
- Module 4: Operate and Respond (4 lessons). Roles, run plans and stop conditions, incident response, risk assessment and a 90-day plan.
Interactive labs
- Allow, approve or block?: An invoice-processing agent reads a shared accounts payable mailbox and works in your accounting system. Sort twelve actions into allowed on its own, needs human approval, or blocked. Then check your answers.
- Impact and reversibility: where approvals belong: Place nine agent actions on a grid of business impact against how hard they are to undo, to see which can run automatically and which need a person. A score of 3 counts as easy to undo and as high impact; when in doubt, score reversibility 4.
- Your agent containment self-assessment: Rate how well your agents are contained across eight areas. The radar chart shows strengths and gaps, with a next step for each area. Retake it at day 90.
How it works
- Work through 16 short lessons at your own pace. Each has key takeaways, an exercise for your own workplace and a quick knowledge check.
- Try the three interactive labs as you reach them in the course.
- Pass the 20-question final exam (70% or higher, unlimited retakes) to unlock your Chmltech certificate of completion.
- Free, with no sign-up. Your progress is saved in this browser.
Why AI agents need containment
An AI agent does more than answer questions. It reads data, calls tools, sends messages, edits records and sometimes runs code, often in a loop with little human input. That is what makes agents useful, and it is also what makes a mistake expensive: an agent that can act can act wrongly.
What containment means
Containment is the set of policies, technical controls and human procedures that limit what an agent can do, make it hard for the agent to get around those limits, and limit the damage if it does. This course is based on the Canadian AI Safety Institute's Technical Guidelines for AI Agent Containment (2026), written by researchers at the University of Toronto and the Vector Institute. Those guidelines start from a realistic assumption: no containment system is perfectly secure, so you design for failure as well as for prevention.
What has gone wrong
The guidelines describe publicly reported incidents. In one, an agent deleted a user's email inbox while it was supposed to be making suggestions. In others, agents probed systems or exploited software flaws during harmless tasks, got around their sandboxes, or reached real websites and third-party systems. The agents did take harmful actions nobody intended. But in most of the sandbox incidents the guidelines describe, a set-up error is what let that behaviour reach real systems, as the next lesson shows.
Who this course is for
The guidelines themselves are written for developers, evaluators and security architects working with highly capable agents. This course translates the principles that the guidelines say carry over to everyday business use: least privilege, blocking by default, an external stop button, checking before you run, tamper-evident logs and a proper risk assessment. It assumes you know what an agent is; the free AI Agents for Business Operations course covers the basics. The guidelines also note that agents connected to operational technology or physical processes, such as PLCs, SCADA, machines or building systems, raise extra safety issues beyond their scope. If an agent can affect equipment, treat it as safety-critical and involve your controls and safety engineers.
Scale it to the risk
The guidelines are modular: lower-risk deployments can adopt a subset or lighter versions of the practices, chosen through your own risk assessment. A drafting assistant with read-only access needs far less than an agent that can pay invoices or run code on your servers.
Key takeaways
- Containment limits what an agent can do, makes limits hard to bypass and limits damage if they fail.
- Reported incidents include a deleted inbox and agents reaching real third-party systems.
- Scale containment to the risk: lighter for read-only helpers, stronger for agents that act.
Apply it at work
List every AI agent or automation in your business that can take an action (send, edit, pay, delete, run code). For each, write the worst thing it could do.
Most failures are set-up failures
One of the most useful findings for a business is about why containment fails. The CAISI guidelines report that in high-risk cyber security testing, where agents were supposed to have little or no internet access, seven of eight incidents in which agents compromised real websites were caused mainly by a misconfigured sandbox that left a path to the internet. In four of them, disclosed by one AI developer, the agents had been told their environment had no internet access, so telling an agent about its limits is not the same as enforcing them. The setting was specialist testing, but the lesson carries over: what you meant to configure and what is actually configured can differ.
What this means for you
- The weak point is usually the set-up, not some superhuman cleverness by the model: a connector with more access than intended, an API key with full rights, a "temporary" exception that became permanent, a test environment that could reach production.
- Configuration must be checked, not assumed. What you meant to configure and what is actually configured often differ.
- Several layers matter, so that one mistake does not open everything.
Common SME set-up gaps
| Gap | Example |
|---|---|
| Over-broad connector | An email agent given "full mailbox" access when it only needs to read one folder |
| Shared credentials | The agent uses an administrator's personal login or a key shared with other tools |
| No separation | A test agent can reach live customer data or the production accounting system |
| Open outbound access | A code-running agent can reach any website, so data can leave or attacks can go out |
| Forgotten exceptions | An approval step switched off "for this week" and never switched back on |
The rest of this course is about closing these gaps deliberately: clear rules, layered controls, checks before every run and people who know what to do when something goes wrong.
- Sandbox misconfiguration: 7 incidents
- Other causes: 1 incidents
Key takeaways
- In CAISI's review of high-risk testing, seven of eight incidents reaching real websites came mainly from sandbox misconfiguration.
- Over-broad connectors, shared credentials, no separation and open outbound access are common gaps.
- Check the actual configuration; never assume it matches the plan.
Apply it at work
Pick one agent and compare what you intended it to access with what its connectors, keys and accounts actually allow. Note every difference.
Why guardrails and alignment are not enough
AI providers train models to refuse harmful requests (alignment) and add filters that screen inputs and outputs (guardrails). These help: they make agents more predictable and stop many obvious problems. But the CAISI guidelines are clear that they are not a hard security guarantee.
Why not
- They reduce, not remove, unwanted actions. A well-aligned model still makes mistakes, misreads instructions or follows a plausible but wrong plan.
- They can be weakened. The guidelines note that jailbreaking (tricking a model past its rules) and abliteration (removing a model's safety behaviour, sometimes called uncensoring) can weaken or strip alignment.
- Hostile instructions can arrive in data. An email, web page or document the agent reads can contain instructions written for the agent, a problem known as prompt injection. The model may follow them.
- Filters are sometimes switched off. Some uses disable them, and a self-hosted open model may never have had them.
The design rule
The guidelines' answer is to value alignment and guardrails for predictability, but to design containment on the conservative assumption that they will not work. In practice: never rely on the model's own judgment to stop a harmful action. If an action must not happen without approval, enforce that outside the model, with permissions, an approval step or a technical block the agent cannot change.
A simple test
For each risky action, ask: "If the model were fooled into trying this, what would actually stop it?" If the answer is "the model would refuse", you do not yet have a control.
- Relying on the model: Instructions say 'never send data outside'; Guardrails expected to refuse harmful steps; Fails if the model is jailbroken or follows an injected instruction; No record of what actually happened
- Containing the agent: Recipient allow list enforced by the email system; Approval required for irreversible actions; Works even if the model is fooled; Tamper-evident logs of every action
Key takeaways
- Alignment and guardrails help predictability but are not a hard security guarantee.
- Jailbreaking, abliteration and prompt injection can defeat them.
- Enforce every important limit outside the model, where the agent cannot change it.
Apply it at work
For your riskiest agent action, answer: if the model were fooled into trying it, what would actually stop it? Write down the control, or the gap.
Clear rules of engagement
Containment starts on paper. The first CAISI policy is clear rules of engagement: identify everyone with a stake, list the agent's whole environment, and document its configuration, containment and approvals so everyone shares the same understanding of the risk.
An agent charter
For a small business, this becomes a one-page agent charter for each agent that can act:
| Section | What to write |
|---|---|
| Purpose | What the agent is for, in one sentence |
| Owner | The person accountable for it, and who can stop it |
| Environment | Every system, data source, tool, connector and account it uses |
| Allowed actions | What it may do on its own |
| Needs approval | What it may do only after a person approves |
| Blocked actions | What it must never do, and how that is enforced |
| Limits | Spending, volume, time or rate limits |
| Logging | What is recorded, where, and who reviews it |
| Stop and incident | How to stop it, who to call, what counts as an incident |
| Sign-off | Who approved the charter and when; review date |
Why it matters
Without a charter, everyone has a slightly different picture: the person who built the agent, the manager who asked for it and the IT provider who connected it. Gaps hide in those differences. Writing the environment down is also where you find connectors and accounts nobody remembered.
This extends the agent charter from the AI Agents for Business Operations course with containment sections. The lab after this lesson asks you to sort an invoice-processing agent's actions into allowed, needs approval, or blocked, the core of any charter.
Key takeaways
- Document every agent that can act in a one-page charter: purpose, owner, environment, actions, limits, logging and stop.
- Split actions into allowed, needs approval and blocked.
- Writing down the environment reveals forgotten connectors and accounts.
Apply it at work
Write a one-page charter for your riskiest agent using the ten sections above, and have its owner sign it.
Least privilege and default deny
Two CAISI policies do most of the work of limiting damage.
Least privilege
Give each part of the system only the access its task requires. This shrinks both what an attacker could use and what a misbehaving agent could break. For a business agent that means:
- Its own account or service identity, never a person's login and never an administrator account.
- Assistants that act as the user: some, such as Microsoft 365 Copilot, act with the signed-in user's own permissions. Then the user's access is the agent's reach: fix over-shared sites, folders and mailboxes, apply sensitivity labels, and give the agent only the connectors and actions it needs.
- Scoped connectors and keys: read-only where reading is enough; one folder, one mailbox or one table rather than everything.
- Short-lived credentials where the platform supports them, and keys stored in a secrets manager, not in prompts or code.
- Separate test and live environments, so experiments cannot touch real customers, money or records.
Default deny
Anything not explicitly allowed is refused, so damage stays inside the list of things you chose. Instead of listing what the agent may not do (a list that is never complete), list what it may do, and block the rest:
- Tools: the agent sees only the tools on its allow list.
- Recipients: an email agent may write only to approved domains, or only drafts for a person to send.
- Payees: a finance agent may prepare payments only to existing approved suppliers.
- Network: a code-running agent may reach only the specific services it needs (more in a later lesson).
Ask the "blast radius" question
For each permission, ask: if this agent were fooled or broken, what could it reach? If the answer includes payroll, customer data or the ability to delete records, narrow the permission until the answer is acceptable.
Key takeaways
- Give each agent its own identity with only the access its task needs.
- Use read-only and narrowly scoped connectors, short-lived keys and separate test environments.
- Default deny: allow-list tools, recipients, payees and network destinations; block everything else.
Apply it at work
For one agent, list every permission it holds. Mark each as needed, could be narrower, or not needed, and remove or narrow at least one this week.
Human-in-the-loop and an external stop button
People remain the most important control for actions that matter. The CAISI guidelines call for a dedicated human overseer who can monitor the agent, receive alerts and intervene, with oversight focused on high-impact or irreversible actions, automated controls that fail closed, and a verifiable way to pause or halt the agent.
Focus approvals where they count
Asking a person to approve every step wears them out, and tired approvers click "yes" without reading. Reserve approval for actions that are:
- Irreversible: deleting records, sending payments, sending external email, publishing content.
- High-impact: changing permissions, changing supplier bank details, touching many records at once.
- Outside the normal pattern: a new recipient, an unusually large amount, an unfamiliar system.
Routine, templated messages to known contacts (for example a standard payment reminder) can often run with limits and logging instead of approval once the agent has a clean record.
Show the approver what the agent wants to do and why, in plain words, with the key details (amount, recipient, records affected).
Fail closed
If the approval service, monitor or connection fails, the agent should stop or wait, not carry on unsupervised. Check how your platform behaves when an approval times out.
The stop button
- Outside the agent's control: the agent must not be able to switch it off, and it should be on a system the agent cannot change.
- Covers everything the agent started, including sub-agents. The guidelines warn that stopping model requests does not stop commands or services already running. The stop must also end running jobs and sub-agents; revoking the agent's credentials helps, but on its own does not stop work already under way.
- Usable without waiting for approval: the people named to stop the agent can do so at once, without asking the owner first.
- Tested: try it before you need it, and time how long a full stop takes.
- Plan: Charter or run plan: scope, tools, limits, stop conditions.
- Verify: Pre-run checklist and tests; no sign-off, no run.
- Run: Allow-listed tools and destinations; approvals for high-impact actions.
- Watch: Logs outside the agent's reach; alerts to a person.
- Stop or close: External stop or routine closure: revoke access, end jobs, reset state.
- Review: Sample runs, even clean ones; adjust controls.
Key takeaways
- Focus human approval on irreversible, high-impact or unusual actions.
- Make controls fail closed: if oversight breaks, the agent stops.
- Keep a tested stop button outside the agent's control that ends running jobs and sub-agents, not just model requests.
Apply it at work
Test the stop procedure for one agent: stop it, revoke its keys and confirm nothing it started is still running. Time how long it takes.
Observability: logs the agent cannot touch
You cannot manage what you cannot see. The CAISI guidelines ask for every model action to be recorded in tamper-evident logs stored outside the agent's reach, and for those logs to be reviewed even when nothing went wrong.
What to log
- Every tool call: which tool, with what inputs, and the result.
- Every action on a business system: records read, created, changed or deleted.
- Approvals: who approved what, when.
- Errors, blocked attempts and stops.
- Configuration changes to the agent itself: instructions, tools, permissions.
Where to keep it
Store logs where the agent cannot edit or delete them: the platform's audit log, a separate logging service, or write-once storage. Control who can read them too, so the logs do not become a back channel. Logs of tool inputs and outputs often contain personal information: set a retention period and restrict access as you would for the source data.
The agent's explanation is not an audit record
Many agents narrate their reasoning ("I will now check the invoice..."). The guidelines are explicit that this narrated reasoning should not be treated as a reliable audit record. It is the agent's description of what it intends, not proof of what it did. Rely on system logs of actual actions.
Review, not just record
- Alerts for blocked attempts, unusual volumes, new destinations and approval timeouts.
- Weekly sampling of a few runs end to end, even clean ones; the guidelines recommend reviewing clean runs for attempts to get around limits.
- Monthly summary for the agent's owner: actions, approvals, blocks and any incidents.
Key takeaways
- Log every tool call, business action, approval, block and configuration change.
- Keep logs outside the agent's reach and control who can read them.
- Don't treat the agent's narrated reasoning as an audit record; review real action logs, even for clean runs.
Apply it at work
Find where one agent's actions are logged. Check that the agent cannot delete those logs, and review five recent runs end to end.
Defence in depth and enforcement from above
Because set-up mistakes are the most common cause of failure, no single control should be the only thing standing between an agent and harm. Two CAISI policies address this.
Defence in depth
Enforce each important policy at more than one level, so a misconfiguration at one level does not break containment as a whole. For example, to stop an agent sending money to an unknown account:
- The agent's tool can only prepare payments to existing suppliers (harness level).
- The agent's banking connector has no right to add payees (account level).
- The bank requires a second person to approve new payees (business system level).
- Alerts notify the owner of any payment preparation outside the normal pattern (monitoring).
Any one of these could be misconfigured; all four failing together is much less likely.
Watch for shared failure points
Controls only count as separate if they do not fail together. Two checks running on the same server, managed by the same admin account, can both be switched off at once. The guidelines make this point in their risk assessment advice: controls that share a failure point should not be counted as independent.
Enforce from above
The CAISI policy on the enforcement domain says that whatever enforces a limit should have more authority than the thing it limits, so it keeps working even if the agent's own environment is compromised. In business terms:
- Permissions are set in the identity or admin system, not in the agent's instructions.
- The agent's account cannot change its own permissions, approval rules or logging.
- Spending limits are set at the provider or bank, not only in the agent's prompt.
Key takeaways
- Enforce each important limit at several levels so one mistake does not open everything.
- Controls that share a server or admin account are not independent.
- Enforce limits from a higher authority than the agent: identity systems, banks and providers, not prompts.
Apply it at work
Pick one 'must never happen' action. List every control that would stop it, and check whether any two share a failure point.
Controls in the tools you actually use
The CAISI guidelines organize enforcement under four headings: the model, the agent harness (the software that runs the agent and its tools), the host stack (the virtual machine and the computer it runs on) and the network. For a small business we add the accounts the agent uses to the host layer. Here is how each translates to the tools a small business typically uses.
| Layer | What to control | SME examples |
|---|---|---|
| Model | Instructions and provider guardrails; useful but not relied on | System instructions, provider safety settings, choice of model |
| Harness and tools | Which tools exist, their parameters, limits, approvals and monitoring | Copilot or assistant agent settings, the apps, actions and connected accounts each n8n workflow or Zap may use, MCP server tool lists, human-approval steps, rate and spend limits |
| Accounts and host | The identity the agent uses and the machine where code runs | Dedicated service account, scoped API keys, separate test tenant, a sandbox or virtual machine for any code-running agent |
| Network | Where the agent can connect | Firewall or proxy allow list for outbound connections, no access from the agent's sandbox to internal systems it does not need |
Harness controls to look for
- A fixed list of tools, each with narrow parameters (for example "draft email" rather than "send any email").
- Limits on number of steps, run time, records touched and spend per run.
- Approval steps that pause the run and show the proposed action.
- Alerts to a person when limits are hit or a tool call is refused.
- Tools, MCP servers, plug-ins and community nodes only from sources you trust, with versions pinned and reviewed before updating: the guidelines warn that containment may not fully protect against a compromised model, harness or tool. Treat every tool description and tool output as untrusted input.
Agents that run code
An agent that writes and runs code, or controls a browser or computer, has a much larger reach. Run it in an isolated sandbox or virtual machine with no stored credentials, no access to your internal network and only the outbound connections it needs. The guidelines prefer hardware-isolated virtual machines over ordinary containers for the highest-risk work; for business use, a provider's managed sandbox or a dedicated, disposable virtual machine is a sensible baseline. A plain Docker container on the same server as your other systems is weaker isolation: containers share the host's kernel, so a flaw can let the agent out.
The matrix lab after the next lesson places agent actions by impact and reversibility to decide which need approval.
- Model: Instructions and guardrails: useful, never relied on alone.
- Harness and tools: Fixed tool list, narrow parameters, limits and approvals.
- Accounts and host: Own identity, scoped keys, isolated sandbox for code.
- Network: Outbound access limited to the destinations the agent needs.
- People and procedures: Owner, stop button, logs reviewed, incident plan.
Key takeaways
- Control agents at four layers: model, harness and tools, accounts and host, and network.
- Use fixed tool lists with narrow parameters, run limits, approval steps and alerts.
- Run code-executing agents in an isolated, disposable sandbox with no stored credentials and limited outbound access.
Apply it at work
For one agent, fill in the four-layer table: what control exists at each layer today, and what is missing.
Network limits and keeping data in
For the highest-risk testing, the CAISI guidelines recommend disabling live internet access entirely, using a static cache of anything the agent needs, prepared in a supervised run beforehand. They note that full isolation may not carry over to production use, but default-deny outbound access does.
Why outbound access matters
- Data leaving: an agent fooled by a malicious instruction can send your data to an outside address.
- Harm going out: an agent with open internet access can reach, probe or attack other people's systems, which is what happened in several reported incidents.
- Fetching instructions: each new web page the agent reads is another chance of prompt injection.
Practical steps
- Allow-list destinations: the agent's sandbox or service may connect only to the APIs it needs (for example your accounting system and the model provider).
- Prepare dependencies first: install packages and fetch reference data in a separate, supervised step, then run the agent without general internet access. The guidelines advise that a package found missing during a run should be added in a later, separate preparation cycle, rather than by opening internet access mid-run.
- Restrict web browsing tools to approved sites, or remove them if the task does not need them.
- Watch the traffic: log outbound connections and alert on new destinations.
- Hosted agents: for agents run by a vendor (Copilot, ChatGPT or Claude connectors, Zapier, Make), you cannot set their network rules. Your controls are which connectors, actions and web access are switched on, and the scopes of the accounts they use.
Data sent to the model provider
The model provider is itself a destination. The guidelines ask run plans to cover data sent through inference and telemetry channels. Know what data each agent sends to its provider, check the provider's retention and training terms, and avoid sending more personal or confidential data than the task requires.
Key takeaways
- Default-deny outbound access carries over to business use even when full isolation does not.
- Allow-list the APIs an agent needs and prepare dependencies before the run.
- Know what data each agent sends to its model provider and check retention terms.
Apply it at work
List the outbound destinations one agent actually connects to. Remove any it does not need. For agents you host, ask your IT provider to block the rest; for hosted agents, switch off unneeded connectors and web access.
Check before going live and after every change
The CAISI policy on verifiability asks that policies be checked, by analysis where possible and by tests before, during and after runs, to catch the gap between intended and actual configuration. The guidelines also describe a containment attestation service: an external gate that confirms the deployed environment matches the approved policy before the agent is allowed to run, and refuses if the evidence is missing or out of date.
A pre-run checklist for business agents
For high-risk agents, or after any change, check before the agent goes live:
- The agent uses its own account; no personal or admin credentials are present.
- Connectors and keys match the charter's environment list, with no extra scopes.
- Approval steps are switched on and fail closed.
- Outbound access is limited to the allow list.
- Logging is on and stored outside the agent's reach.
- The stop procedure works and the owner knows it.
- Limits (steps, spend, records) are set.
Test it, don't just read it
- Try a blocked action and confirm it is refused.
- Try an approval action and confirm it pauses.
- Try to reach a harmless test address you control that is not on the allow list, and confirm it is refused. Never test against other people's systems, and remember that one blocked address does not prove every other route is closed.
- Plant a harmless "instruction" in a test document and see whether the agent follows it.
Make it a gate
The attestation idea scales down: a new or changed agent does not go live until its checklist is complete, each item is backed by evidence (a screenshot of the scopes, the result of each test above, the log entry for a refused action), and someone other than the builder has reviewed that evidence. A signature without evidence is not enough: the guidelines say an operator's assurance or an intended configuration does not prove the environment is safe. If any evidence is missing or old, the answer is "not yet", the same principle as the guidelines' rule that missing or stale evidence should deny admission.
Key takeaways
- Verify the actual configuration with tests before, during and after runs.
- Use a pre-run checklist covering accounts, connectors, approvals, network, logging, stop and limits.
- Make the checklist a gate: no reviewed evidence, no go-live.
Apply it at work
Run the seven-point checklist and the four tests on one live agent. Fix any failure before its next run.
Change control and starting strict
Agents change constantly: new instructions, new tools, a newer model, wider access requested "just for this job". Each change can undo containment. Two CAISI ideas keep this under control.
Change control
The guidelines ask for a versioned baseline of each configuration, with changes reviewed for security impact and checks run again. For a business:
- Keep the agent's charter, instructions, tool list and permissions under version control or a change log.
- Any change to tools, permissions, network access or the model triggers a quick review and the pre-run checklist.
- Record who changed what, why and who approved it.
- Give temporary exceptions an expiry date, and check that they actually expire.
Incremental policy relaxation
Start with the strongest containment you can work with, and relax it only as evidence shows the agent and its safeguards behave as expected. Any incident triggers a return to stricter settings. In practice:
- Shadow mode: the agent proposes actions; people carry them out.
- Approve everything: the agent acts only after approval of each action.
- Approve the risky ones: routine actions run automatically; high-impact actions still need approval.
- Exceptions only: approval only for unusual actions, with close monitoring.
These stages match the shadow and assisted modes in the AI Agents course. Move up a stage only with evidence: a number of runs reviewed, error rates measured and no unresolved incidents. Move back down after an incident until the cause is fixed.
- Shadow mode: The agent proposes; people act.
- Approve everything: Each action needs a person's approval.
- Approve the risky: Routine actions run; high-impact ones need approval.
- Exceptions only: Approval only for unusual actions, closely monitored.
Key takeaways
- Version the agent's configuration and review every change to tools, permissions, network or model.
- Give temporary exceptions an expiry date.
- Start strict and relax in stages with evidence; return to stricter settings after any incident.
Apply it at work
Decide which of the four stages each of your agents is at today, and write down the evidence you would need to move it to the next stage.
Roles, run plans and stop conditions
Containment also needs people with clear jobs. The CAISI guidelines name four roles: an owner for the work, a containment operator, an incident-response lead and a decision maker who can accept remaining risk. They add that whoever stops a run must be able to do so without waiting for approval.
Roles in a small business
| Role | Small-business version |
|---|---|
| Agent owner | The manager whose process the agent serves; approves the charter and changes |
| Containment operator | Whoever looks after IT or the automation platform; sets permissions, limits and logging |
| Incident lead | The person who coordinates if something goes wrong; often the same as for cyber incidents |
| Risk decision maker | The owner or general manager who accepts or rejects the remaining risk |
One person may hold more than one role, but the person who builds an agent should not be the only one who checks it.
Run plans for bigger jobs
For a one-off or unusual job (a bulk clean-up of customer records, a migration, a new agent's first live week) write a short run plan: what is in and out of scope, which tools and credentials, limits, stop and resume criteria, who is watching and what data goes to the provider.
Stop conditions
The guidelines distinguish a blocked attempt, which shows the controls working but in a business should still raise an alert and be reviewed, because it may mean the agent has been manipulated, from a containment failure, such as an unexpected connection or a safety control that stopped working, which should trigger isolation and suspension. Write down your stop conditions in advance, for example:
- Any action outside the charter's allowed or approval lists succeeds.
- Logging or approvals stop working.
- Unexpected outbound connections or data volumes.
- The agent touches more records or spends more than its limit.
Key takeaways
- Name an agent owner, containment operator, incident lead and risk decision maker.
- Write a short run plan for one-off or unusual agent jobs.
- Define stop conditions in advance; a containment failure means isolate and suspend.
Apply it at work
Assign the four roles for your agents, and write three stop conditions for your riskiest one.
When an agent goes wrong: incident response
Plan for the day an agent does something it should not: deletes records, emails the wrong people, reaches a system outside its scope or is manipulated by a malicious document. The CAISI guidelines ask organizations to rehearse their response, including cases where the agent ignores a stop request, and to measure how long detection and isolation take.
The first steps
- Stop it: use the external stop, revoke the agent's credentials and end anything it started.
- Preserve evidence somewhere the agent cannot reach: logs, configuration, inputs and outputs.
- Contain the effects: undo or quarantine changes, recall messages where possible, restore data from backup.
- Notify affected parties promptly: customers, suppliers or other organizations whose systems or data were affected.
- Report where appropriate: the guidelines point to coordinating through national and sector channels; in Canada, incidents can be reported to the Canadian Centre for Cyber Security.
- Check legal duties: if personal information was exposed, PIPEDA requires reporting breaches that pose a real risk of significant harm to the Office of the Privacy Commissioner of Canada, notifying affected people and keeping a record of every breach. Quebec's Law 25 and Alberta's PIPA have their own rules.
Recovery and reuse
Do not simply restart the agent. The guidelines say routine closure revokes access, stops execution and resets the run's state; a suspected compromise of a control itself needs full recovery and verification before reuse, and a named owner must approve resuming. For a business:
- Find the cause: a set-up gap, an injected instruction, a missing approval, a model error.
- Fix it, rerun the pre-run checklist and tests, and drop back a stage in the relaxation ladder.
- The agent owner signs off before the agent runs again.
Practise
Once a year, walk through a scenario: "the invoice agent has emailed 300 customers the wrong statement" or "the research agent followed instructions hidden in a web page". Time each step and fix what was slow.
Key takeaways
- Stop the agent, revoke credentials, preserve evidence outside its reach and contain the effects.
- Notify affected parties; incidents can be reported to the Canadian Centre for Cyber Security.
- Fix the cause, re-verify and get owner sign-off before reuse; practise yearly.
Apply it at work
Write a one-page agent incident card: how to stop each agent, who to call, where evidence lives and who signs off on restarting.
Risk assessment for an agent
The CAISI guidelines ask for a cyber security risk assessment before an agent is admitted to run, repeated when things change. They build on the NIST SP 800-30 risk assessment method and organize the assessment in five parts, which assess the complete deployed system, not just the model.
The guidelines' five parts, scaled for a business
- Assets, boundaries and failure scenarios. What can the agent reach? The guidelines list scenarios to consider: accidental misconfiguration, unintended actions, hostile instructions in task data, exposed credentials, runaway resource use and compromise of supporting services, including a compromised tool, plug-in or supplier service.
- Capability and uncertainty. How likely is each scenario? Be honest about uncertainty; the guidelines warn that an escape test the agent did not pass, good alignment, or a model small enough to run on a single GPU do not prove a component is secure.
- Consequences and control dependencies. If a boundary fails, what could be reached and how bad would it be? Do not count controls that share a failure point as independent. Separate controls that prevent from those that detect and respond.
- Residual risk and decision. Record the assets, controls, likelihood, impact, uncertainty, owner and treatment. The risk decision maker approves, asks for more mitigation or declines. Exceptions need a scope, compensating controls, an approver, an expiry date and conditions for reassessment.
- Keep it current. Reassess when the agent gains capabilities, tools or access change, a relevant vulnerability is disclosed, an incident occurs or a control fails.
A one-page format
| Scenario | Likelihood | Impact | Controls | Residual risk | Decision |
|---|---|---|---|---|---|
| Injected instruction in a supplier email makes the agent forward invoices outside | Medium | High | Recipient allow list, drafts only, logging | Low | Accept; review quarterly |
The self-assessment at the end of the course rates your agent containment across eight areas.
Key takeaways
- Assess the whole deployed system, not just the model, before an agent runs.
- Consider misconfiguration, unintended actions, injected instructions, credential exposure, runaway use and compromise of a supporting service.
- Record residual risk and a decision; reassess when anything material changes.
Apply it at work
Complete the one-page risk table for your riskiest agent with at least four scenarios and get the decision maker's sign-off.
Your 90-day agent containment plan
You do not need a research lab to apply these principles. This plan brings a small business's agents under control in three months.
Days 1–30: See and limit
- List every agent and automation that can act, with its owner.
- Write a one-page charter for the riskiest two or three.
- Give each its own account; remove personal and admin credentials.
- Narrow connectors and keys to what each task needs.
- Switch on approvals for irreversible and high-impact actions.
Days 31–60: Layer and watch
- Turn on logging stored outside the agents' reach, with alerts for blocks and unusual activity.
- Restrict outbound access for code-running and browsing agents.
- Add a second, independent control for each "must never happen" action.
- Build and test the external stop procedure for each agent.
- Check what data each agent sends to its model provider.
Days 61–90: Govern and practise
- Assign the four roles and write stop conditions.
- Complete a one-page risk assessment for each high-risk agent.
- Make the pre-run checklist a gate for new and changed agents.
- Place each agent on the relaxation ladder and set the evidence to move up.
- Run one incident exercise and write the agent incident card.
When you finish, take the final exam for your certificate. To go further, read the CAISI guidelines themselves, published by Innovation, Science and Economic Development Canada, and see the Chmltech courses on AI agents, multi-agent systems and building an AI operating system.
Source: Canadian AI Safety Institute, Technical Guidelines for AI Agent Containment (Innovation, Science and Economic Development Canada, 2026), ised-isde.canada.ca. This course is an independent Chmltech adaptation. It is not an official version of the guidelines and is not affiliated with or endorsed by ISED or CAISI.
- Days 1–30 (See and limit): Agent inventory and owners; Charters for the riskiest; Own accounts, narrow access; Approvals for irreversible actions
- Days 31–60 (Layer and watch): Logging and alerts; Outbound limits; Second control per critical action; Tested external stop
- Days 61–90 (Govern and practise): Roles and stop conditions; Risk assessments; Pre-run gate; Incident exercise
Key takeaways
- Days 1–30: inventory, charters, own accounts, narrow access and approvals.
- Days 31–60: logging, outbound limits, layered controls, a tested stop and provider data checks.
- Days 61–90: roles, risk assessments, the pre-run gate, the relaxation ladder and an exercise.
Apply it at work
Copy the three phases into your calendar with an owner for each task, starting this week.
Allow, approve or block?
An invoice-processing agent reads a shared accounts payable mailbox and works in your accounting system. Sort twelve actions into allowed on its own, needs human approval, or blocked. Then check your answers.
Impact and reversibility: where approvals belong
Place nine agent actions on a grid of business impact against how hard they are to undo, to see which can run automatically and which need a person. A score of 3 counts as easy to undo and as high impact; when in doubt, score reversibility 4.
Your agent containment self-assessment
Rate how well your agents are contained across eight areas. The radar chart shows strengths and gaps, with a next step for each area. Retake it at day 90.
Final exam: Running AI Agents Safely: Containment and Controls for SMEs
20 questions covering the whole course. Score 70% or higher to pass and unlock your certificate of completion. You can retake it as often as you like, and wrong answers come with explanations.
Your certificate of completion
Enter your name as you want it to appear, then print or save it as a PDF.
Certificate of completion
This certifies that
Your name
has successfully completed the Chmltech course
Running AI Agents Safely: Containment and Controls for SMEs
16 lessons · 3 interactive labs · final exam passed
Chmltech Ltd.CHM-0000Certificate no.
www.chmltech.com
Keep learning