Python SDK for BrowseAI Dev — reliable research infrastructure for AI agents
Project description
browseai
Reliable research infrastructure for AI agents. Python SDK for BrowseAI Dev — the research layer for LangChain, CrewAI, and custom agent pipelines.
Install
pip install browseai
Quick Start
from browseai import BrowseAI
client = BrowseAI(api_key="bai_xxx")
# Research with citations
result = client.ask("What is quantum computing?")
print(result.answer)
print(f"Confidence: {result.confidence:.0%}")
for source in result.sources:
print(f" - {source.title}: {source.url}")
# Thorough mode — auto-retries if confidence < 60%
deep = client.ask("What is quantum computing?", depth="thorough")
# Web search
results = client.search("latest AI news", limit=5)
# Page extraction
page = client.open("https://example.com")
# Structured extraction from a URL
extract = client.extract("https://example.com", query="pricing info")
# Compare raw LLM vs evidence-backed
compare = client.compare("Is Python faster than Rust?")
Async
from browseai import AsyncBrowseAI
async with AsyncBrowseAI(api_key="bai_xxx") as client:
result = await client.ask("What is quantum computing?")
# Thorough mode works with async too
deep = await client.ask("What is quantum computing?", depth="thorough")
BYOK (Bring Your Own Keys)
client = BrowseAI(tavily_key="tvly-xxx", openrouter_key="sk-or-xxx")
LangChain
pip install browseai[langchain]
from browseai.integrations.langchain import BrowseAIAskTool
tools = [BrowseAIAskTool(api_key="bai_xxx")]
CrewAI
pip install browseai[crewai]
from browseai.integrations.crewai import BrowseAITool
researcher = Agent(tools=[BrowseAITool(api_key="bai_xxx")])
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
browseai-0.1.2.tar.gz
(7.4 kB
view details)
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 browseai-0.1.2.tar.gz.
File metadata
- Download URL: browseai-0.1.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af0a3ed2962b613b1ddc7e96405455d1ddf837ddfd7c509c3170e88f348b61d1
|
|
| MD5 |
5431e4442b814177d1ae21eb6977f0ab
|
|
| BLAKE2b-256 |
256964095860ec6fe66fdd3bcd9d29ddc1b17afa369ed05f5141cb4bfa644990
|
File details
Details for the file browseai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: browseai-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6828062a740416ee4af4ed950364cea16d31271b1682c002b7ce135e14f38e44
|
|
| MD5 |
d62d99c23e5958ac96fc09e95ce3f6c1
|
|
| BLAKE2b-256 |
fe99e7567929948e6b90ce6cb8d795a3d309bd4cf8cfce19ef2105409e7fb89e
|