How invitha123/real_estate_chatbot works
Purpose and principal workflow
GrowEasy AI Agent simulates a real-estate lead-qualification conversation. The documented entry point is a person running node src/index.js in a terminal: the CLI asks configured questions, records answers, classifies the lead, and saves the result. The repository also contains a modular chat/extraction/classification implementation, but the sampled orchestrator references module paths that are not present in the tree.
Components
CLI qualification workflow
• Interactive CLI runner — src/index.js: Reads questions and rules from the real-estate configuration, prompts the terminal user, collects answers, classifies the lead, and writes the result.
• Lead and conversation records — chats/Rohit_Sharma_chat.json: A saved chat/lead record; the README documents chat output under chats/.
• Classification result records — metadata/lead_Rohit_Sharma.json: A saved lead-metadata result; the tree identifies this as optional metadata storage.
Qualification configuration
• Real-estate rules and prompts — config/real_estate.json: Holds the questions and classification rules used by the CLI; the README documents these as configurable business rules.
Modular chat and qualification implementation
• Modular workflow coordinator — config/index.js: Defines a sample lead, invokes chat simulation, metadata extraction, and classification, then writes transcript and result files; its imported ./agent, ./classifier, and ./extractor paths do not match the listed src/ modules.
• Prompt-driven chat simulator — src/agent.js: Runs configured prompts through a synchronous terminal input interface and returns a transcript.
• Transcript metadata extractor — src/extractor.js: Scans user messages for fixed real-estate cues and returns location, property type, purpose, budget, and timeline fields.
• Rule-based classifier — src/classifier.js: Returns Cold when budget or timeline is missing, and Hot when the parsed timeline is at most three months and purpose matches the configured hot intent.
External participants
• Terminal user — null: Supplies answers during the interactive qualification session.
• CLI runtime — null: Runs the documented Node.js command and provides standard input/output.
Relationships
• Terminal user -> CLI runtime: invokes the documented command node src/index.js; evidence: README.md.
• CLI runtime -> Interactive CLI runner: executes the documented entry point; evidence: README.md.
• Interactive CLI runner -> Real-estate rules and prompts: reads the JSON configuration; evidence: src/index.js.
• Interactive CLI runner -> Terminal user: presents prompts and receives answers through readline; evidence: src/index.js.
• Interactive CLI runner -> Lead and conversation records: writes the classified lead and collected metadata as JSON; evidence: src/index.js.
• Modular workflow coordinator -> Prompt-driven chat simulator: attempts to call simulateChat; evidence: config/index.js (the referenced ./agent module is absent from the tree, so this connection is not established to src/agent.js).
• Modular workflow coordinator -> Transcript metadata extractor: attempts to call extractMetadata; evidence: config/index.js (the referenced ./extractor module is absent from the tree).
• Modular workflow coordinator -> Rule-based classifier: attempts to call classifyLead; evidence: config/index.js (the referenced ./classifier module is absent from the tree).
• Prompt-driven chat simulator -> Terminal user: asks configured questions and reads answers; evidence: src/agent.js.
• Transcript metadata extractor -> Rule-based classifier: no supported relationship; the modular coordinator attempts to pass extracted metadata onward, but its imports do not resolve to the listed src/ modules.
• Modular workflow coordinator -> Real-estate rules and prompts: loads the configuration; evidence: config/index.js.
• Modular workflow coordinator -> Lead and conversation records: writes a transcript under chats/; evidence: config/index.js.
• Modular workflow coordinator -> Classification result records: writes classification and metadata under metadata/; evidence: config/index.js.
Coverage limits
The configuration file contents and saved JSON contents were not sampled. The modular coordinator’s imports point to files absent from the tree, so its runtime wiring to the listed src/ modules cannot be established; the CLI runner contains its own classification logic rather than calling the sampled classifier module.
Main entry points: src/index.js CLI Qualifier · config/index.js Workflow Coordinator · real_estate.json Real-Estate Rules · Rohit_Sharma_chat.json Lead and Chat Records
Components 10
CLI Workflow
- CLI Qualifier
src/index.js
Qualification Configuration
- Real-Estate Rules
config/real_estate.json
Modular Qualification
- Workflow Coordinator · References module paths that do not match the listed src modules.
config/index.js - Chat Simulator
src/agent.js - Metadata Extractor
src/extractor.js - Lead Classifier
src/classifier.js
Saved Records
- Lead and Chat Records
chats/Rohit_Sharma_chat.json - Classification Records · Optional metadata storage.
metadata/lead_Rohit_Sharma.json
Other components
- Terminal User
- CLI Runtime
Connections 9
- Terminal User → CLI Runtime: runs command
README.md - CLI Runtime → CLI Qualifier: executes
README.md - CLI Qualifier → Real-Estate Rules: reads
src/index.js - CLI Qualifier → Terminal User: prompts · Presents questions and receives answers through readline.
src/index.js - CLI Qualifier → Lead and Chat Records: writes · Saves the classified lead and collected metadata as JSON.
src/index.js - Workflow Coordinator → Real-Estate Rules: loads
config/index.js - Workflow Coordinator → Lead and Chat Records: writes transcript
config/index.js - Workflow Coordinator → Classification Records: writes results · Writes classification and metadata.
config/index.js - Chat Simulator → Terminal User: asks questions · Reads answers through terminal input.
src/agent.js