haive-tools
Tool implementations for Haive agents — search, calculators, APIs, code execution, and integrations.
A curated collection of LangChain-compatible tools, ready to drop into any Haive agent. Each tool is wrapped, tested, and exposed via a consistent interface. Use them with ReactAgent, MultiAgent, MemoryAgent, or any agent that takes tools.
Why haive-tools?
LangChain has hundreds of tools but they're scattered across packages, have inconsistent interfaces, and many require fiddly setup. haive-tools curates the most useful ones, fixes their quirks, and packages them as a coherent toolkit.
Tool categories
| Category | Tools | What they do |
|---|---|---|
| 🔍 Search | Tavily, Google Search, DuckDuckGo, SerpAPI, Brave Search | Web search with structured results |
| 🧮 Calculators | Python REPL, math expressions, Wolfram Alpha | Calculation and symbolic math |
| 🌐 Web | Fetch URL, scrape HTML, parse JSON | HTTP requests and web scraping |
| 🐍 Code | Python REPL (sandboxed), shell commands | Code execution |
| 📊 Data | CSV/JSON parsers, structured extractors | Data processing |
| 🎮 Fun APIs | Pokémon (PokéBase), Pokémon TCG | API wrappers for testing |
| 📖 Documents | PDF reader, docx parser, web fetcher | Document loading |
| 🗄️ Databases | SQL execution, schema inspection | Database tools |
Installation
pip install haive-tools
# For Tavily search:
pip install haive-tools[tavily]
# For all extras:
pip install haive-tools[all]
Quick Start
Web Search with Tavily
from haive.tools.search import tavily_search_tool
from haive.agents.react.agent import ReactAgent
from haive.core.engine.aug_llm import AugLLMConfig
import os
# Set TAVILY_API_KEY in env
os.environ["TAVILY_API_KEY"] = "tvly-..."
agent = ReactAgent(
name="researcher",
engine=AugLLMConfig(
tools=[tavily_search_tool],
system_message="Use the search tool to find information.",
),
max_iterations=5,
)
result = agent.run("What are the latest advances in quantum computing in 2025?")
Calculator + Web Search Combo
from haive.tools.search import tavily_search_tool
from haive.tools.calculators import python_calculator
from haive.agents.react.agent import ReactAgent
from haive.core.engine.aug_llm import AugLLMConfig
agent = ReactAgent(
name="research_assistant",
engine=AugLLMConfig(
tools=[tavily_search_tool, python_calculator],
system_message="Use search for facts and calculator for math.",
),
)
result = agent.run("What is the population of Tokyo divided by the area of Japan?")
# Agent: searches for both values, then calculates ratio
Custom Tool Composition
from langchain_core.tools import tool
from haive.tools.search import tavily_search_tool
from haive.tools.web import fetch_url
@tool
def get_weather(city: str) -> str:
"""Get current weather for a city."""
# ... your custom logic ...
return f"Sunny, 72°F in {city}"
agent = ReactAgent(
name="multi_tool",
engine=AugLLMConfig(tools=[
tavily_search_tool,
fetch_url,
get_weather,
]),
)
Tool Routing
All tools work with Haive's automatic tool routing system. You can mix:
- LangChain
BaseTool(from@tooldecorator) → routed tolangchain_tool - Pydantic models with
__call__→ routed topydantic_tool(stateful tools) - Plain callables → routed to
function
from pydantic import BaseModel
class StatefulSearchTool(BaseModel):
"""Search tool with configurable settings."""
api_key: str
max_results: int = 5
region: str = "us"
def __call__(self, query: str) -> str:
# Each instance has its own state
return f"Searching {self.region}: {query}"
# Two instances with different config
us_search = StatefulSearchTool(api_key="...", region="us")
eu_search = StatefulSearchTool(api_key="...", region="eu")
agent = ReactAgent(engine=AugLLMConfig(tools=[us_search, eu_search]))
Tool Reference
Search
tavily_search_tool— Tavily web search (5 results, news + general)google_search_tool— Google Custom Search APIduckduckgo_search_tool— Free DuckDuckGo searchbrave_search_tool— Brave Search APIserpapi_search_tool— SerpAPI for Google/Bing/etc.
Calculators
python_calculator— Sandboxed Python REPL for math expressionswolfram_alpha_tool— Symbolic math via Wolfram Alpha API
Web
fetch_url— HTTP GET with auto-decodingscrape_url— Scrape HTML with BeautifulSoupparse_json— Parse JSON responses
Code
python_repl— Sandboxed Python executionshell_command— Execute shell commands (with safety checks)
Documents
read_pdf— Extract text from PDF filesread_docx— Parse Word documentsweb_loader— Load and parse web pages
Documentation
📖 Full documentation: https://pr1m8.github.io/haive-tools/
Related Packages
| Package | Description |
|---|---|
| haive-core | Foundation: engines, graphs |
| haive-agents | Production agents |
| haive-mcp | Dynamic MCP server tools (1,960+) |
License
MIT © pr1m8
Metadata
Release files for haive-tools 1.0.1
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 |
|---|---|---|---|---|
| haive_tools-1.0.1.tar.gz | 101.9 kB | Without provenance | Details for haive_tools-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| haive_tools-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for haive_tools-1.0.1-py3-none-any.whl |
Total release size: 264.1 kB
Release files / haive_tools-1.0.1.tar.gz
| Download URL | haive_tools-1.0.1.tar.gz |
|---|---|
| Size | 101.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bb7fb45a2177789df4d33a6a740b48d64f2891f00439221ec3a2ddbbfd27aa7
|
|
BLAKE2b-256 checksum How to use checksums |
0a7d41a876a4b4ad64c771cb114fb59830a735e2729d334d29ec8526e79263b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / haive_tools-1.0.1-py3-none-any.whl
| Download URL | haive_tools-1.0.1-py3-none-any.whl |
|---|---|
| Size | 162.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33631bc5e3066b862bcdfee89b535cdeacf7ca4a1ad58723289272b7123bee30
|
|
BLAKE2b-256 checksum How to use checksums |
bea23712fbc8258fcfc9c285fb4e9378b8966bd0a87b7ce20e65b8c7e46925c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for haive-tools 1.0.1
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.