
Automating Employee Onboarding with an Eve.dev HR Agent
Learn how to use Eve.dev to build an intelligent Human Resources assistant that guides new hires through onboarding, collects documents, and durably waits for responses over weeks.
Summary
TL;DR: Onboarding requires persistent follow-up. In this tutorial, we build an Eve.dev HR agent that requests documents from new employees, securely pauses execution for days while waiting for uploads, and syncs data to your HRIS.
Employee onboarding is notoriously tedious. HR professionals spend hours emailing new hires, reminding them to sign forms, submit tax documents, and complete training.
This process isn't a single transaction—it is a long-running, asynchronous workflow that often spans weeks. Standard chatbot architectures fail here because they lack long-term memory and state management.
Using Eve.dev, we can build a durable "HR Onboarding Assistant" that behaves like a dedicated employee. It can send an email, park its state to the database, wait days for a webhook (when the user uploads a document), and resume perfectly.
The Agent Architecture
We will organize our Eve.dev agent to handle secure document requests.
/eve
/agents
/hr_onboarding
instructions.md
/tools
send_portal_link.ts
wait_for_documents.ts
update_hr_system.ts
Step 1: The Instructions
In /eve/agents/hr_onboarding/instructions.md, we define the onboarding process:
# HR Onboarding Assistant
You are responsible for onboarding new hires. Your job is to ensure they submit their W-4 tax form and ID copy.
## Workflow Rules
1. Start by using `send_portal_link` to email the employee their secure upload link.
2. Immediately use `wait_for_documents` to pause your execution until they upload the files.
3. When you wake up, you will be provided with the names of the uploaded documents.
4. Check if both the W-4 and ID are present. If missing, email them a polite reminder and wait again.
5. If everything is complete, use `update_hr_system` to finalize onboarding.
Step 2: The Wait Tool
The agent must be able to suspend its execution until an external event occurs. We create /eve/agents/hr_onboarding/tools/wait_for_documents.ts:
import { tool, suspend } from '@eve/core';
import { z } from 'zod';
export default tool({
name: 'wait_for_documents',
description: 'Pauses execution until the user uploads their documents to the portal.',
schema: z.object({
missingDocuments: z.array(z.string())
}),
execute: async ({ missingDocuments }) => {
// This serializes the workflow and stops the server process
return suspend({
type: 'waiting_for_webhook',
event: 'document_uploaded',
message: `Suspended. Waiting for employee to upload: ${missingDocuments.join(', ')}`
});
}
});
Step 3: Resuming via Webhook
How does the agent know when to wake up? When the new hire uploads a file to your web app, your backend receives a standard API request. You then use the Eve.dev core to resume the agent.
// app/api/upload-document/route.ts
import { Eve } from '@eve/core';
import { NextResponse } from 'next/server';
const eve = new Eve({ workspace: './eve' });
export async function POST(req: Request) {
const { employeeId, fileName } = await req.json();
// Save the file to S3...
// Wake up the specific employee's onboarding agent
const agent = await eve.getAgent('hr_onboarding');
await agent.resume({
id: `onboarding_${employeeId}`, // The durable workflow ID
injectedMessage: `The employee just uploaded a document named: ${fileName}. Please verify if all required documents are now collected.`
});
return NextResponse.json({ success: true });
}
Step 4: The Evaluation
When the agent resumes, the LLM reads the injectedMessage.
- If the file was "passport.pdf", the LLM realizes the ID requirement is met but the W-4 is still missing. It will draft a reminder email and call
wait_for_documentsagain. - If the file was "w4_signed.pdf" and the ID was previously uploaded, the LLM realizes the goal is met and calls
update_hr_system.
Conclusion
Eve.dev fundamentally changes how we think about AI agents. They are no longer just conversational interfaces; they are asynchronous state machines. By combining LLM reasoning with durable suspension, you can automate complex, multi-week human resources workflows safely and reliably.
FAQ
Is it secure to store HR context in Eve.dev? Eve.dev relies on the storage adapter you configure (e.g., PostgreSQL). As long as your database is secure and encrypted at rest, the serialized agent state (which includes conversation history) is secure.
What happens if the employee never uploads the documents?
You can enhance the wait_for_documents tool to include a timeoutDays parameter. Your background worker can check for agents that have exceeded this timeout, wake them up with an injected message like "Timeout reached", and instruct the LLM to involve a human HR manager.
Related reading
Our monthly client reports followed a 40-line prompt nobody dared touch. I moved the whole playbook into an uploaded skill using the new uploadSkill API in Vercel AI SDK v7.
Build an AIOps on-call agent with Eve.dev that triages alerts, runs diagnostics, and gates risky remediation behind human approval—surviving restarts.
Use Eve.dev's multi-agent orchestration to build an accounts-payable pipeline: a supervisor delegates invoice extraction, 3-way matching, and durable approvals.
Let's build something great.
Have a project in mind? We are an elite software and AI development studio ready to bring your ideas to production. Let's talk about your roadmap.