LinkupSearchTool
Description
TheLinkupSearchTool
provides the ability to query the Linkup API for contextual information and retrieve structured results. This tool is ideal for enriching workflows with up-to-date and reliable information from Linkup, allowing agents to access relevant data during their tasks.
Installation
To use this tool, you need to install the Linkup SDK:Steps to Get Started
To effectively use theLinkupSearchTool
, follow these steps:
- API Key: Obtain a Linkup API key.
- Environment Setup: Set up your environment with the API key.
- Install SDK: Install the Linkup SDK using the command above.
Example
The following example demonstrates how to initialize the tool and use it in an agent:Code
Parameters
TheLinkupSearchTool
accepts the following parameters:
Constructor Parameters
- api_key: Required. Your Linkup API key.
Run Parameters
- query: Required. The search term or phrase.
- depth: Optional. The search depth. Default is “standard”.
- output_type: Optional. The type of output. Default is “searchResults”.
Advanced Usage
You can customize the search parameters for more specific results:Code
Return Format
The tool returns results in the following format:Error Handling
The tool gracefully handles API errors and provides structured feedback. If the API request fails, the tool will return a dictionary withsuccess: false
and an error message.
Conclusion
TheLinkupSearchTool
provides a seamless way to integrate Linkup’s contextual information retrieval capabilities into your CrewAI agents. By leveraging this tool, agents can access relevant and up-to-date information to enhance their decision-making and task execution.