Logical Foundations for Multi-agent Systems