In AI, consciousness of self consists in a program having certain kinds of facts about its own mental processes and state of mind. We discuss what consciousness of its own mental structures a robot will need in order to operate in the common sense world and accomplish the tasks humans will give it. It’s quite a lot. Many features of human consciousness will be wanted, some will not, and some abilities not possessed by humans will be found feasible and useful. We give preliminary fragments of a logical language a robot can use to represent information about its own state of mind. A robot will often have to conclude that it cannot decide a question on the basis of the information in memory and therefore must seek information externally. GSdel’s idea of relative consistency is used to formalize nonknowledge. Programs with the level of consciousness discussed in this article do not yet exist. Thinking about consciousness with a view to designing it provides a new approach to some of the problems of consciousness studied by philosophers. The advantage is that it focusses on the aspects of consciousness important for intelligent behavior.