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.
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.
Layer identity, input, tools, approval, logs, and people
The language that keeps the work clear.
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 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.
Complete the working artifact
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
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
- Which control should stop the data before the model sees it?
- Which control should stop the send?
- 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.