<Anchor label="CrewAI " target="_blank" href="https://www.crewai.com/">CrewAI </Anchor>is a framework for coordinating AI agents to tackle complex tasks together. In this guide, you’ll build a two-agent crew that creates a digest using Desearch’s search results. You’ll learn how to:
This guide sets up a CrewAI team that produces a daily Twitter news digest on any topic using Desearch’s Twitter tool.
Use pip to install the required packages for the project.
We create a <Anchor label="custom tool" target="_blank" href="https://docs.crewai.com/concepts/tools">custom tool</Anchor> using the crewAI <Anchor label="@tool decorator" target="_blank" href="https://docs.crewai.com/concepts/tools#utilizing-the-tool-decorator">@tool decorator</Anchor> . Inside it, we initialize the Desearch class from the <Anchor label="Desearch Python SDK" target="_blank" href="https://github.com/desearch-ai/desearch.py">Desearch Python SDK</Anchor>, send a query, and return the parsed results.
📘 Select Desearch Methods to Use
In this example, we’re only using the ai_search method from Desearch, so we connect that directly to our agent’s toolset.
Start by importing the necessary CrewAI modules.
Next, we create two agents and group them into a crew: one uses the Desearch tool to gather insights, and the other writes a digest based on those findings.
Now let’s assign <Anchor label="tasks" target="_blank" href="https://docs.crewai.com/concepts/Tasks/">tasks</Anchor> to each agent and bring everything together by creating the full crew.
Finally, we launch the crew by passing in a topic for them to research and write about.
As you can see, Desearch’s results added valuable context that enhanced the final output!
Output
Hi folks!
In the latest buzz, AI and robotics are hitting the headlines with some exciting developments! Sam Altman, the pioneering brains behind OpenAI, is dreaming big about humanoid robots, forecasting their arrival within 5–10 years. But don’t get too excited just yet; the engineering challenges of creating a human-like body remain a tough nut to crack! (Check it out here).
On the practical side of things, businesses are harnessing AI to supercharge their supply chains. One company recently reported a whopping 32% efficiency boost in just a week after deploying AI-driven models in their warehouses. Can you imagine robots darting around autonomously, optimizing inventory in real time? (Read more). And if that's not enough, firms like Hexagon Manufacturing have introduced groundbreaking platforms that revolutionize robotic motion and path planning—engineering magic in action! (More info here).
As if that wasn’t enough, we have #Mech, the first AI-powered superhumanoid robot, tackling tough tasks in demanding environments. From cooking pancakes with custom-designed tools to handling serious warehouse chores, the future of robotics looks super fun! Robots are not just for factories anymore; they’re on their way to becoming part of our daily routines (See for yourself, and here).
Catch you on the timeline!
ai_search_tool: The Desearch API allows you to perform AI-powered web searches, gathering relevant information from multiple sources, including web pages, research papers, and social media discussions.twitter_search_tool: The X Search API enables users to retrieve relevant links and tweets based on specified search queries without utilizing AI-driven models. It analyzes links from X posts that align with the provided search criteria.web_search_tool: This API allows users to search for any information on the web. This replicates a typical search engine experience, where users can search for any information they need.