Section Insights
Introduction to Email Assistant Setup
What is the purpose of the video?
The video demonstrates how to set up and modify an email assistant using Langmith's agent builder without coding.
- The email assistant can read and respond to emails autonomously.
- The setup process is entirely no code.
- Users can supervise the assistant's actions.
Connecting Accounts
How do I connect my email and calendar accounts?
Users need to connect their Google account to grant permissions for the assistant to access their email and calendar.
- Account connection is necessary for functionality.
- Permissions allow the assistant to read and write emails.
- Users must ensure their accounts are properly linked.
Setting Up Triggers
How do I set up triggers for the email assistant?
Users can set up triggers that allow the assistant to run autonomously in the background based on incoming emails.
- Triggers are essential for the assistant's autonomous operation.
- Users can customize which emails activate the assistant.
- Human supervision is still integrated into the process.
Editing Agent Instructions
How can I modify the email assistant's instructions?
Users can edit the agent's instructions directly through a visual interface or by using natural language.
- Modifications can be made easily without coding.
- Natural language processing allows for intuitive changes.
- Users can tailor the assistant's behavior to their preferences.
Supervising the Email Assistant
What does supervising the email assistant involve?
Supervision includes reviewing notifications, approving actions, and providing feedback on the assistant's decisions.
- Users can interact with the assistant to refine its actions.
- Feedback helps the assistant learn and adapt over time.
- Supervision ensures that important emails are not overlooked.
Testing the Email Assistant
How can I test the email assistant's functionality?
Users can test the assistant by selecting emails from their inbox to see how it processes them.
- Testing helps verify the assistant's responses to different email types.
- Users can assess the assistant's decision-making capabilities.
- Real-time testing enhances user confidence in the assistant.
Handling Notifications
How does the assistant manage notifications?
The assistant flags important questions and updates users on actions taken, allowing them to respond or mark items as read.
- Notifications keep users informed about the assistant's activities.
- Users can quickly manage their inbox by marking items as read.
- The assistant learns user preferences through interaction.
Final Overview of Features
What are the key features of the email assistant?
The email assistant utilizes memory, triggers, skills, and sub-agents to operate effectively and autonomously.
- The assistant can adapt based on user feedback.
- It integrates various technologies for enhanced functionality.
- Users are encouraged to explore more features on Langsmith.
Transcript
0:00 In this video, we are going to set up and then modify all in a no code way an email assistant that can read and respond to emails on your behalf. We're then going to show how you can use the feed to interact and supervise this autonomous agent that's running in the background. This is all going to be done in no code using Langmith's new agent builder. Let's jump in. So, to get started, we're actually going to go over to the templates page. Here we have a few different templates that you can choose from. I'm going to choose the email assistant template. If I see this, I can see that it connects to calendar and Gmail and it has some agent instructions here. Let's click create agent.
0:40 So, this is going to ask me to connect my accounts. I've already off my Google account. So, that's done. If you haven't done that, you're going to need to go ahead and do that. This is giving it permissions to your calendar and also your email so that it can read and write emails. Next, I'm going to set up a trigger. This is important. So, I want this email assistant to just run autonomously in the background. And there's still going to be some human in the loop. Don't worry, we'll get to that later, but it's going to run in the background. So, I'm going to set up a trigger and I'm going to select my email that I want to connect it to. From here, I can then hit confirm, and this will copy the template and create my email assistant. I'm brought in here into an empty chatbot.
1:20 We can see that this actually isn't a chat agent. It has a trigger. It has this Gmail email receive trigger. So, this means that it's running in the background triggered by this event. So, I actually don't want to chat with it. Instead, I'm going to go over here and I'm going to click edit agent. So, this is where I can view the agent that I just cloned. I can see a visual description of the agent over here. So, it's got a trigger. It's triggered by incoming emails to this email address. I can see the agent here. This is the name, email assistant, and then it's got instructions. And if I click edit, I can see it pop up. And these are the default instructions. I'll get into how to edit these later on.
1:56 I can then go over and look at the toolbox. So, it's connected to a number of tools. One of them is the Gmail send email tool. And if you notice, there's this little pause button. So, this pauses before executing this tool. So, you can approve or edit it. So, this gets into supervising the agent. And I'll touch on that in a little bit. I can toggle this off if I want to, by the way. So I can turn this off and now it can send emails autonomously. But I still want to be in the loop for these things. I want to be in the loop for when it sends emails and I want to be in the loop for when it creates events. But I will let it call things like mark email as read, fetching threads, listing events, and getting information about events. So it can do all of that autonomously. But before it communicates with the outside world, I have these human approval steps in place.
2:38 We can notice that it also has a sub agent. So this is a calendar context sub agent. If I click edit, I can see that this is this agent that's really specialized for just fetching information about dates and times. So, it's only got the tools that are relevant for the calendar and it's got some specific instructions here. I have this test chat over here. So, there's a number of things that I can do. So, I can actually chat with the agent about itself. So, I can say like, who are you? What do you do? So if I want to learn more about the agent and just explore it, I can do that here. If I want to make changes, I can also do that from here. So let's say that I always want to flag things that are from other lang chain employees. Always flag emails that are from other lang chain employee. So this actually updated this agent in a no code way. So it changed some things. So it actually went in and it changed this old string and it added this new string. So it's modifying the instructions the agents.mmd directly.
3:45 And so this is part of the power of lang agent builder. You can modify the agent. We can also add tools and add sub aents this way as well. But we can modify any part of the agent just by using natural language. If we wanted to modify it manually, we could use these edit buttons that we already talked about. Or we could switch over into this file explorer view. So this file explorer view is a file representation of the agent. All agents on Langmith agent builder are just represented by a set of files. These use industry standards like agents.md and skills.md.
4:18 It also uses MCPs under the hood. And so this is this toolbox here. I can also test the agent with triggers here. So remember this agent is triggered by incoming emails. It's going to take that email. It's going to format it in a particular way and it's going to kick off the agent. If I want to see what that format looks like, or if I want to test it on emails that are in my inbox, I can click this little test triggers button here. From here, I can select from emails that are actually in my inbox, and I can click on it, and it will populate the agent with that. So, I can see here that it's populated it with a what looks like an automated spam email.
4:54 So, I can see here that it's populated it with what looks like an automated notification email from Ashb. So now let's run this through and see what actually happens. So it's decided that it wants to ask me a question. So because this email agent is running in the background, it's really important that it has the ability to ask me a question. And we I'll see what this looks like when I show off my actual email assistant that's been running and we can see the interrupted threads and things like that. But here we can see that it's interrupting me with a question and it's giving me a few potential options that I could respond as. And so let me say mark as read automatically in the future and submit my answers.
5:33 We can see also that after it asked that question, it's going to remember what I said. So in the future, I don't have to keep on saying, "Oh, you should ignore these ASP notification emails." It's going to automatically remember to do that. Okay, so this is initially getting set up with the agent. Let's now see how to supervise it and actually use it. If I go to my feed, I can see one way to do that. So, this is a view of all of my agents. And so, my email assistant has a few notifications here, but there's also notifications from other assistants over here. I can see that it's flagged a question and I can respond to it here.
6:09 So, I received a Slack email announcing the new AI powered Slackbot is rolling out. blah blah blah blah blah. I don't want to see these. I don't really care about these emails. So, I'm going to say always mark these as red. don't notify me. Press send and it's going to go away. So, I can continue to do that with a number of other emails or I can go down here and see unread messages. So, unread messages are from when I'm interacting with the agent and it takes some actions and there's not necessarily any action that it's waiting on me for, but it's done some work in the background.
6:50 And so these are places where I've previously gone in and messaged the agent. It's done some work and now it's just letting me know that it's finished. And so it's a little bit different than action required. There's no interrupted actions, but it's just places where there might have been work done that I care about. In this case, I don't really care about a lot of these, so I'm just going to mark these as red and clear it from my inbox here.
7:13 Now, a way to really focus in and just work on my email assistant is to click on it in the sidebar here. So this is the agent inbox specifically for my email assistant. I can see all of the threads that exist and then I can see the ones that require attention. So the ones that require attention might be happening because it wants to ask me a question. It wants to update its memory. It wants to send an email or it wants to schedule a calendar event. Here it looks like it's trying to remember. It's trying to remember that these types of emails don't need to be responded to.
7:45 This is good. I'm going to accept. Now that it's handled, I can go on to the next one. So I can see here that it's interrupted and asked me a question. in this case, this isn't something that I'm interested in. So I can say not interested in this. So I don't have to use these suggested questions. I can also just respond in chat and it will handle it. I can then go on to the next one. This now asks me a question. I want to respond directly to the question. I can say ignore ramp expense emails.
8:14 Someone else handles them. and submit that. So, I can keep on doing this and I can roll through the items in my inbox. Some of these will continue to be updates to memory. This is great. The agent learns as it goes along. Some of these will be requests to send emails or send calendar events and over time my email assistant will adapt and learn from my preferences. This was an overview of setting up, modifying, and then using an email assistant that runs in the backgrounds and can handle your emails and calendar invites for you autonomously. It was all done in no code. It was all done in Linksmith Agent Builder, and it takes advantage of a few really cool pieces of tech like memory, triggers, skills, sub agents, and a lot more. We only just scratched the surface in this video, so I'd encourage you to go over to Langsmith and check it out.
9:07 Thanks for watching.
Summary
- The email assistant connects to Gmail and calendar accounts, enabling it to read and write emails autonomously.
- Users can set triggers for the assistant to operate in the background, with options for human approval on certain actions.
- The assistant can learn user preferences over time, adapting its responses based on feedback.
- Modifications to the assistant can be made using natural language or through a visual editing interface.
- The system includes a sub-agent specifically for calendar-related tasks, enhancing its functionality.
- Users can interact with the assistant to manage emails, flagging or marking them based on personal preferences.
- The assistant provides notifications for actions requiring user attention and updates its memory based on user interactions.
- The video encourages viewers to explore more features of Langsmith's agent builder for advanced customization.
Questions Answered
What is the purpose of the video?
The video demonstrates how to set up and modify an email assistant using Langmith's agent builder without coding.
How do I connect my email and calendar accounts?
Users need to connect their Google account to grant permissions for the assistant to access their email and calendar.
How do I set up triggers for the email assistant?
Users can set up triggers that allow the assistant to run autonomously in the background based on incoming emails.
How can I modify the email assistant's instructions?
Users can edit the agent's instructions directly through a visual interface or by using natural language.
What does supervising the email assistant involve?
Supervision includes reviewing notifications, approving actions, and providing feedback on the assistant's decisions.
How can I test the email assistant's functionality?
Users can test the assistant by selecting emails from their inbox to see how it processes them.
How does the assistant manage notifications?
The assistant flags important questions and updates users on actions taken, allowing them to respond or mark items as read.
What are the key features of the email assistant?
The email assistant utilizes memory, triggers, skills, and sub-agents to operate effectively and autonomously.