This book constitutes the refereed proceedings of the 21st Brazilian Symposium on Artificial Intelligence, SBIA 2012, held in Curitiba, Brazil, in October 2012. The 23 revised full papers presented were carefully reviewed and selected from 81 submissions. The papers cover the following topics: knowledge representation, machine learning, machine learning and computer vision, agent-based and multi-agent systems, robotics and language, as well as constraints.