Skip to main content

Overview

Linkup can be integrate with Agno as a tool to provide real-time web search capabilities to your Agno AI agents.

Installation

1

Set Up API Key

  1. Get your Linkup API Key:

    Get your API key

    Create a Linkup account for free to get your API key.
  2. Set the API key in your environment:
    export LINKUP_API_KEY=your_api_key_here
    
2

Install Linkup SDK

  1. Install the Linkup SDK using pip:
    pip install linkup-sdk
    
3

Install Agno

  1. Install Agno using pip:
    pip install agno
    

Example Usage

The following agent will search the web for the latest news in French politics and print the response.
python
    from agno.agent import Agent
    from agno.tools.linkup import LinkupTools

    agent = Agent(tools=[LinkupTools()], show_tool_calls=True)
    agent.print_response("What's the latest news in French politics?", markdown=True)

Toolkit Functions

FunctionDescription
web_search_with_linkupSearches the web for a query using Linkup API. Takes a query string and optional depth/output_type parameters. Returns search results as a string.

Toolkit Parameters

ParameterTypeDefaultDescription
api_keyOptional[str]NoneAPI key for authentication. If not provided, will check LINKUP_API_KEY environment variable.
depthLiteral["standard", "deep"]"standard"Depth of the search. Use ‘standard’ for fast and affordable web search or ‘deep’ for comprehensive, in-depth web search.
output_typeLiteral["sourcedAnswer", "searchResults"]"searchResults"Type of output. ‘sourcedAnswer’ provides a comprehensive natural language answer to the query along with citations to the source material. ‘searchResults’ returns the raw search context data without synthesis.
You are now ready to use Linkup in Agno as a tool for your agents !
You can check the Agno documention for more information about agents and tools.
Facing issues? Reach out to our engineering team at support@linkup.so or via our Discord or book a 15 minutes call with a member of our technical team.
I