The agreement highlights growing collaboration between major tech companies and government agencies on sensitive AI applications.