A Hub & Spoke tool selection engine for AI agents with Pinecone vector store
Project description
Tool Hub 🎯
A "Hub & Spoke" tool selection engine for AI agents. Combines semantic search with graph-based expansion to intelligently select tools—including dependencies you didn't know you needed.
Features
- 🧠 Smart Ingestion: Enriches tools with LLM-generated metadata (use cases, dependencies, neighbors)
- 🔍 Hybrid Retrieval: Vector search (Hub) + graph expansion (Spoke) for complete toolkits
- ☁️ Pinecone Backend: Cloud-native vector store with namespace isolation for integrations
- ⚡ Async-First: Fully async API for high-performance tool queries
Installation
pip install -e .
pip install -e ".[dev]" # For development dependencies
Quick Start
import os
from tool_hub import ToolHub
# Initialize ToolHub
hub = ToolHub(
openai_api_key=os.getenv("OPENAI_API_KEY"),
pinecone_index_name=os.getenv("PINECONE_INDEX_NAME"),
pinecone_api_key=os.getenv("PINECONE_API_KEY")
)
# Ingest tools (one-time, per integration)
await hub.ingest(
tools=tools, # List of OpenAI-format tools
integration_name="github", # Namespace for this integration
max_workers=10
)
# Query tools
results = await hub.query(
query="list GitHub repositories",
integration_name=["github"], # Optional: filter by integration(s)
top_k=5
)
API Reference
Initialization:
ToolHub(
openai_api_key: str, # Required
pinecone_index_name: str, # Required
pinecone_api_key: str, # Required
llm_model: str = "gpt-5-mini",
embedding_model: str = "text-embedding-3-small",
embedding_dimensions: Optional[int] = None
)
Methods:
async ingest(tools, integration_name, max_workers=10)- Enrich and index tools to Pineconeasync query(query, integration_name=None, top_k=3)- Query tools using semantic search
Examples
See examples/precompute_pinecone_index.py for complete Pinecone indexing example.
Environment Variables
OPENAI_API_KEY=your_key
PINECONE_API_KEY=your_key
PINECONE_INDEX_NAME=your_index
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seer_tool_hub-0.0.3.tar.gz.
File metadata
- Download URL: seer_tool_hub-0.0.3.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
501c9dbca5b4e63104f74da636d99a869d50ec79b8fec5143544a041c6e58bb7
|
|
| MD5 |
1934d22f707c5a41f67a2d218b9d7ada
|
|
| BLAKE2b-256 |
766799cd65635d77f64da33a3bb2f282e70fe25048a6e6c6bdfe0a1d85a6b5c0
|
File details
Details for the file seer_tool_hub-0.0.3-py3-none-any.whl.
File metadata
- Download URL: seer_tool_hub-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203410274bd2dc04c8b258ec4f70ffd7e2125fcf3dee2af9cd5257a6ea4a3383
|
|
| MD5 |
85b05554dbb5c3189e28be510e3b2d86
|
|
| BLAKE2b-256 |
a49f69d4e399bd8c670e394b67507934294a605893f9095af919850ae478bca6
|