Tool

Access Real-Time Data and Recommendations

LlamaIndex tools connecting an agent to Dappier's real-time web search, stock data, and AI recommendations.

Works with openaidappierpolygon.io

83
Spark score
out of 100
Updated 2 days ago
Version 0.14.23
Models
gpt 4o

Add to Favorites

Why it matters

Empower your AI agents with real-time, rights-cleared data from trusted sources like web search, finance, and news. Get up-to-the-minute insights and AI-powered content recommendations to enhance agent capabilities.

Outcomes

What it gets done

01

Fetch real-time web search results, stock market data, and news.

02

Provide AI-powered content recommendations across various domains.

03

Integrate with Dappier API for enriched, prompt-ready data.

04

Enhance AI agent decision-making with verified and up-to-date information.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/li-tool-tools-dappier | bash

Overview

Dappier Tools

Dappier Tools connect a LlamaIndex agent to real-time, rights-cleared data through two tool specs: real-time web and stock search (via Polygon.io) and AI-powered content recommendations across sports, lifestyle, pet care, and local news verticals. Use it when an agent needs current, verified information rather than static training data. It requires both an OpenAI API key and a Dappier API key.

What it does

Dappier connects LLMs and agentic AI agents to real-time, rights-cleared data from trusted sources -- web search, finance, and news -- delivering enriched, prompt-ready data; the full range of available data models can be browsed in Dappier's marketplace at marketplace.dappier.com. This package provides two tool specs: DappierRealTimeSearchToolSpec, an API-driven tool for up-to-the-minute web search results, stock market data, news, weather, and travel deals; and DappierAIRecommendationsToolSpec, which provides AI-powered content recommendations across domains like sports news, lifestyle news, pet care (iHeartDogs and iHeartCats), compassionate living (GreenMonster), and local news (WISH-TV and 9&10 News). The Real-Time Search tool pulls stock prices, financial news, and trade data from Polygon.io, uses pre-defined AI models to refine and enhance search results for better accuracy and relevance, and requires a valid Dappier API key to access its search functionality at all. The AI Recommendations tool supports semantic, trending, and most-recent search modes, lets you target a specific reference domain for more context-aware results, and returns structured output with title, summary, author, publish date, source, and links.

When to use - and when NOT to

Use it when an agent needs current, verified information -- live web search, stock market data, or domain-specific content recommendations -- rather than relying on the LLM's static training data. It requires both an OpenAI API key and a Dappier API key (available with free credits), so it is not usable without setting up both accounts first.

Inputs and outputs

Install with:

pip install llama-index-tools-dappier

Set OPENAI_API_KEY and DAPPIER_API_KEY as environment variables -- the OpenAI key comes from your OpenAI organization's API-keys settings page, and the Dappier key comes from your Dappier profile's API-keys page, which starts you off with free credits -- then attach the tool to an agent:

from llama_index.tools.dappier import (
    DappierRealTimeSearchToolSpec,
)
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

dappier_tool = DappierRealTimeSearchToolSpec()
agent = FunctionAgent(
    tools=dappier_tool.to_tool_list(),
    llm=OpenAI(model="gpt-4o"),
)

await agent.run(
    "How is the weather in Boston today ? Create a detailed analysis in markdown format."
)

The Real-Time Search spec exposes search_real_time_data (real-time web search for news, weather, travel deals, and more) and search_stock_market_data (real-time stock prices, financial news, and trade updates with AI-powered insights).

Who it's for

Developers building agents that need live, rights-cleared data -- search, finance, or curated recommendations across sports, lifestyle, pet care, and local news -- instead of static or hallucinated information, and who are willing to browse Dappier's marketplace and set up OpenAI and Dappier API keys.

Source README

Dappier Tools

Dappier is a platform that connects LLMs and Agentic AI agents to real-time, rights-cleared data from trusted sources, including web search, finance, and news. By providing enriched, prompt-ready data, Dappier empowers AI with verified and up-to-date information for a wide range of applications. Explore a wide range of data models in our marketplace at marketplace.dappier.com.

Overview

This package provides two tool specs:

  • DappierRealTimeSearchToolSpec: A powerful API-driven tool designed to fetch up-to-the-minute information from various sources, including real-time web search results, stock market data, news, weather, travel deals and much more.

  • DappierAIRecommendationsToolSpec: Provides AI-powered content recommendations across a range of domains including sports news, lifestyle news, pet care content from iHeartDogs and iHeartCats, compassionate living from GreenMonster, and local news from WISH-TV and 9&10 News.

Key Features

Real Time Search Tool

  • Real-Time Web Search: Fetches the latest news, weather updates, travel deals, and other relevant web content through AI-powered search.

  • Stock Market Insights: Retrieves real-time stock prices, financial news, and trade data from Polygon.io, enriched with AI-driven insights.

  • AI-Powered Queries: Uses pre-defined AI models to refine and enhance search results for better accuracy and relevance.

  • Seamless Integration: Works with the Dappier API, requiring a valid API key to access search functionalities.

AI Recommendations Tool

  • Domain-specific recommendations: Tailors AI-powered content suggestions across verticals like sports, lifestyle, pet care and news.

  • Smart search algorithms: Supports modes like semantic, trending, and most recent to deliver the most relevant and timely results.

  • Reference domain targeting: Lets you prioritize results from a specific site or domain for more context-aware recommendations.

  • Readable, structured output: Returns responses with clear formatting, including title, summary, author, publish date, source, and links.

Installation

pip install llama-index-tools-dappier

Setup

You'll need to set up your API keys for OpenAI and Dappier.

You can go to here to get API Key from Open AI.

os.environ["OPENAI_API_KEY"] = "openai_api_key"

You can go to here to get API Key from Dappier with free credits.

os.environ["DAPPIER_API_KEY"] = "dappier_api_key"

Usage

Real Time Search Tool

This tool has a more extensive example usage documented in a Jupyter notebook here

Here's an example usage of the DappierRealTimeSearchToolSpec.

from llama_index.tools.dappier import (
    DappierRealTimeSearchToolSpec,
)
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

dappier_tool = DappierRealTimeSearchToolSpec()
agent = FunctionAgent(
    tools=dappier_tool.to_tool_list(),
    llm=OpenAI(model="gpt-4o"),
)

await agent.run(
    "How is the weather in Boston today ? Create a detailed analysis in markdown format."
)

The tools available in are:

  • search_real_time_data: A tool that performs a real-time web search to retrieve the latest information, including news, weather, travel deals, and more.
  • search_stock_market_data: A tool that fetches real-time stock market data, including stock prices, financial news, and trade updates, with AI-powered insights.

AI Recommendations Tool

This tool has a more extensive example usage documented in a Jupyter notebook [here](https://github.com/run-llama/llama_index/blob/main/llama-index-inte

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.