← All guides · Markdown: /guides/crewai.md

CrewAI: a paid @tool for an Agent

Give a CrewAI agent one of the shop's tools: a @tool function, paid per call with x402, free trial first.

For: CrewAI 1.x. Endpoint shape: GET https://shop.lordevo.com/api/quick/<tool>?<input>; (HTTP 402 with x402 terms until paid). All guides: https://shop.lordevo.com/guides

Easier: use the SDK: https://shop.lordevo.com/guides/sdk/crewai

Prerequisites

Code

Put the helper from https://shop.lordevo.com/guides/python in lordevo.py next to this file.

# pip install crewai   (plus the helper's packages)
from crewai import Agent, Crew, Task
from crewai.tools import tool
from lordevo import lordevo_tool  # tries a free trial call first (X-Lordevo-Trial: 1), then pays


@tool("dns_lookup")
def dns_lookup(host: str, type: str | None = None) -> str:
    """DNS records lookup (A, AAAA, CNAME, MX, TXT, NS, SOA, CAA). Costs $0.003 per call (x402, USDC on Base); 3 free trial calls per IP per UTC day (shared by all tools up to $0.005). Instant tools that fail or are refused are not charged. Long jobs (202) are charged when accepted and are not refunded automatically if they fail later. If a paid job failed, email hello@lordevo.com with the transaction hash and we'll review it, usually within 2 business days."""
    return lordevo_tool("dns-lookup", {"host": host, "type": type})


analyst = Agent(role="Web analyst", goal="Answer with checked facts", backstory="Uses Lordevo checks, paid per call.", tools=[dns_lookup])
task = Task(description="Use the dns_lookup tool on example.com and summarise the answer.", expected_output="A short summary", agent=analyst)
print(Crew(agents=[analyst], tasks=[task]).kickoff())

Or all 58 tools at once: pip install "lordevo-x402>=0.1.5", then from lordevo_x402.crewai import crewai_tools and Agent(..., tools=crewai_tools(LordevoSync.from_private_key(os.environ["AGENT_WALLET_KEY"]), only=["dns-lookup"])).

Try it free (no wallet)

lordevo_tool() always tries a free call first (3 per IP per UTC day on tools up to $0.005).

Errors (nothing is charged on any of these)

The tool never raises: errors reach the agent as JSON (error, message, retry_after_seconds, charged: false).

Next tools to try

Checked

Written 2026-10-30 against the current public docs:

The snippets follow those docs; they were not executed end to end by the shop. Tell us if something has moved: hello@lordevo.com