Skip to content

feat: add spraay crypto payments agent example#20

Open
plagtech wants to merge 2 commits intoNVIDIA:mainfrom
plagtech:add-spraay-crypto-payments
Open

feat: add spraay crypto payments agent example#20
plagtech wants to merge 2 commits intoNVIDIA:mainfrom
plagtech:add-spraay-crypto-payments

Conversation

@plagtech
Copy link
Copy Markdown

@plagtech plagtech commented Mar 22, 2026

Add Spraay crypto payments agent example

Summary

This PR adds a Spraay Crypto Payments Agent example that demonstrates how to build an AI agent capable of executing cryptocurrency payments across 13 blockchains using the x402 protocol.

What It Does

The example provides 8 custom tools that connect to the Spraay x402 gateway (gateway.spraay.app), enabling any NeMo Agent Toolkit agent to:

  • Query tools (free): check gateway health, list routes/pricing, list supported chains, check wallet balances, get token prices
  • Action tools (paid via x402 USDC micropayment): batch-send tokens to multiple recipients, create milestone-based escrow contracts, discover robots/IoT devices via the Robot Task Protocol (RTP)

Why This Matters for Agent Toolkit Users

Agents that take action in the real world need to pay for things. The x402 protocol makes payments native to HTTP — agents pay per API request with USDC, no wallet UX required. This example shows how to integrate a payment layer into any NeMo Agent Toolkit workflow.

What's Included

examples/spraay_crypto_payments/
├── README.md                                    # Full documentation
├── pyproject.toml                               # Dependencies
├── configs/
│   └── config.yml                               # Workflow config (ReAct + 8 tools)
└── src/spraay_crypto_payments/
    ├── __init__.py                              # Tool registration
    └── spraay_tools.py                          # 8 async tools (httpx-based)

Quick Start

export NVIDIA_API_KEY=<your-key>
nat run --config_file configs/config.yml --input "What chains does Spraay support?"

Supported Chains

Base · Ethereum · Arbitrum · Polygon · BNB · Avalanche · Solana · Bitcoin · Stacks · Unichain · Plasma · BOB · Bittensor

Related

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Mar 22, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copy link
Copy Markdown
Member

@willkill07 willkill07 left a comment

Choose a reason for hiding this comment

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

This example doesn't run. The code is invalid.

All examples should show sample runs with expected output.

@plagtech plagtech requested a review from a team as a code owner April 3, 2026 15:43
@plagtech
Copy link
Copy Markdown
Author

plagtech commented Apr 3, 2026

This example doesn't run. The code is invalid.

All examples should show sample runs with expected output.

Thanks for the review — I've rewritten the example to use the proper @register_function / FunctionBaseConfig / FunctionInfo pattern and added expected output to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external This issue was filed by someone outside of the NeMo Agent toolkit team feature request New feature or request non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants