Skip to content

Lyba97/factoryiq-agent

Repository files navigation

factoryiq-agent

An AI-powered assistant for manufacturing floor workers, built with NestJS, LangChain.js, and Groq.

Features

  • Natural language chat with a factory-domain system prompt
  • Conversation history support
  • Input validation with class-validator
  • Clean modular NestJS architecture (ready for LangGraph agents in Phase 2)

Tech stack

  • NestJS (TypeScript)
  • LangChain.js
  • Groq llama-3.3-70b-versatile
  • class-validator / class-transformer

Setup

  1. Clone the repo
  2. Install dependencies: npm install
  3. Copy .env.example to .env and add your Groq API key
  4. Run: npm run start:dev

API

POST /chat

Send a message to factoryiq-agent.

Body:

{
  "message": "Machine CNC-04 is showing error E-201",
  "history": [
    { "role": "human", "content": "Which line is CNC-04 on?" },
    { "role": "ai", "content": "CNC-04 is on production line 3." }
  ]
}
curl -X POST http://localhost:3000/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Machine CNC-04 is showing error E-201, what does that mean?"}'

Response:

{
  "reply": "Error E-201 typically indicates a spindle overload...",
  "timestamp": "2025-01-01T10:00:00.000Z"
}

GET /chat/health

Returns agent status.

About

AI-powered manufacturing floor assistant built with NestJS, LangChain.js, and LangGraph

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors