CrewAI tool for x402 service discovery — find any x402-payable API endpoint at runtime
Project description
crewai-x402-discovery
CrewAI tool for x402 service discovery — let your CrewAI agents find and call any paid API endpoint at runtime.
Installation
pip install crewai-x402-discovery
Quick Start
from crewai import Agent, Task, Crew
from crewai_x402_discovery import X402DiscoveryTool
tool = X402DiscoveryTool()
researcher = Agent(
role="Research Specialist",
goal="Find and use the best available APIs for any research task",
backstory="An expert at finding and using external APIs efficiently.",
tools=[tool],
verbose=True,
)
task = Task(
description="Find the best web search API available under $0.02/call and report its details.",
expected_output="API name, URL, price, and a Python usage snippet.",
agent=researcher,
)
crew = Crew(agents=[researcher], tasks=[task], verbose=True)
result = crew.kickoff()
print(result)
Configuration
from crewai_x402_discovery import X402DiscoveryTool
# Custom price limit
tool = X402DiscoveryTool(max_price_usd=0.10)
# Custom discovery API (e.g. private catalog)
tool = X402DiscoveryTool(
discovery_api_url="https://x402-discovery-api.onrender.com",
max_price_usd=0.50,
)
Tool Parameters
The tool accepts a natural language query string. Examples:
"web search""image generation""crypto prices""data enrichment""regulatory filings"
Links
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 crewai_x402_discovery-1.0.1.tar.gz.
File metadata
- Download URL: crewai_x402_discovery-1.0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27877b7a6f47350f8a388cd949190409036ad483e1fd7ae2f2eab66c6cb9b6ab
|
|
| MD5 |
42223f0ba36f3c89a591360e5433c112
|
|
| BLAKE2b-256 |
8c783684f02934fc4f59dfa80241c6acdf38c0f69ca9b5a62e40c4fbdbb0ba3b
|
File details
Details for the file crewai_x402_discovery-1.0.1-py3-none-any.whl.
File metadata
- Download URL: crewai_x402_discovery-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e31d70c5a380984c767b9bb45feadc1cf95b155fbdcacfe35ddb6e4ccfb355b3
|
|
| MD5 |
7502d38671ba3e115ff17e92805aab3a
|
|
| BLAKE2b-256 |
80f549eecec90d842162c90f476e0ea717cabf6d5903a32b008ebf44a1976614
|