In the startup world, recruiting is a battlefield.

There are nearly 13,800 Silicon Valley startups, according to Angel List, with an average salary of $101,000 -- and all are clambering against tech heavyweights to attract top talent.

The primary weapon in this war is cash. The median pay for software developers has climbed nearly 15 percent since 2009, according to PayScale.com. Wall Street banks are now feeling pressure, looking to boost pay and perks to woo top graduates to New York rather than San Francisco, CNNMoney reports.

“Before most computer science graduates ever walk across a stage to get their diplomas, they’re set for life,” Redfin CEO Glenn Kelman wrote in TechCrunch. “The problem is that the young engineers earning that much become well-fed farm animals at the very moment in their lives when they should be running like wild horses.”

Here is where startups have an advantage over brand-name competitors – more than money, millennials search for meaning in their work, research suggests. They don’t want to be put out to pasture but given room to run.

Here’s how startups can build a recruitment machine worthy for war in the world’s toughest talent battlefield.

1. Be smart when hiring your first employees, as they matter the most. The first 10 to 30 hires create the DNA of the company. Getting that right out of the gate is incredibly difficult and puts an incredible amount of pressure on fledgling managers, many of whom will be sifting through and hiring candidates for the first time. It’s a daunting task, and disastrous if done wrong.

Related: Trusting Your Gut Is Never More Important Than When Picking Your Team

2. Create a compelling story to lure talent. You can’t draw top talent if you don’t believe in what the company is doing – and that passion needs to be infectious. In recruitment, the story and mission behind the company is your “product.” That story needs to be authentic, meaningful and capture the essence of what your company is – and importantly – wants to become. Great stories draw great candidates eager to help write future chapters for your company.

3. Visualize your ideal hire.  You can’t find them if you don’t know what you’re looking for. Here is where recruitment and the core values of your company need to be tightly interwoven and the metric by which all hires are judged. For example, at NerdWallet the core values include strategic thinking that drives results, a zeal for learning and desire to build strong relationships with colleagues. These are at once lofty goals and very practical benchmarks by which to judge those who join your cause.

4. Engaged employees are your best recruiters. Again, this can sound like an empty HR trope – but in truth, it’s a practical reality. Small firms are always woefully outnumbered in the recruitment war: 50 people actively helping recruitment are better than five. Cash rewards for bringing successful hires to the company are now de rigueur in the Silicon Valley. But employees will never want to get involved in company building and hiring unless they are happy, appreciated and really enjoy the work. This is where a strong corporate culture and strong hires early on creates a virtuous circle to scale the company.

Related: Why You Should Hire People Smarter Than You

5. Sound the Battle Cry. Your employees can’t be foot soldiers in your talent war unless they know the battlefield. If you’re looking for a kickass marketer, engineer or product developer, broadcast hiring priorities across the company. Tell them why the position is important and what’s at stake. Sometimes you’ll get pushback from your recruiting team members who have to cull through the stack of referrals. But that’s a secondary concern – top priority is turning on the spigot for lead generation. You can later refine how referrals are made, but from the start you want as little friction in the process as possible.

6. Execute a "people-first’"strategy. Recruiting can sometimes be played out as a numbers game and a rush to get bodies in the door. But a classic mistake is spending too much time selling and not enough time evaluating – does candidate’s interests and passion align with your company? As eager as you are to make a key hire, you need to be sure it’s a genuine match for both. The chemistry between a prospective candidate and a company are critical for success. Losing a good candidate is bad, but hiring someone who won’t put his or her heart into the job is worse.

And you’re going to lose -- a lot. In the talent war, the losses are legion. You’ll go down plenty of rabbit holes and come back empty handed. But if you consistently act with integrity -- both for your company and candidates you interview -- you gain the resiliency to wake each day and begin the battle anew. 

Related: 5 Steps for Building a Great Startup Team