Inspiration

HR platforms all answer questions the same way: open a module, find a report, filter, drill down. Payroll is in one place, attendance in another, productivity in a third. Answering something as simple as "what was Priya's net pay in June?" means clicking through four screens for one number.

We kept doing the same thing every week — opening Payroll for a number, then Attendance for another, then the monitoring tool for a third — just to answer one question about one person. At some point we asked why the software couldn't just do that for us.

EmpCloud already had a chatbot, but the old rule-based kind — ask it about salary and it just told you to go open the Payroll module. It sent you back to the dashboard it was meant to replace. So during Build Week we asked a different question: what if you could just ask, and get the answer — from any system, in one sentence?

What it does

EmpCloud HR Assistant replaces dashboards with a conversation. You ask in plain language, and it pulls live data across three separate systems and composes one answer:

  • Core HR — attendance, leave balances, shifts, employee directory
  • Payroll — salary structures, payslips, net pay, run totals
  • EmpMonitor — productivity %, application and website usage, and AI-tool adoption

What makes it standout: ask "compare Priya's attendance, productivity, and salary this month" and AI works out the steps itself — find the person, pull attendance from HR, productivity from monitoring, pay from Payroll — then writes one answer. It handles questions no dashboard we had could, like " which AI tools is the team using, and how much?"

Streaming answers, full conversation history you can reopen, rename, and delete, and everything scoped to your role and permission — an employee only sees their own data, a manager sees their team reports.

How we built it

We built the assistant as a new, self-contained module rather than touching the legacy chatbot — its own routes, services, tools, prompts, storage, and tests.

  • Engine: the OpenAI SDK with AI function calling, in a bounded multi-round loop — the model calls a tool, we run it against real data, feed results back, repeat up to eight rounds, then compose.
  • Tools: 21 read-only tools across the three systems, each with strict schema validation. The model never receives the organization ID or caller identity — every tool enforces org- and permission-scope itself.
  • Integration: secure server-to-server calls into Payroll and monitoring over an internal-secret bridge, plus direct reads from the core HR database.
  • Experience: Server-Sent Events for streaming, and full conversation CRUD in a React frontend that matches the host app.

Using Codex We drove the architecture and product decisions; Codex generated the function-calling loop, wrote each of the 21 tools against our real schemas, built the streaming layer and the conversation UI, and produced the test suite. We decided what to connect, how to scope permissions, and what the product should feel like; Codex implemented it fast enough to make 21 tools and a streaming agent achievable.

If a request touches systems, the assistant resolves it in at most $\lceil N \rceil + 1$ model rounds — one planning round per domain plus a final synthesis — keeping latency and cost bounded no matter how broad the question.

Challenges we ran into

  • Trust and scope. An AI that can read payroll and productivity data is a liability if it leaks. The hardest work was guaranteeing a model-supplied employee ID can never escape the caller's authorization — every tool re-derives visibility (self/team/organization) from the caller's real permissions, not from anything the model says.
  • Reasoning without hallucination. We had to force the model always to call a tool for factual claims and never answer salary or productivity questions from memory — and to reject an aggregate-only answer when the data had a line-item breakdown.
  • Keeping old and new separate. The platform already had a chatbot; building beside it — sharing nothing — is what let us show a genuine before/after.
  • Live data across three services. Reconciling different tenant keys and identity models between the HR, payroll, and monitoring systems so one question could span all three.

Accomplishments that we're proud of

  • One chat box that answers across three independent systems with real multi-step reasoning — a planner, not a lookup table.
  • A complete product experience — streaming, history, rename/delete, role scoping — not a demo skeleton.
  • 21 tools where the model plans freely but can never exceed the user's real permissions — authorization enforced in code, not the prompt.
  • Surfacing insight the old dashboards couldn't, like AI-tool adoption across the workforce.
  • Shipping all of it as a clean, isolated module in a single build week.

What we learned

  • The tool layer is the product. With function calling, the intelligence isn't in the prompt — it's in a well-scoped set of tools. Get the boundaries right and the model composes things you never explicitly programmed.
  • Security has to live in the tools, not the prompt. You can't instruct a model into safety; you enforce it in code at every boundary.
  • Codex changes the unit of iteration. When a new tool against a real schema takes minutes, you design more ambitiously — 21 tools and streaming went from "later" to "this week."
  • Once answers arrive in one sentence, dashboards feel broken. "Replace the dashboard" stopped being a tagline and became how we actually wanted to use it.

What's next for EmpCloud HR Assistant

  • Actions, not just answers — apply for leave, approve a request, raise a ticket, each with a human confirmation step.
  • Proactive intelligence — a weekly AI digest for managers and standing "watch and alert me" goals.
  • Persistent memory across conversations.
  • Voice input
  • More systems — recruiting, performance, exit, and learning under the same question box.

Built With

Share this project:

Updates