OpenClaw Full Tutorial for Beginners: How to Setup Your First AI Agent (ClawdBot)
https://www.youtube.com/watch?v=BoC5MY_7aDk
[00:00] Hello legends.
[00:02] In this video, I'm going to show you how to install OpenC Claw from scratch.
[00:04] I'm going to show you how to deploy it in a safe way.
[00:08] And I'm also going to give you a bunch of tips and tricks on how to use it for the very first few days so you can get the most value out of it.
[00:13] I'm finding that a lot of people fall into two buckets.
[00:15] One, they're either too scared to or they don't know how to install OpenClaw.
[00:20] And two, they do install OpenClaw, but they get too excited.
[00:23] They try to do too many things with it all at once.
[00:25] And then they ultimately waste a lot of time, a lot of tokens, and then they lose their motivation, and they stop using it.
[00:28] So, in this video, I'm going to take you through a brand new install of OpenClaw.
[00:33] I'm going to show you how to connect it up to your Telegram.
[00:37] I'm going to give you a couple of security prompts that will help you secure your deployment even better.
[00:41] The OpenClaw agent is actually able to scan a device that it's on.
[00:45] Understand how you deployed and make some recommendations on how to just harden that deployment.
[00:48] I'll show you how to set up your API key so you can use different AI models.
[00:51] I'll show you how to set up your web search.
[00:55] I'll give you an overview of all the different MD files and how the very first conversation works when you first deploy your agent.
[01:00] your agent.
[01:02] And then finally, I'll give you a couple of tips and tricks on how best to use OpenCore for the very first few days.
[01:05] So instead of trying to do absolutely everything all at once, I recommend the scaled back approach where you spend the first couple of days just getting a feel for things and then brain dumping all of your goals, your challenges, whatever tasks, whatever things you're working on to your OpenClaw agent and then asking it to help set up the very next steps for you.
[01:20] So OpenClaw is pretty straightforward to install.
[01:22] You don't want to install it on your main computer where you're logged into all of your accounts, you have any secret information like files, documents or passwords because if your open claw does get compromised, then it can access all those files on a computer.
[01:35] So really what you want to do is get a dedicated device and that could be an old laptop or a computer you have lying around.
[01:41] It could be a Mac Mini, it could be a Raspberry Pi, which is what I use, or it could be a VPS, so a virtual server.
[01:47] If you're using a virtual server, OpenClaw doesn't recommend using a third-party one-click image.
[01:51] So, a one-click deployment is something like Digital Oceans button over here where you can click this and then it spools up a custom configured version of OpenClaw
[02:01] custom configured version of OpenClaw directly on a server.
[02:02] And same thing directly on a server.
[02:02] And same thing with Hostinger.
[02:04] You just click on this one-click deploy button.
[02:06] and then you have a deployed OpenClaw on their server.
[02:09] So, the upside of using a one-click image is that it's very easy to get started.
[02:13] But the downside is that over time you might want to change some of the configurations.
[02:17] And if you're using someone else's preconfigured version of OpenClaw, it might just be difficult or maybe impossible to change some settings later on.
[02:24] So, so the recommendation is just to start from a blank slate and then do it yourself.
[02:28] So, I'm going to be using a Raspberry Pi for the demo today.
[02:31] And to get started, you just need to copy this command and then open up a terminal on a device that you want to install OpenClaw.
[02:36] So, for me, I'm on my Raspberry Pi.
[02:38] Okay, so I'm going to open up my Raspberry Pi, open up a terminal, and then paste in this command.
[02:41] This command is going to do absolutely everything for you.
[02:44] It'll first look at your device and make sure you got all the prerequisites, and if you don't, it'll just download them.
[02:49] Second, it'll download and install OpenClaw, and then third, it'll finalize the installment, and then it boots up the onboarding process.
[02:57] Now, a suggestion here is that I would not get bogged down on all the different settings that you can choose.
[02:59] I would
[03:01] I would just do the MVP approach.
[03:03] Just get the bare minimum in place.
[03:05] Use OpenClaw for a couple of hours, maybe a day.
[03:08] Begin to understand exactly where you want to use it, how you want to use it, what do you want it to do for you.
[03:13] And then when you know more about what you want to do, wipe OpenClaw from your computer.
[03:16] Restart the onboarding process, and then be even more deliberate and specific with the configuration and security settings.
[03:21] OpenClaw even mentions in their security document that there's no perfectly secure setup, and the goal is to be deliberate about who can talk to your bot, where the bot is allowed to act, and what the bot can touch.
[03:34] So only after you use OpenClaw for the first time and you begin to understand its magic.
[03:37] Only then can you actually know what you want to do with that and then be very deliberate with the options you choose.
[03:42] So let's keep going and say yes we understand the security risks and let's opt for manual onboarding.
[03:49] Let's keep local gateway accept this directory.
[03:53] And for here my recommendation at least for the start is to use something called Open Router.
[03:56] And if you haven't heard of Open Router, this is a provider that gives you one single API key and then access to pretty
[04:04] Single API key and then access to pretty much every single AI model that you'd ever want to use.
[04:06] You can access all the OpenAI models, all the Google models, all the Anthropic models, and then you get access to these open-source models.
[04:13] And the benefit of using these open-source models that are very cheap to run.
[04:17] It's 30 cents per million input tokens and $110 per million output tokens.
[04:21] And this is said to be on par with models like Claude called Opus 4.6.
[04:25] And the comparison here is that for Opus 4.6, it's $5 per million input tokens and $25 per million output tokens.
[04:31] Now, there are some use cases that you might want to use Opus 4.6, but the Minimax, I've been experimenting with it and it's actually very good to get started with and be your daily driver.
[04:40] So, then the value is you get one single API key from Open Router and you can access every single one of these providers and all of the different models.
[04:48] Let's hit enter for Open Router. After you create an account from Open Router, go into the credits tab, add about 5 or 10 bucks just so you can get started.
[04:55] Then go across to API keys. Create a new API key. Give it a name and click create.
[05:00] And then copy that key. Paste it into
[05:02] And then copy that key.
[05:02] Paste it into here and hit enter.
[05:04] And then to get us here and hit enter.
[05:05] And then to get us started, I'm just going to go down to started, I'm just going to go down to Claudson 4.6.
[05:08] Let's hit enter.
[05:08] And then hit enter and accept this port.
[05:10] In my case, I'm already running another instance of OpenClaw that is attached to this port.
[05:13] So I've got to change mine.
[05:15] Hit enter.
[05:16] We're going to keep the gateway bind on loop back.
[05:19] We'll go with the recommended token.
[05:21] Leave tail scale off and then hit enter to generate a token.
[05:23] and let's configure our first channel.
[05:25] We're going to go with Telegram bot.
[05:27] Once you've signed into your account for Telegram, just start a new conversation with the bot father.
[05:28] Then in your conversation, go forward slash and newbot and hit enter.
[05:30] Enter in a descriptive name for the bot.
[05:32] And then for the second name, just make sure you end in bot.
[05:34] And you cannot use the dashes.
[05:37] You have to use underscores if you want these kind of spaces.
[05:38] Let's hit enter.
[05:40] The bot's been created.
[05:42] So we can now copy our API key.
[05:44] Paste the bot token into here.
[05:45] Let's go all the way down to finished and hit enter.
[05:47] and let's configure the DM access policies now.
[05:49] So just like in the install instructions, you want to be very specific where you deploy your bot and who can speak with your bot.
[05:51] My preference here is to use an allow list.
[06:03] Preference here is to use an allow list.
[06:05] For the allow list, you just get the user ID or the username and then you enter it into here and only that user can speak with your bot over time.
[06:10] If you want to add someone else from your team to be able to chat with the bot as well, you can just update the allow list.
[06:15] Back in Telegram, you just want to get your username or user ID.
[06:19] So let's click on this hamburger menu.
[06:20] Click on your profile.
[06:22] And I find that sometimes copying the username doesn't actually work in this setup.
[06:25] So if you go into the URL of this page, you'll actually find your user ID.
[06:29] Only copy the digits and nothing else.
[06:31] Paste it into here and hit enter.
[06:33] I'd recommend to start off by not configuring any skills, but just to take a look.
[06:35] And here you have a bunch of pre-built tools that can plug into your OpenClaw agent.
[06:39] I'm just going to skip this for now.
[06:41] So I'm going to hit spacebar to select skip and then hit enter.
[06:42] I'm not going to supply any more API keys.
[06:44] So I'm going to go no, no again and again and then again all the way through to the end.
[06:51] And over here, let's just enable all of these different hooks.
[06:55] Once we've done, let's hit enter and click yes and hit enter to install the gateway service and then yes for node.
[06:58] Let's hit enter to enable bash.
[07:00] And with that, we complete the onboarding.
[07:01] So at this stage, we have
[07:03] Onboarding.
[07:05] So at this stage, we have OpenClaw set up and installed on our machine.
[07:07] Up in the top section over here, you can see the dashboard is ready.
[07:11] Let's just copy the URL link with the token.
[07:13] Copy that and then paste it into your terminal.
[07:14] And here you have your OpenClaw dashboard.
[07:17] Let's test if this works by sending in a message.
[07:20] Hi there.
[07:22] And here's our response.
[07:24] Now, this conversation is very important.
[07:26] As you can see, we're basically asked to help the agent understand who it is, who we are, and what kind of goals we have.
[07:30] Now, every time you deploy a new agent for OpenClaw, so right now, this is one agent we have, but we can technically go into the agents tab and then just deploy another agent for research, another agent for writing, whatever, whatever use case you need.
[07:45] Every time you deploy a new agent and have your very first conversation, they're always going to have a similar experience like this, asking who you are, who they are, and what their purpose is.
[07:53] So, at this stage, you want to spend 5 or 10 minutes just initially having this conversation with the agent.
[07:57] If you do what I said before where I'm like, just install it first, begin to understand what it's capable of doing for you, and then you
[08:04] capable of doing for you, and then you begin to understand what you want to do.
[08:05] begin to understand what you want to do with it.
[08:07] with it. Same thing goes for this conversation.
[08:08] conversation. Just get the first conversation out of the way.
[08:10] conversation out of the way. The important thing is that the agent actually goes across to its own files.
[08:13] actually goes across to its own files.
[08:15] So over in the agents tab, if we click on the files over here, we got a bunch of MD files.
[08:19] of MD files. So this is just marked down.
[08:21] down. It's just a format of a file like a doc or a PDF, but in this case, it's just MD.
[08:25] just MD. So some of the files that we have here are the agents MD file is just the instruction set for the agent whenever it's having a conversation with you.
[08:31] whenever it's having a conversation with you. The very first run, it's told to actually use the bootstrap MD.
[08:36] actually use the bootstrap MD. So the bootstrap MD is just that first onboarding conversation where it's been prompted to say, "Hey, figure out who you are, who you're working with, what the goals are."
[08:46] Um, and to basically help build some personality and character for this agent.
[08:49] character for this agent. You have the solemn MD, which is like the personality character.
[08:54] character. You have the identity MD, which is the agent's identity.
[08:57] So once you tell it exactly who it is, how you want it to operate, it'll fill this out.
[09:01] And then you have the user MD.
[09:03] The user MD is essentially who you are to the
[09:06] MD is essentially who you are to the agent.
[09:06] So you just give it your name.
[09:08] Agent.
[09:08] So you just give it your name.
[09:10] Uh you can give it your uh time zone that you're in, any special notes about communicating with you, and some more context around projects that you want to create.
[09:13] Communicating with you, and some more context around projects that you want to create.
[09:15] Over time, uh you'll actually find that you'll evolve whatever files you have here.
[09:19] If you create a research agent, you might tell create a research.md file for you and just start putting in different bits and pieces of research that you're working on.
[09:25] Now these agents are able to edit those files whenever you want or they want.
[09:33] So after you have this first conversation, if you find in two days time that you want to update like how the agent actually communicates with you, which is definitely reasonable, you can tell the agent to go back and just update its own configuration file.
[09:45] So I just finished my initial conversation with OpenClaw.
[09:47] I defined who I was, who the agent was, and what our goals were.
[09:51] And then I reset our session so we can start fresh.
[09:53] Let's now test out the Telegram connection to make sure it works.
[09:56] I'm going to go back to our botfather and open up the chat.
[10:00] Since it's the first conversation we're having, let's go and start the combo.
[10:03] And here we have the message from our agent.
[10:04] Now, my preference is to just use Telegram for
[10:06] My preference is to just use Telegram for all the communication.
[10:07] I don't really like using the dashboard to send and receive messages.
[10:11] Plus, it's on my phone.
[10:12] And literally, wherever you are, you can just access and speak with your agent.
[10:15] Now, the very next thing you want to do before actually going away and giving your agent tasks and starting to see exactly what's possible, I recommend you run a couple of these prompts just to harden security of your setup.
[10:22] The first prompt is basically saying, "Hey, can you please run a security audit of our setup, so of our device and our deployment of OpenClaw, and let me know if we have any issues that we should fix."
[10:36] And since the agent knows how OpenClaw was built and has access to different commands for OpenClaw, like security audits or health checks, it's able to look at your device and then recommend some changes.
[10:45] I recommend you actually read the response and understand what the agent's talking about.
[10:49] And if you agree with everything it said, you can just reply back and say, "Can you please fix everything?"
[10:54] The next command you want to run is around redacting sensitive information from leaking in logs.
[10:58] This is another security feature that you can do in the back end of OpenClaw.
[11:02] There's actually a specific feature where when you're having a conversation, sometimes the metadata of the conversation might have
[11:07] Metadata of the conversation might have an API key or a specific user ID that you don't want to leak out into the wild.
[11:13] So, we're just asking OpenClaw to enable that feature and just make sure that we're redacting that sensitive information.
[11:17] And this is another really good scan to do.
[11:18] As you can see from default, some of these tokens were shared as plain text.
[11:21] So then the agent went through here and then it made some recommendations on how we can beef up our security and then including down here as well.
[11:31] So you can just reply back to the agent and say, "Yes, I agree with all your recommendations. Let's do it."
[11:34] Then the agent will go away and then fix everything for you.
[11:36] So at this stage, I'd say that you've doubled the security of your instance just by sending those two very basic prompts.
[11:39] Now we have some breathing room and can start actually figuring out what this agent can do for us.
[11:44] This first part is going to be a relatively personal experience where you're going to be prompting up the agent based on your specific tasks and goals.
[11:48] But I'm going to give you a couple of tips and pointers on what you could possibly do.
[11:50] So, the first thing is we want to give our agent the ability to search the web.
[11:54] So, we're going to install the Brave API key.
[11:57] The two default options are using Brave Search or Perplexity for Brave Search, which is what I'm using right now.
[12:02] You get a
[12:07] What I'm using right now.
[12:07] You get a bunch of free API credits that you can use.
[12:11] I definitely recommend starting with this or since we're using open router already to run our Claude Sonnet model.
[12:15] You can use open router to use the Perplexity web search as well.
[12:18] Let's go across to Brave and get our API key.
[12:20] After you create an account, you don't have to upload any credits.
[12:24] Right now on this plan, you get one request per second, which is actually pretty good.
[12:27] You can just let your agent know to slow it down its internet requests and you get 2,000 requests per month total.
[12:33] So, this is quite a high capacity.
[12:33] Let's click on add an API key.
[12:35] Give it a name and hit add.
[12:37] Let's copy that key.
[12:37] And we can either go back into the agent conversation, give it the API key and say, "Hey, can you please set up Brave web search?"
[12:45] Or we can go with these instructions and copy this command.
[12:47] Back into your terminal, you can keep going on from the previous session you had.
[12:51] Or even if you start a new terminal session, just hit enter.
[12:53] Let's leave it as local and let's enable web search for Brave.
[12:57] Just get that API key one more time.
[12:57] Paste it into here and hit enter.
[13:00] Let's enable web fetch.
[13:02] And it's complete.
[13:02] Now, let's just make sure it
[13:08] Complete. Now, let's just make sure it works.
[13:10] So, I'm going to get the agent to hit the Brave API and let us know if it was successful or not.
[13:13] Awesome. So, now we have web search.
[13:14] So, let's set up our first daily task.
[13:16] So, I'm asking the agent in plain English, hey, can every day at 8 a.m. you send me the latest AI news?
[13:23] Now, a tip here is that I would just start with something.
[13:26] Start with something small.
[13:27] And typically, I will run this automation or a task or whatever I'm doing for a couple of rounds.
[13:31] So, maybe like a couple of days.
[13:33] And as you go on, you can just get the agent and say, "Hey, you got me the AI news.
[13:38] Can you also let me know the weather or can you actually give me a research report or can you give me some YouTube video ideas?"
[13:42] So, as you go through, you can just tell the agent to optimize whatever task it's doing.
[13:46] Then you can go back and change the scope of work by itself.
[13:49] Now, the final tip that I want to give you is the use of MD files, markdown files.
[13:55] So, for the first few days that you use OpenClaw, it's going to be super exciting and most likely you're going to try and do absolutely everything all at once.
[14:01] A very common thing that people do is, hey, I've got one agent.
[14:03] Why don't I just deploy another two or three agents?
[14:08] Just deploy another two or three agents and you start getting them to do tasks for me.
[14:12] The difficult thing about that is that you don't fully know exactly what you can do with OpenClaw.
[14:16] Instead of like wasting tokens, wasting your time doing unnecessary things, for the first few days, I recommend just sending a bunch of voice notes across to your OpenClaw.
[14:26] And explaining here's the things that I'm thinking about.
[14:27] Here's what's on my mind.
[14:29] Here's a couple of goals that I want to achieve.
[14:30] And then piece by piece get your OpenClaw agent to start building out separate MD files.
[14:35] For example, a research.m MD and then to put the research tasks that you mentioned from your conversations or travel.m MD.
[14:41] And if you ever speak about wanting to travel overseas or do things locally, it's going to start putting those tasks and placing them in those MD files.
[14:48] So then over a couple of days, you'll naturally build out two or three really solid MD files with a bunch of tasks immediately embedded into them.
[14:57] So then you can come back to your primary agent and just say hey based on the MD files that we have can you spin up multiple agents and then it'll be very easy for you to configure those agents and then give them tasks so they can hit the ground running.
[15:07] Now my next steps
[15:09] The ground running.
[15:11] Now my next steps are to be building out a bit more of a series about Openclaw.
[15:13] So my next video will be about building an agent team and also building out a command center where you can actually communicate with multiple team members on different tasks and projects.
[15:21] If you want to stay up to date with that video, please subscribe to my channel, drop a like on this video, or drop a comment saying that you're excited to see the next one.