The email from Denmark was only a few lines long. "It basically said, 'We have an opportunity for you here, but we can't tell you anything until you sign a nondisclosure agreement," says Steve Hassenplug, a soft-spoken software engineer from Lafayette, Indiana. The cryptic tone of the email from Lego headquarters hinted at something more than a simple customer survey, but Hassenplug didn't know what.

This article has been reproduced in a new format and may be missing content or contain faulty links. Contact wiredlabs@wired.com to report an issue.

He guessed it had something to do with Mindstorms, Lego's programmable robotics kit. After all, he's a master at assembling the plastic bricks into complex robots, like his wheeled, self-balancing machine dubbed the LegWay, and he's something of a celebrity in the Mindstorms world. But there hadn't been a Mindstorms update in nearly four years, and rumor had it Lego might abandon the product altogether.

Intrigued, Hassenplug signed the NDA, received a username and password, and was ushered to a secure online forum. Even there, he found no official information – just an email thread between a few peers: John Barnes, David Schilling, and Ralph Hempel. Hassenplug knew them well from Brickfest, the annual conference where Lego zealots show off their most elegant creations, from massive starships and richly detailed cathedrals to giant bipedal robots. The four Mindstorms experts speculated as to why they'd been tapped and sworn to secrecy. Lego probably needed beta testers for a Mindstorms update.

After lurking for a few days, Søren Lund, the director of Mindstorms, dropped in on the conversation. He told the crew that a revamped kit was, in fact, in the works. But Lego didn't even have a working prototype. It was way too early for beta testers; Lego needed a Mindstorms User Panel, or MUP, to help with the design. "I was surprised they were so early in their development, and I think everyone else was, too," recalls Barnes, an electronics engineer from Holland Patent, New York. "We realized that our input was going to be a lot more important than we had imagined."

Over the next 11 months, right up to the January launch of Mindstorms NXT at the Consumer Electronics Show in Las Vegas, the four men were de facto Lego employees. They exchanged countless emails with Lund and his team, reeling off ideas for new sensors, redesigned input ports, and stabilized firmware. The MUPers also met with Lund at Brickfest in the US and at Lego's Denmark headquarters to hash out specs for the computer that serves as the brain of every Mindstorms creation.

The one key difference between the four panelists and actual Lego staffers: a paycheck. For their participation, Hassenplug and his cohorts received a few Lego crane sets and Mindstorms NXT prototypes. They even paid their own airfares to Denmark. That was fine by Hassenplug. "Pretty much the comment from all four of us was 'They're going to talk to us about Legos, and they're going to pay us with Legos?'" Hassenplug says. "'They actually want our opinion?' It doesn't get much better than that."

Such loyalty isn't unusual among the fanboys who've swooned over Mindstorms since its 1998 debut. Four years after its release, version 2.0 still sells 40,000 units a year at $199 a pop – with no advertising – and has become Lego's all-time best-selling product. The market is almost evenly split between parents buying the kit for their budding engineers and grown-up geeks who build Mindstorms robots that can scale walls, solve Rubik's Cubes, or pick blue M&Ms out of a pile.

The kit, due in stores in August, looks nothing like 2.0 and isn't backward compatible. Users still program the bots from their PCs, but everything else about the experience has been changed. The centerpiece of a Mindstorms kit is the RCX brick, which acts as the robot's brain. It receives input from sensors and sends instructions to motors, breathing life into plastic-block creatures. The new brain has a 32-bit processor – a huge upgrade over the old 8-bit processor – allowing NXT bots to perform more-complex tasks than their predecessors, like ambling with a near-human gait or reacting to voice commands. The chunky yellow brick in the old kit – which looked like SpongeBob SquarePants – is gone, replaced by a gray rectangle that could be the love child of an iPod and a first-gen Gameboy. The programming language has been revamped, as have the sensors, motors, and I/O ports. As a result, Mindstorms NXT robots look and act far more realistic than their predecessors.

But the boldest part of the Mindstorms overhaul is Lego's decision to outsource its innovation to a panel of citizen developers. Relying on the MUP is a gamble that Lego hopes will lead not only to a better product but also to a tighter, more trusting bond between corporation and customer.

Let me borrow your tools there," Lund says, reaching across the table and motioning toward my pen and notebook. We're talking Mindstorms over beers and bland Danish food at the Hotel Legoland, steps from the company's modest offices in the sleepy town of Billund, Denmark. Lund, 37, speaks English at a lightning clip. He's been trying to explain how NXT pieces will differ from those in the 2.0 kit. He's now decided to illustrate the point.

I slide my notebook over to him, and he begins drawing the classic Lego block, the so-called two-by-four that was used in Mindstorms 2.0. Then he draws a piece from the new Technic line, a flattened tube pocked with holes – what enthusiasts call a "studless Lego." They'll be included in the NXT kit. Connected by tiny rods, the Technic pieces give the robots a sleeker, less boxy look. "We wanted to create robots with more personality," Lund says. "We wanted them to go from being more mechanical to more human."

Lego also wanted to create buzz with its new product, and that meant doing more than just freshening up the last version. In early 2004, when the company hatched the idea of a new Mindstorms, it was coming off its worst year ever – a $238 million loss in fiscal 2003. There were plenty of strategic blunders behind the dismal results: a misguided foray into making PC software games, expensive licensing arrangements (chiefly with Disney), and designs that puzzled rather than entertained. "We had started to make fire trucks that look like spaceships, building systems that no customer could truly appreciate," says Mads Nipper, a Lego senior vice president. "We had to clean that up."

Cleaning up meant ditching the software division, halving development times, and slashing product lines to reduce the number of unique pieces being manufactured in Billund from 12,400 to around 7,000. Meanwhile, Mindstorms was in limbo. The RCX bricks are expensive to manufacture, and Lego's specialty is toys, not electronics. But sales were still strong, and the company was enjoying good publicity from the First Lego League, a program in which teams of schoolchildren compete to build the best robot. All told, Lego officials say that nearly 1 million Mindstorms units have reached the market, a figure that includes retail sales and giveaways. So Lego asked Lund to come up with a new version that would attract as much attention as the original, which sold 80,000 in its first three months back in 1998.

Instead of cobbling together a 3.0 version, Lund decided to make a clean break with the past. Mindstorms' main flaw, he believed, was its complexity; many kids lost interest before completing their first robot. (The complexity had another unintended effect – Lego ended up with far more adult users than it originally anticipated. One company survey from 1999 found that 70 percent of Mindstorms users were adults.) Lund wanted novices to be able to construct and program a robot in 20 minutes. The biggest barrier to making that happen was the Mindstorms programming language, known as RCX-code. Though simple by computer science standards, it was too frustrating for many programming neophytes. The drag-and-drop commands – green shapes labeled with instructions like "Set direction" or "Set AC power 8" – could be confusing to link together and made it hard to program a bot to do anything more than move forward or backward.

But Lego didn't have the expertise to write more intuitive software in house, so Lund turned to National Instruments, an Austin, Texas, programming firm that specializes in creating user-friendly coding tools. Hiring outside help was a change for Lego, a family-owned company that has historically kept its own counsel. Sometimes it takes a nine-figure loss to convince management to rethink its insularity.

National Instruments designed a programming system made up of intuitive icons (like a microphone to represent the kit's sound sensor). "I call it Photoshop for robotics, or goofware," says Paal Smith-Meyer, a Lego creative director. "You just look at it and you know where to start, and you know how to goof around and have fun with it."

The Mindstorms team tested the new language by asking the members of Lego's executive board to play with an NXT prototype. "We created a robot in 20 minutes," Nipper says. With RCX-code, he admits, "it would have taken an hour, at least."

From combing the Mindstorms tech support logs, Lund knew that the most frequent complaint, by a wide margin, was the fickleness of the infrared tower, a black box that sends programming instructions from a PC to the robot's RCX. So Lund ditched infrared in favor of a USB 2.0 connection. His team also toyed with the idea of adding a camera so robots could be programmed to snap pictures. But they decided against it because it would mean exceeding the $249 price tag target for the NXT kit. Instead, the company added Bluetooth, allowing Mindstorms bots to be linked to – and even controlled by – camera phones.

Within weeks of the original Mindstorms debut, a Stanford graduate student named Kekoa Proudfoot reverse engineered the RCX brick and posted all of his findings, including detailed information on the brick's underlying firmware, online. Several other engineers quickly used Proudfoot's revelations to design their own Mindstorms tools, including an open source operating system (LegOS) and a C-like programming alternative to RCX-code (Not Quite C, or NQC). Lego's Danish brain trust soon realized that their proprietary code was loose on the Internet and debated how best to handle the hackers. "We have a pretty eager legal team, and protecting our IP is very high on its agenda," Nipper says. Some Lego executives worried that the hackers might cannibalize the market for future Mindstorms accessories or confuse potential customers looking for authorized Lego products.

After a few months of wait-and-see, Lego concluded that limiting creativity was contrary to its mission of encouraging exploration and ingenuity. Besides, the hackers were providing a valuable service. "We came to understand that this is a great way to make the product more exciting," Nipper says. "It's a totally different business paradigm – although they don't get paid for it, they enhance the experience you can have with the basic Mindstorms set." Rather than send out cease and desist letters, Lego decided to let the modders flourish; it even wrote a "right to hack" into the Mindstorms software license, giving hobbyists explicit permission to let their imaginations run wild.

Soon, dozens of Web sites were hosting third-party programs that helped Mindstorms users build robots that Lego had never dreamed of: soda machines, blackjack dealers, even toilet scrubbers. Hardware mavens designed sensors that were far more sophisticated than the touch and light sensors included in the factory kit. More than 40 Mindstorms guidebooks provided step-by-step strategies for tweaking performance out of the kit's 727 parts.

Lego's decision to tap this culture of innovation was a natural extension of its efforts over the past few years to connect customers to the company. On Lego's Web site, for example, fans can purchase online-exclusive sets and sign up for Lego's Internet club, which offers perks like a magazine filled with DIY projects, members-only kits, and a ticket to the Legoland theme park in Southern California. For those looking to further express their creativity, the company introduced Lego Factory, a customization program that lets users design, upload, and purchase their own unique Lego creation.

The MUP would push this cooperative model even further – giving a few stellar Mindstorms users the opportunity to help develop sets for the world. But who should be in the inner circle? By trolling through online user groups and Web sites, Lund and Smith-Meyer collected 20 names. They winnowed the list based on the candidates' experience and their desire to have a well-rounded panel of specialists in different areas – sensors, software, building, et cetera. Eventually, they had five names: the four pioneering MUPers, and another person who never responded.

One of the first things Lego executives discussed with the panel was the need for absolute secrecy. Keeping NXT on the down-low was necessary because of the abundance of eager competitors. But the company also wanted the relaunch to feel like a major event, a declaration of Lego's intentionto battle gaming consoles, action figures, and other products that have nibbled away at its market share. "Some companies work with a leak strategy," Lund says. "We decided to give it a big bang."

Once the MUPers signed on, they sent numerous suggestions to Lund and his team. The executives responded with appeals for feedback on planned improvements. "We would ask them about a planned feature," Lund says, "and within half an hour, there would be a four-page email on it."

The Lego team was eager to piggyback on the work MUP members had already done. Ralph Hempel, for example, is renowned for writing pbForth, a powerful, Mac/Linux-compatible version of the RCX brick's firm-ware. Lego was particularly wowed by the craftsmanship of John Barnes, the owner of HiTechnic, which manufactures an ultrasonic range sensor, a critical add-on that allows robots to sense when an obstacle is approaching. "They said, 'We really like your ultrasonic sensor – would you mind if we started making this?'" Barnes recalls. "I said, 'Go ahead. I have a whole list of sensors to get started on.'"

Last April, Hassenplug and Schilling flew to Billund for a Mindstorms tournament. They stayed an extra day and were ushered into Lego's research sanctum – the high-security Global Innovation and Marketing building that's strictly off-limits to nonemployees. Beneath a sign reading We will do for robotics what iPod did for music, Lund and the two MUPers examined prototypes for the NXT circuit boards, as well as the kit's proposed assemblage of Technic pieces.

Hassenplug had a serious problem with the studless Legos. Because they're linked by rods, it's tricky to make right angles. And that makes it difficult to construct square frames. He asked whether Lego could add a small L-shaped joint so Technic bars could be bolted at right angles. "One of the first things S�ren told us was 'We don't have the budget to make new pieces,'" Hassenplug says. "But then, after our talks, they decided it was really a good idea." Lego's designers located an L-shaped mold languishing in a pile of unused prototypes and added it to the production line.

Lego wasn't always so obliging, of course. The MUPers pushed for an AC power pack, for example, but it never materialized. They would have also liked a few additional ports and more memory for the programmable brick. "There are certain things that we thought were going to happen," Barnes says. "But they'd do a close analysis and say, 'We'd love to do this, but we just can't.' And we understand that they have to work within a budget."

The full MUP crew didn't meet face-to-face with the Mindstorms team until last August, after the annual Brickfest in Washington, DC. During the conference, which was attended by several thousand Lego hobbyists, the four panel members acted as if they knew nothing about the top-secret NXT project. "They didn't even say hello to me," Lund recalls. "They were so afraid someone might ask, 'How do you know that guy?' They were even more cautious than we were."

The day after the conference, the four MUPers gathered with Lund at a Washington hotel, where the group hashed out final details of the pieces the NXT kit would contain – almost 200 fewer than 2.0 – as well as specs for the motors, sensors, and firmware. The MUPers weren't getting paid. But they were playing a vital role in shaping a product they loved. "When I met S�ren, he said he wondered why we were all doing this," says Barnes, laughing. "I told him that if it had been any company other than Lego, I wouldn't be here."

In January, Lego put out word that it's looking for 100 more citizen developers. These volunteers won't enjoy the exalted insider status of the MUPers, whose ranks have recently grown to 14. But over the next few months, they will be allowed to buy prerelease versions of the NXT kits at discounted prices and asked to test them rigorously. Lund calls the new committee "a MUP extension" and says it's still not open to just anyone. "You have to argue why you should be part of this," he explains. "How will the community benefit from having you on board?"

Until recently, companies were skittish about customer innovation, fearing that outsiders might leak trade secrets or that they simply lacked the necessary technical skills. But Lego has warmed to the power of the open source ethos. It's clear to the Lego execs that Mindstorms NXT would be a lesser product without the MUPers' input.

Inviting customers to innovate isn't just about building better products. Opening the process engenders goodwill and creates a buzz among the zealots, a critical asset for products like Mindstorms that rely on word-of-mouth evangelism. In his book Democratizing Innovation, MIT professor Eric von Hippel says that "the joy and the learning associated with membership in creative communities" drives people to generously share their time. After his close encounter with four of the most passionate Mindstorms users, Lund wants every NXT customer to be able to have an effect on how Mindstorms is used and designed. His plans include a Lego-hosted Web site where brickheads can upload scripts for robot behaviors or peruse blogs detailing the building of a Mindstorms typewriter or pinball machine. "Imagine Flickr for robotics," says Lund, who admires the photography site for how it has made image-sharing accessible and, in turn, spurred demand for digital cameras.

Because of its popularity among gearheads already familiar with the open source model, Mindstorms was a perfect candidate for Lego's experiment with customer innovation. But if NXT is a hit, the strategy could be extended to the full range of Lego products; after all, who would know better how to improve the company's building systems than the people who spend hundreds of hours preparing for Brickfest every year?

In Billund, Denmark, not only is the customer always right, he's also a candidate for the R&D team. And he'll work for small plastic blocks.

Mindstorms: The Next Generation

BUILDING BLOCKS Mindstorms 2.0 2001: "Two-by-four" Lego blocks Mindstorms NXT 2006: Technic blocks, aka "studless Legos"

COMMAND CENTER Mindstorms 2.0 2001: 8-bit RCX programmable brick Mindstorms NXT 2006: 32-bit, iPod-like brick with larger LCD

USER INTERFACE Mindstorms 2.0 2001: Nonintuitive interface, RCX-code commands, PC only Mindstorms NXT 2006: Intuitive GUI, drag-and-drop icons, PC and Mac

SENSORS Mindstorms 2.0 2001: Two touch sensors and one light sensor Mindstorms NXT 2006: Redesigned touch and light sensors, new sound sensor and ultrasonic sensor

POWER Mindstorms 2.0 2001: Two motors Mindstorms NXT 2006: Three motors, redesigned for smoother operation

CONNECTORS Mindstorms 2.0 2001: Two-wire analog cables Mindstorms NXT 2006: Six-wire digital cables

The Dream Factory

Three design whizzes test-drive Lego's custom kit builder.

It's a common frustration: You set out to build a perfect replica of Babylon 5 (or whatever), only to find that you don't own enough gray plates for the twin particle arrays. It doesn't have to be this way. Now there's Lego Factory, a service that lets you create your very own Lego set.

Lego Factory starts with a downloadable 3-D modeling program that lets you design your virtual toy using as many bricks as you want. Upload your masterpiece to Lego's Web site and you – and any other Lego fan – can order the kit for your creation, complete with assembly instruction booklet. There are some rough edges: Instructions can be confusing, and blocks come in preset packages, meaning you often have to buy a whole bag to get a single piece. Still, it's a brilliant move. Customers get to make whatever they want, and Lego gets to transform its army of users into a massive product design team – 30,000 kits have been uploaded so far.

Not sure what to make? For inspiration we asked three creative pros to design kits for Wired. Now go build your own at lego.com/factory. – Sonia Zjawinski

Contributing editor Brendan I. Koerner (brendan@wiredmag.com) wrote about the DNA testing of Native Americans in issue 13.09.