CrewAI tools for Quercle web search and URL fetching
Project description
quercle-crewai
CrewAI tools for Quercle web search and URL fetching.
Installation
uv add quercle-crewai
Or with pip:
pip install quercle-crewai
Quick Start
from quercle_crewai import QuercleSearchTool, QuercleFetchTool
# Initialize tools (uses QUERCLE_API_KEY env var by default)
search = QuercleSearchTool()
fetch = QuercleFetchTool()
# Or with explicit API key
search = QuercleSearchTool(api_key="qk_...")
fetch = QuercleFetchTool(api_key="qk_...")
Standalone Tool Usage
Use the tools directly without any agent:
Search
from quercle_crewai import QuercleSearchTool
search = QuercleSearchTool()
# Basic search
result = search.run(query="What is TypeScript?")
print(result)
# With domain filtering
result = search.run(
query="machine learning tutorials",
allowed_domains=["*.edu", "*.org"],
blocked_domains=["ads.com"],
)
Fetch
from quercle_crewai import QuercleFetchTool
fetch = QuercleFetchTool()
result = fetch.run(
url="https://docs.python.org/3/whatsnew/3.12.html",
prompt="Summarize the key new features in bullet points",
)
print(result)
Usage with CrewAI Agents
Basic Agent Setup
from crewai import Agent, Task, Crew
from quercle_crewai import QuercleSearchTool, QuercleFetchTool
# Initialize tools
search_tool = QuercleSearchTool()
fetch_tool = QuercleFetchTool()
# Create an agent with Quercle tools
researcher = Agent(
role="Research Analyst",
goal="Find and analyze information from the web",
backstory="You are an expert researcher who finds accurate information.",
tools=[search_tool, fetch_tool],
verbose=True,
)
# Create a task
research_task = Task(
description="Research the latest features in Python 3.13 and summarize them.",
expected_output="A summary of Python 3.13 features with key highlights.",
agent=researcher,
)
# Run the crew
crew = Crew(
agents=[researcher],
tasks=[research_task],
verbose=True,
)
result = crew.kickoff()
print(result)
Multi-Agent Example
from crewai import Agent, Task, Crew
from quercle_crewai import QuercleSearchTool, QuercleFetchTool
# Tools
search_tool = QuercleSearchTool()
fetch_tool = QuercleFetchTool()
# Research agent - finds information
researcher = Agent(
role="Web Researcher",
goal="Find relevant information from the web",
backstory="Expert at finding and extracting information from web sources.",
tools=[search_tool, fetch_tool],
)
# Writer agent - synthesizes information
writer = Agent(
role="Content Writer",
goal="Write clear and engaging content based on research",
backstory="Skilled writer who creates well-structured content.",
)
# Tasks
research_task = Task(
description="Research the benefits and challenges of remote work in 2024.",
expected_output="Detailed research findings with sources.",
agent=researcher,
)
writing_task = Task(
description="Write a blog post based on the research findings.",
expected_output="A well-written blog post about remote work.",
agent=writer,
context=[research_task],
)
# Create and run crew
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, writing_task],
verbose=True,
)
result = crew.kickoff()
Configuration
Environment Variable
Set your API key as an environment variable:
export QUERCLE_API_KEY=qk_your_api_key_here
Tool Parameters
Both tools accept these optional parameters:
api_key: Your Quercle API key (falls back toQUERCLE_API_KEYenv var)timeout: Request timeout in seconds
tool = QuercleSearchTool(
api_key="qk_...",
timeout=60.0,
)
Tool Descriptions
QuercleSearchTool
- Name:
quercle_search - Description: Search the web and get AI-synthesized answers with citations
- Arguments:
query(required): The search queryallowed_domains(optional): List of domains to include (e.g.,["*.edu"])blocked_domains(optional): List of domains to exclude
QuercleFetchTool
- Name:
quercle_fetch - Description: Fetch a URL and analyze its content with AI
- Arguments:
url(required): The URL to fetchprompt(required): Instructions for content analysis
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quercle_crewai-0.1.0.tar.gz.
File metadata
- Download URL: quercle_crewai-0.1.0.tar.gz
- Upload date:
- Size: 265.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b64cd4f9af6b8eaf21f27aef8a85170722e6004eb064ad30da695606c0266a2
|
|
| MD5 |
d6f6b24d682108717fd8da93c2bf4873
|
|
| BLAKE2b-256 |
7e1e0197de9446909a8bbfb75f1b9957bae26d225f6c6855bdd7b9e6536240b5
|
Provenance
The following attestation bundles were made for quercle_crewai-0.1.0.tar.gz:
Publisher:
publish.yml on quercledev/quercle-crewai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quercle_crewai-0.1.0.tar.gz -
Subject digest:
5b64cd4f9af6b8eaf21f27aef8a85170722e6004eb064ad30da695606c0266a2 - Sigstore transparency entry: 870286828
- Sigstore integration time:
-
Permalink:
quercledev/quercle-crewai@26bd358ecdbd0f94989c1448da43ed1c50c1e355 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/quercledev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@26bd358ecdbd0f94989c1448da43ed1c50c1e355 -
Trigger Event:
push
-
Statement type:
File details
Details for the file quercle_crewai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quercle_crewai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee8f842dc5dce2d5d3acbaa5f7fbcafd0be2682744029a39ba77b96898acc742
|
|
| MD5 |
f8c5e2b71a98b2cfdf64c3632ad2340b
|
|
| BLAKE2b-256 |
536c98a97227d1167d1f4ce95d8224fcd1bb023933e39870d436a70c171221aa
|
Provenance
The following attestation bundles were made for quercle_crewai-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on quercledev/quercle-crewai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quercle_crewai-0.1.0-py3-none-any.whl -
Subject digest:
ee8f842dc5dce2d5d3acbaa5f7fbcafd0be2682744029a39ba77b96898acc742 - Sigstore transparency entry: 870286835
- Sigstore integration time:
-
Permalink:
quercledev/quercle-crewai@26bd358ecdbd0f94989c1448da43ed1c50c1e355 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/quercledev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@26bd358ecdbd0f94989c1448da43ed1c50c1e355 -
Trigger Event:
push
-
Statement type: