Before we start, let’s take a look at what we are building!
The application takes user queries, searches the web, and transforms them into a well-crafted news article, complete with citations!
Technology Stack:
LLM: Cohere ultra-fast βR 7B (can also be replaced with a large model you are familiar with)
Multi-agent architecture: CrewAI
The architecture diagram below illustrates some key components (Agent/Task/Tools) and how they interact!

Setting up the LLM and web search tools
Also, create a .env file for its corresponding API keys:

Define the Senior Research Analyst Agent
The web-search Agent takes user queries, then uses the Serper web-search tool to fetch results from the internet and integrates them.
Check this out π

Define the research_task
This is the research task we assign to the senior research analyst Agent, which includes a description and expected output.

Define the content_writer Agent
The role of the content_writer is to utilize the selected results and transform them into a polished, publishable news article.

Define the writing_task
All the details and expected output for the writing task are as follows:

Launch Crew
All done! β
Just assemble a team and get started! π

βR 7B is lightweight, fast, and suitable for enterprise agent RAG use cases.
This is a 7B model that you can also deploy locally! β¨
For more details, see:
http://cohere.com/blog/command-r7b
All code can be found here:
https://github.com/patchy631/ai-engineering-hub/tree/main/ai_news_generator
