China's President Xi Jinping (L) and US President Donald Trump attend a working session on the first day of the G20 summit in Hamburg, northern Germany, on July 7, 2017.

A trade agreement between China and the United States including possible tariff reductions started to take shape during talks in Washington this week, a senior administration official told CNBC on Friday.

Representatives for the world's two largest economies have set "targets" for a potential pact after two days of negotiations, but there is no guarantee it will get signed, said the person who declined to be named. The sides are talking about cutting tariffs in sectors including energy and farming, among others.

On Thursday, Trump attended an Oval Office meeting with Chinese Vice Premier Liu He and top U.S. officials as Beijing and Washington try to reduce trade tensions and fears of a possible trade war. The president's presence indicates the meetings are going well, and he pushed Liu to expand the list of sectors that could see tariff reductions, according to the official. Trump brought up areas including energy and natural gas.

On Friday, Trump's chief economic advisor Larry Kudlow told reporters the negotiations "are going well." He said Trump "was probably more optimistic yesterday on the subject than I've seen him in this whole process."

"China's come to trade, they're meeting many of our demands," Kudlow said. "There's no deal yet, to be sure, and it's going to probably take a while. It's a process. But they're coming to play. I believe they want to make a deal."

The economic advisor said he does not think there is a deadline to reach a deal.

While the Trump administration considers alleged intellectual property theft by Chinese companies a critical issue, the representatives have not resolved the problem yet, according to the senior administration official who declined to be named.