Skip to content

Add Virtuals ACP integration example#6

Merged
AlexanderLawson17 merged 1 commit into
mainfrom
feat/virtuals-acp-integration
Mar 26, 2026
Merged

Add Virtuals ACP integration example#6
AlexanderLawson17 merged 1 commit into
mainfrom
feat/virtuals-acp-integration

Conversation

@AlexanderLawson17

Copy link
Copy Markdown
Owner

Summary

  • Adds examples/virtuals_acp_safe_buyer.py showing Revettr risk checks before ACP job creation
  • Adds brief Virtuals ACP section to README
  • Buyer agents score seller wallets before committing funds on the Agent Commerce Protocol

Context

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 with ACPJobPhase) so it feels native to existing ACP users.

Test plan

  • Example runs without errors (uses Revettr free tier, no wallet needed for demo mode)
  • README section renders correctly
  • Commented ACP code matches real SDK class names and method signatures

🤖 Generated with Claude Code

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>
@AlexanderLawson17 AlexanderLawson17 merged commit 5bca784 into main Mar 26, 2026
3 checks passed
@AlexanderLawson17 AlexanderLawson17 deleted the feat/virtuals-acp-integration branch March 26, 2026 00:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +106 to +107
"decision": "warn",
"score": None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant