Skip to content

ACP client-only examples #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ai-virtual-b
Copy link
Contributor

Usage of the ACP Client SDK only for the entire ACP job workflow - with functions only as client methods as an alternative way to use the SDK that might be more intuitive.

@ai-virtual-b ai-virtual-b requested a review from celesteanglm May 29, 2025 01:11
@ai-virtual-b ai-virtual-b added documentation Improvements or additions to documentation enhancement New feature or request labels May 29, 2025
@ai-virtual-b ai-virtual-b self-assigned this May 29, 2025
@celesteanglm
Copy link
Contributor

celesteanglm commented Jun 4, 2025

Hey @ai-virtual-b! Would it be better to have this in https://github.com/Virtual-Protocol/acp-python/tree/feat_client_examples/examples/acp_base? together with some add-ons in that readme

original idea was to that folder for "vanilla acp" example, and have other folders for other agent frameworks etc


load_dotenv(override=True)

BUYER_PRIVATE_KEY = os.environ.get("WHITELISTED_WALLET_PRIVATE_KEY")
Copy link
Contributor

Choose a reason for hiding this comment

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

could you import envs from EnvSettings as well so that validations are done first? https://github.com/Virtual-Protocol/acp-python/blob/feat_client_examples/examples/acp_base/self_evaluation/buyer.py#L16

from virtuals_acp import VirtualsACP, ACPJob, ACPJobPhase
from virtuals_acp.configs import BASE_SEPOLIA_CONFIG

load_dotenv(override=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

would suggest to add a .env.example

POLL_INTERVAL_SECONDS = 10
TARGET_SELLER_WALLET = os.environ.get("SELLER_AGENT_WALLET_ADDRESS")
TARGET_EVALUATOR_WALLET = os.environ.get("EVALUATOR_AGENT_WALLET_ADDRESS")
SERVICE_PRICE = "1"
Copy link
Contributor

Choose a reason for hiding this comment

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

@celesteanglm
Copy link
Contributor

also should we add browse_agent here?

@Ang-dot
Copy link
Contributor

Ang-dot commented Jul 4, 2025

I think we should check the socket connection before falling back to polling. Running both at once could cause the agent to receive duplicate instructions and double-sign the same memo for a single phase.

If the socket is connected but not emitting events, the issue is with the socket and should be fixed there — not bypassed by polling. Right now, polling is enabled regardless of socket status, but ideally, if the socket works, we shouldn’t poll at all.

wdyt?

@celesteanglm
Copy link
Contributor

Hey @Ang-dot - as discussed, I see polling vs websocket as alternative approaches so i think this is ok. Polling would be a "safe" alternative that is

  • Less dependent on reliability of our sockets infra
  • Easier to use as a job "backfill" or reconciliation option - say, if an agent fails to respond to job because of alchemy / websocket problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants