Skip to content

edgeandnode/aws-agentcore-payments-ampersend

Repository files navigation

AgentCore Payments — Private Preview

Enable AI agents to make x402 cryptocurrency microtransactions using Amazon Bedrock AgentCore Payments.

📖 AgentCore Payments Private Beta Guide (PDF) — Full testing guide, API walkthrough, and setup (if distributed with your preview).

🤖 docs/getting-started.md — Long-form guide for humans and coding assistants.

Preview access

Your AWS account must be allowlisted for AgentCore Payments private preview. If setup_manager fails with UnknownOperationException, the Payments APIs are not enabled for that account or region — confirm with your AWS contact. See docs/getting-started.md (preview section).

What's in this repo

Directory What it does
quickstart/ IAM roles, Coinbase credential provider, payment manager, connector
scripts/ E2E data plane test — exercises APIs with role separation
strands-agent/ Strands agent that pays x402 endpoints via AgentCore
bazaar-test/ Deterministic Bazaar MCP + AgentCore test
blockrun-demo/ AgentCore → Ampersend x402 → BlockRun LLM demo
docs/ Getting started, Bazaar integration, API HTML specs

Quick path

Use a Python virtualenv at the repo root (Homebrew Python blocks system pip — PEP 668):

cd agentcore-payments-beta-main
python3 -m venv .venv
source .venv/bin/activate
pip install -r quickstart/requirements.txt

AWS CLI: use a profile with IAM admin for setup_roles.sh (e.g. AdministratorAccess on the same account you want to onboard). If you use IAM Identity Center, configure a profile via aws configure sso and run export AWS_PROFILE=your-profile.

1. Quickstart (payment stack)

cd quickstart
cp .env.sample .env
# Edit .env: Coinbase CDP (API key id, secret, wallet secret from CDP portal)

bash setup_model.sh    # once: botocore models → ~/.aws/models
bash setup_roles.sh    # once: four IAM roles (needs iam:CreateRole)
bash setup_manager.sh  # credential provider + manager + connector (runs setup_manager.py)

Details, SSO trust-policy notes, and optional control-plane URLs: quickstart/README.md.

2. E2E test (instrument + session)

cd ../scripts
cp .env.sample .env
# Fill MANAGER_ARN, CONNECTOR_ID, role ARNs from quickstart output

bash e2e-test.sh

3. Strands agent

cd ../strands-agent
cp .env.sample .env
# session + instrument IDs from step 2

pip install -r requirements.txt
python agent.py

4. BlockRun demo (optional)

cd ../blockrun-demo
cp .env.sample .env
# AgentCore + Ampersend seller wallet

pip install -r requirements.txt
python seller.py                    # terminal 1
python buyer.py "What is 2+2?"      # terminal 2

See blockrun-demo/README.md.

Docs

About

AWS AgentCore Payments samples and quickstarts (x402, CDP, guardrails)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors