Smart cities involve, in a large scale, a wide array of interconnected components and agents, giving birth to large and heterogeneous data flows. They are inherently cross-disciplinary, provide interesting challenges, and constitute a very promising field for future urban developments, such as smart grids, eco-feedback, intelligent traffic control, and so on. We advocate that the key to these challenges is the proper modelling and exploitation of context. However, said context is highly dynamic and mainly unpredictable. Improved AI and machine learning techniques are required. Starting from some of the main smart cities features, this paper highlights the key challenges, explains why handling context is crucial to them, and gives some insights to address them, notably with multi-agent systems.