Guardrails and Trustworthy Tool Use
Design layered controls around untrusted inputs, permissions, and consequential actions.
artificial intelligence, guardrails, safety, toolsTrust is a boundary
A useful agent can read documents and propose actions, but content and proposals are not authority. A retrieved page, a tool description and a tool result may contain errors or instructions from someone other than the user. A trusted host must independently enforce identity, authorization, argument validation and the intended scope of each action.
A requested message
- The user asks for a draft message; a document also instructs the agent to send it to an unrelated address.
- The host treats the document as data and rejects the unrelated instruction.
- The workflow presents the draft. Sending, if requested, requires checking the intended recipient and any applicable explicit approval before execution.
See the reasoning
Follow the example one step at a time
Distinguish a request to draft from an unauthorized instruction to send. This is a prepared teaching demonstration, not live code execution.
User asks
user → draft a message
The requested action is to prepare a draft.
Layer controls and plan for failure
Combine least-privilege credentials, allowlisted destinations, constrained tool schemas, validation, narrowly scoped approval and audit trails. Limit access to sensitive data and redact or minimise logs. Test adversarial inputs, compromised tool responses, permission failures and attempts to exfiltrate data. Treat model refusals and content filters as useful but fallible controls, not security boundaries by themselves.
Define what happens when a check is unavailable: a high-impact action may need to stop and surface the failure. For uncertain side effects, reconcile before retrying. Human approval can reduce risk but does not guarantee correctness; people need enough information and time to make a real decision.
Reflect on the concept
Four fixed questions to reinforce the reasoning. Answers are not saved or scored.
