You can do that when you rethink the way you are building your agents. Don't try to get the agent to NOT do things it is not supposed to do.
Instead, make it not possible for it to do them in the first place.
If the agent cannot access data from other users, it has no way of divulging that data, no matter what input it goes through, for example.
See here, as an example: https://ravendb.net/quill
This is based on RavenDB's agent, and we have the concept of scoped access. The instructions you give to the agent aren't relevant, as long as the scoping is defined.
You may be able to use word trickery to get the agent to try to read other users' data, it may even give you something that looks plausible. But if it can only query on _your_ data, that is not a security breach.
This is just another variant of my observation that a publicly exposed agent can only be safely allowed to read fully public data. What you're saying is that an agent that receives credentials from a user A can only be safely allowed to read any data that user A can read directly - which is the same thing.
The problem is that there are many use cases where we'd like to use agents where this doesn't work. Basically this limits agents to being smarter self-service pages / docs , nothing more.
But what companies really want is to be able to replace, say, a customer support employee with a customer support agent. However, there is no way to do this with the kind of safety you are discussing here: if the agent can do something like provide a refund to a customer, then it must be able to do something that the customer themselves can't be allowed to do. Sure, you can absolutely make sure programmatically that an agent talking to user A can't accidentally refund user B's order. But you can't make sure programmatically that an agent talking to user A can only refund user A's order if user A has provided solid proof their order was messed up in some way.
Or say you want to run a personal assistant agent that can handle your calendar and coordinate with people looking to get in contact with you, and even answer simple questions. Again, you can't programmatically ensure that this agent will not leak details about your calendar or private life to the wrong person, while still being able to coordinate with the right people, the way a real personal assistant can.