Introducing the Project
00:00 In this lesson, I will take you through the project you’ll be working on, so you don’t get lost in the code because there is quite a bit of it, actually. So you’ll be building an email agent, and this agent can read emails, it can extract information, and it can notify internal teams, so teams internal to the company you’re working for.
00:21
The model it uses is an OpenAI LLM, gpt-5.4-nano, and the tools, which are Python functions, the tools the agent has access to. There’s four of them, there’s extract data from email, determine action based on email, forward an email or send a wrong email notification to the sender.
00:42 Now, check this out. The first tool, the one that will extract data from an email, is itself a state graph with its own nodes, its own edges, and its own state.
00:54
So how cool is that? So this is the state graph for our first tool. Now three of the nodes call a LangChain chain. So the parse_notice_message node calls the NOTICE_PARSER_CHAIN, the check_escalation_status node calls the ESCALATION_CHECK_CHAIN, and the answer_follow_up_question node calls the BINARY_QUESTION_CHAIN.
01:20
There are two state graphs and three chains. Now with that knowledge, you can find your way through the code structure shown on screen here. So please note, for example, that there are two notice_extraction.py files, so don’t get them confused.
01:37 One models a graph and the other one models a chain. I just wanted to give you a little taste of what you will be building. So never mind the instruction on screen to get the agent running, but just have a look at the cool output that it’s creating.
01:54
So there’s an email, then it’s thinking, or there’s an AI Message. It’s doing a number of cool things. We’ll come back to that in a second. It’s doing some more work, more investigation, still working.
02:08
Then there’s a Tool Message. You’ll find out what that means. There’s another AI Message, and that is the output. Clearly, there is a ton to go through, but something I wanted to show you here is something the model’s doing.
02:22 So it’s calling an email notice extraction graph, it’s parsing the notice, it’s determining escalation status, it then determines escalation is needed, sending escalation emails, and so on, and so on.
02:36 So all this cool stuff is waiting for you. That’s too much to show you here. You will be going through this output in more detail later in the course, but for now, let’s just get to work and let’s go to the next lesson.
Become a Member to join the conversation.