awslabs / awslabs/agentcore-samples
[Add Use Case] Batch Payments Agent — multi-recipient transfers via Spraay x402 + AgentCore Payments
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 30
Description
### Describe the tutorial request
Add a Batch Payments Agent use case to the `02-use-cases/` directory. This agent
uses Amazon Bedrock AgentCore Payments to execute multi-recipient batch payments —
paying N wallets in a single atomic blockchain transaction through the Spraay x402
gateway, a live merchant with 170+ paid endpoints across 15 chains.
### Problem this solves
Every agent that needs to distribute funds (payroll, airdrops, refunds, grants,
rewards) currently requires N separate transactions for N recipients. This sample
introduces batch payments as a first-class agent primitive — one x402 micropayment,
one on-chain transaction, all recipients funded atomically.
### Key features
- Strands agent with AgentCorePaymentsPlugin for automatic x402 handling
- Batch transfer tool: pay N recipients in 1 atomic tx instead of N separate txs
- Budget-controlled micropayments ($0.01–$0.05 USDC per batch call)
- Coinbase x402 Bazaar integration for endpoint discovery
- Supports Base, Ethereum, Solana, and 12 additional chains
- Complete test suite, setup scripts, clean-up scripts
### Is this feature already supported by the AgentCore service?
Yes. This use case uses AgentCore Payments (preview), AgentCore Gateway, and
AgentCore Runtime, documented at:
- https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/payments.html
- https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/payments-how-it-works.html
### Implementation status
Implementation is complete and ready for PR submission.
Contributor guide
Research direction
Start by comparing existing use cases in the 02-use-cases/ directory, including their tests, setup scripts, and clean-up scripts. Add the Batch Payments Agent with the listed AgentCore Payments, x402, multi-recipient, chain, and budget behavior, then verify the complete test suite and scripts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, blockchain, python
- Domain
- ai, blockchain, payments
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100