Loading video player...
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.
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.
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.
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.
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.
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.
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.
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.
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.
So, I received a Slack email announcing
the new AI powered Slackbot is rolling
out. Um, 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. 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.
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.
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. Um,
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.
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.
Thanks for watching.
LangSmith Agent Builder is a no-code agent builder. I built an email assistant to monitor and respond to emails, that I've been using for the last ~3 months. Here's what it looks like: 1/ Triggers: it is triggered by incoming emails. I don't have to do any work to kick it off - it just runs automatically 2/ Tools via MCP: connects to gmail (read emails, send email) and gcal (read calendar, read events, create event) 3/ Human in the loop: the "write" actions (sending email, creating calendar) require human approval to run. More on this later - but wanted to highlight that it's able to go completely wild! 4/ Subagent for calendar scheduling: LLMs suck at working with calendars! So i have a subagent specifically for finding my availability - its works a lot better 5/ Agent inbox to review: as mentioned, some actions require human approval. LangSmith Agent Builder ships with an agent inbox to review and approve the actions the agent wants to take 6/ message_user to ask questions: sometimes my agent doesn't know what it should do. It has a message_user tool, which it can use to ask me a question! This also shows up in agent inbox 7/ Remembers what I say: it updates it memory automatically based on my responses to it! This keeps me from having to repeat myself Try out the template: https://smith.langchain.com/agents/templates?viewingTemplateId=email-assistant&skipOnboarding=true Or build your own agent: https://smith.langchain.com/agents?skipOnboarding=true