LlamaIndex Tools Integration: Valyu
This tool connects to Valyu and its Exchange Platform to easily enable your agent to search and get content from programmatically licensed proprietary content and the web using Valyu's deep search API.
To begin, you need to obtain an API key on the Valyu developer dashboard. You can also use the SDK without an API key by setting the VALYU_API_KEY environment variable.
Usage
Here's an example usage of the ValyuToolSpec.
# %pip install llama-index llama-index-core llama-index-tools-valyu
from llama_index.tools.valyu import ValyuToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
import os
valyu_tool = ValyuToolSpec(
api_key=os.environ["VALYU_API_KEY"],
max_price=100, # default is 100
)
agent = FunctionAgent(
tools=valyu_tool.to_tool_list(),
llm=OpenAI(model="gpt-4.1"),
)
print(
await agent.run(
"What are the implications of using different volatility calculation methods (EWMA vs. GARCH) in Value at Risk (VaR) modeling for fixed income portfolios?"
)
)
# You can also search directly with the new parameters
results = valyu_tool.search(
query="artificial intelligence trends 2024",
included_sources=[
"arxiv.org",
"nature.com",
], # Only search academic sources
response_length="medium", # 50k characters per result
max_num_results=3,
relevance_threshold=0.5,
)
search: Search and retrieve relevant content from proprietary and public sources using Valyu's deep search. Supports filtering by:
- Search type ("all", "proprietary", or "web")
- Relevance threshold
- Date ranges (start_date, end_date)
- Source filtering (included_sources, excluded_sources)
- Response length (integer for character count or preset values: "short" 25k, "medium" 50k, "large" 100k, "max" full content)
This loader is designed to be used as a way to load data as a Tool in a Agent.
Metadata
Release files for llama-index-tools-valyu 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_tools_valyu-0.7.0.tar.gz | 7.1 kB | Without provenance | Details for llama_index_tools_valyu-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_tools_valyu-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_tools_valyu-0.7.0-py3-none-any.whl |
Total release size: 15.2 kB
Release files / llama_index_tools_valyu-0.7.0.tar.gz
| Download URL | llama_index_tools_valyu-0.7.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d951ae08a322c818aa01905c554dec18991dfb6b422f6d42e2c75d134483a748
|
|
BLAKE2b-256 checksum How to use checksums |
2d0e6fa27f33bee4259be6971cbc10c59d20088a347483ebb04e31ff9284b057
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_tools_valyu-0.7.0-py3-none-any.whl
| Download URL | llama_index_tools_valyu-0.7.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
753b2a2e52d49dbd95def262d567715b3542d1fe6f566fbbb4d45187d7daf665
|
|
BLAKE2b-256 checksum How to use checksums |
bce35468ba9c7774f2fdce7f51007e42c08e9bc5be18183f7f2884834a112d6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-tools-valyu 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.