Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_x402_discovery-1.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_x402_discovery-1.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for crewai_x402_discovery-1.0.1.tar.gz
Algorithm Hash digest
SHA256 27877b7a6f47350f8a388cd949190409036ad483e1fd7ae2f2eab66c6cb9b6ab
MD5 42223f0ba36f3c89a591360e5433c112
BLAKE2b-256 8c783684f02934fc4f59dfa80241c6acdf38c0f69ca9b5a62e40c4fbdbb0ba3b

See more details on using hashes here.

File details

Details for the file crewai_x402_discovery-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_x402_discovery-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e31d70c5a380984c767b9bb45feadc1cf95b155fbdcacfe35ddb6e4ccfb355b3
MD5 7502d38671ba3e115ff17e92805aab3a
BLAKE2b-256 80f549eecec90d842162c90f476e0ea717cabf6d5903a32b008ebf44a1976614

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page