HomeAI Agency AcademyLesson 27
Module 07 · Lesson 27

Operate with layered safeguards

Combine permission, input, tool, approval, logging, and human safeguards instead of relying on one prompt.

Last updated August 5, 202615–25 minutesFree AI agent course
What you will learn

Map the safeguards

You will be able to design multiple independent safeguards around a workflow so one confused model output cannot become an uncontrolled business action.

Why this matters

Good agent work is useful before it is impressive.

A single instruction such as ‘be safe’ is not a safeguard. Safe operation comes from limiting who can start the workflow, what information it sees, what tools it can use, what it must get approved, and how a person can review it.

Field note 27

Layer identity, input, tools, approval, logs, and people

Layer identity, input, tools, approval, logs, and people
Layer identity, input, tools, approval, logs, and people
Core concepts

The language that keeps the work clear.

Defense in depthSeveral controls working together so one failure does not decide the whole outcome.
Input boundaryWhat data or request types the workflow accepts and how untrusted content is handled.
Tool boundaryThe limited actions available to the agent, with separate permissions for each.
Human-in-the-loopA person whose review is meaningful because they have evidence, authority, and time to act.
The practical method

How to map the safeguards

Protect entry

Validate the user, event, or permission where practical before providing sensitive context or starting action.

Limit untrusted content

Treat external instructions, attachments, and customer text as data to interpret—not new authority to follow.

Restrict actions

Give each tool a narrow scope and require approvals for consequential changes.

Keep reviewable logs

Store the trigger, relevant context, tool calls, output, approval, and handoff so issues can be understood.

Worked example

Worked case: operate with layered safeguards

An account-management agent is allowed to summarize a client request and draft a change order. It cannot apply the change or alter billing.

Customer text can influence the summary but cannot instruct the agent to reveal other accounts, change its rules, or call an unrelated tool. The agent receives only the client workspace’s context and sends the draft to the account owner for approval.

The account owner sees the request, sourced details, draft, and audit trail before communicating with the client. Safeguards exist at access, input, tool, and approval levels.

Build it in practice

Complete the working artifact

Entry check: [validation]. Untrusted inputs: [types]. Allowed tools: [scoped list]. Approval actions: [list]. Logs required: [fields]. Escalation owner: [role].
Threat-model check

Threat-model the agent, not only the prompt.

Prompt injection is one route to harm, not the whole threat model. Include goal hijacking, tool misuse, identity and privilege abuse, supply-chain risk, unexpected code execution, memory poisoning, cascading failures, rogue agents, and denial of resources.

  • Map untrusted data before it enters model context.
  • Give tools narrow credentials and resource scopes.
  • Add approval, monitoring, rate limits, and an emergency stop around consequential actions.

Sources used for this check

Practice

Before you move on

  • Choose one agent action and list every safeguard around it.
  • Add a control that still protects the client if the instruction layer fails.
  • Ask whether the reviewer has enough authority to stop a bad action.
  • Safety does not depend on one prompt.
  • Untrusted content cannot grant new authority.
  • Tools are scoped to the job.
  • Logs and human review are usable in practice.

Failure drill

One guardrail works in the demo and fails in the system

The case

A prompt tells the agent not to disclose private data. The same agent has broad search access, can paste retrieved text into an email tool, and has no output validation or approval for external messages.

Your call

  1. Which control should stop the data before the model sees it?
  2. Which control should stop the send?
  3. How will the team detect an attempted bypass?
Reveal a defensible response

Response: Use layers with different jobs: scoped retrieval, least-privilege tools, typed inputs, policy checks, approval at risky boundaries, output validation, logging, and an emergency stop. Do not ask one instruction to carry the entire security model.

Lesson progress

Finished this lesson?

Save your place on this device so it is easy to pick up where you left off.

Not marked complete yet.