Skip to content

feat(aws-agent-payments): add x402 paywall auto-pay plugin for autonomous agents - #243

Open
wirjo wants to merge 1 commit into
awslabs:mainfrom
wirjo:feat/aws-agent-payments
Open

feat(aws-agent-payments): add x402 paywall auto-pay plugin for autonomous agents#243
wirjo wants to merge 1 commit into
awslabs:mainfrom
wirjo:feat/aws-agent-payments

Conversation

@wirjo

@wirjo wirjo commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Adds a new aws-agent-payments plugin that enables stateful autonomous agents to transparently pay for x402-paywalled APIs, MCP tools, and web content via microtransactions using AWS AgentCore Payments.

Related

Changes

New Plugin: plugins/aws-agent-payments/

plugins/aws-agent-payments/
├── .claude-plugin/plugin.json          # Claude Code marketplace
├── .codex-plugin/plugin.json           # Codex marketplace
├── .mcp.json                           # AWS MCP Server config
├── README.md                           # Full documentation
├── openclaw.plugin.json                # Runtime plugin manifest (NEW PATTERN)
├── package.json / tsconfig.json
├── src/                                # TypeScript reference implementation (NEW PATTERN)
│   ├── index.ts                        # Plugin entry + tool registration
│   ├── config.ts                       # Config management
│   ├── payments.ts                     # AgentCore API integration
│   └── x402.ts                         # x402 protocol handling (v1 + v2)
└── skills/x402-payments/
    ├── SKILL.md                        # Agent-agnostic skill instructions
    └── references/
        ├── protocol.md                 # x402 protocol details (v1/v2)
        ├── setup.md                    # Prerequisites + IAM setup
        └── debugging.md               # Common issues + diagnostics

New Standards Introduced

This plugin introduces two new patterns that extend the existing plugin model:

1. Runtime Plugin Manifest (openclaw.plugin.json)

Unlike skill-based plugins (which provide markdown instructions for the agent to follow), this manifest declares executable tools that stateful agent hosts register directly into their tool system:

{
  "id": "aws-agent-payments",
  "name": "AWS Agent Payments (x402)",
  "contracts": {
    "tools": [
      "get_payment_session_status",
      "create_payment_session",
      "get_paid_content",
      "pay_and_get_header",
      "setup_x402_payments"
    ]
  },
  "activation": { "onStartup": true },
  "configSchema": { ... }
}

This enables fully autonomous payment flows without human-in-the-loop for each transaction — critical for agents that browse, fetch APIs, and act independently.

2. TypeScript Reference Implementation (src/)

While all existing plugins are skill-only (markdown + optional scripts), this plugin includes a working TypeScript implementation that demonstrates:

  • x402 challenge parsing (v1 and v2 protocol versions)
  • AgentCore ProcessPayment integration via AWS SDK
  • Payment-Signature envelope construction
  • Session lifecycle management (creation, validation, expiry)
  • Full infrastructure setup automation

This serves as a reference implementation that other agent hosts can adapt. The SKILL.md continues to work independently for coding agents following the existing pattern.

Why These Patterns Matter

Stateful autonomous agents (OpenClaw, Hermes, custom AgentCore deployments) differ from coding agents in a key way: they act continuously and autonomously — browsing the web, calling APIs, managing infrastructure — without a developer in the loop. For x402 payments, this means:

  • The agent must handle 402s in real-time without asking the user to run a script
  • Payment sessions must be managed across conversations (persist state)
  • Tools must be always available (activated on startup, not invoked via slash command)

Skill-only plugins work well for coding agents (developer reads guidance, runs CLI commands). Runtime plugins work for autonomous agents (tools execute programmatically, no human steps).

Tools Provided

Tool Description
setup_x402_payments One-shot infrastructure setup (Payment Manager, Connector, Wallet)
get_payment_session_status Check current session usability
create_payment_session Mint fresh session (locks USDC up to spend cap)
get_paid_content Pay + fetch content server-side (recommended)
pay_and_get_header Mint payment header for browser-based flows

Supported Providers & Networks

  • Wallet providers: Coinbase CDP, Stripe/Privy
  • Networks: Base Sepolia (testnet), Base Mainnet, Solana Devnet, Solana Mainnet

Future: ClawHub Publishing Lifecycle

The runtime plugin pattern introduced here is designed to support publishing via ClawHub — the OpenClaw skill and plugin registry. This would enable one-command install and automated lifecycle management:

# End users install via OpenClaw CLI:
openclaw plugins install clawhub:@aws/aws-agent-payments

# Publishers manage versions via clawhub CLI:
clawhub login
clawhub package publish . --family code-plugin --dry-run
clawhub package publish . --family code-plugin

Implementation path:

  1. Compatibility metadata — add openclaw.compat.pluginApi and openclaw.build.openclawVersion to package.json so ClawHub can validate version compatibility at install time
  2. Build pipelineopenclaw plugins build generates the final manifest from TypeScript entry metadata, keeping openclaw.plugin.json and package.json in sync
  3. CI auto-publish — a GitHub Action publishes new versions to ClawHub on tagged releases, giving users automatic updates
  4. Skill publishing (independent of plugin) — clawhub skill publish ./skills/x402-payments makes the SKILL.md discoverable for any agent host, not just OpenClaw

This gives a full lifecycle: develop locally → validate → publish to registry → users install with one command → auto-update on new releases. The same pattern could be adopted by other plugins in this repository that want to support autonomous agent hosts.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@theagenticguy theagenticguy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this — x402 auto-pay is a capability the repo does not have today, the v2 flow is coherent end to end, and the source typechecks cleanly against its pinned dependencies (npx tsc --noEmit passes). Requesting changes because the build gates fail, because the v1 protocol path looks untested, and because the two new repo patterns need a maintainer decision first.

I ran the repo's own gates on this branch. Four hard failures:

Gate Result
mise run lint:manifests FAIL.codex-plugin/plugin.json missing required interface
mise run fmt:check FAIL — 4 unformatted files (dprint fmt fixes)
mise run lint:md FAIL — non-spec version key, description parsed as 2 chars, MD029/MD031/MD032
mise run lint:cross-refs pass, but plugin is absent from both marketplace manifests
mise run validate:refs 0 broken links; all 3 reference files orphaned
mise run validate:size pass — SKILL.md 110 lines, ~1172 tokens, "ideal"

The one gitleaks finding (admin:admin in .github/workflows/security-scanners.yml) is pre-existing on main, not from this PR. GitHub only ran the title and contributor-statement checks here, so the Build workflow's failures are not yet visible on the PR.

Correctness, verified against the specs in coinbase/x402:

  1. v1 payment header is wrong twice over — sent as raw JSON where specs/transports-v1/http.md requires base64, and missing the {x402Version, scheme, network, payload} envelope from §5.2. No v1 server accepts it.
  2. v1 amount is silently dropped — the field is maxAmountRequired in v1, and the code reads accepted.amount (v2's name) for both versions.
  3. Retry guidance can double-spend — SKILL.md says ProcessPayment is idempotent via client_token, but the SDK auto-generates a fresh token per call, so a retry is a second payment.
  4. A drained session reports usable: trueremainingUsd is computed and then ignored.
  5. networkPreferences is dead config — declared, plumbed, written, never read; accepts[0] is taken unconditionally.
  6. Payment proof follows cross-origin redirects — reproduced locally; a paywall can 302 a signed authorization to an origin that never issued the challenge.
  7. Wallet signing keys are model-visible tool parameters, so they land in transcripts and logs.

Given #1 and #2, I would guess the validation against x402-test.genesisblock.ai covered only v2. If so, consider dropping v1 from this PR instead of shipping an advertised-but-untested path.

Process: CONTRIBUTING.md requires an RFC before work begins on a new plugin or a major repo change, and I could not find one for this. Both new patterns here — the openclaw.plugin.json runtime manifest and the bundled src/ implementation — are repo-architecture changes: no schema validates the manifest, no scripts.build exists to produce the dist/index.js it points at (and dist/ is gitignored), CI has no Node or TypeScript step, and there is no JS test framework, so 976 lines of money-moving code land with no automated coverage. Splitting this into an RFC for the runtime-plugin pattern plus a skill-only plugin that ships now would de-risk both halves.

Inline comments have the specifics, including exact line numbers and repro steps. Happy to re-review promptly once the gates are green.

"web3",
"autonomous-agents"
],
"license": "Apache-2.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocker — build gate fails. mise run lint:manifests rejects this file:

plugins/aws-agent-payments/.codex-plugin/plugin.json invalid
data must have required property 'interface'

schemas/codex-plugin.schema.json requires interface with displayName, shortDescription, longDescription, developerName, category, and capabilities (see plugins/aws-amplify/.codex-plugin/plugin.json for the shape). The other nine plugins all pass.

Note this file is generated, not hand-written: tools/generate_codex_manifests.py builds it from .claude-plugin/marketplace.json plus an INTERFACE_METADATA entry keyed on plugin name. Since aws-agent-payments is absent from both, the generator would skip it entirely. Fix in this order: add the marketplace entry, add the INTERFACE_METADATA block, then regenerate rather than editing by hand.

```bash
/plugin marketplace add awslabs/agent-plugins
/plugin install aws-agent-payments@agent-plugins-for-aws
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocker — plugin is not registered in either marketplace. .claude-plugin/marketplace.json lists eight plugins and .agents/plugins/marketplace.json lists nine; aws-agent-payments is in neither.

That makes the documented install commands here non-functional: /plugin install aws-agent-payments@agent-plugins-for-aws resolves through the marketplace manifest, and there is no entry to resolve. mise run lint:cross-refs passes only because it validates marketplace-to-directory, never the reverse, so an unregistered plugin directory is invisible to it.

@@ -0,0 +1,110 @@
---
name: x402-payments
description: >-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocker — mise run lint:md fails here (exit 1). Two frontmatter errors:

SKILL.md:13 skill-frontmatter/SKILL002 [Description should be at least 20 characters (current: 2)]
SKILL.md:13 skill-frontmatter/SKILL002 [Non-spec frontmatter property: "version"]

The description reads as 2 characters because tools/markdownlint-frontmatter.cjs matches multiline descriptions with /^description:\s*>\s*\n/ — a bare >, not >-. The strip indicator makes the multiline branch miss, the single-line branch then captures the literal >-, and the length check fails on that. Every other SKILL.md in the repo uses a quoted single-line description, which sidesteps this. Either follow that convention or fix the rule's regex.

Separately, version is not in the Agent Skills spec allowlist (agent, allowed-tools, argument-hint, context, description, disable-model-invocation, license, metadata, model, name, user-invocable). Move it under metadata if you want to keep it.

- **Always check session status first** — avoids `ExpiredTokenException` errors
- **Never auto-mint sessions** — get explicit user approval each time (unless user previously authorized auto-creation)
- **Payment headers expire in ~60 seconds** — if using the header path, replay immediately
- **Idempotent retries** — ProcessPayment uses a client_token for idempotency, safe to retry on transient failures

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Money-loss risk — this idempotency guarantee does not hold. The line tells the agent retries are safe because "ProcessPayment uses a client_token for idempotency."

clientToken on ProcessPaymentRequest carries the Smithy idempotencyToken trait, and src/payments.ts never sets it. The SDK therefore auto-fills a fresh UUID on every call (@smithy/core/dist-cjs/submodules/protocols/index.js:836if (ns.isIdempotencyToken()) this.stringBuffer = generateIdempotencyToken()). Two calls for the same 402 get two different tokens and are two distinct payments.

So the exact scenario this guidance encourages is the one that double-spends: ProcessPayment succeeds server-side, the response times out, the agent retries on the "safe to retry" advice, and the user pays twice. Either thread a caller-stable clientToken derived from the challenge (nonce/resource/amount) so a retry is genuinely deduplicated, or delete the claim and tell the agent to verify session state before retrying.


return {
headerName,
headerValue: JSON.stringify(signedPayloadObj), // raw JSON; caller builds envelope

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protocol bug — the v1 payment header is neither base64-encoded nor wrapped in the required envelope. For version !== "2" this raw JSON string is passed straight through to the X-PAYMENT header (src/index.ts:130, :205).

Two deviations from the spec:

  1. Encoding. specs/transports-v1/http.md is explicit: "Mechanism: X-PAYMENT header containing base64-encoded JSON." Raw JSON also risks a header-parsing failure on the non-ASCII/whitespace path.
  2. Shape. specs/x402-specification-v1.md §5.2 defines the v1 PaymentPayload as {x402Version, scheme, network, payload} — where the signed {signature, authorization} object goes inside payload. This sends the inner object alone, so x402Version, scheme, and network are all missing.

Result: any real v1 server rejects the header. The PR notes end-to-end validation against x402-test.genesisblock.ai, which suggests only the v2 path was exercised. If v1 has not been tested against a live server, consider dropping it from this PR rather than shipping an untested branch, since the README and references/protocol.md both advertise it.

**Cause:** The payment was processed but the merchant's on-chain settlement is transient — the signature hasn't propagated yet.

**Fix:**
- The tool automatically retries. If it persists:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The tool automatically retries" is not accurate. get_paid_content makes exactly one ProcessPayment call and one replay; on a second 402 it returns an error object immediately (src/index.ts:136-143). There is no retry anywhere in src/.

This matters more than a doc nit because the surrounding text attributes the failure to settlement propagation delay and tells the reader to wait for a retry that will not happen. Either implement a bounded retry with backoff or rewrite the fix steps around what the tool does.

Two more items in this file to verify while you are here: the aws bedrock-agentcore-control delete-credential-provider invocation on line 58 (please confirm the command name and flags against the shipped CLI), and the diagnostic field names on line 66 (remainingBalance, expiresAt) which do not match what get_payment_session_status actually returns (remaining_usd, minutes_left).

@@ -0,0 +1,28 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the part that needs a maintainer decision before the code review matters. The PR introduces two new repo-wide patterns — a runtime plugin manifest and a bundled TypeScript implementation — and CONTRIBUTING.md is explicit: "For new plugins or major changes to the repository, contributors must first open an [RFC] before doing any work." I searched all issues and found no RFC for x402, payments, or agent payments, though there is precedent for exactly this (#163 aws-transform, #148 containers, #55 Amazon Location).

Concrete gaps that an RFC would settle:

  • No schema, so no validation. schemas/ has manifests for Claude, Codex, marketplace, MCP, and skill frontmatter. openclaw.plugin.json matches none, so mise run lint:manifests never sees it and nothing keeps the five names in contracts.tools in sync with src/index.ts.
  • No build path. package.json declares main: dist/index.js and openclaw.extensions: ["./dist/index.js"], but has no scripts.build, and dist/ is gitignored at repo root. Nothing in the repo compiles src/, and CI has no Node/TypeScript step — mise run build is markdown lint, dprint, reference validation, and security scanners. As committed, this plugin cannot produce the artifact it points at. (npx tsc --noEmit does pass cleanly against the pinned deps, so the source itself is sound.)
  • No tests. The repo has no JS test framework (Establish a Python unit-test framework wired into mise run build #226 is still open for the Python equivalent), so 976 lines of payment-executing code arrive with zero automated coverage. For code that moves money, that is the gap I would want closed first.
  • Third-party registry in the critical path. README.md:48 and the PR body point installs at ClawHub. Please confirm that is settled for an awslabs repo.

None of this is an argument against the capability — x402 auto-pay is a genuinely useful plugin. It is an argument that "runtime plugins" is a repo-architecture change that wants its own RFC and its own CI, separate from shipping this one plugin.

Comment thread plugins/aws-agent-payments/README.md Outdated
### OpenClaw (Stateful Autonomous Agent)

```bash
openclaw plugins install clawhub:@aws/aws-agent-payments

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This install command does not currently resolve — npm view @aws/openclaw-x402-payments and @aws/aws-agent-payments both return 404. Worth marking as planned rather than documenting it as available, especially since the PR body describes ClawHub publishing as future work.

Also flagging a naming inconsistency across the four manifests, since a publish pipeline will trip over it: package.json says @aws/openclaw-x402-payments v1.0.3, both plugin manifests say aws-agent-payments v1.0.0, openclaw.plugin.json uses id aws-agent-payments with no version, and the config example on line 57 keys the plugin as x402-payments. Pick one identity and one version.

2. Paid transparently
3. Returned the paid content to the user

The user should never see "Payment Required" as a final error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The three reference files are unreachable from here. mise run validate:refs flags all of them:

ORPHAN  plugins/aws-agent-payments/skills/x402-payments/references/debugging.md
ORPHAN  plugins/aws-agent-payments/skills/x402-payments/references/protocol.md
ORPHAN  plugins/aws-agent-payments/skills/x402-payments/references/setup.md

SKILL.md never links them, so the progressive-disclosure model in docs/DESIGN_GUIDELINES.md is defeated: the agent has no way to know references/debugging.md exists when it hits NetworkMismatch. (The task exits 0 on orphans, so this is not a CI failure — it is still a real defect.) Add pointers at the relevant steps, e.g. "See references/debugging.md" in Step 4 and "See references/setup.md" under First-Time Setup.

Comment thread plugins/aws-agent-payments/.mcp.json Outdated
@@ -0,0 +1,8 @@
{
"mcpServers": {
"awsknowledge": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The awsknowledge MCP server is declared but nothing in SKILL.md or the references invokes it. docs/DESIGN_GUIDELINES.md says to include "only servers this plugin needs" and exclude "optional nice-to-have integrations." Drop it, or add the skill instructions that use it.

@@ -0,0 +1,28 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need claude and codex support for now? If we have not tested against them, anyway we can remove it and only supports OpenClaw?

wirjo added a commit to wirjo/agent-plugins that referenced this pull request Jul 28, 2026
Adds a skill-only plugin enabling agents to transparently pay for
x402-paywalled APIs, MCP tools, and web content via microtransactions
using AWS AgentCore Payments.

Addresses review feedback from awslabs#243 v1:
- Removed runtime code (src/, openclaw.plugin.json, package.json,
  tsconfig.json) — runtime plugin pattern deferred to separate RFC
- Removed .mcp.json (unused by skill)
- Fixed SKILL.md frontmatter (single-line description, version under
  metadata, no non-spec keys)
- Added references links in SKILL.md for progressive disclosure
- Fixed false idempotency claim (clarified retry semantics)
- Fixed debugging.md field names to match actual tool output
- Removed v1 protocol claims (only v2 validated end-to-end)
- Added security guidance (redirect safety, credential handling)
- Added plugin to both marketplace manifests
- Added .codex-plugin with required interface metadata
- Addressed drained-session-reports-usable bug in guidance
- Narrowed supported networks to validated ones (Base only)

Structure:
  plugins/aws-agent-payments/
  ├── .claude-plugin/plugin.json
  ├── .codex-plugin/plugin.json
  ├── README.md
  └── skills/x402-payments/
      ├── SKILL.md
      └── references/
          ├── protocol.md
          ├── setup.md
          └── debugging.md
@wirjo
wirjo force-pushed the feat/aws-agent-payments branch from c4167a8 to 161e07a Compare July 28, 2026 21:55
@wirjo

wirjo commented Jul 28, 2026

Copy link
Copy Markdown
Author

Thanks for the thorough review @theagenticguy — this is excellent feedback. Pushed a v2 that addresses all points:

Changes Made

Structural (following your recommendation to split)

Removed all runtime codesrc/, openclaw.plugin.json, package.json, tsconfig.json, .mcp.json are all gone. This is now a skill-only plugin matching the existing repo pattern. The runtime plugin pattern (with executable TypeScript) will be proposed via a separate RFC as you suggested.

Build Gates Fixed

  • .codex-plugin/plugin.json now includes full interface metadata (displayName, shortDescription, longDescription, defaultPrompt, category, capabilities)
  • ✅ Plugin registered in both .claude-plugin/marketplace.json and .agents/plugins/marketplace.json
  • ✅ SKILL.md frontmatter: single-line quoted description (>20 chars), version moved under metadata
  • tools/generate_codex_manifests.py updated with INTERFACE_METADATA entry
  • ✅ Files formatted with dprint fmt

Correctness Fixes

  • Dropped v1 claims — only v2 was validated e2e, so protocol.md and SKILL.md now focus on v2 exclusively
  • Fixed false idempotency claim — removed the "safe to retry" guidance. Added note that SDK auto-generates fresh clientToken per call, so retries are separate payments unless a stable token is derived from the challenge
  • Fixed drained session guidance — SKILL.md Step 1 now explicitly says to check balance, and Step 4 error handling says to verify session balance before retrying
  • Removed networkPreferences dead config — no longer referenced (runtime code removed)
  • Redirect security — protocol.md now documents that replay should use redirect: "manual" and verify origin matches
  • Credential handling — setup.md and SKILL.md now explicitly state wallet secrets must NEVER be tool parameters. Read from env/config at execution time.

Reference Files (Orphan Fix)

MCP Server

  • ✅ Removed .mcp.jsonawsknowledge was declared but unused by the skill

What's Deferred (to RFC)

  • Runtime plugin manifest (openclaw.plugin.json)
  • TypeScript reference implementation (src/)
  • Build/test pipeline for executable code
  • Schema for runtime manifests

These are repo-architecture changes that warrant their own RFC as you noted. The skill-only plugin ships now and provides value independently.

Remaining Open

  • RFC: Will open separately for the runtime-plugin pattern
  • Naming: Consolidated on aws-agent-payments everywhere (plugin id, manifests, marketplace)

wirjo added a commit to wirjo/agentcore-samples that referenced this pull request Jul 28, 2026
Fixes based on detailed review (awslabs/agent-plugins#243):
- Fix drained session reporting usable:true (now checks remainingUsd)
- Fix credential provider naming (underscore → hyphen per naming rules)
- Fix cross-origin redirect vulnerability (use redirect:manual, verify origin)
- Fix v1 amount field compatibility (amount ?? maxAmountRequired)
- Update SKILL.md: fix frontmatter, add reference links, fix retry guidance
- Update references: remove false idempotency claims, fix field names,
  add security guidance for redirects and credentials
wirjo added a commit to wirjo/agent-plugins that referenced this pull request Jul 28, 2026
Adds a skill-only plugin enabling agents to transparently pay for
x402-paywalled APIs, MCP tools, and web content via microtransactions
using AWS AgentCore Payments.

Addresses review feedback from awslabs#243 v1:
- Removed runtime code (src/, openclaw.plugin.json, package.json,
  tsconfig.json) — runtime plugin pattern deferred to separate RFC
- Removed .mcp.json (unused by skill)
- Fixed SKILL.md frontmatter (single-line description, version under
  metadata, no non-spec keys)
- Added references links in SKILL.md for progressive disclosure
- Fixed false idempotency claim (clarified retry semantics)
- Fixed debugging.md field names to match actual tool output
- Removed v1 protocol claims (only v2 validated end-to-end)
- Added security guidance (redirect safety, credential handling)
- Added plugin to both marketplace manifests
- Added .codex-plugin with required interface metadata
- Addressed drained-session-reports-usable bug in guidance
- Narrowed supported networks to validated ones (Base only)

Structure:
  plugins/aws-agent-payments/
  ├── .claude-plugin/plugin.json
  ├── .codex-plugin/plugin.json
  ├── README.md
  └── skills/x402-payments/
      ├── SKILL.md
      └── references/
          ├── protocol.md
          ├── setup.md
          └── debugging.md
@wirjo
wirjo force-pushed the feat/aws-agent-payments branch from 161e07a to f00367d Compare July 28, 2026 22:09
Adds a skill-only plugin enabling agents to transparently pay for
x402-paywalled APIs, MCP tools, and web content via microtransactions
using AWS AgentCore Payments.

Addresses review feedback from awslabs#243 v1:
- Removed runtime code (src/, openclaw.plugin.json, package.json,
  tsconfig.json) — runtime plugin pattern deferred to separate RFC
- Removed .mcp.json (unused by skill)
- Fixed SKILL.md frontmatter (single-line description, version under
  metadata, no non-spec keys)
- Added references links in SKILL.md for progressive disclosure
- Fixed false idempotency claim (clarified retry semantics)
- Fixed debugging.md field names to match actual tool output
- Removed v1 protocol claims (only v2 validated end-to-end)
- Added security guidance (redirect safety, credential handling)
- Added plugin to both marketplace manifests
- Added .codex-plugin with required interface metadata
- Addressed drained-session-reports-usable bug in guidance
- Narrowed supported networks to validated ones (Base only)

Structure:
  plugins/aws-agent-payments/
  ├── .claude-plugin/plugin.json
  ├── .codex-plugin/plugin.json
  ├── README.md
  └── skills/x402-payments/
      ├── SKILL.md
      └── references/
          ├── protocol.md
          ├── setup.md
          └── debugging.md
@wirjo
wirjo force-pushed the feat/aws-agent-payments branch from f00367d to eb42f59 Compare July 29, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants