Twitter today announced what could lead to a reduction of hostilities in the patent wars threatening to engulf Silicon Valley: a pledge to do no evil.

The pledge, which could become a kind of Hippocratic Oath for tech companies with patents, gives Twitter employees more control over their inventions -- and, most importantly, promises that the patents will only be used for defensive purposes, not to block other companies from innovating.

"One of the great things about Twitter is working with so many talented folks who dream up and build incredible products day in and day out. Like many companies, we apply for patents on a bunch of these inventions," Adam Messinger, vice president of engineering, wrote in a blog post. "However, we also think a lot about how those patents may be used in the future; we sometimes worry that they may be used to impede the innovation of others. For that reason, we are publishing a draft of the Innovator's Patent Agreement, which we informally call the 'IPA.'"

Under the IPA, inventors will maintain control over their patents, and Twitter agrees not to use the patents to file offensive lawsuits designed to block technology development at other firms without permission of the inventor.

"This is a significant departure from the current state of affairs in the industry. Typically, engineers and designers sign an agreement with their company that irrevocably gives that company any patents filed related to the employee's work," the post says. "The company then has control over the patents and can use them however they want, which may include selling them to others who can also use them however they want. With the IPA, employees can be assured that their patents will be used only as a shield rather than as a weapon."

The IPA will be implemented later this year and be applied retroactively to all past patents, the company said.

Twitter is talking with other companies about adopting the IPA, which is published on GitHub, and is asking Twitter users for feedback.

The move is in response to what has become a battle of patents of late. Technology companies are building up massive war chests of intellectual property to better defend their businesses. Earlier this month, for instance, Microsoft spent $1 billion on 800 patents from Web pioneer AOL, a move that trailed Facebook's acquisition of some 750 patents from IBM, which covered "software and networking" technologies. Both of those companies are currently embroiled in lawsuits that center on patents, where the end goal can be keeping a product from being sold, or simply threatening that in the hopes of reaching a profitable settlement.

Such acquisitions come at a price though. For instance, Nortel's patent portfolio, which contained some 6,000 patents related to communication technologies, was bought by a consortium of companies that included Apple, EMC, Microsoft, and Research In Motion, among others in a $4.5 billion deal. It was big enough to warrant an investigation from the U.S. Department of Justice's antitrust division, which later noted that those companies committed to license those patents to others, as well as keep from using them against others in disputes.

Meanwhile, a courtroom in San Francisco is hearing opening testimony this week in a case to decide whether Google's Android operating system violates Oracle-owned patents to the Java programming language. And Facebook and Yahoo are embroiled in a patent litigation involving a range of technologies including online ads and customizing views for social users.

The move was praised by some as a reasonable way to stop big software companies from using patents to interfere with technology development at other firms to thwart competition. Software code is already protected from theft by copyright, but patents are being used to block other companies from adding the same features to their products, say patent critics. A former Yahoo employee argues for abolition of software patents and wrote about how Yahoo "weaponized" his technology in a recent Wired article.

"Instead of companies competing with each other on the best product they are suing each other to prevent rivals from competing with products," said David Sacks, chief executive at Yammer. "Patents give the patent holder a monopoly on that type of functionality. You shouldn't be able to steal code, but we don't want to outlaw feature wars...Every patent is like a micro law that says no one else can innovate in this area."

"It's no secret that software patents can cause great harm for inventors, companies, and innovation," said Julie Samuels, staff attorney at the Electronic Frontier Foundation. "Twitter's IPA gives those companies and inventors a powerful tool to take a system that's broken and make it work for them, which in turn will benefit us all."

But one patent expert criticized Twitter's IPA plans, saying it could leave the company wide open to wholesale intellectual property theft.

"On the face of it, it appears that this agreement, if adopted wholesale, will make their IP nearly impossible to transact, crippling a potentially important underlying value driver of the company," said Erin-Michael Gill, managing director and chief intellectual property officer for MDB Capital. "At the minimum, this agreement gives a small team of developers outsized leverage in potentially leaving Twitter for companies like Facebook, Microsoft and Google to work on exactly the same projects and functionality."

Twitter's announcement comes during the company's quarterly Hack Week, in which employees work on projects that are outside their regular day-to-day work.

Updated 1:07 p.m. PT with reaction from patent experts and 11:57 a.m. with background on patent purchases and lawsuits.

CNET's Declan McCullagh and Josh Lowensohn contributed to this report.