Logical Theories for Agent Introspection