Skip to content

Add Circle/x402 pay-per-browser-action endpoint for autonomous agents #5458

Description

@batikanor

Proposal: add an optional Circle/x402 pay-per-action endpoint for autonomous agents

I ran a static Circle/x402 readiness scan against Browserless to evaluate whether it could expose an agent-payable API surface. Browserless is a strong candidate because agents often need one-off browser actions: render a page, scrape content, capture a screenshot/PDF, or run a short browser function.

Readiness summary

  • Score from the scan: 38/100 — early candidate, higher effort than projects that already include x402.
  • The repo already has API-token auth, concurrency/queue controls, OpenAPI/schema generation, and browser action routes.
  • I did not find x402 or Circle Agent Wallet/Marketplace-specific docs.
  • Concrete API surfaces exist in the route tree, including REST routes such as content.post.ts, pdf.post.ts, screenshot.post.ts, scrape.post.ts, function.post.ts, plus WebSocket browser routes.

Why this is useful

Autonomous agents often need a browser for a single paid task, but a long-lived shared Browserless token or prepaid account is awkward for agent-to-service commerce. A Circle/x402 route could let an agent:

  1. Request a browser action.
  2. Receive a 402 Payment Required challenge.
  3. Pay in USDC from a Circle Agent Wallet.
  4. Retry and receive the browser result plus receipt metadata.

Suggested first implementation

Start with one narrow REST action instead of changing all auth paths:

POST /x402/screenshot   or   POST /x402/content
  -> return 402 Payment Required when no valid payment is supplied
  -> verify x402 payment on Base/USDC
  -> run the existing Browserless route handler
  -> return { data, receipt }

A receipt shape for agent buyers could look like:

{
  "receipt": {
    "amount": "0.01",
    "asset": "USDC",
    "network": "base",
    "resource": "POST /x402/screenshot",
    "requestHash": "sha256:...",
    "resultHash": "sha256:...",
    "sessionId": "..."
  }
}

Circle Agent Marketplace readiness docs

If useful, I would document:

  • supported network(s)
  • USDC price per action or browser-second
  • request JSON schema
  • response JSON schema
  • receipt/proof object
  • timeout, queue, and retry behavior
  • how Circle Agent Wallet / x402 clients should pay

I generated this from Budcle, a small scanner for identifying Circle/x402 adoption gaps in open-source API projects: https://github.com/batikanor/Budcle

This is intentionally additive: existing tokens, hosted plans, queues, and self-hosted deployments can remain unchanged while adding a pay-per-call path for x402-capable agent clients.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions