Metadata-Version: 2.5
Name: lordevo-x402
Version: 0.1.1
Summary: Client for Lordevo's pay-per-call web, DNS, email and domain checks for AI agents: 33 tools from $0.01, paid with x402 (USDC on Base). LangChain and CrewAI tools included.
Project-URL: Homepage, https://shop.lordevo.com
Project-URL: Documentation, https://shop.lordevo.com/llms.txt
Author-email: Lordevo <hello@lordevo.com>
License-Expression: MIT
License-File: LICENSE
Keywords: a2a,ai-agents,base,crewai,dns,langchain,mcp,robots.txt,security,seo,usdc,x402
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Provides-Extra: crewai
Requires-Dist: crewai>=0.80; extra == 'crewai'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3; extra == 'langchain'
Provides-Extra: pay
Requires-Dist: eth-account>=0.13; extra == 'pay'
Requires-Dist: x402[evm,httpx,requests]>=2.25; extra == 'pay'
Description-Content-Type: text/markdown

# lordevo-x402 (Python)

Python client for the pay-per-call checks at **[shop.lordevo.com](https://shop.lordevo.com)**. It has 33 web, DNS, email and domain tools for AI agents, priced from $0.01 per call and paid with [x402](https://x402.org) (USDC on Base). There's no account or API key: each call is one micro-payment from the agent's wallet. Calls that fail or get refused (4xx/5xx) are never charged. LangChain and CrewAI tools are included.

```bash
pip install lordevo-x402            # free helpers
pip install "lordevo-x402[pay]"     # paid calls (x402 + eth-account)
pip install "lordevo-x402[pay,langchain]"   # or [pay,crewai]
```

## Quickstart

Free calls need no wallet:

```python
from lordevo_x402 import ask, quote, catalog

ask("dns-lookup example.com")            # A2A router: the endpoint, price and payment terms
quote("can-fetch", "https://example.com/blog")   # live x402 terms from the HTTP 402, nothing is paid
len(catalog()["quick_checks"])           # 33
```

Paid calls need a Base wallet holding a little USDC:

```python
import os
from lordevo_x402 import LordevoSync, Lordevo

lo = LordevoSync.from_private_key(os.environ["AGENT_WALLET_KEY"], max_price_usd=0.02)
lo.can_fetch("https://example.com/blog/post")    # robots.txt + AI-crawler gate, $0.01
lo.dns_lookup("example.com", type="MX")          # $0.01
lo.email_validate("jane@gmial.com")              # syntax + MX + disposable + typo hint, no SMTP, $0.01

# async
async with Lordevo.from_private_key(os.environ["AGENT_WALLET_KEY"]) as alo:
    await alo.link_check("https://bit.ly/xyz")
```

- `max_price_usd` (default 0.05): tools priced above it are refused before any request.
- `cache_seconds`: identical calls within the window are answered locally and not paid again.
- Errors raise `LordevoError` with `status`, `code` and `charged`.
- You can also pass your own paying client: `Lordevo(x402HttpxClient(...))` or `LordevoSync(x402_requests(...))`.

## LangChain and CrewAI

```python
from lordevo_x402.langchain import langchain_tools
tools = langchain_tools(sync_client=lo, only=["can-fetch", "link-check", "dns-lookup"])

from lordevo_x402.crewai import crewai_tools
agent = Agent(role="Researcher", goal="...", backstory="...", tools=crewai_tools(lo, only=["can-fetch", "link-check"]))
```

## Tools

These are the live prices from [catalog.json](https://shop.lordevo.com/catalog.json). Call any of them with `lo.call(slug, value, **options)` or as a method (`lo.dns_lookup`).

| Tool | Input | Price | What it does |
|---|---|---|---|
| `site-check` | `url` | $0.03 | Site check: trust + AI readiness + security headers (recommended start) |
| `agent-readiness` | `url` | $0.03 | Agent readiness / AI visibility score (GEO) |
| `url-trust` | `url` | $0.01 | URL trust check before you click or pay (safe / caution / risky) |
| `can-fetch` | `url` | $0.01 | Can I fetch this URL? robots.txt + AI-crawler permission gate |
| `link-check` | `url` | $0.01 | Link check: is it alive, where does it really go (redirects resolved) |
| `dns-lookup` | `host` (+ type) | $0.01 | DNS lookup (A, AAAA, CNAME, MX, TXT, NS, SOA, CAA) |
| `email-validate` | `email` | $0.01 | Email address validation (syntax + domain + MX, no SMTP probing) |
| `ssl-cert` | `host` | $0.01 | SSL/TLS certificate check (expiry, issuer, SANs, chain) |
| `domain-rdap` | `domain` | $0.01 | Domain age, registrar and expiry (RDAP) |
| `ip-info` | `ip` | $0.01 | IP address owner and network (RDAP + reverse DNS) |
| `links-batch` | `urls` | $0.02 | Batch link check (up to 10 URLs per call) |
| `broken-links` | `url` | $0.02 | Broken links on a page (up to 40 links checked) |
| `sitemap-urls` | `url` | $0.01 | Sitemap URL extractor (robots.txt + sitemap index) |
| `link-preview` | `url` | $0.01 | Link preview / unfurl (title, description, image, favicon, logo) |
| `readability` | `url` | $0.01 | Readability and word count (Flesch, reading time, top terms) |
| `structured-data` | `url` | $0.01 | Structured data extractor (JSON-LD, microdata, RDFa) |
| `canonical-check` | `url` | $0.01 | Canonical, hreflang and indexability check |
| `cors-check` | `url` (+ origin, method) | $0.01 | CORS check (preflight + allowed origins) |
| `http-ping` | `url` | $0.01 | HTTP ping: up or down, status and timings (DNS, TCP, TLS, TTFB) |
| `domain-lookalike` | `host` | $0.01 | Lookalike / homograph domain check (punycode, mixed scripts, brand typos) |
| `myr-rates` | `currency` | $0.01 | Malaysian ringgit exchange rates + OPR (Bank Negara Malaysia data) |
| `verdict-card` | `url` | $0.02 | Shareable site verdict card (grade + one-liner, SVG) |
| `page-markdown` | `url` | $0.01 | Page to Markdown (main content) |
| `page-meta` | `url` | $0.01 | Page metadata + Markdown |
| `email-auth` | `domain` | $0.01 | Email authentication check (SPF, DKIM, DMARC) |
| `security-headers` | `url` | $0.01 | Security headers + TLS quick grade |
| `tech-stack` | `url` | $0.02 | Tech stack detection |
| `seo-page` | `url` | $0.02 | On-page SEO check (one page) |
| `site-snapshot` | `url` | $0.03 | Site snapshot (SEO + security + tech + email) |
| `page-quality` | `url` | $0.01 | Page quality verdict (AI) |
| `site-verdict` | `url` | $0.02 | Is this a legit business site? (AI trust verdict) |
| `seo-audit-lite` | `url` | $0.03 | SEO Audit LITE (top 10 issues, one page) |
| `security-scan-lite` | `url` | $0.03 | Website Security Scan LITE (passive summary) |
## Other ways in

| Interface | Endpoint |
|---|---|
| MCP (streamable HTTP, x402 MCP transport) | `https://shop.lordevo.com/mcp` |
| A2A JSON-RPC (`message/send`, a free router) | `https://shop.lordevo.com/a2a` |
| x402 manifest | `https://shop.lordevo.com/.well-known/x402.json` |
| OpenAPI 3.1 | `https://shop.lordevo.com/openapi.json` |

Only check sites you are allowed to check. All checks are passive and read-only.

JavaScript package: [`lordevo-x402` on npm](https://www.npmjs.com/package/lordevo-x402). Docs: [shop.lordevo.com/llms.txt](https://shop.lordevo.com/llms.txt). MIT licence.
