Discover how we transform IT and strengthen the security of the top companies in the market.
Integrated security to detect, prevent, and respond to threats.
Continuity and recovery to keep your business always running.
Compliance and security culture to elevate your company’s cyber maturity.
Take control of your company’s IT with integrated and secure management tools.
Hybrid and integrated infrastructure to support the evolution of your business.
Use hybrid cloud with the security of having the support of one of the most important players in the market.
Specialized services to operate and evolve your IT efficiently.
Provide your company with Private Network solutions that only an end-to-end integrator can offer.
Outsource efficiently, maintaining control over everything your company needs.
Handle payment and invoice issuance with credibility, efficiency, and data security.
Articles, events, and information to go beyond and dive deep into each technology. Be inspired to transform your company.
Learn about technological innovations and how they can benefit your company.
We know that generative AIs are a market trend. They are already helping various fields and professionals execute their projects. However, the use of AI is not restricted only to the widely publicized prompt engineering. With the help of some tools, we can customize the use of AI to meet more demanding requirements that necessitate a higher level of complexity.
In this article, I would like to introduce CrewAI, an open-source tool that enables the creation of agents capable of using tools and interacting with other created agents. This allows for a broad use of LLMs. In addition to simplifying the creation and implementation of automated workflows, CrewAI enables the use of any LLM and cloud platform.
You might wonder why you should use CrewAI instead of directly using AI models like ChatGPT, which are already widely available on the market. The reason is clear: CrewAI allows for the simultaneous use of multiple agents. You can create an agent for each LLM, as demonstrated in the workflow available on the CrewAI website.
Figura 1 – Fluxo dos agentes
Still, there is a problem. Let’s say you ask the agents for research: they will execute the task using ready-made or customized tools. Each will return an answer, and you will have to read and weigh all of them, which can increase your workload and reduce your productivity. To solve this, CrewAI allows for the creation of a third agent that synthesizes the answers. Another advantage of CrewAI is the possibility of creating a hierarchy, similar to a company structure, where LLM agents can review, assess quality, and perform other assigned tasks.
To conclude, let’s create an agent that uses a web scraping tool to collect information from the internet and generate a summary of the content found. Another agent will be developed to rewrite the information in simple and interesting language. Finally, a last agent will be responsible for the translation, since the data will be in English and we will need it in Portuguese.
The code below is an example of an agent created along with the necessary libraries. It is important to have an API key to access an LLM. In this example, we will use GEMINI.
After creating the agent, we need to define the tool it will use to search for information on the internet through web scraping. In this case, we will use a tool already integrated into CrewAI, Serper.
Then, we delegate the tasks that each agent will execute using the code below.
With everything ready, our agents are created, with their tasks defined and tools associated. Now, we just need to create one more block of code to give the kickoff.
And that’s it! Just run the code, with the last file created being our main. After some time observing the interaction of the agents in the command prompt, you will receive the text formatted in Markdown.
Despite the simple example, it is incredible what can be done using CrewAI. It is also possible to implement other text editing tools as output and even create customized tools using the CrewAI documentation.
Fonts
Project repository
Our team of experts is ready to support your company with solutions that enhance performance and security.