how to make AI agents reliable