WASHINGTON — The United States and China have agreed to hold regular, high-level talks on how to set standards of behavior for cybersecurity and commercial espionage, the first diplomatic effort to defuse the tensions over what the United States says is a daily barrage of computer break-ins and theft of corporate and government secrets.

The talks will begin in July. Next Friday, President Obama and President Xi Jinping of China, who took office this spring, are scheduled to hold an unusual, informal summit meeting in Rancho Mirage, Calif., that could set the tone for their relationship and help them confront chronic tensions like the nuclear threat from North Korea.

American officials say they do not expect the process to immediately yield a significant reduction in the daily intrusions from China. The head of the United States Cyber Command and director of the National Security Agency, Gen. Keith B. Alexander, has said the attacks have resulted in the “greatest transfer of wealth in history.” Hackers have stolen a variety of secrets, including negotiating strategies and schematics for next-generation fighter jets and gas pipeline control systems.

Nonetheless, a senior American official involved in the negotiations to hold regular meetings said in an interview on Friday that “we need to get some norms and rules.”