What is the relation between the complexity of agents and the complexity of the goals that they can achieve? It is argued on the basis of a fundamental conservation of complexity principle that complex goals can only be achieved if either the agents or their environment has a complexity of matching stature. This has consequences for research programs in distributed artificial intelligence, robotics and connectionism. After presenting a qualitative theory of complexity of agent systems, we also critically investigate the claims and the realities behind reactive agents, the subsumption architecture (Brooks), and the view of plans as resources (Agre, Chapman, Suchman). Finally, the implications of the complexity conservation principle for the foundations of cosmology and complexity of the universe are discussed. Puzzles appear whose possible solution relates the uncertainty principle of quantum mechanics with the second law of thermodynamics.