Repository navigation
Add CrewAI x402 tool example - #438
Merged
Merged
Conversation
|
@Edgadafi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
M0nsxx
approved these changes
Nov 22, 2026
M0nsxx
left a comment
Member
There was a problem hiding this comment.
AI-assisted review (Claude)
Checked: CI green; testnet tx 632ebebc…3d8d is a real 0.02 USDC payment from the author's payer to the author's own x402Serve seller (GDYJA25N…), not a Nirium key; the $2 route is refused before signing; demo video attached. Approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #367
Adds
examples/crewai-x402/: a CrewAI tool wrapping the Nirium Python SDK'sx402_fetch()withmax_amount_per_payment($1 cap, stellar:testnet), and a two-agent crew where a Data scout picks the route and a Payer pays my own localx402Serveroute (server/).Testnet evidence (my own keys):
/paid/market-summary($0.02): 632ebebc…3d8d/paid/full-report($2) refused before signing withX402SpendCapError(signed: false), and the crew finishes without crashing.Tests: 15 offline tests (
pytest, no network): the tool against faked HTTP, plus the crew with a scripted model for the paid and refused runs.Pinned versions: nirium 0.12.7, crewai 1.15.44, python-dotenv 1.2.2 (crewai needs >=1.2.2), Python 3.10–3.13.
Demo video (1:09): Nirium may share this video with credit to @Edgadafi.
pr367-crewai-demo.mp4