feat(autogen-ext): add VoidlyPay x402 tool#7651
Open
EmperorMew wants to merge 1 commit intomicrosoft:mainfrom
Open
feat(autogen-ext): add VoidlyPay x402 tool#7651EmperorMew wants to merge 1 commit intomicrosoft:mainfrom
EmperorMew wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
|
@EmperorMew please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
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.
Adds a
VoidlyPayextension underautogen-extthat lets AutoGen agentspay for HTTP 402 endpoints via the x402 protocol.
Sits next to
tools/http/andtools/mcp/and follows the sameBaseTool+Component-loadable pattern.Wraps the existing
voidly-pay-autogenPyPI package when installed (full toolkit), with a self-contained x402
round-trip fallback using
voidly-payso the tool worksout-of-the-box. Settles in <200ms via a Sourcify-verified USDC vault on
Base mainnet (
0xb592...1c12).Files
python/packages/autogen-ext/src/autogen_ext/tools/voidly_pay/_voidly_pay.py(new)python/packages/autogen-ext/src/autogen_ext/tools/voidly_pay/__init__.py(new)python/packages/autogen-ext/tests/tools/voidly_pay/test_voidly_pay.py(new — 5 unit tests)python/packages/autogen-ext/tests/tools/voidly_pay/__init__.py(new)No changes to
pyproject.toml— the tool importsvoidly_payandhttpxlazily and reports a clearerroron the result model wheneither is missing. (Happy to add a
voidly-payextra if maintainersprefer.)
Tests
5 unit tests, all passing locally. They mock
voidly_payandhttpxto exercise the inline x402 path without network:
test_tool_schema— args schema correctnesstest_component_round_trip—dump_component/load_componenttest_x402_round_trip_settles— full 402 -> sign -> retry happy pathtest_x402_blocks_when_over_cap— refuses to spend overmax_amount_creditstest_non_402_passthrough— 200 responses bypass payment logicruff check+ruff formatboth clean against the project config.How an AutoGen agent uses it
Mint a DID + claim a 10-credit faucet at https://voidly.ai/pay/claim
(no install), then export
VOIDLY_PAY_DID+VOIDLY_PAY_SECRET.Honest scope
Voidly Pay is an open marketplace (anyone can list a paid endpoint at
/pay/list-your-service). Real
volume is small today (~$4 in the vault); the value here is the working
pattern for x402-aware tool design.
CLA
Aware Microsoft requires a CLA. The cla-bot will comment and I'll sign
on the standard flow.