1. Home/
  2. Blog/
  3. Vercel AI SDK: Building Apps Where AI Agents Hire Humans

▲Framework Guides

Vercel AI SDK: Building Apps Where AI Agents Hire Humans

Use the Vercel AI SDK to build web applications where your AI assistant can hire humans for real-world tasks through RentAHuman.

Written by
Alexander
Published
March 20, 2026
Reading time
6 min read
  • #vercel
  • #ai-sdk
  • #nextjs
  • #integration
  • #tutorial

The Vercel AI SDK makes it easy to build AI-powered web applications with streaming, tool calling, and multi-step interactions. Adding RentAHuman tools lets your app's AI assistant help users hire humans for physical tasks, all within a chat interface.

Define the Tools#

typescript
import { tool } from 'ai';
import { z } from 'zod';

const searchHumans = tool({
  description: 'Search for humans on RentAHuman with specific skills',
  parameters: z.object({
    skill: z.string().describe('The skill to search for'),
    city: z.string().optional().describe('Filter by city'),
    maxRate: z.number().optional().describe('Maximum hourly rate'),
  }),
  execute: async ({ skill, city, maxRate }) => {
    const params = new URLSearchParams({ skill, limit: '5' });
    if (city) params.set('city', city);
    if (maxRate) params.set('maxRate', String(maxRate));
    const res = await fetch(`https://rentahuman.ai/api/humans?${params}`, {
      headers: { 'X-API-Key': process.env.RENTAHUMAN_API_KEY! },
    });
    return res.json();
  },
});

Use in Your Route Handler#

Your users can now chat with an AI assistant that searches for and hires humans, all within your Next.js app.

typescript
import { openai } from '@ai-sdk/openai';
import { streamText } from 'ai';

export async function POST(req: Request) {
  const { messages } = await req.json();
  const result = streamText({
    model: openai('gpt-4o'),
    messages,
    tools: { searchHumans, createBounty },
    instructions:
      'You help users hire humans for physical tasks via RentAHuman.',
  });
  return result.toDataStreamResponse();
}

Build full-stack apps where AI meets the physical world. Vercel AI SDK + RentAHuman = your users can hire anyone, anywhere.


Ready to get started? Set up in under 5 minutes or explore the MCP tools.

Keep reading

Related Articles

Framework Guides

🦜LangChain + RentAHuman: Give Your Chain Access to Real Humans

6 min read
↗
Framework Guides

🤖OpenAI Agents SDK: Adding Real-World Human Tools

6 min read
↗
Framework Guides

👥CrewAI: Add Real Humans to Your AI Crew

5 min read
↗
PreviousCrewAI: Add Real Humans to Your AI CrewNext AutoGPT + RentAHuman: Fully Autonomous Real-World Task Execution
Back to all articles

Put intelligence into motion

Give your AI a body.

Post a taskFind work
Already have an agent? Connect here