[ clawifi for llamaindex ]
Web search and page reading for LlamaIndex
Install llama-index-tools-clawifi and a LlamaIndex agent can search the web and read pages and PDFs as Markdown, or only the passages that answer a question, with sources.
What Clawifi gives LlamaIndex#
ClawifiToolSpec turns Clawifi search and page reading into LlamaIndex tools that return Documents, with the URL, title and rank in metadata, so results flow into the rest of your pipeline.
- Search:
search_freesearches many engines as one and returns ranked results with their sources. - Read:
fetch_urlandscrape_urlread pages and PDFs as Markdown; with aquery,scrape_urlreturns only the passages that answer it. - Parse and discover:
extract_urlpulls structured fields from a page;map_sitelists a site’s URLs;start_crawlandget_crawlread several pages. - Jobs, history and monitors:
create_job,get_job,list_historyandlist_monitorsfor longer runs and scheduled checks. - Cost first:
estimateprices a call before it runs, and the account tools show your credits.
Set it up#
1. Install the package
llama-index-tools-clawifiis on PyPI (MIT); its source is ReARCLabs/clawifi-llamaindex. It uses thellama_index.tools.clawifinamespace. Install the LlamaIndex LLM package you use with it (here OpenAI).pip install -U llama-index-tools-clawifi llama-index-llms-openai2. Add a key, or try it without one
Set
CLAWIFI_API_KEYfrom clawifi.dev/signup; the Free plan includes 1,000 credits a month. Without a key the package uses the hosted server’s keyless trial: 12 calls a minute and 50 a day per address, at most 3 search results (Remote MCP).3. Give the tools to an agent
The tool spec has
searchandfetch, each with an async version. Replace the model with the one you use.import asyncio from llama_index.core.agent.workflow import FunctionAgent from llama_index.llms.openai import OpenAI from llama_index.tools.clawifi import ClawifiToolSpec async def main(): tools = ClawifiToolSpec(max_results=5).to_tool_list() agent = FunctionAgent(tools=tools, llm=OpenAI(model="your-model")) response = await agent.run("What changed in the latest MCP specification?") print(response) asyncio.run(main())
Sources for this setup: llama-index-tools-clawifi on GitHub · llama-index-tools-clawifi on PyPI · LlamaIndex contributing guide · Remote MCP. Clawifi works with LlamaIndex; it is not affiliated with its makers.
Reference: MCP tools lists every tool, the CLI checks a key and prints MCP config, and Rate limits and plans shows how many calls run at once on each plan.
Example prompts#
Search for the three newest papers on long-context retrieval and read each abstract.
Read https://docs.llamaindex.ai and return only the passages about agents.
Search the web for the latest MCP specification changes and summarise them with links.
Questions#
How do I use Clawifi in LlamaIndex?
Install llama-index-tools-clawifi, build ClawifiToolSpec(), call to_tool_list() and pass the tools to an agent such as FunctionAgent.
What do the tools return?
search returns one Document per result, with the snippet as text and url, title and rank in metadata. fetch returns the page or PDF as Markdown, or only the passages that answer query.
Is it in the llama_index repository?
No. LlamaIndex no longer takes new integration packages in its repository, so this one is published on its own on PyPI, in the usual llama_index.tools.* namespace.
What does it cost?
Each tool call is billed like the API route it runs: most cost 1 credit and a browser render 3. Cache hits, failures on Clawifi’s side and answers with nothing to read (a blocked page, a JavaScript shell, a 404) cost 0. The Free plan includes 1,000 credits a month. See Pricing.
Related comparisons: Clawifi vs Brave Search API · Clawifi vs Exa · Clawifi vs Tavily.
Other agents and frameworks#
Next: Integrations · Docs · Pricing