---
type: raw-transcript
title: "Why is Everyone Missing This with AI Agents?! (Memory + Tools that Scale)"
youtube_id: F1I9JN0z0w0
url: https://www.youtube.com/watch?v=F1I9JN0z0w0
slug: why-is-everyone-missing-this-with-ai-agents-memory-tools-that-scale
published: 2025-07-30
duration: "0:28:03"
fetched_at: 2026-07-21
immutable: true
---

## Transcript

**[0:00:00]** Most AI agents and MCP servers are built to only work with a single user, you. And a lot of times that's okay. But in this video, I want to help you move beyond that. Because here's the thing, a lot of times we build our AI agents and we want to scale them to thousands or millions of users. But also, our agent needs to be personalized, personal memory and tools for every single user. And there is a fundamentally different way that we have to build our agents if

**[0:00:29]** we want that to actually work because most agents are built with a single Gmail account in mind or a single Slack account or a single rag knowledge base and that my friend will not scale. Now I'm using N8N here just because it helps me demonstrate things very visually for you. But this is a problem that we have no matter where we are building our AI agents and MCP servers. We build something that needs personalization. Like in this case, it's a very basic example of an email assistant agent. And

**[0:00:58]** so we have a couple of tools to manage our inbox in Gmail. You can obviously imagine adding a lot more tools to extend this quite a bit. But the thing that I'm trying to show you here is that if we click into any one of these Gmail nodes, we have our credentials essentially hardcoded into the agent. And we see this all of the time. And so as soon as we want to bring in a second user, we have to change these credentials, maybe duplicate the agent. Obviously not ideal. What we really want

**[0:01:24]** here is for this agent or this MCP to be able to go through an authorization flow with the user. So they connect their Gmail account and the agent will dynamically use the Gmail account based on the user interacting with the agent. We can have that kind of personalization for memory as well. So we're combining memory and tools. And the other thing that'd be really ideal is if the agent would only go through this authorization flow when the time comes for it to first

**[0:01:52]** use a Gmail tool on behalf of this user. These are the kinds of things that are actually quite challenging to build ourselves. And trust me, I have tried. But in this video, I have you covered. I'll show you how we can build personalized AI agents that actually scale. We'll be using Langraph, which is one of my favorite agentic frameworks. and they have some awesome features for long-term memory that we'll be using. And we'll be also using a platform called Arcade. Now, Arcade is the key

**[0:02:19]** here for solving the authentication and scaling nightmare for tools that I can almost guarantee you wouldn't want to build yourself because this is what MCP wishes it had. We can take our AI agents and we can have them dynamically request access to user accounts for different services and we go through an OOTH flow. So, we have scopes for security and permissions. We can cache these credentials going forward so our agents don't have to ask again. And also we can

**[0:02:45]** build our own tools into the platform. And then for icing on the cake here, we also are only asking for permission when the time comes for our agent to use one of these services on behalf of our user for the very first time. It's very powerful. All right, so I'm going to give you a really cool demo now of the agent we're going to build in this video and it's using langraph and arcade under the hood. So, I have a basic streamlet interface that I built for demonstration

**[0:03:11]** purposes. I'm signed into my account here with my email. This is the Langraph workflow that I'll show you how to build later in this video that we have operating under the hood. So, we have our agent node. We have its tools and then we also have this authorization step whenever our agent needs to get access to a user's account to use some tools in arcade for the first time. Now, I have specifically revoked my access to a sauna and Gmail so that you can see the flow for the first time. So, no

**[0:03:38]** connected users in Arcade right now. I'll go ahead and send in a request. I'll say, "Grab all my emails in my inbox and tell me what Cole said because just for demonstration purposes, I sent myself an email here. AI SAS ideas using Arcade." And so, just a few ideas of platforms that I mean, you could build without Arcade, but Arcade is going to solve that huge problem of agent authorization. And it's just so cool. I reached out to Arcade and I partnered with them to bring this video to you

**[0:04:05]** because there really is a whole new suite of agents and SAS platforms that we can build thanks to them solving agent authorization. So yeah, here we go. So it asks us to visit this URL and obviously you can make a much nicer UI here, but I'm just going to go ahead and click on this link. And so we'll sign in with our Google account and we will authorize based on specific scopes what we want Arcade to do with our Google account so it can operate on our behalf.

**[0:04:28]** So the authorization is successful. I can go back here and now in a second. There we go. So Cole has said in his email, here are his five SAS ideas. Take a look at that. And then just to continue with something simple here, I can say now look in my SAS ideas project and tell me which ones I'm missing. So I'm going to send in this request. I'll show you what I'm talking about here. So within my ASA, I have this SAS ideas project and I'm listing three out of the

**[0:04:52]** five that I sent myself in an email. And the really cool part here is that now it's asking for my authorization for a sauna. And so we can see how whenever we first need access to a specific tool, that's when it asks for access. It's not like we have to do our Gmail and a sauna and every other tool we connected all up front. It's just in time authorization. And so I can click on this link and we'll go through a very similar process here. In my case, I already went through

**[0:05:19]** it. So it's just kind of a oneshot there. And all right. So now in a second it's going to list out everything in my ASA and it's going to find the difference between what it just had here and then what we have in ASA. There we go. The ideas that are not currently in your SAS project is social media growth agent and calendar and task life management. And then it asks if I want to add them to my SAS project so I can keep going forward with this. But then the other thing that I want to show you

**[0:05:44]** here is long-term memory. So, I set it up in a way where I can say remember, that's my keyword here, telling the agent to remember something for later for my user specifically. So, I'm just saying remember these tasks for later. So, this is going to use a long-term memory that is built into Langraph. There we go. I've remembered these tasks for later. And I can actually start a brand new conversation and I can ask it what are the tasks that I asked you to remember. All right. So, now leveraging

**[0:06:09]** the long-term memory here because it is a brand new conversation. There we go. You asked me to remember social media growth agent and calendar and task life manager. There we go. So, we've got long-term memory. We've got tools specific to the user with authorization that's just in time. This is the kind of personalized agent that we can really bring to everyone. So, there we go. We've got long-term memory. We've got tools that are specific to the user. Like, if I went and I signed into a

**[0:06:34]** different account here, it's going to go through the same authorization flow for Gmail and ASA. I'll have a completely different set of memory. So, it's not going to give me the same answer when I ask this question. This is the kind of personalized agent that we can bring to everyone and scale to millions. All right. So, now that you know what you're getting yourself into, let's dive into how we build this agent. So, I'll have a GitHub repo linked in the description

**[0:06:56]** below where we have the agent there that you can try yourself. And in the read me, I've got instructions for setting up everything. And then what we're going to go over here is a progression. So, I'm going to start by covering the fundamentals, the basics of Arcade and how we have the Asian authorization built in. Then, we'll dive into more of the langraph integration and how that works with Arcade. And then, finally, we'll add in the Streaml interface and long-term memory for the complete agent

**[0:07:21]** that I just demoed for you. And the thing is, even if you don't end up building with Arcade, which obviously I would recommend doing, I reached out and partnered with them to bring you this guide for a reason. Even if you don't build with Arcade, I still want to dive into the core concepts, the fundamentals of how exactly we build these kinds of agents so we can have personalization that scales to thousands and millions of users. And so that's what we're covering

**[0:07:46]** in this repository. This is the resource that I have for you. And getting started with Arcade is so, so easy. And so you can sign up. They got a free tier that can definitely get you started in your development. And then they have the documentation. So, I'll link to Arcade and their documentation below as well. And man, their documentation just makes it so easy to get started. So, certainly poke around with the documentation if you're interested in using Arcade. They

**[0:08:10]** got a lot here, including a really nice quick start. But specifically, the section of the documentation that I'm really interested in, if I go into Langchain, they have a guide here using Langraph with Arcade. And this really is just a beautiful combination because of the way that Lang graph helps us build these agentic workflows that are necessary to have those authorization steps kind of just built right into our agent. And so that's why I'm using Langraph here. And they show you how to

**[0:08:37]** set up your environment like installing your pip packages, setting up your environment variables. And then a lot of the code that we see here is going to look very similar to what I'm going to show you when we dive into our agent. And what you can do with Langraph is they have all these preconfigured tools for things like Firecrawl or Gmail or Asauna like we saw or Slack or Jira, Reddit. They have all of these preconfigured tools that we can bring into our agents just with a couple of

**[0:09:01]** lines of code. We can also add in our own tools and MCP servers as well. So very easy to get everything up and running with this in mind. And this is our documentation as our reference point. Now let's dive into what this looks like for our agent. All right, so back to our readme. Let's scroll down to our progression section cuz I want to start with the basics of Arcade, laying the foundation of how we can connect Arcade to Langraph and have the Asian authorization for our tools. And I'm

**[0:09:27]** actually pretty excited to dive into this with you. I've been so focused on AI coding recently that I haven't had one of these guides in a while where I just go through building a script step by step. So, I'm looking forward to this. And so, what we're going to be doing is building out the first version. And so we're going to actually create this graph at a very high level and I'll show you what it looks like to connect the different tools that we have in Arcade. And so you can follow the readme

**[0:09:50]** to understand like you know how you leverage the requirements.ext and the example to set up your environment. I'm assuming you have all that taken care of. And so we can start by importing all the packages that we need and setting our environment variables. So we just need to set our Arcade API key which you can just do within the settings in your Arcade dashboard here. And then we need our OpenAI API key. We're just using GPT for our model here. And we can define

**[0:10:14]** the exact one we like, like GPT 4.1 mini, and then also the email that we're using for authorization. And this will be more dynamic once we get to one of the more advanced parts of our progression. And so then what we're going to do is create an instance of the tool manager. This is the primary class in the Arcade SDK where we can define the tools that we want to bring into our agent. And so we'll actually do that right now. So we'll call manager.gettools. And then we passed in a couple of tool

**[0:10:41]** kits here for Gmail and ASA just like we saw in our demo. And so these are the preconfigured tools. They come out of the box with Arcade and we can just plug them right into our agents. It's really convenient. And then we can also build our own tools and connect our own MCP servers as well, which is outside of the scope of this guide, but I just want to call that out and you can definitely go to the documentation to add that as well. Then once we have all of our

**[0:11:03]** tools, we can call this to lang chain to basically just take the tools that we have in arcade and then use their direct integration to turn it into the tools that we can then pass directly into a chat openai instance that we create from langchain. Now I don't cover lang chain a lot on my channel. I generally use pideantic AI for my agent framework, but this is just what works really well with arcade and also we're not focusing too much on lang chain here. We're just

**[0:11:27]** using it to create our connection to the LLM. And then the rest of the heavy lifting is going to be done with langraph. And I definitely cover lang graph a lot on my channel. So yeah, we define our chat openaii instance. We bind the tools that we've created from arcade. And then we can create our langraph workflow. So we're just using an in-memory saver right now. And then we're calling this create react agent. So this is a pre-built component from Langraph. In the next step of our

**[0:11:52]** progression, I'll show you more how we can actually build the langraph workflow ourselves. So you see how it works under the hood. But basically what we're building here is the flow that we already saw. So the request from the user comes into the agent and then the agent is going to figure out just like we typically have with AI agents. Do I need to invoke a tool or can I give the final response to the user right away? And so if it doesn't need to invoke any tools, we'll just go right to end and

**[0:12:16]** it'll give that simple response. Otherwise, we are either going to go to tools or to authorization. And it's all based on if we already have the authorization for the user's account set up in Arcade. And so like in my dashboard right here, my account is already connected with Asauna and Gmail. So I've already given the agent the ability to use the accounts on my behalf. And so if I were to go in and ask it to list the emails in my inbox right now, like just within the Streamla

**[0:12:44]** interface here, then it's going to go right to the tools node because it already has that access. So it'll invoke the tool. the control will go back to the agent and it'll reason about what happened and then give the final response to the user or invoke another tool. But if I haven't given access yet, like if I start with a new account or I go back in the dashboard and I revoke the access here, then it has to go to the authorization step first. So it'll get the authorization for my Gmail

**[0:13:08]** account or my Jira account, whatever, then go to the tool node, invoke that tool, then go back to my agent. And so this is very much like our usual AI agent flow that we have and we've seen before, I've covered it on my channel. It's just we have this one extra node here for authorization. So it's a very simple addition, but it unlocks this whole new world of possibilities for personalized agents that can scale to thousands of users. And so this is what we're building here. And so we create

**[0:13:35]** the React agent. We pass in the tools and the model. And then we're going to define our configuration. And so this is everything that we're passing into the lang graph flow and then we'll just go ahead and call it. So it's just graph.stream. We pass in the user input and our configuration and we just print out everything that we get back from the graph. And then the last thing that we'll dive into more as we continue here as well is we have the whole concept of interrupts in langraph. And so

**[0:14:00]** specifically when we reach the authorization node, we actually have to pause the graph entirely because we need to wait for the user to authorize the agent to access their Gmail account or whatever that might be. And so Arcade has this direct integration with Lang Graph where whenever we hit this stage, it's going to pause the graph with this interrupt and then we would authorize the account and then the graph needs to resume and we'll continue on with the tool call and then getting the final

**[0:14:29]** response from the agent. And for this first basic implementation, that automated step where we'd actually resume the graph after authorization, we're not doing that here, but we'll see in a little bit what that actually looks like. But this is everything that I want to show you for a very basic implementation just so that we can see what it looks like to define the tools in arcade and then integrate that with langraph. And so now within my terminal here, I'll bring this over and we can go

**[0:14:54]** ahead and call Python and then I'll say arcade one basics.py. So I'll go ahead and kick this off. Actually off camerara I did change the question by the way just to match with our demo from earlier but it's going to go through the authorization flow. In my case I already did give it access to my Gmail account earlier. So, it's just going to go and fetch the contents, the five SAS ideas from the email that I sent myself already. So, I'll pull my terminal back

**[0:15:17]** up. And there we go. Here are my five AI SAS ideas. This is looking really good. And then the other thing that we can do, I'll show you this really quick. If we go back into Arcade and I revoke my access to my email. So, now I I have to go through the authorization flow again. And then I clear this. Let me zoom back out and I'll run the same thing again. Now, it's not going to give us an answer. It's instead going to give us a link because we need access now. So

**[0:15:42]** there we go. So it ends the flow here. But we'll see in the next iteration when we get into integrating more with Lang graph, we can make it so that it'll give the link, we'll authorize, and then it'll continue on right away without us having to rerun anything like we saw in the demo earlier. Okay. So now on to the second step of our progression here. I want to show you more how langraph works along with arcade. This is where we really start to understand this pattern

**[0:16:08]** of authorization that's going to apply no matter the tool or platform that we're using for agent authorization. And so I've got the second script that we're going to go through from scratch. Again, covering a lot of the same things. So I'll go a little bit quicker here, but then talking about more specifically how exactly we've built up this graph in Langraph. And the documentation that I'm referencing for this is the second page in the lang chain section on user

**[0:16:33]** authorization. And so a lot of the code that you see and you can reference here is what we're going to be covering in our repo. And so starting off with the same kind of deal here. We're importing all of our libraries, setting our environment variables for things like our Arcade API key and OpenAI API key. And then we're going to create that same tool manager. I'm just going to keep things simple and include the same tools throughout all these demos here. So

**[0:16:55]** we've got Gmail and ASA again. Going to convert those to Langchain, build up our chat, OpenAI, and then I also have this tool node. This is one of the nodes that we have in lang graph specifically for executing a tool once the agent has decided that it wants to do so. And we'll see how that plays in with the rest of the graph in a second here. Then we can define our workflow. This is where we define all of the nodes that we want in our langraph flow and we'll connect them together at the end as

**[0:17:21]** well. And so starting with our primary node to call the agent. So going back to the langraph studio here, we're defining this purple node right here. And so all we have to do is take in the messages. And so we're going to have this with conversation history as well and we're going to pass that into the model. So we're going to call the a stream function so we can get the tokens out in real time as they're being streamed from the LLM. And so we're going to just write those out like this. And then

**[0:17:48]** we're going to accumulate any of the tool calls that the agent has decided to make. And so we build up this list over time because then if we do have any tool calls, we have to go to these nodes here. Otherwise, we'll just give the final response to the user and go to the end of the graph. So, accumulated list of tools right here and then adding into the message history. So, we're building up the message history over time, which we're maintaining as a part of the state

**[0:18:12]** for our LAN graph workflow. So, really the only state that we're keeping track of in our graph is the message history. And then we have a decision node. So, if the agent has decided to invoke tools, we have to go to the authorization and tool nodes. Otherwise, like I said, we'll just go to the end of the graph. And so this kind of decision point is what we're adding right here with this should continue function. So basically, we're just checking to see if there are any tool calls. We'll go to

**[0:18:38]** authorization if we require O. And so we're basically asking the Arcade tool manager here, is this a tool that requires authentication? And do we already have the authorization for this user and this account for this tool? If we do already have all that in place and we can just invoke the tool right away, then we'll go right to the tools node, which is what we've defined right here. Otherwise, we'll move on to the authorization step. So, this manager tells us which one of the two paths we

**[0:19:07]** have to go down here from our agent whenever we are invoking a tool. And so then we have our authorize step. And so this is where we figure out exactly like what's the URL that we need for for the OOTH for Gmail or Asauna or whatever that might be. And then we give that to the user. So we write this out to the CLI which we'll run in a second here. Um or our streamlin application. And then we're just going to call this manager.we for off. And so this is where we integrate directly with the whole

**[0:19:34]** interrupt that we have in langraph. The whole concept of an interrupt. And so we're actually going to stop the execution of the graph here. We're going to wait for the user to fulfill our authorization request. Then we'll move on to the next step of the flow where we actually execute the tool. we were waiting on authorization for. And that's everything. Those are all the nodes that we have for our graph. And so now we can just build our graph. So we have a simple function to do that where we

**[0:19:57]** define the state here which is just a simple message state because again the conversation history is the only thing that we care about here. And then we'll add our nodes. So we have the agent tools and authorization. And then we have all our edges. So we start with the agent and then from the agent we're either going to just give the final response and exit or go to authorization or tools. And then if we do go to authorization after we, you know, get the permission to use the user's

**[0:20:21]** account, then we'll go to tools. Otherwise, once we go to tools, we want to go back to the agent because we never end our workflow execution after executing a tool. We always want to invoke the tool and then pass control back to the agent because then the LLM is going to figure out like, okay, yes, my tool call was successful. Now I can tell the user like, yep, your tool was successful. Let me give you a summary of what happened. So we always want to do that and that's everything for our

**[0:20:47]** graph. So now we can just compile it with the in memory here. We'll add in Postgress later in the next example and we can return our graph and then we just have a simple main function to execute our graph very similar to what we did in the first example here. So that is it. Now we can go ahead and run the CLI and test this out. See how it works now where once we perform the authorization it'll automatically go on to our tool call. So now to test out our second implementation, I have a little CLI

**[0:21:16]** built that I'm not going to dive into right now. It's very similar to how we interacted with our lane graph graph in the first implementation. So I'll go ahead and run this. And then within my arcade dashboard, I revoked my access to aauna again. So we can see what the authorization flow looks like now that we have langraph more integrated. So it'll automatically pick back up after our authorization. So I can say what tasks do I have in my SAS ideas project? and then it'll give me the link to

**[0:21:43]** authorize with a sauna. There we go. So, I'm going to go ahead and copy this. Just do it really quickly on my other monitor here. Okay, so I've done the authorization and then in just a second here, it'll start listing out the tasks that I have. Just those three that I have in my project right now. And there we go. In my SAS ideas, I've got these three. So, this is looking really good. And because we have the direct integration with the interrupt here, we're able to ask for the authorization

**[0:22:08]** and then pick right back up without us having to re-execute the graph in any way. All right. So at this point, we understand the core pattern that we need to have for agents for agent authorization. So we can have tools that are acting on users behalfs with their services like Gmail and Asa. And so the last thing that I want to show you how to add here is long-term memory that is also custom to each user. So we can have hyperpersonalized memory and tools thanks to Arcade. And then some of the

**[0:22:36]** long-term memory stuff that I'll dive into with Langraph. And so I'll have this linked in the description as well. This is the documentation from Langraph for memory. They cover both short-term and long-term memory here, which we're going to be focusing on long-term memory. So this page right here is definitely worth a read. And everything that we're about to implement is coming from this. And so within the third example that I have in the GitHub repo for you, most of our langraph setup here

**[0:23:01]** and our integration with arcade looks exactly the same. So all this code that I'm scrolling through right here is pretty much the same. What really is different though is we're using Postgress first of all to store our checkpointers. That's our interrupts to handle the authorization. So we know where we need to pick back up in our graph. And then also we have this new concept of a store. The store is for our long-term memory. And so specifically the way that I've set it up here, and

**[0:23:27]** you could definitely set up long-term memory in many different ways. You could also integrate with me zero, which is a long-term memory solution that's open source and I've covered on my channel a lot. I'm just trying to build something really simple into Langraph right here. But specifically, what I've added to this flow is it's going to check to see if the keyword remember is anywhere in the user's message. because if it is, that is our way to clue the AI agent

**[0:23:50]** that we want to leverage long-term memory and store this message so it can pick it back up later. And so if that is the case, we're going to call this aput function of the store. And we're going to add in the data, which is basically going to be our user request, which we told it to remember. And this nameace here, if I go back to where we defined the namespace, we're specifying the unique user ID, which in this case, now that we have streamllet in the mix, and

**[0:24:16]** that this is based off the demo that I showed you earlier, we actually sign in with superbase. And so if you take a look at the example and you set it up yourself, we define the Superbase URL and key. So we have Superbase authentication. So this is actually very very dynamic where this user ID is going to be based on the email we use to sign in with superbase. And so we're storing long-term memories in our Postgress database unique to each user. That is the main thing that we're adding in

**[0:24:43]** here. So when we call our agent, the main thing that's different is we fetch those memories and we pass that in as a part of the prompt to our agent. And then if we have the remember keyword, we'll also store the memories from that last user message as well. And so then I also built a streamlet interface around this which I'm not going to dive into how I configured all of this. You can take a look at the code if you're interested. But this is our way to now interact with the agent that now has

**[0:25:07]** custom tools and memory for each user. So back over to the stream interface that I showed in the demo earlier and I've got instructions in the readme for spinning this up. I'm going to go ahead and create a brand new account here. So I've already done a lot of demoing of the arcade tools and how the authorization flow looks like. So maybe I'll just show the memory really quickly here. So, I'll make a brand new account so we can show that we do have distinct memories for different users. So, I'll

**[0:25:28]** just use one of my throwaway emails here just to get a new account here with Superbase. I'll add in my full name. I will sign up. All right, there we go. So, I'm logged into a new account and now I can just say like remember these tasks. I need to um build a new app and also uh do my laundry. All right. So, we're going to go ahead and remember these tasks. And then I'll show that like in a brand new conversation, we have these tasks remembered. There we go. All right. So, new conversation. Uh,

**[0:25:59]** what tasks did I tell you to remember for me? All right. So, now it should say do the laundry and build a new app. There we go. Yep. Build a new app. Do your laundry. Perfect. But now, if I log out of this account and then I log back into the original one that I was using for the demo at the start of this video. So, let me log into this. And now I ask the same exact question. What tasks did I ask you to remember? Now, we'll get, if you remember from the start of the

**[0:26:28]** video, some of the tasks that we had in the email that I had. There we go. Social media growth agent, calendar, and task life manager. So, perfect. We now have long-term memory individual for each user. And our agent can access our individual ASA and Gmail accounts. There are really powerful ways you can combine this together as well where the way that it does things in our ASA and Gmail can be based off of memories that we gave it like giving it instructions for it to

**[0:26:51]** remember on how we want it to operate with our account. So basically every single user can have a little individual system prompt essentially for how it wants the agent to operate for them so that we don't just have to rely on a single massive system prompt instructing the agent on how to do things on users behalf and they can really get custom with it as well. So, that's the power of combining Arcade with long-term memory and really everything that I had for you

**[0:27:14]** in this video. So, definitely check out Arcade. There are they are a fantastic platform. It's free to get started. you can build these agents that really just unlock a whole new world of possibilities for the kind of platforms that you can build that I mean sure you could implement agent authorization yourself but if you really think about what goes on behind the scenes to manage the authorization and being able to like scale the thousands of users and maybe

**[0:27:38]** building a dashboard like this yourself like Arcade just takes care of so much for you and combining that with memory man it is just a gamecher so I hope that you enjoyed this guide and just getting an understanding of what this Asian authorization pattern looks like. And so if you're looking forward to more things with AI agents and building these kind of solutions, definitely give me a like and a subscribe as well. Thank you for watching and I will see you in the next
