Lave Kumar's Work | ContraWork by Lave Kumar
Lave Kumar

Lave Kumar

AI Engineer specializing in LLM agents, FastAPI backends.

New to Contra

Lave is building their profile!

Cover image for 🚀 Built an AI Order
🚀 Built an AI Order Entry Agent with LangChain + LangGraph I just wrapped up a full‑stack AI agent that reads a customer email (with a PDF attachment), extracts shipment details, asks follow‑up questions when data is missing, and creates the shipment – all driven by LLM tool calling. What it does ✅ Reads real .eml files and PDFs ✅ Extracts structured data using GPT‑4o + Pydantic models ✅ LLM decides when to call the create_shipment tool ✅ If required fields are missing, the graph interrupts and asks a natural follow‑up question ✅ Once all data is collected, the tool returns a tracking ID ✅ Full logging and an evaluation suite that measures extraction accuracy and tool execution Key technical highlights 🔹 LangGraph StateGraph – clean state machine with nodes for extraction, validation, agent, and tools 🔹 True tool calling – LLM emits a tool call → ToolNode executes it → result returns to LLM (no manual shortcuts) 🔹 Structured output – ChatOpenAI.with_structured_output(ShipmentDetails) replaces fragile JSON parsing 🔹 Human‑in‑the‑loop – interrupt() pauses the graph, waits for user input, then resumes with Command(resume=...) 🔹 Checkpointing – MemorySaver preserves conversation state across interruptions 🔹 Pydantic validation – weight, dimensions, and required fields validated before shipment creation Why this matters Real‑world AI agents need more than a single prompt – they need stateful reasoning, reliable tool execution, and the ability to ask for missing information. This project demonstrates how to build that with production‑ready libraries. Always happy to connect and chat about AI agents, LLM architectures, or anything LangChain/LangGraph. Let me know what you think or if you’ve built something similar! 💡 #AI #LangChain #LangGraph #LLM #OpenAI #Agents #MachineLearning #Python #Automation #ToolCalling
1
12
Cover image for AI RAG Chatbots with LangChain,
AI RAG Chatbots with LangChain, LangGraph, FastAPI
1
51