Microsoft has made the code behind its infamous 'Tay' chatbot open source, meaning any developer can now use it to create their very own racist, sexist artificial intelligence.

The release is part of the company's new Bot Framework, a toolkit which can be used to create conversational chat programs for a variety of tasks.

The framework was announced at the opening event of the Build 2016 developer conference, where Microsoft CEO Satya Nadella heralded bots as the next big platform to be tackled by tech companies.

Tay, a Twitter chatbot designed to mimic the online behaviour of a teenage girl, was unveiled last week as a demonstration of what the company's new technology could do.

By monitoring what other users said to it, Tay developed an understanding of speech and was able to write new tweets of its own. After cottoning on to the bot's design, a group of users made a concerted effort to bombard Tay with offensive messages.

Believing this to be the way humans speak, the program simply spat their messages back out, and the Twitter account was quickly locked after Tay praised Hitler, used racial slurs, and boasted about smoking cannabis in front of the police.

An example of what a conversation with a bot built with Microsoft's framework might look like

Microsoft hopes that future products built with their software will be more successful.

The Bot Framework is comprised of three parts, which allow developers to connect their conversational programs to applications like Skype, email and embeddable chat windows.

Rather than interacting with websites by navigating windows and clicking buttons, Microsoft sees users simply speaking to a bot in natural language, letting it complete tasks for them.

An example from the event showed someone ordering a pizza online simply by typing their order into a chat box, as if the message were to a real person. The bot then replied with menu items and questions about the delivery address, and everything was taken care of in a few messages.

Microsoft sees this technology as the future of the internet, and their framework includes a number of connectors to Cortana, the voice-controlled digital assistant, to make bot automation possible across Windows.