Integrations

LlamaIndex

Installation

Install the integration package and configure your API key.

uv add llama-index-tools-quercle
View repository

Available tools

All five Quercle endpoints are exposed as tools through this integration.

ToolEndpointDescription
QuercleToolSpec.fetchFetchFetch a URL and return an AI-synthesized answer based on page content and your prompt.
QuercleToolSpec.searchSearchSearch the web and return an AI-synthesized answer from the retrieved results.
QuercleToolSpec.raw_fetchRaw FetchFetch a URL and return raw markdown or HTML.
QuercleToolSpec.raw_searchRaw SearchRun web search and return raw results.
QuercleToolSpec.extractExtractFetch a URL and return chunks relevant to a query.

Endpoint examples

Use the same endpoint methods directly through this integration.

from llama_index.tools.quercle import QuercleToolSpec

quercle = QuercleToolSpec(api_key="qk_your_api_key")
result = quercle.fetch(url="https://example.com", prompt="Summarize the main points")
print(result)

Use in agents

Wire the integration into your agent orchestration loop.

import asyncio
from llama_index.tools.quercle import QuercleToolSpec
from llama_index.llms.openai import OpenAI
from llama_index.core.agent.workflow import FunctionAgent

async def main():
    spec = QuercleToolSpec()
    tools = spec.to_tool_list()  # all 5 tools: fetch, search, raw_fetch, raw_search, extract
    agent = FunctionAgent(
        tools=tools,
        llm=OpenAI(model="gpt-4o"),
        system_prompt="You are a helpful research assistant.",
    )
    response = await agent.run(user_msg="Find trusted sources about prompt-injection defense")
    print(response)

asyncio.run(main())