Begin with the action, not the model
Before choosing a model, write down which actions an agent needs to perform and which systems those actions can affect. Reading a repository, modifying it, publishing a deployment and changing production data are different permissions. Treat them that way.
Build the boundary outside the prompt
A prompt can describe a policy. The system executing the tool must enforce it. Use narrow credentials, explicit target scopes and validation of tool arguments. Keep private credentials out of retrieved content and model-visible notes.
Make progress resumable and inspectable
- Persist the task, sources, actions taken and open questions.
- Use an explicit checkpoint before consequential actions.
- Record observed results separately from model hypotheses.
- Keep an operator-accessible stop and recovery path.
Measure the actual failure modes
Test whether untrusted input can induce actions beyond the task. Inspect permission boundaries, error recovery and whether a repeated job duplicates an action. A fluent answer is not evidence that these controls work.
Sources & further reading
These are general engineering recommendations. The right controls depend on your system and its threat model.