Metadata-Version: 2.4
Name: llama-index-tools-querit
Version: 0.1.0
Summary: llama-index tools querit integration
Author-email: Your Name <you@example.com>
License: MIT
Project-URL: Homepage, https://querit.ai
Project-URL: Repository, https://github.com/run-llama/llama_index
Keywords: llama-index,search,querit,tool
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: llama-index-core>=0.13.0
Requires-Dist: querit>=0.1.4
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"

# Querit Search Tool

This tool connects to the [Querit Search API](https://querit.ai) and allows an Agent to perform web searches with optional filters for language, geography, site whitelist/blacklist, and time range.

## Installation

```bash
pip install llama-index-tools-querit
```

## Usage

```python
from llama_index.tools.querit import QueritToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = QueritToolSpec(api_key="YOUR_QUERIT_API_KEY")

agent = FunctionAgent(
    tools=tool_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("Search for the latest news about AI in 2025"))
```

## Available Tools

- `search`: Basic web search by query text.
- `search_with_language`: Search filtered by language (e.g. `"english"`, `"japanese"`).
- `search_with_geo`: Search restricted to a specific country (e.g. `"united states"`, `"japan"`).
- `search_with_site_filter`: Search with domain whitelist / blacklist.
- `search_with_time_range`: Search filtered to a time range (e.g. `"d1"` past day, `"m1"` past month, `"y1"` past year).

## API Key

Obtain your Querit API key from the [Querit platform](https://querit.ai).

## Parameters

`QueritToolSpec(api_key, base_url, timeout)`

| Parameter | Type | Default | Description |
|---|---|---|---|
| `api_key` | `str` | required | Querit API key |
| `base_url` | `str` | `"https://api.querit.ai"` | API base URL |
| `timeout` | `float` | `60.0` | Request timeout in seconds |

This loader is designed to be used as a way to load data as a Tool in an Agent.
