Add Vibes-Coded Observer middleware example (x402 guard gates before settle)#20
Open
doteyeso-ops wants to merge 3 commits into
Open
Add Vibes-Coded Observer middleware example (x402 guard gates before settle)#20doteyeso-ops wants to merge 3 commits into
doteyeso-ops wants to merge 3 commits into
Conversation
Author
|
@AetherCore-Dev @BTCBoyd @0xAllenDev — bumping for review. This adds |
…erifiable accountability)
… nonexistent fields); verified mints receipt
Open
3 tasks
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.
Summary
Adds
examples/vibes_coded_observer.py— a drop-in Observer that screens an agent's irreversible actions (payments, transfers, stateful writes) against Vibes-Coded's hosted x402 pay-per-call guard APIs before ag402 settles them.Because
ag402_core.enable()already auto-pays any HTTP 402, the guard calls need zero payment code — ag402 transparently settles the tiny per-call USDC fee.How it fits the ag402 / Observer split
Guard mapping (all live endpoints):
payment_or_transfer/idempotent_callidempotency-guardstateful_actionagent-state-guardexternal_writememory-exfil-guardvalue_transferrate-limit-guardA guard returning
allowed: falseblocks the action (fail-closed). Uses the sandbox key fromAG402_SANDBOX_KEY(thanks @BTCBoyd for the key in #4).Test plan
pip install ag402-core httpx && AG402_SANDBOX_KEY=... python examples/vibes_coded_observer.pyHappy to adjust the guard→intent mapping or wire it into the existing integration examples (LangChain/CrewAI/Autogen) if you'd like it as a first-class reference integration.