CrewAI Agents with Desearch
<Anchor label="CrewAI " target="_blank" href="https://www.crewai.com/">CrewAI </Anchor>coordinates multiple AI agents on a shared task. This page builds a two-agent crew that writes a Twitter news digest from Desearch search results.
CrewAI Example: Twitter News Digest
1. Install Required Packages
2. Custom Tool: Desearch for Twitter
Create a <Anchor label="custom tool" target="_blank" href="https://docs.crewai.com/concepts/tools">custom tool</Anchor> with the CrewAI <Anchor label="@tool decorator" target="_blank" href="https://docs.crewai.com/concepts/tools#utilizing-the-tool-decorator">@tool decorator</Anchor>. Inside it, 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 results.
📘 Select Desearch Methods to Use
This example uses only the ai_search method from Desearch, connected directly to the agent's toolset.
3. Create Agents
Import the CrewAI modules.
Create two agents: one gathers tweets with the Desearch tool, the other writes the digest.
4. Create Tasks
Assign <Anchor label="tasks" target="_blank" href="https://docs.crewai.com/concepts/Tasks/">tasks</Anchor> to each agent, then create the crew.
5. Run the Crew
Pass in a topic:
6. 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!
Desearch Tool Functions
ai_search_tool: AI-powered search across multiple sources, including web pages, research papers, and social media.twitter_search_tool: retrieves links and tweets matching a search query, without AI models.web_search_tool: plain web search, like a normal search engine.