Installation
Install the integration package and configure your API key.
uv add quercle-pydantic-aiAvailable tools
All five Quercle endpoints are exposed as tools through this integration.
| Tool | Endpoint | Description |
|---|---|---|
quercle_fetch_tool | Fetch | Fetch a URL and return an AI-synthesized answer based on page content and your prompt. |
quercle_search_tool | Search | Search the web and return an AI-synthesized answer from the retrieved results. |
quercle_raw_fetch_tool | Raw Fetch | Fetch a URL and return raw markdown or HTML. |
quercle_raw_search_tool | Raw Search | Run web search and return raw results. |
quercle_extract_tool | Extract | Fetch a URL and return chunks relevant to a query. |
Endpoint examples
Use the same endpoint methods directly through this integration.
from pydantic_ai import Agent
from quercle_pydantic_ai import quercle_tools
agent = Agent("openai:gpt-4o", tools=quercle_tools(api_key="qk_your_api_key"))
result = agent.run_sync("Fetch https://example.com and Summarize the main points")
print(result.output)Use in agents
Wire the integration into your agent orchestration loop.
from pydantic_ai import Agent
from quercle_pydantic_ai import quercle_tools
# quercle_tools() returns all 5 tools: fetch, search, raw_fetch, raw_search, extract
agent = Agent("openai:gpt-4o", tools=quercle_tools(api_key="qk_your_api_key"))
result = agent.run_sync("Summarize the latest MCP security best practices")
print(result.output)