Installation
Install the integration package and configure your API key.
uv add langchain-quercleAvailable tools
All five Quercle endpoints are exposed as tools through this integration.
| Tool | Endpoint | Description |
|---|---|---|
QuercleFetchTool | Fetch | Fetch a URL and return an AI-synthesized answer based on page content and your prompt. |
QuercleSearchTool | Search | Search the web and return an AI-synthesized answer from the retrieved results. |
QuercleRawFetchTool | Raw Fetch | Fetch a URL and return raw markdown or HTML. |
QuercleRawSearchTool | Raw Search | Run web search and return raw results. |
QuercleExtractTool | Extract | Fetch a URL and return chunks relevant to a query. |
Endpoint examples
Use the same endpoint methods directly through this integration.
from quercle_langchain import QuercleFetchTool
tool = QuercleFetchTool(api_key="qk_your_api_key")
result = tool.invoke({"url": "https://example.com", "prompt": "Summarize the main points"})
print(result)Use in agents
Wire the integration into your agent orchestration loop.
from quercle_langchain import QuercleFetchTool, QuercleSearchTool, QuercleRawFetchTool, QuercleRawSearchTool, QuercleExtractTool
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
model = ChatOpenAI(model="gpt-4o")
tools = [
QuercleFetchTool(),
QuercleSearchTool(),
QuercleRawFetchTool(),
QuercleRawSearchTool(),
QuercleExtractTool(),
]
agent = create_react_agent(model, tools)
response = agent.invoke({
"messages": [{"role": "user", "content": "Find and compare three trusted sources about prompt-injection defense"}]
})
print(response["messages"][-1].content)