Video25 min watch

NEW: Meet Agent Zero AI 🤖 Automatic, Transparent, & Customizable AI Python Framework👨‍💻 (Install)

Links from the video

Transcript

3,683 words

What's going on guys Josh pook here and in today's video we're going to be looking at installing Agent Zero this is a framework built on Python and and it's a personal organic AI framework um it's not a predefined agentic framework it is designed to be dynamically organically growing and learning as you use it we're going to dive into it uh show you how to install it and show you some use cases of this tool let's dive right into it [Music] all

Right guys so uh I got a comment on one of my recent videos you know someone suggesting uh I should check out Agent Zero I actually saw a bit about it um there's it's somewhat new uh 10 days ago they posted their first video also saw David Andre Andre uh post a video on it it's a pretty they're to but this one's a good video it's short and quick if you don't have much time it's 8 minutes as well to watch

It from the like the founder of the tool um as well as this one's like uh an hour and a hour and 20 minutes so um it's a you know kind of going over different topics around the tool and seeing different use cases uh if you only have a short amount of time after you're done watching this one check this one out but I'll leave both links in the description down below so you can go ahead continue on I've been using

This testing it out and I think it's a pretty interesting framework it's pretty uh pretty cool um but anyways you know definitely it's still like newer so it's definitely going to be improved upon as well as you yourself could improve upon it with um the architecture just the prompting uh in the system prompts and all that good stuff but let's Dive Right In so few things you're going to need to actually use this is one Docker okay so just go I'll

Leave a link down below if you don't have Docker already installed download it on your Windows or Mac whatever the case may be we're also going to need python so make sure python is installed okay and I'll also leave of course a link to the GitHub repo so you're going to want to download the repo you can either get clone it or just download the code here okay once you do that um me personally I am have it open in vs

Code with my python at least lately I either usually I mean with my coding I usually use vs code sometimes with my python I'll use uh pie charm the Community Edition so could do either one but um yeah that's more specific for python but right now I'm just using vs code so you can see here this is pretty much I'll quickly go over some of this um I would definitely recommend checking out this 8 minute video for sure um and I'll

Go over some of the stuff that he kind of mentions in as well and kind of give you my um own thoughts about how I'll be using it and and my opinion on a few things but uh Agent Zero is fully transparent readable comprehensive customizable and interactive Agent Zero uses the computer as a tool to accomplish its it/ your tasks uh key Concepts general purpose assistant so it's not pre uh pre-programmed for any specific task but can be it is meant

To be a general purpose uh uh personal AG assistant give it a task and it will gather information execute commands and code cooperate with other agent instances and do its best to accomplish it so it's called Agent Zero because you'll see when I start running the code you'll see it the first one is called Agent Zero but if I give them more complex task where it needs multi-agents uh it can call upon subordinates which would be like agent One agent 2

Agent three if I say hey go do this and use multiple agents it will call upon those agents and and spawn them okay so computer as a tool Agent Zero uses the operating system as a tool to accomplish its task it has no single purpose tools preprogrammed instead it it can write its own code and use a terminal to create its own code as needed so I mean we've seen tools that um that I've done certain that are kind of similar

In some sort of ways um you know like we've seen a lot of different kind of tools in the AI space I mean some that are somewhat similar some that are a bit different you know like uh they were talking about crew Ai and a crew AI youve still got to write a bit more python code calling functions and all this stuff this is kind of meant to uh even if you don't know that much about coding or python Works somewhat

Out of box you can change the prompting and whatnot but um anywh who uh multi-agent cooperation complete uh completely customizable and extensible um and then communication is key so giving the promper proper system prompts and it can do Miracles not going to read through this whole thing but you can kind of see the whole behavior is defined by System prompt in prompts for agent. system. MD so you go to the prompts here we can see all the different markdowns of the

Prompts like agent memory agent system agent tools uh no code output code runtime so these are so errors intervention um different uh events or messages or whatnot um memory cleanup uh knowledge response okay so you can take a look I'm not going to dive through the whole project files but we can kind of like get a sense of kind of how it's um built with certain things like for example if we go to requirements we you can see the different requirements

That it's installing Lang Chang Rock hugging face open AI Lang Chang Community anthropic chroma databas um database and then Google um and then sentence Transformers Docker uh duck. go search and yeah and then essentially to um what it does when it executes code like let's say like I'll do some example in just a second but it spawns a it initializes its own Docker container so you can see here this is why you need Docker right here I have Agent Zero uh

Running and it does this all you don't have to do this like yourself it does it once you actually um need to run code so if I just ask it like hey how's it going it's not going to spawn it right away uh or set it up but once you ask something that it's going to need the code um executor fun um prompt or whatever the case may be or the tool then it's going to um start the docker container okay

So how do you get uh everything up and running well let's just scroll down here so um what you're going to do is required API key so at the moment moment the only recommended API key is for perplexity API so um yeah if you're not if you don't have perplexity API or API key yet just go to perplexity you can sign up I believe if you're I don't know if it's for free plan too but I know if you're on the

Pro Plan you get about $5 of free API credits a month so um that should be pretty good and then perlei is used as a convenient web search tool and has not yet been replaced by an open source alternative even though I know if you're' been following this channel we've covered a lot of Open Source alternatives on this channel but in terms of like actually using the API um you know perplexity is makes sense and then so yeah if you leave

It empty in the environment file they won't be used chat models and embedding files can be executed locally via olama and hugging face or via apis as well so basically what we're going to do is enter our API Keys into the EnV file which you can find a copy of in the example. EnV so I actually already uh change of course since I've been kind of using it I did change this uh you will see example. EnV and essentially what it's

Going to look like just so I can show show you here example. EnV you got your API key for open AI or AP I key for anthropic right here for Gro perplexity for Google and um yeah so essentially what they're saying is you technically like one recommended the main recommended one is perplexity but um I just put every single one just because I mean why not so yeah once you do that you can save it and then very simple you just

Go ahead and run python uh main.py okay so once you do that also to oh actually sorry no you need to install uh pip install uh requirement so you run this command if you have it opened in vs uh code just letting you know if you um didn't if you're not running it as administrator you may encounter an error so you could just go to your your either reopen vs code uh running it as administrator or um just do it in

Your terminal running it as administrator and then just pip install requirements okay it's going to take a little bit maybe a couple minutes um just cuz there's a decent amount and then once that's done you can simply just run it um using python main.py okay once you do that it's basically going to start up um Agent Zero so you can see here it's actually I've already been doing a few things here so let me just kind of show you what it

Looks like so this is the first message I just said hi so you can see here um it's set it up initializing framework high and and this is kind of how the structure is of it so we have Agent Zero starting a new message thoughts so we see its thoughts um its internal thoughts like user has greeted me I will respond to the user and then it calls upon a tool name it uses like a tool the tool that's uh there's

Different tools and let's just see where tools so as you can see here we got like response tool right you can see the python code here we got task done tool we got call subordinate tools this is what it uses to call support the subordinate and delegate tasks um code execution so you can see all the code here the Imports um and what it does to execute code and it executes code within the docker the Linux um Docker containerized environment so

That's pretty cool because like it says in the um read me here somewhere I think it's at the bottom somewhere um so the system prom the agent can break his operating system uh sometimes can deactivate virtual environment so yeah here Agent Zero can be dangerous with proper instruction Agent Zero is capable of many things even potentially dangerous to your computer data or accounts always run Agent Zero in an isolated environment like the built-in Docker container and be careful of what you

Wish for right so if you tell it hey uninstall like if you didn't have it containerized and you're just running it on your computer so it is running executing code on your computer just like many different AI tools if you have it executing uh the code on your computer it could potentially be dangerous right because it could execute any type of code right um it could like hey delete my operating system or like uninstall this or that or change the P

Like whatever data this that so yeah of course it could be d uh dangerous so it's cool that they have this so it automatically runs the docker and it's you don't have to worry about that it sets it up um once you get going okay so yeah we got the tools and then text I have more work um okay so let's go ahead and just show a couple examples here so I actually just did one and I'll just show you what

My prompt was um I believe I could just go okay so basically what I did is I said I want you to write some python code to download this video on YouTube and then I just gave it actually um a link to this video which is where is it um working directory so if you check your working directory by the way so just to quickly explain this any code that's executed within the docker file uh which is in like the or

The docker container which is like a Linux system um instead of you having to like you know go and like FTP and transfer that from one computer to your computer if you want like certain files or like videos or whatever the case may be from what the agent Z was executing it actually just automatically puts it into the working directory so um yeah it will only put like that stuff in the working directory and then you can easily just access it

On your computer okay so I downloaded this video Lex Freeman uh Elon Musk Etc so I'm going to download a different video and just so you know um sometimes you you got to correct it because when I ran this initially you can see like different errors and stuff and it will try to correct itself um and essentially like for this example it was trying to use a different Library um like I I can't find exactly which one it was I was

Trying to use multiple different libraries and basically one the cool thing about this is like if you you can see it thinking and and whatnot and like doing different things so if you want to stop it like if you realize it's going down the wrong path or the wrong whatever you can stop it and say hey use this so I was trying to download the YouTube um video with different uh libraries and I said hey use um I like I stopped

It by pressing any key when it's doing it so if you press any key it will stop and I think I said so I just said use uh YT DLP to download it and then it worked okay but uh instead of downloading this video I'm going to just select a different video um they will pick this Andy Elliot video cuz it's uh 9 minutes so let's go here delete this paste this in okay so the user has provided me a video

To download using python I'll write the code so luckily it's still using the correct uh library now I don't know why it's getting this log encoding coding error continues to block the execution of the Python script it should allow the video to download without encountering issues so yeah sometimes like it's not like it it did download the video here and it worked perfectly but um I guess it was getting some sort of errors I'm not going to try to like even

Worry about debugging that I was seeing what the issue was right now just because it still worked but basically just because it was I guess getting these Z it was still talking to itself trying to fix it I believe uh continues to block the command in the terminal this issue is likely due to the terminal default terminals default en coding settings it will attempt to run the YouTube uh DLP command using a different method to avoid encoding issues okay so it's

Talking about the encoding anyways so yeah you get kind of the point now let's go ahead and say hey generate me 10 let's go five um SVG images of different animals and five uh short songs telling stories about each animal use five different agents for this each one gets a different animal okay so let's just see user as requested blah blah blah I will delegate this task to five separate subordinate agents each responsible for one animal I need to select five

Different animals for this task and provide clear instructions for each so call subordinate you are a writer task with creating a short song about a lion this should be short uh engaging and suitable for children telling a story about the Lion's Adventure okay so that's and then Agent Zero using tool called subordinate so we got a agent one here hey let me just make sure it's not like spinning through so now okay so let's stop it cuz it looks like it's

Go this is like the one issue like now we're on agent 18 um let's see so okay so as you can see I finally kind of got it to see it's still going let's see so okay so now I'm going to tell the stop let's see okay so this is what I got for the SVG code it's pretty much like elephant to just says the word elephant um what flyfly so essentially um guys I haven't I didn't spend like that much

Time creating these prompts and whatnot I'm sure you can really fine-tune it to I'm going to be playing around with this more cuz um to to try to get the best optimal result as you can see it was kind of continuously running and I had to stop it multiple times and um you can see here I said I was like hey why why are you just continuous ly delegating to multiple agents like we're on agent 16 here and you aren't downloading

Any F txts or storing them and then it basically smartened up and was like okay I need to do that so I did uh save the butterfly svgs and the Butterfly txt kind of story SL song with colors bright and wings so light the butterfly dances in the warm sunlight so pretty pretty good for that in the ocean blue the dolphin leaps and plays singing songs of joy in the sun sunlet waves okay so pretty good poems um the svgs definitely

Could use some work like I could maybe say hey the svgs just are colors with the word of the animal in them I wanted svgs that actually resemble each animal like a picture please upate each SVG all right let's see how it does and of course Guys these this is like very basic stuff obviously like I like I would probably want okay so what are we let's just make sure we're not just going through tokens here uh which it looks like

We are okay what is going on so the user okay so it's doing that call subordinate token thing again um maybe it could be okay it could actually be okay I'm going to like I said I'm going to be playing around with this more um I I don't know if it's based on memory from the previous uh terminal okay guys so essentially I just wanted to kind of give an introduction to this framework it's newer framework um so it's something I'm

Excited about to stay up to date with I'm going to be doing uh videos on more Frameworks as well as 12 tutorials maybe more on Agent Zero as well if there's any other Frameworks you want me to cover let me know in the comments down below if you have used Agent Zero let me know some of the cool stuff you got to do if you are a fan of it if you have some critiques of it whatever the case may be

Let me know in the comments Down Below guys um but shout out to I believe his name is yon uh yeah I don't know yeah sorry if I got your name wrong but shout out to this gentleman who is the uh creator of this uh framework I know it's new so um yeah so shout out to that him he's doing a great job so far and I'm excited to see how continues building out other than that guys if you're new to

The channel we upload videos every single day on AI automation tools uh marketing business entrepreneurship Etc so uh make sure to smash that like button smash the Subscribe button to stay up to date with the daily uploads if you got some value here uh let me know what your thoughts are in the comments down below about all this you have any questions have any issues and solving it I'll uh do my best to help you and then also too guys if

You're new to the channel you haven't already joined our free stride Community Link for that will be in the description down below guys we have about 750 800 members in our free Discord free Facebook group all right so you can network with like-minded entrepreneurs developers and entrepreneur uh coder AI Enthusiast whatever the case may be as well as myself and other than that guys if you haven't already checked out my book client acquisition code link for that will be in the

Description down below too guys other than that I will see you in tomorrow's video keep hustling keep grinding and of course guys accelerate your stride take care

Latest from the blog

View all