feat: add Tutorial 08 — OpenClaw Agent with AgentCore Payments (zero-code) - #1797
Conversation
✅ End-to-End Validation CompleteSuccessfully tested the full x402 payment flow on a live OpenClaw instance: Test endpoint: Plugin source updated: wirjo/agentcore-x402-payments-for-openclaw@68d5e98 with key fixes for x402 v2 compliance:
|
|
Updated the README to address all review comments. Key changes:
cc @royosherove for review |
mvangara10
left a comment
There was a problem hiding this comment.
Please add AgentCore CLI command to create payment manager - or links
|
@mvangara10 @peterjiang-dev — Updated this PR to include the full plugin source code alongside the tutorial. What changed: The tutorial now offers two installation paths:
New This makes the tutorial fully self-contained — reviewers can inspect the complete implementation without needing an external repo. The same source code has also been submitted to awslabs/agent-plugins#243 as the |
|
Latest scan for commit: Security Scan ResultsScan Metadata
SummaryScanner ResultsThe table below shows findings by scanner, with status based on severity thresholds and dependencies: Column Explanations: Severity Levels (S/C/H/M/L/I):
Other Columns:
Scanner Results:
Severity Thresholds (Thresh Column):
Threshold Source: Values in parentheses indicate where the threshold is configured:
Statistics calculation:
|
1. Remove x402 from tutorial folder name (08-openclaw-payments-plugin) per Chethan's feedback via Peter 2. Replace hardcoded region list with link to official AgentCore regions docs (expanding to 10+ in Aug) 3. Recommend IAM role separation (setup vs runtime) with link to official IAM best practices docs 4. Remove 'locks USDC' phrasing — use 'sets spending budget' instead 5. Strengthen user approval guidance — explicitly state this is a safety-critical control, agent MUST ask every time 6. Add .env credential guidance — credentials must NEVER be passed as tool parameters to the LLM, read from environment only 7. Clarify testnet vs mainnet — same infrastructure is production-capable, only network parameter and funding differ 8. Update SKILL.md tool table and session creation guidance Addresses all comments from @peterjiang-dev on PR awslabs#1797
Addressing all @mvangara10 feedbackQ: "Include both Privy and CDP, be wallet agnostic"A: Done — the tutorial has had both paths since the 3rd revision:
The README and plugin are wallet-agnostic by design. Q: "Add AgentCore CLI command to create payment manager"A: Done — Prerequisites now includes the Q: "Clean up this PR with everything that is already in the docs and add relevant docs link"A: Added canonical source links to the top of each reference file (commit 5d53837):
Why we keep the reference files: These are not human documentation — they are agent-optimized extracts used at runtime by the AI agent. The skill system (SKILL.md + references/) follows the AgentSkills progressive disclosure pattern: SKILL.md loads first (~5KB), references load on-demand only when the agent encounters a specific situation. Replacing them with raw doc URLs would require the agent to fetch and parse full documentation pages at runtime, degrading performance and reliability. Q: "Is that a part of openclaw skill?"A: Yes. The
This is the standard structure for OpenClaw plugins that include agent guidance alongside executable tools. It is published as-is to ClawHub. Q: "The folder does not have the sample? Can we consolidate the sample that uses this skill?"A: This tutorial is intentionally conversational/zero-code — unlike the other tutorials (00–07) which are Python scripts, this one demonstrates installing a plugin and using it through natural language conversation. The "sample" is the conversation flow documented in the README (Steps 2–6), and the The folder structure is: There is no separate Python script because the entire point is zero-code operation through an installed plugin. |
Addressed: Folder rename + skill naming + consistencyChanges (commit 40e11a3): Q: Folder naming consistency with other tutorials Q: Skill name should be generic
Q: "08 folder will have the tutorial of a sample openclaw agent with agentcore payments which uses/maps to the openclaw skill within the folder" The README explicitly notes: "This tutorial uses the |
|
Updated the tutorial README:
|
a1b0d9a to
adf7992
Compare
Replaces the standalone Tutorial 08 with a trimmed path inside 01-payments-skills-and-cli/, alongside the two coding-assistant-driven paths added since this PR opened. Keeps only what is genuinely OpenClaw-specific (install command, openclaw.json config, chat-driven validation flow, OpenClaw-specific troubleshooting) and links out to the aws-agents-pay skill's operator-guide/security-model docs instead of duplicating them.
adf7992 to
fd237a1
Compare
|
Restructured this tutorial to fit alongside the paths added in
|
Renamed the attached diagram to images/architecture_openclaw_agent.png, matching the naming convention used by sibling tutorials in 00-getting-started/ (e.g. images/architecture.png, images/high_level_architecture.png).
|
@peterjiang-dev — architecture diagram is now added to the Reviewed the README against the human-operated vs. agent-facing boundary you've flagged in past comments on this PR: Diagram ↔ text: consistent
Up to date
Config casing checked against the actual plugin schema: confirmed Net: boundary story holds up and the doc looks current. |
…w feedback - Flag region as required with no default; clarify us-east-1 is a placeholder - Clarify per-payment ceiling vs. session budget for maxPaymentAmountAtomic - Document allowAnyRecipient as a mutually-exclusive alternative to allowedRecipients - Describe both model-visible tools explicitly instead of just naming them - Clarify package/plugin/skill identifiers (@aws/aws-agents-pay, aws-agents-pay, agents-pay) - Add conversational setup entry point alongside manual install - Explain returnBody tradeoff (metadata-only default vs. body-with-risk opt-in) - Add troubleshooting row for allowedRecipients/allowAnyRecipient conflict - Link the AWS blog post for this integration - Distinguish agents-build (coding-assistant paths) vs agents-pay (OpenClaw path) as source of truth in parent README Resources
|
@peterjiang-dev @mvangara10 — pushed changes addressing the review feedback (commit
Ready for another look. |
- Clarify Step 2 provisioning: both OpenClaw-assisted and manual paths run the same agentcore CLI/admin-script steps with human-typed session approval; OpenClaw does not skip or automate that gate. - Fix Step 3 config example: allowedOrigins/allowedRecipients now match the real sandbox.node4all.com x402 challenge (payTo address, origin) so the tutorial completes an actual end-to-end payment as written. - Disclose that this endpoint is Bazaar-listed, with a pointer to Tutorial 04 for discovery-driven flows. - Set returnBody: true in the config and expected output so the reader can see the paid content, per the blog's proposed change; keep the 10 KiB cap + untrusted:true disclosure and the guidance on when to leave it off.
config.ts defaults region to us-east-1 when omitted. Correct the README to state that, and warn that a mismatched region fails silently (manager not found) rather than erroring on missing region.
Summary
Adds Tutorial 08 for using AWS AgentCore Payments from OpenClaw with x402 v2. The tutorial installs the published
@aws/aws-agents-paypackage from ClawHub and keeps payment administration outside the model-facing runtime.The tutorial does not carry a plugin source snapshot. The canonical package and bundled
agents-payskill are maintained inaws/agent-toolkit-for-aws.Added an architecture diagram (
converse-with-openclaw-agent/images/architecture_openclaw_agent.png) showing the human-operated admin path (IAM/session/spend-limit setup, dashed/out-of-band) versus the agent-facing runtime path (boundedProcessPaymentcalls, no direct wallet access) — verified consistent with the README and the skill's security-model doc.Install
The runtime exposes exactly:
get_payment_session_statusget_paid_contentValidation
aws-agents-payconfig schema (packages/openclaw/src/config.ts,openclaw.plugin.json) for human-vs-agent boundary accuracy