Skip to main content

LlamaIndex Tools Integration: Blopus

Blopus is a web search and fetch API for LLMs and agents, running on its own crawler and index rather than reselling another search engine.

This tool spec gives an agent two functions: blopus_search for ranked results with snippets, and blopus_fetch for the full cleaned text of the pages worth reading.

pip install llama-index-tools-blopus

Create a key at blopus.ai/app:

export BLOPUS_API_KEY="blp_live_..."

Usage

from llama_index.tools.blopus import BlopusToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = BlopusToolSpec()

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

print(await agent.run("What changed in postgres logical replication this month?"))

Calling the functions directly:

tool_spec.blopus_search("postgres logical replication", freshness="pw")
tool_spec.blopus_fetch(["https://example.com/article"])

Configuration

Defaults can be set once on the spec and overridden per call:

BlopusToolSpec(
    count=20,              # results per search; billed in blocks of 10, so this rounds up
    freshness="pm",        # pd, pw, pm, p3m, p1y, all
    news_only=True,        # newsroom sources only; faster, not slower
    include_content=True,  # cleaned page text inline, avoiding a second fetch
)

Per-search filters: include_domains, exclude_domains, language.

Notes

One topic per search. A query joining several subjects ("economy, sports, Iran") matches nothing, because no single document is about all of them. Issue one search per topic. The tool description tells the model this, and the API returns a note when it detects the mistake, which this package passes straight through.

Billing is in blocks of ten. One search returns up to 10 results for 1 credit. If your remaining quota cannot cover a request, the API serves a partial page rather than refusing and sets quota_clamped, so an agent can tell "my quota cut this short" apart from "that is all that exists".

Fetch is batched. Pass up to 50 URLs in one call. URLs that were not found come back in failed_urls rather than raising, so one bad URL does not lose the rest of the batch.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_blopus-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_tools_blopus-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_blopus-0.1.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_blopus-0.1.1.tar.gz
Algorithm Hash digest
SHA256 54f1b3d02174966defe9e136d7404097bbd2d66b60147046f25cbb099046cc20
MD5 9e195aaa6ce0c433705a930168aa7c39
BLAKE2b-256 6748e5c6c9afd8338e5e1a5463d6f739a961960027ba31af52eaf246946e363b

See more details on using hashes here.

File details

Details for the file llama_index_tools_blopus-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_blopus-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 069fbf45f28a2765feae9f8bab787a6a7177fcfa2d342c16752576921f2e645b
MD5 ebb4cc830c5725366d76a761c8d071c4
BLAKE2b-256 a71e735b382aa050fbebe6f1a88f8accd24365d0f843c558bdbac724d02b17f2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page