Inspiration

Working closely with AI and Large Language Models, I noticed a distinct gap in the B2B market. While large corporations have the capital to deploy massive, AI-driven ERP systems, small and medium enterprises (SMBs) are often left with fragmented, manual tools. I wanted to build an "agentic" HRMS that allows SMBs to optimize their resources and compete with larger firms. However, a major constraint for small businesses is operational cost. Therefore, the core inspiration was to build a powerful, multi-agent platform that strictly minimizes LLM token consumption to maintain viable, startup-friendly unit economics.

What it does

Sugam AI is an Agentic AI-First Enterprise HRMS. Instead of forcing managers to navigate clunky static forms or read paragraphs from a text-chatbot, the platform uses a Universal Orchestrator to emit Generative UI (GenUI) cards directly onto the user's canvas.

It acts as an autonomous HR department through eight specialized agents:

  • Semantic Recruitment Copilot: Uses vector similarity to shortlist candidates and draft interview invites and outreach emails.
  • Leave & Attendance Agent: Calculates exact business days and drafts time-off requests.
  • Compensation & Finance Agent: Projects tax/TDS from real payroll data and files expense claims.
  • Data Alignment Agent: Ingests legacy CSV rosters, auto-maps schemas, and masks sensitive PII.
  • Finance Anomaly Guardrail: Runs statistical audits on payroll and expense claims to flag irregularities.
  • Policy RAG: Answers handbook queries with exact PDF citations and walks employees through HR processes.
  • Performance / OKR Agent: Turns a stated goal into a SMART objective with key results.
  • Offboarding Orchestrator: Generates dynamic, role-aware clearance checklists for exiting employees.

A Navigation Agent also sits underneath the canvas, routing natural-language requests like "take me to payroll" straight to the right module via GenUI instead of a menu click.

How we built it

I chose a tech stack optimized for long-term maintainability, serverless scaling, and minimal technical debt.

  • Backend & Orchestration: The core logic is powered by Spring Boot 17, Spring AI, and LangChain4j, deployed on Google Cloud Run for highly scalable, serverless execution.
  • Frontend & UI: The interface is built on Next.js 14 and hosted seamlessly on Vercel to handle our CopilotKit Generative UI components.
  • Database & Migrations: Data persistence and pgvector semantic searches are managed through a serverless PostgreSQL database on Neon, using Flyway for migration scripts.
  • Infrastructure: We secured our web presence using GoDaddy for our domain (sugam-ai.com) and email routing.

To accelerate development and ensure clean architecture across these platforms, I extensively utilized AI coding assistants, primarily Google Gemini and Cursor.

Challenges we ran into

Building a production-ready agentic system presented several practical hurdles:

  • Controlling Infrastructure Costs: As an early-stage startup, keeping the initial deployment costs near zero was critical. Architecting the platform to leverage free tiers (like Vercel and Neon) and scale-to-zero container execution (Cloud Run) was challenging but necessary to strictly control our burn rate.
  • Implementing Generative UI (GenUI): Moving beyond standard text-based chatbots required finding and integrating the right tools to seamlessly bridge backend Java logic with interactive React components on the frontend.
  • Preventing LLM Hallucinations: Ensuring the AI agents performed accurately in a financial context was difficult. I had to design architectural workarounds to prevent math hallucinations by offloading those tasks to deterministic Java and SQL functions.

Accomplishments that we're proud of

I am incredibly proud of achieving enterprise-grade Human-In-The-Loop (HITL) execution safety. The AI prepares actions (like filing leave or sending emails), but execution strictly halts until a manager clicks "Confirm" on the GenUI card, ensuring zero accidental database writes.

I am also proud of our token economics. By utilizing sliding window memory and strict agent routing, we successfully kept our average request consumption under 1,000 tokens, dropping our LLM operating costs to a fraction of a cent per interaction. Finally, the zero-LLM math guardrail works flawlessly; our Finance Anomaly Agent calculates Z-scores directly in the PostgreSQL database using standard deviation logic:

$$ Z = \frac{x - \mu}{\sigma} $$

If $Z > 2.5$, the system triggers a visual alert entirely independent of the LLM.

What we learned

This project was a masterclass in balancing probabilistic AI with deterministic enterprise software. I learned that you cannot rely on LLMs for everything—they are brilliant for semantic routing, translation, and text extraction, but terrible at arithmetic and date-math. I gained deep practical experience in offloading the right tasks to the right tools, ensuring the application remains both intelligent and mathematically flawless.

What's next for Sugam AI (HRMS)

The immediate next step is officially incorporating the company in India. While setting up the legal entity, we are actively executing our go-to-market strategy. This involves shortlisting potential SMB clients, initiating direct outreach via targeted emails, and sharing our progress through LinkedIn posts to secure our first three beta clients.

From a technical standpoint, we plan to deepen our compliance engine to handle complex, multi-state tax regimes automatically, and expand our Data Alignment Agent to integrate directly with legacy HR API endpoints via Webhooks, moving beyond just CSV uploads.

Built With

Share this project:

Updates