whatisgithub

What is arbitrum-x402-aws?

hummusonrails/arbitrum-x402-aws — explained in plain English

Analysis updated 2026-05-18

3TypeScriptAudience · developerComplexity · 5/5LicenseSetup · hard

In one sentence

A working demo where an AI agent automatically pays with cryptocurrency to unlock paywalled content, combining AWS Lambda, an HTTP 402 response, and USDC payments on Arbitrum.

Mindmap

mindmap
  root((repo))
    What it does
      Agent pays for content
      HTTP 402 paywall
      Crypto settlement
    Tech Stack
      TypeScript
      Python
      AWS Lambda
      Arbitrum
    Use Cases
      Pay-per-request API
      Agent crypto wallet
      Agent to agent payments
    Audience
      Developers
      AI agent builders
    Flow
      CloudFront merchant
      Embedded wallet
      USDC on Arbitrum

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Learn how to build a pay-per-request API using the HTTP 402 Payment Required standard.

USE CASE 2

Give an AI agent its own crypto wallet that can pay for gated content automatically.

USE CASE 3

Deploy a CloudFront and Lambda@Edge merchant that verifies and settles USDC payments.

USE CASE 4

Prototype agent-to-agent or agent-to-API payments on the Arbitrum blockchain.

What is it built with?

TypeScriptPythonAWS LambdaAWS CDKArbitrumCloudFront

How does it compare?

hummusonrails/arbitrum-x402-awsarpitbhalla/ts-backendbrijeshmarch16/ai-interview
Stars333
LanguageTypeScriptTypeScriptTypeScript
Last pushed2022-06-09
MaintenanceDormant
Setup difficultyhardmoderatemoderate
Complexity5/53/53/5
Audiencedeveloperdeveloperpm founder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an AWS account, CDK bootstrap, a funded crypto wallet, and Coinbase CDP API keys before the agent can run.

MIT licensed, free to use, modify, and reuse including for commercial purposes.

So what is it?

This project is a working demonstration of an AI agent paying for content automatically using cryptocurrency, built on AWS and the Arbitrum blockchain. It shows how a piece of software running on Amazon's Bedrock AgentCore can encounter a paywall, pay for access on the spot using real digital money, and get the content it asked for, all without a human clicking anything. The setup has two main pieces. The first is a merchant server built on AWS CloudFront and Lambda@Edge that guards a piece of gated content. When someone requests it without paying, the server replies with an HTTP 402 Payment Required response, which is a real but rarely used web standard for exactly this situation. The second piece is a Python agent that holds its own digital wallet, created and managed through AWS Bedrock AgentCore. When the agent hits that 402 response, it automatically signs a payment using its embedded wallet and resends the request with proof of payment attached. Behind the scenes, the actual payment settles as USDC, a dollar pegged cryptocurrency, on the Arbitrum One blockchain, verified and processed through Coinbase's CDP payment facilitator service. The whole exchange, request, payment demand, signed payment, and verified access, happens automatically in a few network round trips, and the agent gets back the gated data along with a link to view the transaction on a blockchain explorer. The repo is organized as a small monorepo with a TypeScript merchant app, a Python agent app, and a shared TypeScript package defining the payment protocol types and Arbitrum specific constants. Deployment uses the AWS CDK for infrastructure and a Makefile that walks through installing dependencies, deploying the merchant, setting up the agent's wallet, and running the agent end to end. It includes 26 automated tests across both the TypeScript and Python halves of the project, and is released under the MIT license.

Copy-paste prompts

Prompt 1
Walk me through deploying the merchant stack in arbitrum-x402-aws using the Makefile.
Prompt 2
Explain how the HTTP 402 payment flow works between the agent and the CloudFront merchant in this repo.
Prompt 3
Help me set up the Bedrock AgentCore embedded wallet for the Python agent in this project.
Prompt 4
Show me how USDC payments settle on Arbitrum One through the CDP facilitator in this codebase.

Frequently asked questions

What is arbitrum-x402-aws?

A working demo where an AI agent automatically pays with cryptocurrency to unlock paywalled content, combining AWS Lambda, an HTTP 402 response, and USDC payments on Arbitrum.

What language is arbitrum-x402-aws written in?

Mainly TypeScript. The stack also includes TypeScript, Python, AWS Lambda.

What license does arbitrum-x402-aws use?

MIT licensed, free to use, modify, and reuse including for commercial purposes.

How hard is arbitrum-x402-aws to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is arbitrum-x402-aws for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.