Integrations

Pydantic AI

Installation

Install the integration package and configure your API key.

uv add quercle-pydantic-ai
View repository

Available tools

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

ToolEndpointDescription
quercle_fetch_toolFetchFetch a URL and return an AI-synthesized answer based on page content and your prompt.
quercle_search_toolSearchSearch the web and return an AI-synthesized answer from the retrieved results.
quercle_raw_fetch_toolRaw FetchFetch a URL and return raw markdown or HTML.
quercle_raw_search_toolRaw SearchRun web search and return raw results.
quercle_extract_toolExtractFetch 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)