LlamaIndex
The llama-index-tools-airweave package provides an AirweaveToolSpec that gives your LlamaIndex agents access to Airweave’s semantic search capabilities.
Prerequisites
Before you start you’ll need:
- A collection with data: at least one source connection must have completed its initial sync. See the Quickstart if you need to set this up.
- An API key: Create one in the Airweave dashboard under API Keys.
Installation
Quick Start
Available Tools
The AirweaveToolSpec provides five tools that your agent can use:
search_collection
Simple search in a collection with default settings (most common use case).
advanced_search_collection
Advanced search with full control over retrieval parameters.
Returns a dictionary with documents list and optional answer field.
search_and_generate_answer
Convenience method that searches and returns a direct natural language answer (RAG-style).
list_collections
List all collections in your organization.
get_collection_info
Get detailed information about a specific collection.
Advanced Examples
Direct Tool Usage
You can use the tools directly without an agent:
Advanced Search with All Options
RAG-Style Direct Answers
Using Different Retrieval Strategies
Temporal Relevance
Weight recent documents higher in results:
Custom Base URL
If you’re self-hosting Airweave: