0:02 in today's video I'm going to show you
0:04 guys how to build an AI agent that has
0:06 the ability to store long-term memory
0:08 often times when you're chatting with an
0:11 AI agent it can keep the context of the
0:13 conversation when you're in a single
0:15 chat but what if you had a chat with it
0:17 10 days ago and now you want to
0:18 reference back to some of the insights
0:21 that it gained from that conversation
0:22 that's exactly what I'm going to show
0:25 you how to do in today's video and I'll
0:26 show you how to build this workflow
0:30 inside of n8n now this workflow
0:32 basically just uses a telegram trigger
0:34 which you can see over here this is
0:35 where I'm triggering the agent by
0:38 sending either a voice note or a text
0:40 note to it and every time that I send a
0:42 chat through it's querying this air
0:44 table database right here that has
0:47 information about me it can even add new
0:49 memories in real time using this memory
0:51 tool here so that it's actually
0:53 self-improving and I'm even going to
0:55 show you guys the secret sauce I'm going
0:57 to give you the system prompt for this
0:59 AI agent if you stick around until that
1:01 portion of the video but before I kick
1:03 this off let's show you how this agent
1:05 works so I'm going to go ahead and send
1:08 it a voice note hey there what's your
1:11 name now this automation has triggered
1:13 and it's going to reference this row of
1:16 the database and as you can see it says
1:18 my name is super wizbot perfect it
1:20 grabbed that from right here I want you
1:22 to store a memory in your long-term
1:25 memory that reminds you that you were
1:27 part of an amazing YouTube video where I
1:30 shared how to build you super wizbot
1:33 and if you watch down here it should add
1:35 that memory momentarily just a quick
1:37 Refresh on my air table
1:40 database and as you can see it added in
1:42 that memory so Carter was part of an
1:44 amazing YouTube video where he shared
1:46 how to build super wizbot now the
1:48 exciting thing about this agent is you
1:50 can actually ask it to improve its
1:52 memory so I can just say hey what are
1:54 some things that you need to know about
1:56 me and this overall system in order to
1:58 improve your memory the first question
2:00 that it asks here are what are some
2:02 specific personal or professional goals
2:04 you have for this year then it says are
2:06 there particular Hobbies or interests
2:07 that you're currently pursuing or would
2:10 like to explore more deeply what topics
2:12 or themes resonate most with you in your
2:13 reading and learning Beyond
2:15 cryptocurrencies and AI which it got
2:18 from right here cryptocurrencies and AI
2:19 all right so it asked me some questions
2:21 here so that it can improve its future
2:23 context on me so I'm just going to give
2:25 it a quick
2:28 reply some personal goals that I have
2:30 for this year are to get more fit and to
2:33 get better sleep I want to aim for 7 to
2:36 8 hours per night and a professional
2:38 goal of mine is to reach 100,000
2:40 subscribers on YouTube some Hobbies or
2:43 interests that I'm exploring more deeply
2:45 include collecting records and learning
2:48 more about deeper disciplines like
2:51 engineering I also am interested in
2:54 scaling up my small town and making it
2:57 more of a prominent town in the area and
2:59 just improving the life quality for
3:00 people around me
3:03 so I sent that off and it should go now
3:05 and add some memories here to the air
3:07 table and then it'll come back with a
3:09 reply so as you can see it's adding all
3:11 of these memories right here it's adding
3:13 my professional goal for the year uh
3:14 some themes that I'm resonating with
3:16 when learning it's also sharing some
3:19 hobbies that I'm exploring some of my
3:21 other goals and interests and it covered
3:24 my health goals right here particularly
3:26 that I want to improve my sleep so now
3:28 even after this chat session is complete
3:30 it's going to have access to the past 50
3:33 memories in my air table database and
3:35 it's going to sort them by the date that
3:36 they were created so look guys I'm going
3:38 to show you how to build this entire
3:41 thing today for free on YouTube it's my
3:42 gift to you because I want you guys to
3:44 be able to implement this for your
3:46 agents but if you want to take the
3:48 community aspect of your learning up a
3:49 notch and you want to network with
3:52 people who are fired up about Ai and
3:53 maybe you even want to share some of
3:55 your own insights or maybe you just want
3:57 to learn this stuff in a more structured
3:58 way rather than jumping around YouTube
4:00 videos If any of those cases sound like
4:02 yourself then I highly recommend
4:04 investing in the AI foundations
4:07 community at AI foundations we do
4:09 regular weekly Zoom calls for both
4:11 support and just general Community
4:13 interaction and networking and we even
4:15 just implemented a new course in our
4:18 classroom on how to master nadn this
4:20 tool is going to be vital in the future
4:22 for agent Builders so if this group
4:24 sounds interesting to you if it sounds
4:25 like a place that you'd want to hang out
4:27 then I highly recommend using the link
4:29 in the top pinned comment or the
4:31 description below to join AI foundations
4:34 today all right now let's go ahead and
4:36 dive into building this nadn agent to
4:37 kick things off we're going to head over
4:39 to nadn and we're going to create a new
4:42 workflow I'll just create it in personal
4:43 and we'll kick things off by adding our
4:46 telegram trigger so I'll click this plus
4:48 button in the middle and I'll type in
4:51 telegram I'll click on Telegram and we
4:53 want to go with on message so this is
4:55 the trigger for on message so I'll hit
4:57 on message if you don't have your
4:58 credential in here then you can just
5:00 click on create cre credential here but
5:02 I'm going to click the drop down and hit
5:04 create new credential and then it brings
5:06 me to this screen where it needs an
5:09 access token to get this access token
5:10 I'm going to open up telegram either on
5:13 my computer or on my phone and on the
5:15 computer you can just click up in this
5:17 corner here create a new channel I'll
5:20 just call it test and hit create and
5:21 I'll make it a private Channel and hit
5:24 save I'll skip adding people for now and
5:25 the first message that I'm going to type
5:28 in here is at botfa I'll hit enter next
5:29 I'll click on the link for the bot
5:32 father and I'm going to type in slstart
5:34 and after sending off SL start it's
5:36 going to give me a list of commands here
5:38 so I'll do Slash new bot and I'll hit
5:40 enter and now it's asking me what I want
5:42 to call the bot so I need to give my bot
5:44 a name I'm going to call it super memory
5:47 bot and I'll hit enter and now it needs
5:48 a handle for the bot so for this one I'm
5:52 going to go supercore memory uncore and
5:55 I'll end it with bot and hit enter ah
5:56 this username is already taken so let's
6:00 try super memory is one wordbot
6:02 that one's taken too let's try ultracore
6:04 ultracore
6:06 memorybot all right that one worked so
6:09 it says done congratulations on your new
6:11 bot and it gives me this access token
6:13 here so if I click on this access token
6:15 it'll copy it to my clipboard we can
6:17 come back to our naden account and paste
6:19 that token right here and then hit save
6:21 now I'm going to close this window and
6:23 I'll hit back to Canvas so now we have
6:25 our telegram trigger so when we send a
6:27 message it's going to come through right
6:29 here now we need to wait for this bot to
6:31 access access the ongoing memory so for
6:33 that we're going to be using air table
6:35 so I'll click plus right here I'll type
6:38 in air table and I'll click on the air
6:40 table icon and then what we want to look
6:43 for is search records click on search
6:46 records and I'm going to create a new
6:48 credential for my air table and I'm
6:50 going to use the access token to get the
6:52 access token I can just come over to my
6:54 air table account get logged in and then
6:56 I can click on my account in the upper
6:58 right hand corner go to Builder Hub and
7:00 from here I can hit create new token
7:03 I'll give my token a name of test and
7:05 then under access I'm going to hit add a
7:07 base and I'm going to select all current
7:09 and future bases in all current and
7:11 future workspaces and just for testing
7:13 purposes I'm going to add all of these
7:16 Scopes you can decide to limit these if
7:18 you want to but just to get this through
7:20 and to make it work I want to give it
7:22 everything so that the agent doesn't run
7:24 into any issues when it's accessing this
7:27 token and accessing my workspaces and
7:28 this is basically just all the
7:30 permissions that the agent has has so
7:33 here C data and Records this is probably
7:34 the only one I need for this step but
7:36 later I'm going to need to write to the
7:39 records as well and I just want to leave
7:41 it wide open for the agent especially in
7:43 this testing ground and then later I can
7:45 come back and refine this for security
7:46 purposes but I'm going to hit create
7:48 token and I'm going to give it this
7:50 token that allows nen to access my air
7:52 table account so I'll copy it and hit
7:55 done then I'll paste that access token
7:56 here and hit save it should say
7:59 connection tested successfully so now
8:00 I'll click close this popup window make
8:03 sure your resource is set to record your
8:05 operation is set to search and we want
8:07 to select a base but right now we don't
8:10 have any bases for the agent to access
8:12 so I'll head over to air table and hit
8:14 the blue create button in the bottom
8:16 left hand corner I'll select a workspace
8:18 I'm just going to go with my first
8:20 workspace and I'm going to hit start
8:22 from scratch then we need to give the
8:24 base a name I'm just going to call it
8:26 agent memory and I'll call the table
8:29 here memory I'll hit save and for the
8:31 name column here I'm going to rename it
8:34 to memory and I'm going to make this a
8:36 long text in case the memory gets a
8:38 little bit longer then the single text
8:40 can handle then I'll hit save I'm going
8:42 to delete these other default fields
8:48 us and I'll delete these initial records
8:49 and in the first record I'm just going
8:51 to give it a test memory so that it
8:53 actually has something it can pull from
8:55 this database for testing purposes so
8:58 I'm just going to say users name is
9:00 Carter and that's pretty much all you
9:02 need for the memory database and on the
9:04 base you're going to make sure it says
9:06 from list you're going to click on the
9:08 dropdown and I'll type in agent and I
9:10 should see my agent memory base here
9:12 I'll click on that and for the table
9:13 we're just going to make sure it's on
9:16 from list I'll click the drop down and
9:17 we're going to click on that memory
9:19 table that we created now when you're
9:21 passing memories to your agent you don't
9:23 want to return all because if you were
9:25 returning everything the responses would
9:28 get too long as you add up your memories
9:30 so you can either set a filter for
9:31 certain memories that you want it to
9:34 bring into context for your agent or as
9:36 a basic way of managing the length of
9:38 the memories you can just turn return
9:40 all off and then change the limit to
9:41 make sure that it's not going to be too
9:44 many memories that it pulls in I'll just
9:46 change the limit to 50 and then if this
9:48 makes my agent bug out at a certain
9:50 point you can lower this a little bit if
9:52 you want to but you can just play around
9:54 with the limit to get the right amount
9:55 of memories in there and to make sure
9:57 that your agent isn't dying out because
9:59 you're overwhelming it with information
10:02 and now I'll go back to Canvas and the
10:04 next step is to aggregate this data
10:06 because it's going to send it through as
10:08 individual items but we want to turn it
10:10 into one array that has all of the
10:12 memories in it so to do that there's a
10:14 handy node that you can set up in nadn
10:16 and it's the aggregate node so I'll just
10:18 hit the plus button here and I'm going
10:19 to type in Aggregate and then I'll see
10:21 it here it's just this little tree this
10:23 little orange tree so I'll click on that
10:25 I'll make sure aggregate is on
10:27 individual fields and then for the input
10:29 field name I'm going to enter the name
10:31 of the field for our memories and that's
10:33 right here in our air table it's just
10:35 called memory so I'm going to use that
10:37 to pull it through so we'll type in
10:40 memory and I'll go back to Canvas now
10:41 the pathway for this chat needs to go
10:43 straight to our AI agent it can't go
10:45 through these other nodes here so what
10:47 we need to do is we need to create a
10:49 merge node so I'm going to hit the plus
10:51 button right here and I'm going to type
10:54 into the search nodes merge and I should
10:56 see this little blue tree here I can
10:57 click on that one and I'm going to
11:00 change the mode to combine and then for
11:01 Combined by we'll change that to all
11:04 possible combinations and I'll go back
11:06 to Canvas now we can drag our telegram
11:09 trigger to go through and be input one
11:11 or input two it doesn't really matter
11:13 how you do this it would actually
11:14 probably be better though if this was
11:16 input one and then this one was input
11:19 two there we go so now it's merging
11:21 those two pieces of information together
11:23 when that telegram message is sent it's
11:25 going to go grab all of the memories
11:26 that are currently in the air table it's
11:28 going to merge them into a single item
11:30 using the AG Ator and then it's going to
11:32 take the text that I sent through
11:34 Telegram and it's going to put that into
11:37 a single item so then we can pass this
11:40 special packet here over to our AI agent
11:41 this is the fun part this is where we're
11:43 going to add in our AI agent so I'll hit
11:45 the plus button right here I'll click on
11:49 Advanced Ai and I'll click on AI agent
11:51 now I'll go back to Canvas and I need to
11:53 send some test data from our telegram
11:55 trigger this will allow me to map the
11:58 chat to the AI agent so I'm going to
12:00 copy the name of my bot and then I'm
12:02 just going to type in at I'll paste that
12:04 bot in and then hit
12:07 enter and now it gives me this hyperlink
12:09 for the bot so I'll click on it and I'll
12:11 hit start and now I'm able to chat with
12:13 my bot now for now what we're going to
12:14 do is we're going to delete this
12:16 connection to our AI agent and we'll
12:18 bring it back in in a moment and I'm
12:20 going to right click and deactivate my
12:22 AI agent for now so that it doesn't
12:24 trigger an error then I'll hit test
12:27 workflow and now telegram is waiting for
12:28 me to send a message so I'm going to
12:30 send a message to that agent that we've
12:32 connected over here I'll just say this
12:35 is a test and I'll hit send all right
12:37 and what you should see is you should
12:39 see the items move through here so it
12:41 pulled our air table memories and it
12:43 also pulled through the chat that we
12:45 sent to telegram right here then it
12:47 merged those into one item that we can
12:49 pass to our agent so now I can connect
12:52 this back to the AI agent I can
12:54 rightclick it and it activate and then
12:57 we can click into that AI agent and I
12:59 can pass in all of the variabl that this
13:02 agent needs because I now have them here
13:04 so I see our memories right here and
13:05 since there's only one right now it's
13:07 just showing one but they would list out
13:09 right here and I could just drag this
13:11 memory in and it would have access to
13:13 all of those but the first and most
13:15 important thing to map in is this text
13:17 right here this is the actual
13:19 conversation text that I sent through
13:21 over here so I said this is a test and
13:23 as you can see it's passing that
13:25 variable right here so we'll change this
13:28 prompt source to Define below and then
13:30 all I have to do is is click and drag
13:32 that text into the text field over here
13:34 and now that agent should be able to
13:36 receive my messages next we need to add
13:38 the system prompt for this agent so that
13:41 it knows how it works so I'll hit add
13:43 option and I'm going to click on system
13:45 message and it starts by default just
13:47 saying you are a helpful assistant but
13:49 we're actually going to delete that and
13:50 the first line of the system message
13:52 that I'm going to give it is the current
13:55 time and day I need to change this to
13:57 expression here and once I change that
14:00 to expression this expression right here
14:03 just the curly brackets around the money
14:05 sign now is going to pull back in the
14:07 date and time so that the agent always
14:09 has the current date and time next I'll
14:12 enter down just a couple lines and I'm
14:14 going to paste this next section so this
14:15 next one says you are a helpful
14:17 assistant with the ability to add and
14:19 read memories about the user simple as
14:22 that I'll enter down again and for this
14:23 next part I'm going to tell it how to
14:25 add those memories so let's go ahead and
14:27 open this up in a full window and I'm
14:30 going to paste this next of text here so
14:31 I just say to add a new memory or
14:33 insight to the top of your list of
14:35 recent memories you can use the memory
14:37 tool and I'm telling it the name of the
14:39 tool so we haven't created that yet but
14:41 we're going to all right and it says
14:43 which allows you to add short one
14:45 sentence insights about the user to your
14:47 memory for the future in order to help
14:49 you customize your response output we'll
14:51 go down to the next line and I'm going
14:54 to paste in this next bit of information
14:56 so this next line is just more
14:59 generalized instructions for how I want
15:01 it to add those memories because if I
15:02 don't give it instructions like this
15:04 it's just going to go crazy adding
15:06 memories and it's not going to be
15:08 relevant to the way I want this agent to
15:10 work and the way that you probably want
15:12 this agent to work so now I just say you
15:15 don't have to always customize based on
15:16 the memories because I don't want it
15:19 going over the top right if it has these
15:21 memories I want it to be able to access
15:22 them when they're handy and when they're
15:24 useful but I don't want it just like
15:27 implementing the memories like if I say
15:29 I have a dog I don't want it to
15:31 Implement that I have a dog into all of
15:33 the responses I only want it to bring
15:35 that up when it's relevant so I said but
15:37 if there's a good reason to customize
15:39 your response you can use the memories
15:41 below to do so these are memories that
15:44 have been added by you if you need to
15:45 learn more about the user for the future
15:47 you can ask questions in order to take
15:49 note of their preferences now for this
15:51 next line I'm going to say use your
15:52 current memories of the user to recall
15:55 past insights about them then I'll paste
15:57 in this next line where we have the
15:59 curly brackets around this Jon memory
16:01 and it says read your most recent
16:03 memories here and as you can see on the
16:05 preview of the result over here it's
16:07 showing the memory that we have in our
16:08 air table database that it pulled
16:11 through using that search step and
16:13 finally I'm going to add some last
16:15 instructions here so I just say tailor
16:16 your response based on the relevant
16:18 memories if you find that a memory is
16:20 relevant to the response a bit redundant
16:23 but I like to add that here and then
16:26 this one is a little bit um of my own
16:28 secret sauce for how I like to get the
16:30 agent to talk talk to me so I just say
16:32 always output your final response as a
16:34 conversational piece rather than a list
16:36 or blog post if you must make a list
16:38 keep it simple and don't add too much
16:40 hierarchy only share the most important
16:42 notes after thinking of your response
16:46 consider the tldr version or a to Long
16:48 didn't read version and always give a
16:51 conversational cheeky fun reply while
16:53 remaining assertive helpful and not too
16:55 playful and then for this last line give
16:57 a Meek tone to your response I really
16:59 just like how the responds when I tell
17:02 it to give me a Meek tone but I like
17:03 pairing it with these other kind of
17:06 keywords as well and that gives it a
17:07 really good balanced response from my
17:09 experience I'm going to close this
17:13 window now we'll jump back to the canvas
17:15 and now we need to add a chat model so
17:16 I'm just going to hit the plus button
17:20 right here I'll go to open AI chat model
17:21 and here you need to connect your
17:24 credentials for open AI so I'll just hit
17:26 create new credential and now it needs
17:29 an API key from open AI to get this just
17:30 go to platform.
17:33 open.com create an account if you don't
17:35 already have one and then click on the
17:37 settings you'll go over to billing and
17:39 you'll add some billing details in just
17:41 $5 to $10 to test with if this is your
17:43 first time and you're just trying this
17:45 out and then you'll go to API Keys
17:48 create a new secret key and I'll call
17:51 this test I'll select a default project
17:53 and hit create secret key and I'll copy
17:57 my key paste and save now it should say
17:59 connection tested successfully and we'll
18:01 close this popup window from here you
18:03 can choose your model I like just using
18:05 GPT 40 mini because it's pretty
18:08 inexpensive I'll go back to Canvas now
18:11 and next I want to add a memory so I'll
18:13 hit the Plus on this memory right here
18:15 and I'll click on window buffer memory
18:18 and we'll change this to Define below
18:21 I'll go to mapping and for the key we're
18:24 going to want to drag in the chat
18:26 ID then you can select the context
18:28 window length so this is how many past
18:30 inputs from the chat it's actually
18:32 receiving in its context window so that
18:33 it can provide you with a better
18:36 response I'll leave this on Five for now
18:38 and I'll go back to Canvas and this is
18:40 where the real magic happens now we're
18:42 going to give this agent a tool that
18:44 allows it to log to this air table
18:46 database so that it's basically
18:48 recursively improving its memory here
18:50 add this tool we can make it so that it
18:52 can add new memories so I'll click on
18:55 the air table tool and first things
18:57 first I'm going to add a name to this
18:59 air table tool and we're just going to
19:01 call it memory uncore tool and hit
19:03 rename just like I had in the system
19:06 prompt you should be connected to your
19:07 air table credentials here so that
19:10 shouldn't be a problem tool description
19:12 can be set automatically or you can set
19:13 it manually and give it more
19:15 instructions on how to use the tool I
19:17 just set automatically and that seemed
19:19 to work fine for the resource we're just
19:21 going to choose record and you're going
19:23 to have to change this operation from
19:26 get to create then just like we did
19:27 earlier when we were searching for the
19:29 memories and pulling in the most recent
19:31 memories we're just going to click on
19:34 this from list base drop down here and
19:37 we're going to go find the agent agent
19:39 memory right there and for the table
19:41 we'll drop that one down I'll type in
19:43 memory and I'll click on the memory
19:45 table this should be set to map each
19:47 column manually so I'll change this to
19:50 the expression tab on my memory and I'm
19:52 just going to paste in my expression but
19:54 I'm just using the from Ai and then I'm
19:56 putting in a name for the tool and now
19:58 this from AI expression is going to
20:00 allow the agent to write its own
20:02 memories right here now I'll go back to
20:04 the canvas and now this is getting
20:06 really close to being completed now we
20:08 just need to send the message back to
20:10 telegram so I'll hit the plus button
20:12 right here I'll type in Telegram and
20:14 I'll click on the telegram I'll search
20:17 for send and you should see send a text
20:19 message I'll click on that I'm going to
20:21 paste in this expression that I already
20:23 have here it's just calling for the
20:25 telegram trigger and it's pulling in the
20:28 chat ID from that telegram trigger so
20:30 that's just referring to this and it's
20:32 pulling the chat ID that this outputs
20:35 just like we had to put the chat ID in
20:37 the window buffer memory here so if the
20:40 name of your node is telegram trigger
20:42 this should work and again I'm referring
20:44 to this name right here telegram trigger
20:46 so we'll go back into send message this
20:48 one's going to be an expression as well
20:50 and I'm just going to paste in this
20:53 expression json. output so this is just
20:55 pulling the output from the previous
20:57 node so if you see a dollar sign and
20:59 it's not referencing a node like this
21:01 it's just pulling it from the previous
21:03 node and all it's doing is grabbing the
21:06 Json objective output from this AI agent
21:08 node when it's done outputting so I'll
21:09 click back in now I'm going to go ahead
21:12 and test out this entire workflow to do
21:15 that I'll activate the workflow and hit
21:16 got it I'll make sure it says saved up
21:19 here and everything looks pretty good so
21:21 I'll open up my super memory bot here
21:23 and I'm just going to send it a message
21:26 and just say what do you know about
21:29 me and let's see if it can figure out
21:31 that my name is Carter all right perfect
21:32 it came back and it said I know that
21:34 your name is Carter I didn't tell it
21:36 that it's not in its context the reason
21:38 that it knew is because this air table
21:41 record right here sent in that memory
21:43 that I added to begin with now for the
21:45 next experiment we're going to head over
21:46 to air table while we still have
21:49 telegram open and we can see here it
21:50 says user's name is Carter but if I
21:53 wanted to add a new memory to the memory
21:55 database I can just say something like I
21:58 have a dog named Rees and I can say send
22:00 that off and as you can see it sent a
22:02 response here it says that's great to
22:04 know Reese must be a wonderful companion
22:06 if you want to share more about your dog
22:08 or anything else I'm all ears and
22:11 furthermore it added this memory in here
22:14 Carter has a dog named Reese it can even
22:16 add multiple memories at once so if I
22:19 just said something like I live in
22:22 Michigan and I'll add another list item
22:26 here my favorite Starbucks order is a
22:30 caramel latte with a a double shot of
22:38 off and boom you saw that add those real
22:40 time Carter's favorite Starbucks order
22:42 is a carel latte with a double shot of
22:44 espresso and Carter lives in Michigan
22:46 and it gave me this beautiful response right
22:47 right
22:49 here now if I wanted to make this a
22:51 voice agent our community actually has a
22:53 plug-in play way to actually set up this
22:55 telegram voice agent so I'm just going
22:58 to go to the classroom in AI foundations
23:01 I'll go into the nadn Mastery course and
23:03 I'll scroll down to communication
23:06 mediums and on communication mediums we
23:07 show you guys how to connect to all
23:09 these different platforms like slack
23:12 telegram WhatsApp open web UI and it's a
23:14 growing list so my brother Drake
23:16 actually made a telegram Text Plus voice
23:18 automation right here that allows you to
23:20 plug this into any of your agents so I'm
23:22 just going to go ahead and download the
23:24 Json for this and then I'll just paste
23:26 it straight into nadn I'll show you how
23:29 simple that is so we'll download this
23:32 file and I'll just open it up in a text
23:35 editor or vs code and I'll copy all of
23:38 this Json here then I can head back into
23:41 n8n and I can just paste it right above
23:43 my automation down
23:46 here and we'll drag it up and I don't
23:48 need all of this right I already have an
23:50 AI agent and I have a lot of these
23:52 things set up but what I can do is I can
23:54 just pull the important components out
23:57 of here so I have my telegram trigger
23:58 what I don't have is the Switcher right
24:02 here so I need to remove this and
24:04 connect it to the switcher I need to
24:06 delete this connection here because it
24:08 created a connection uh I'll delete this
24:10 too and I'll add that back in in a
24:14 moment but we need edit fields and we
24:17 need this edit fields to go into the
24:19 merge and I'll just drag this out so
24:25 here now I'll go into this telegram get
24:27 file and I'll make sure that my
24:30 credential is connected here I'll go
24:31 back to Canvas and now you see that
24:34 there's no more warning on that one and
24:36 when you get this file from telegram you
24:39 need to add an open AI transcriber so
24:43 I'll go open AI transcriber
24:46 recording I'll go back to Canvas and now
24:48 that this transcriber recording is in
24:51 here I can drag that into input one as
24:53 well now to get the window buffer memory
24:55 updated and the input variable for the
24:57 AI agent I can go into the memory of
25:00 this template Automation and copy the
25:02 key then I can go into my window buffer
25:04 memory here and I can just paste that
25:06 key in and the reason this doesn't work
25:08 is because his was named telegram
25:11 trigger one mine is just named telegram
25:12 trigger so I'll just delete that one out
25:14 of there and now it's pulling through my
25:16 session ID so that it can keep a
25:19 short-term memory of the conversation I
25:21 can go back to Canvas and I'm going to
25:22 delete the rest of this information
25:24 since we already have it and there's
25:26 just one final step to get voice working
25:28 with this AI agent I just need to make
25:29 sure sure that the variable maps in
25:31 properly because it's not pulling the
25:33 text directly from this telegram trigger
25:35 anymore it's pulling it from either one
25:38 of these fields to get this variable
25:40 I'll make sure that this is active I'll
25:41 hit save and I'll go back to my super
25:43 memory bot and I'm just going to send
25:46 through a voice note hey there this is
25:48 just a test voice note to map the
25:50 variables properly so now it's going to
25:52 send that voice note through it's going
25:55 to go down this voice route it'll
25:58 transcribe that recording into text and
26:00 then it'll pass it into the merge here
26:02 so now that execution should have gone
26:04 off in the background so I can go to
26:07 executions and I'll see that there's an
26:10 execution here that has an error now the
26:12 reason that it has an error is because
26:14 you can see that it went down that voice
26:16 route here and it went into the merge
26:18 but once it got to the agent the agent
26:20 didn't understand this response that was
26:22 coming in because it no longer had the
26:24 input field from this telegram trigger
26:26 it went down this voice route and it's a
26:29 different input field now so I'm going
26:31 to hit debug in editor and this is going
26:33 to pull me back to the editor with the
26:35 information passed through I can open up
26:38 my AI agent now and instead of this Json
26:40 message text we're just going to remove
26:43 that text and I'm going to drag in this
26:45 new text property now if I go back to
26:48 Canvas and I hit save and we'll go into
26:50 our execution here and I'm going to
26:52 unpin it and hit back to Canvas once
26:54 more and now we'll send it off a new
26:57 test hey there what do you know about me
26:59 and as you can see it came back with the
27:02 proper response if I go into executions
27:04 on nadn you can see that it succeeded
27:07 here so if I click on that succeeded one
27:09 you can see how that response played out
27:11 here I hope you guys enjoyed building
27:13 this agent that has long-term memory
27:16 using air table and nadn if you want to
27:18 improve your knowledge around AI agents
27:19 or just the basics of artificial
27:21 intelligence and surround yourself with
27:24 the community of like-minded individuals
27:25 then again I recommend you join AI