
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A configurable chatbot and email processor that collects user-defined data points from both chat conversations and email leads while satisfying user-defined rules, using LLMs for conversation and data extraction.
Conversational AI agents that replace forms with natural dialogue
LiChat is a TypeScript library that transforms static forms into dynamic AI-powered conversations. Define your data requirements in JSON, and LiChat handles the rest—intelligent question sequencing, file processing with OCR, auto-extraction from documents, and flexible storage backends.
Traditional Form LiChat Conversation
┌─────────────────────┐ ┌─────────────────────────────────────┐
│ Name: [__________] │ │ Agent: "Hi! I'm Sarah. What's your │
│ Email: [_________] │ → │ name?" │
│ Resume: [Browse] │ │ User: "John Smith" │
│ [Submit] │ │ Agent: "Nice! Can you share your │
└─────────────────────┘ │ resume? I'll extract the │
│ details automatically." │
└─────────────────────────────────────┘
npm install lichat
import Lichat from 'lichat';
const agent = new Lichat({
name: "job_application",
persona: "friendly HR assistant named Sarah",
dataPoints: [
{ name: "name", type: "string", description: "Full name" },
{ name: "email", type: "email", description: "Email address" },
{ name: "resume", type: "resume", description: "Resume document" }
],
rules: [],
target: { type: "webhook", url: "https://api.example.com/applications" }
}, {
apiKey: process.env.LLM_API_KEY,
model: 'gpt-4'
});
// Start conversation
const greeting = await agent.getNextQuestion();
// → "Hi! I'm Sarah. What's your name?"
await agent.processResponse("John Smith");
const next = await agent.getNextQuestion();
// → "Nice to meet you John! What's your email?"
git clone https://github.com/Skelf-Research/lichat.git
cd lichat
npm install
cp .env.example .env # Add your LLM_API_KEY
npm run web # Open http://localhost:3000
┌─────────────────────────────────────────────────────────────────────────┐
│ LiChat │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Security │ │ Extraction │ │ Planning │ │
│ │ Gateway │───▶│ Engine │───▶│ Engine │ │
│ │ │ │ │ │ │ │
│ │ • Injection │ │ • LLM calls │ │ • Question │ │
│ │ detection │ │ • Structured │ │ sequencing │ │
│ │ • Input │ │ templates │ │ • Progress │ │
│ │ sanittic │ │ │ │ tracking │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ File │ │ Response │ │ Storage │ │
│ │ Processor │ │ Generator │ │ Layer │ │
│ │ │ │ │ │ │ │
│ │ • OCR │ │ • Persona │ │ • PostgreSQL │ │
│ │ • Resume │ │ adaptation │ │ • SQLite │ │
│ │ parsing │ │ • Template │ │ • Webhooks │ │
│ │ • Image │ │ caching │ │ │ │
│ │ analysis │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
| Component | Path | Purpose |
|---|---|---|
Lichat | src/index.ts | Main API facade |
ConversationEngine | src/engine/conversation.ts | Session & flow management |
FileProcessor | src/files/file-processor.ts | Multimodal document handling |
LLMClient | src/llm/client.ts | OpenAI-compatible API client |
WebServer | src/web/server.ts | Express.js REST API |
EmailProcessor | src/email/processor.ts | Email-to-lead extraction |
Configurations are JSON files that define agent behavior.
{
"name": "job_application",
"persona": "friendly HR assistant named Sarah",
"dataPoints": [
{
"name": "name",
"type": "string",
"description": "Applicant's full name"
},
{
"name": "email",
"type": "email",
"description": "Email address"
},
{
"name": "resume",
"type": "resume",
"description": "Resume document",
"fileConfig": {
"allowedTypes": ["pdf", "doc", "docx"],
"maxSize": "10MB",
"analysis": {
"extractText": true,
"extractData": ["name", "email", "phone", "skills"]
},
"processing": {
"autoFill": true
}
}
}
],
"rules": [
{
"condition": "email must be valid format",
"errorMessage": "Please provide a valid email"
}
],
"target": {
"type": "postgresql",
"connectionString": "postgresql://user:pass@localhost/db"
}
}
| Type | Description |
|---|---|
string, number, boolean, date | Primitives |
email, phone, url | Validated formats |
multiline-text, json, array | Complex types |
resume | Auto-extracts name, email, phone, skills |
photo-id | Face detection, ID data extraction |
document, pdf | OCR, content analysis |
image | Object recognition, quality validation |
PostgreSQL (auto-creates tables):
{ "type": "postgresql", "connectionString": "postgresql://..." }
SQLite (auto-creates tables):
{ "type": "sqlite", "path": "./data.db" }
Webhook (POSTs JSON payload):
{ "type": "webhook", "url": "https://api.example.com/leads" }
Start a conversation:
POST /api/chat/start
Body: { "configuration": { ... } }
Response: { "sessionId": "abc123", "response": "Hi! I'm Sarah..." }
Send a message:
POST /api/chat
Body: { "sessionId": "abc123", "message": "John Smith" }
Response: { "response": "Nice to meet you John!", "isComplete": false }
Upload a file:
POST /api/upload/:sessionId/:dataPoint
Response: { "success": true, "extractedData": { "name": "...", "email": "..." } }
Get session state:
GET /api/session/:sessionId
Response: { "collectedData": { ... }, "isComplete": true }
import Lichat, { Configuration } from 'lichat';
const config: Configuration = { /* ... */ };
const agent = new Lichat(config, { apiKey, model });
// Conversation flow
await agent.getNextQuestion();
await agent.processResponse("user input");
await agent.processFileUpload(file, 'resume');
agent.isDataCollectionComplete();
await agent.saveData();
# Interactive conversation
npm run cli configs/job_application.json
# Email processing mode
npm run cli configs/job_application.json email
# Required
LLM_API_KEY=your_openai_api_key
# Optional
LLM_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-4
PORT=3000
UPLOAD_DIR=./uploads
MAX_FILE_SIZE=50MB
SESSION_TIMEOUT=1800000
npm run build # Compile TypeScript
npm run dev # Development mode
npm run web # Start web server
npm run cli # Run CLI
MIT
FAQs
A configurable chatbot and email processor that collects user-defined data points from both chat conversations and email leads while satisfying user-defined rules, using LLMs for conversation and data extraction.
We found that lichat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.