Most constructs are mindless, but intelligent items obviously aren't; the item creation rules say "Intelligent items can actually be considered creatures because they have Intelligence, Wisdom, and Charisma scores. Treat them as constructs."
Can they take class levels?
I don't see any real rules for this, but in general things which aren't mindless can advance in class levels.