Skip to main content
Back to Projects
Autonomous AI AgentsFeaturedNov 2024 → Present

Agentic HR & Payroll Automation

LangGraph-powered agent that parses unstructured payroll emails, queries PostgreSQL, and routes edge cases to humans (HITL) for approval.

PythonLangGraphPostgreSQLFastAPILangChainPinecone
Time saved
−80% manual
HITL escalation
<8% cases
Throughput
1.2k emails/day

Problem & Solution

The Problem

HR teams spend hours each week parsing free-form payroll emails, matching them to internal records, and routing exceptions. Manual work means delays, errors, and a heavy ops load.

The Solution

Built a LangGraph agent that ingests incoming emails, extracts entities with LLMs, queries PostgreSQL for matching records, performs the relevant payroll action, and pauses for human approval on edge cases via a HITL checkpoint.

System Architecture

End-to-end flow from intake to outcome

  1. 01

    Email Ingest

    FastAPI

    Inbound payroll emails are fetched and queued for the agent.

  2. 02

    Entity Extraction

    LangChain

    LLM extracts employee, amount, and intent from free-form email text.

  3. 03

    Record Match

    PostgreSQL

    Agent queries PostgreSQL for matching employee and payroll records.

  4. 04

    HITL Checkpoint

    LangGraph

    Edge cases (anomalies, low confidence) are paused for human approval.

  5. 05

    Action & Audit

    PostgreSQL

    Approved actions are executed; all steps are recorded for audit.

Engineering Challenges & Wins

Optimization results and engineering tradeoffs

Optimization Results

  • LangGraph state machine for planning, tool use, and HITL checkpoints.
  • PostgreSQL-backed record matching for grounded, auditable actions.
  • FastAPI service for ingestion, status, and the human approval surface.

Engineering Challenges

  • Designing HITL checkpoints that don't block the happy path.
  • Keeping the agent auditable for compliance and HR review.

More case studies

Explore other production systems I've engineered end-to-end.

All Projects

Related Projects

Autonomous AI AgentsFeatured
OmniShield ICES: Asynchronous AI Email Security Middleware

Mail-server gateway (Postfix Milter) that intercepts every inbound message, runs a fine-tuned BERT core (M-BSCE) through an asynchronous inference pipeline (RabbitMQ + Celery), and adds multimodal threat detection (PaddleOCR for Quishing) with SOAP clawbacks to the upstream mail system.

Quishing detection
98%+
p95 classification
<400ms
Async throughput
5k msg/min
PythonPostfix MilterRabbitMQCeleryBERT+6
Autonomous AI AgentsFeatured
OpenClaw Multi-Channel Orchestration

Autonomous multi-channel AI platform that unifies chat, voice, and email behind microservices and an API gateway, with shared context across channels.

Channels
3 unified
Tenant onboard
<1 day
Cross-channel memory
100%
OpenClawFastAPIWebRTCWebSocketRabbitMQ+4