Skip to main content

⚡ The Spend Firewall & B2A Autonomous Agent Data Oracle (CleanWeb Studio v2.5.2)

"The Spend Firewall for Autonomous Agents: Verified data in. Signed policy out. Every payment auditable on-chain."
Zero credit cards. Zero human logins. 100% Native USDC micropayments & pre-funded vaults with on-chain EIP-712 spend policy attestations.

Version Multi-Chain PyPI Package Tests License: MIT


🚀 Why CleanWeb Studio for Autonomous AI Agents?

Autonomous AI Agents (LangChain, CrewAI, AutoGPT, DeFi trading bots) face three critical bottlenecks when accessing web knowledge:

  1. Paywall & Anti-Bot Friction: Agents cannot solve Cloudflare turnstiles or register credit cards.
  2. LLM Context Token Waste: Raw HTML is 95% garbage (ads, scripts, cookie banners) that drains inference budgets.
  3. Lack of Verifiable Truth (On-Chain Grounding): Smart contracts on Polymarket, Hyperliquid, or DeFi cannot verify whether off-chain web data has been tampered with.

CleanWeb Studio v2.5.0 solves all three in a single HTTP call.


🔮 Core Agent Services & Micro-Pricing (USDC)

Service Endpoint What it Does Cost (USDC) Gas Overhead
🌐 Clean Web (/api/v1/clean-web) 99.9% token reduction web markdown cleaner 0.001 USDC 0원 (<5ms)
📝 Pure Text (/api/v1/clean-text) Ultra-lightweight raw plain text for vector/RAG embeddings 0.001 USDC 0원 (<5ms)
🗺️ Site Mapper (/api/v1/map-site) Domain sitemap & internal URL tree discovery (Firecrawl /map) 0.002 USDC 0원 (<5ms)
🔍 Agent Search (/api/v1/search) Fast real-time keyword search & verified snippets (Tavily) 0.002 USDC 0원 (<5ms)
📄 PDF Research (/api/v1/clean-pdf) Formula & table-preserved academic paper extractor 0.005 USDC 0원 (<5ms)
🎬 YouTube AI (/api/v1/clean-youtube) Gemini 3.6 Flash hybrid video analysis & audio intelligence 0.010 USDC 0원 (<5ms)
📊 Extract JSON (/api/v1/extract-json) Webpage to schema-constrained JSON structured extractor 0.030 USDC 0원 (<5ms)
🔮 Web3 Signed Oracle (/api/v1/oracle/grounding) Real-time search + Clean-to-JSON + EIP-712 On-Chain Attestation 0.035 USDC 0원 (<5ms)
🧠 Deep Research (/api/v1/deep-research) Multi-source synthesized AI executive research briefing 0.150 USDC 0원 (<5ms)

💼 B2A Pre-funded Smart Vault (2.0 ~ 1,000.0 USDC)

Forget credit card chargebacks and 2.9% + $0.30 payment gateway fees. CleanWeb operates entirely on Native USDC across Polygon, Base, and Arbitrum.

  • Minimum Deposit: 2.0 USDC (~2,000 web cleans or 200 YouTube AI analyses)
  • Maximum Deposit: 1,000.0 USDC (1,000,000 queries for enterprise agent clusters)
  • Session Key Auth: Agents deposit once on-chain and receive an X-Vault-Key for instant sub-5ms calls with zero gas transaction friction.

🔮 Oracle-Grade Grounding Pipeline (/api/v1/oracle/grounding)

graph LR
    Agent[🤖 Autonomous AI Agent] -->|POST /api/v1/oracle/grounding\nQuery: Fed Interest Rate Decision| CleanWeb[CleanWeb Engine]
    CleanWeb -->|1. Real-time Meta Search| Web[(Live Web Sources)]
    CleanWeb -->|2. Gemini 3.6 Flash| JSON[(Structured JSON)]
    CleanWeb -->|3. EIP-712 Master Key| Signer[(Cryptographic Signer)]
    Signer -->|Signed Attestation v,r,s| Agent
    Agent -->|ecrecover()| Contract[DeFi / Polymarket Smart Contract]

1-Line Solidity Verification (CleanWebOracleVerifier.sol)

// Verify CleanWeb Oracle attestation on Polygon / Base / Arbitrum
require(
    verifier.verifyAttestation(query, dataHash, timestamp, v, r, s),
    "Tampered or unauthorized oracle data"
);

🛠️ Quickstart (Autonomous Python Agent)

import requests

# 1. Deposit into vault via Web3 or use existing session key
VAULT_KEY = "vault_key_your_prefunded_agent_key"

# 2. Call Web3 Signed Oracle Grounding
response = requests.post(
    "http://127.0.0.1:8000/api/v1/oracle/grounding",
    headers={"X-Vault-Key": VAULT_KEY},
    json={
        "query": "US Federal Reserve interest rate decision latest",
        "max_sources": 3
    }
)

data = response.json()
print("Fact Summary:", data["summary_markdown"])
print("Structured JSON:", data["structured_data"])
print("EIP-712 Signature:", data["oracle_attestation"]["signature"])

🧪 Comprehensive Test Suite (19/19 Passed)

# Run complete test suite
python -m pytest tests/ -v
tests/test_oracle_grounding.py::test_oracle_grounding_402_challenge PASSED           [  5%]
tests/test_oracle_grounding.py::test_oracle_grounding_execution_with_attestation PASSED [ 10%]
tests/test_oracle_grounding.py::test_oracle_vault_deduction_0_035 PASSED             [ 15%]
tests/test_payment_comprehensive.py::test_full_payment_lifecycle PASSED              [ 21%]
tests/test_payment_comprehensive.py::test_vip_promo_code PASSED                      [ 26%]
tests/test_payment_comprehensive.py::test_b2a_vault_deposit_limits_lifecycle PASSED [ 31%]
tests/test_payment_comprehensive.py::test_ui_html_payment_components PASSED          [ 36%]
tests/test_phase1_cleaners.py::test_web_cleaner_example_domain PASSED                [ 42%]
tests/test_phase1_cleaners.py::test_youtube_cleaner_video_id PASSED                  [ 47%]
tests/test_phase1_cleaners.py::test_youtube_cleaner_execution PASSED                 [ 52%]
tests/test_phase1_cleaners.py::test_batch_clean_concurrent PASSED                    [ 57%]
tests/test_phase2_payments.py::test_multi_chain_configs PASSED                       [ 63%]
tests/test_phase2_payments.py::test_onchain_eip712_attestation PASSED                [ 68%]
tests/test_phase2_payments.py::test_vault_deposit_and_deduct PASSED                  [ 73%]
tests/test_phase2_payments.py::test_402_challenge_returned_when_unauthorized PASSED [ 78%]
tests/test_phase2_payments.py::test_dev_bypass PASSED                                [ 84%]
tests/test_treasury.py::test_ping_keepalive PASSED                                   [ 89%]
tests/test_treasury.py::test_treasury_status_endpoint PASSED                         [ 94%]
tests/test_treasury.py::test_multi_chain_balances_structure PASSED                   [100%]

======================= 19 passed, 2 warnings in 44.01s =======================

CleanWeb Studio operates strictly under the Transformative Non-Expressive Text/Data Mining (TDM) Fair Use doctrine for autonomous AI reasoning.

  1. No Financial or Investment Warranty: All oracle feeds, search results, and scraped contents are provided AS-IS. CleanWeb Studio assumes zero liability for DeFi smart contract liquidations, prediction market settlements (e.g. Polymarket), or trading losses resulting from external web misreporting or LLM hallucinations.
  2. Caller Responsibility: The autonomous agent deployer/caller is solely responsible for respecting target website intellectual property and applicable laws.
  3. Zero-Data Retention (GDPR Compliant): All fetched HTML and raw assets are processed ephemerally in RAM and purged immediately upon response transmission.
  4. 100% OFAC Sanctions Filtering: All micropayment addresses are verified against OFAC Specially Designated Nationals (SDN) lists.
  5. Full Legal Endpoints:
    • GET /api/v1/legal/terms: Official Machine-to-Machine Terms of Service
    • GET /api/v1/legal/disclaimer: Full Legal & Financial Disclaimer

📜 License

Distributed under the MIT License. See LICENSE for more information.

Metadata

Release files for x402-cleanweb-agent 2.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for x402-cleanweb-agent 2.5.2
File Size Uploaded
x402_cleanweb_agent-2.5.2.tar.gz 90.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for x402-cleanweb-agent 2.5.2
File Interpreter ABI Platform
x402_cleanweb_agent-2.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 181.1 kB

Release files / x402_cleanweb_agent-2.5.2.tar.gz

Download URL x402_cleanweb_agent-2.5.2.tar.gz
Size 90.3 kB
Tags Source
SHA-256 checksum
How to use checksums
85b20cba79a0293a3f9ad01a729a21063a8093d61aec436144e70c993817a9c8
BLAKE2b-256 checksum
How to use checksums
ac471a6dade686bf72632d63f294d1700c0fb361cb545b0523a5224ca66ba971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / x402_cleanweb_agent-2.5.2-py3-none-any.whl

Download URL x402_cleanweb_agent-2.5.2-py3-none-any.whl
Size 90.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ebacd72e7a458a96891426b538914168b2334c5671e36a5ce7f6f9c3822c5dd
BLAKE2b-256 checksum
How to use checksums
38cde62375483b5a4c8fb6397a9f622575e9b7242cde59033cc385393c046330
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

2.7.0

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

This release

2.5.2 This release

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page