Now that we created the tool that would run Zap proxy, let's go ahead and create this cybersecurity
agent.
For that, I will create a Python file, name it as Web Security Vulnerability Scan agent.
In here I'm going to use the crew AI components and packages to run the agent task and the tool together.
So now I'm going to import crew base agent crew and task from the crew AI base package.
And then I'll also import from source tools.
I will import zap proxy.
So now what I'm going to do is I'm going to quickly go ahead and create a class.
This is going to do specifically pen testing.
So pen test agent and I'll annotate this as a crew base.
So now this is a pen test agent.
Crew agent.
Now what I'm going to do is I'm we'll have to import the two files that we created initially.
So for that I will go ahead and write the agent configs that we initially wrote.
It's a config and test agents.
And then here the task config is config and test tasks.
Now I will go ahead and write the agents.
For that I'll say agent.
I'll create a function that says pen test planner.
And then this will give us the agent.
That should be good enough.
And then what I'm going to do is return an object as agent type.
So config is one of the object that it needs.
Let me go ahead and use the existing code base and I'll walk you through it.
So here we have to import agent.
So for that let me go ahead and input the right agent class.
So this is our agent.
So now I will go ahead and define the task that we created earlier.
And I'll name this as Pen test security research task.
Right.
And this is this does very similar things like we did it earlier.
It annotates the method with the task.
And in here we are giving this task config as the name of the task that we wanted to use from this task
file, and this is the agent file.
So now coming to the final step where we will create the crew class or the crew agent.
So for that I am editing this method crew by the name at crew.
And then this is the method that will create the crew class with by passing all the agents, task and
processes that we want to run all of this sequentially, one after another.
And memory is true where we are passing memory from one call to another.
We'll use this memory extensively in our next video Agentic calls, but for now, I'll make this as
false and I will import process from the crew I package.
All good.
So now we have completed the entire Agentic flow.
Let's go ahead and execute this and learn how this thing works end to end by taking a deep dive into
it.
Thank you and I'll see you in the next video.