Skip to main content

Overview

The llama-index-tools-nimble package brings Nimble web search to LlamaIndex. It provides a single tool spec, NimbleToolSpec, that lets LlamaIndex agents and workflows retrieve current information from the web. Search results return as LlamaIndex Document objects. Each document carries the page title and source URL, so answers stay citable and ready for RAG pipelines.

Key Features

  • Real-time web search — one method, search(), returns fresh results from across the web
  • Citable output — every Document includes the title and source URL in its metadata
  • Agent-readyto_tool_list() plugs directly into any LlamaIndex agent or workflow
  • RAG-friendlyDocument output drops straight into LlamaIndex indexes and query engines

Quick Start

Installation

Setup

Get your API key from Nimble’s dashboard (free trial available). Set it as an environment variable:
Or pass it directly when constructing the tool spec:
Call search() on the tool spec to get results back as Document objects. Use max_results to cap how many results come back (default is 6):
The loop above prints the title and source URL for each result:

Build an AI Agent

Pass the tool spec to a LlamaIndex FunctionAgent with to_tool_list(). The agent can then search the web to answer questions with current facts:

Citable Document Output

Every result is a LlamaIndex Document. The title and source URL are embedded in the document text, so the agent can read and cite the source even though it never sees metadata. Each document’s text has this shape:
The title and URL are also available as metadata fields for programmatic use: Use these fields to build citations or deduplicate sources:

Use Results in a LlamaIndex Index

Because search() returns Document objects, results drop straight into a LlamaIndex index for retrieval-augmented generation:

Additional Resources