Job Interview Notification AI Agent (LangGraph JS)
Video Link: https://youtu.be/Br4Pem4wWxY
GitHub Repository: https://github.com/Ashot72/Job-Interview-Notification-AI-Agent-LangGraph-JS
LangGraph.js is a library for building stateful, multi-actor applications with LLMs, used to create agent and multi-agent workflows. Compared to other
LLM frameworks, it offers these core benefits; cycles, controllability, and persistence.
Figure 1
I built an AI console app agent in Node.js where a recruiter can select the best candidate for a position just by providing a prompt and send an email notification, all powered by AI.
When prompted, the AI will find the matching category. Here is the prompt We are looking for an experienced web designer with expertise in Drupal and WordPress, as well as agile leadership.
Figure 2
We define high-level categories and subcategories.
Figure 3
To extract categories, we use the Extract Categories tool.
Figure 4
With the help of AI, we obtain high-level categories, which allows us to retrieve subcategories.
Figure 5
Once we have the categories, we obtain the users belonging to those categories and them to the state.
Figure 6
Those are the selected candidates.
Figure 7
After getting the candidates, the AI searches for the best candidate.
Figure 8
Here is the best candidate.
Once we have the best candidate, a human in the loop is involved.
Figure 9
The recruiter decides whether to select that candidate based on their age and skills or skip them and
wait for the next best candidate. If the recruiter decides to skip the best candidate, the skipped candidates ID is added to the state. The app then loads the candidates, excluding the
skipped ones, and the AI selects the best one from the updated candidates list.
Figure 10
If No is types, the best candidate's ID is appended to the list
Figure 11
In this case, we select Yes, meaning we do not skip the selected candidate, and the app generates an email to send to the selected candidate.
Figure 12
Email-related information is specified in the .env file.
Figure 13
In this case, a human in the loop is involved again. The email is generated by AI, and if the recruiter does not like the email content, they can skip it and
wait for a new one to be generated by AI before sending.
Figure 13
Here, you can compare two emails for the same user by skipping the first one. This is the first one.
Figure 14
This is the second one.
Figure 15
This is the AI tool for email generation.
Figure 16
When the email content satisfies the recruiter, they simply send a notification to the best candidate.
Sending emails is tricky when using the NodeMailer package. If you specify your Gmail username and password, it will not work. Google has changed its policy regarding this feature,
rendering it ineffective in resolving the problem. Thankfully, there is a solution that involves enabling 2-Step Verification and generating an app password.
Figure 18
Navigate to https://myaccount.google.com/u/2/security?hl=en enable 2-Step Verification, and create an app password, which I have already done. Then, put the app password in the .env file.
Figure 19
LangSmith is a platform designed to assist with the debugging, testing, and optimization of large language model (LLM) applications, particularly in production environments.
It provides tools to monitor model performance, trace execution flows, and evaluate LLM interactions, ensuring they operate efficiently and as expected.
Figure 20
LangSmith tracing is optional.