Add Virtuals ACP integration example#6
Conversation
Shows how to score seller agents via Revettr before creating jobs on Virtuals' Agent Commerce Protocol. Buyer agents check counterparty risk (wallet history, cross-chain trust, sanctions) and block jobs to high-risk sellers automatically. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d40dce55b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "decision": "warn", | ||
| "score": None, |
There was a problem hiding this comment.
Fail closed when Revettr scoring cannot be performed
When client.score(...) raises (for example RevettrPaymentRequired, timeouts, or other runtime errors), this handler converts the outcome to decision: "warn", and safe_buyer continues past warnings toward job creation. That means the buyer can proceed with an unscored counterparty, which defeats the safety gate this example is meant to demonstrate. Scoring failures should default to block (or an explicit opt-in override) so a job is never created without a successful risk check.
Useful? React with 👍 / 👎.
| example adds a pre-job risk layer so buyer agents don't send funds to risky sellers. | ||
|
|
||
| Usage: | ||
| pip install revettr virtuals-acp |
There was a problem hiding this comment.
Fix install instructions for wallet-based scoring
The usage instructions say to install revettr and virtuals-acp, but this example also supports REVETTR_WALLET_KEY, which invokes Revettr(wallet_private_key=...) and requires the x402 extras (revettr[x402]). If users follow the documented install command and set the wallet key, they can hit an ImportError before any risk check runs. The install command should include the required extra or the code path should avoid wallet mode unless those deps are present.
Useful? React with 👍 / 👎.
Summary
examples/virtuals_acp_safe_buyer.pyshowing Revettr risk checks before ACP job creationContext
Virtuals Protocol (virtuals.io) runs an active agent-to-agent commerce platform where AI agents discover, hire, and pay each other via smart contracts on Base. Their ACP Python SDK (
virtuals-acp) has no built-in counterparty risk checking — Revettr fills that gap.The example follows the real ACP SDK patterns (
VirtualsACP,browse_agents,ACPJobOffering.initiate_job, polling loop withACPJobPhase) so it feels native to existing ACP users.Test plan
🤖 Generated with Claude Code