After President Donald Trump decided to withdraw the United States from the Paris Agreement on climate change, Walmart CEO Doug McMillon felt an obligation to respond, writing on Facebook that "we think it's important for countries to work together to reduce greenhouse gas emissions."

At a time when political rhetoric has become increasingly divisive and partisan, McMillon sees a role for the country's prominent business executives to weigh in "when something needs to be responded to."

"There are moments when something comes so close to our core or touches one of our values when we really do need to speak up," McMillon said Friday during a discussion with television journalist Soledad O'Brien.

McMillon, 50, spoke on the opening day of the Essence Festival's free daytime programming, which is held at the Ernest N. Morial Convention Center. The events, running through Sunday, include motivational seminars, live demonstrations and various exhibits.

Other speakers Friday included Vanessa K. De Luca, editor of Essence magazine; Phaedra Parks, of Bravo's “Real Housewives of Atlanta"; and R&B singer Mary J. Blige.

McMillon touched on a range of topics during his discussion with O'Brien, including one area where he and Trump agree: finding ways to create new domestic manufacturing jobs.

But to get there, McMillon said, government officials and business leaders should focus less on talk about trade obstacles and more on training workers to be "more entrepreneurial" and prepared for what's to come, particularly as Walmart and other large retailers grapple with the growing impact of automation.

"You can't stop automation," he said. "It's happening now, and it's going to keep going, so we, as human beings, have got to get ahead of that."

That could mean retraining older workers as well as preparing the next generation of workers for new and evolving job responsibilities, he said.

"For us to get from where we are today to the other side of this transformation that's going on, we have got to be more open, more curious, more creative and faster to be successful," he said.

For Walmart, automation doesn't mean mass layoffs, he said. Instead, the new processes could free some employees from menial tasks and allow them more opportunity to interact with customers, he said.

"I believe we will become more productive and over time we'll hire fewer people. Hopefully, the turnover is going to decrease, and we'll just manage it through attrition," he said.

In 2013, Walmart committed to spending an extra $250 billion over a decade on U.S.-produced goods, which he said has led the retailer to "drive manufacturing of all kinds."

Another focus area for McMillon: ensuring diversity among Walmart's 2.3 million employees worldwide and 1.5 million workers in the U.S.

"It's a people business, and so when a customer interacts with an associate, we want them to feel comfortable and to feel welcome," he said.

Earlier this year, Walmart completed implementing a five-year plan to stock its stores with $20 billion worth of products from women-owned businesses as well as training 1 million women in key skills for career advancement and improving their access to the company's supply chain.

So what's next? Walmart, which had nearly $486 billion in revenue in the fiscal year that ended in January, is trying hard to make its workforce more inclusive, he said.

The company's vast empire means that there's "variance in the culture" of some stores, but that needs to change, he said.

"In order for us to be able to retain the talent that we attract and develop, we've got to make sure that our environments are inclusive," he said.

Follow Richard Thompson on Twitter, @rthompsonMSY.