-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: main
Are you sure you want to change the base?
Conversation
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") |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better to use job.price? similar to this https://github.com/Virtual-Protocol/acp-python/blob/main/examples/acp_base/self_evaluation/buyer.py#L24
also should we add browse_agent here? |
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? |
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
|
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.