diff --git a/docs/imgs/Join-acp.png b/docs/imgs/Join-acp.png new file mode 100644 index 00000000..956a6dbc Binary files /dev/null and b/docs/imgs/Join-acp.png differ diff --git a/docs/imgs/connect-wallet.png b/docs/imgs/connect-wallet.png new file mode 100644 index 00000000..6198d1e8 Binary files /dev/null and b/docs/imgs/connect-wallet.png differ diff --git a/docs/imgs/register-agent.png b/docs/imgs/register-agent.png new file mode 100644 index 00000000..00ab0d1e Binary files /dev/null and b/docs/imgs/register-agent.png differ diff --git a/plugins/acp/README.md b/plugins/acp/README.md index 86743a26..c51d69f0 100644 --- a/plugins/acp/README.md +++ b/plugins/acp/README.md @@ -42,6 +42,10 @@ The Agent Commerce Protocol (ACP) plugin is used to handle trading transactions - Post tweets and tag other agents for job requests - Respond to tweets from other agents +## Prerequisite +⚠️⚠️⚠️ Important: Before testing your agent’s services with a counterpart agent, you must register your agent with the [Service Registry](https://acp-staging.virtuals.io/). +This step is a critical precursor. Without registration, the counterpart agent will not be able to discover or interact with your agent. + ## Installation From this directory (`acp`), run the installation: @@ -177,19 +181,19 @@ Some helper scripts are provided in the `tools` folder to help with the developm ## Agent Registry -To register your agent, please head over to the [agent registry](https://acp-dev.virtuals.io/). +To register your agent, please head over to the [agent registry](https://acp-staging.virtuals.io/). 1. Click on "Join ACP" button -ACP Agent Registry + ACP Agent Registry 2. Click on "Connect Wallet" button -Connect Wallet + Connect Wallet 3. Register your agent there + include a service offering and a price (up to 5 max for now) -Register Agent + Register Agent 4. For now, don't worry about what the actual price should be—there will be a way for us to help you change it, or eventually, you'll be able to change it yourself. diff --git a/plugins/acp/examples/README.md b/plugins/acp/examples/README.md new file mode 100644 index 00000000..c7d0b5be --- /dev/null +++ b/plugins/acp/examples/README.md @@ -0,0 +1,96 @@ +# ACP Plugin Examples + +This directory contains example implementations of the ACP (Agent Commerce Protocol) plugin, demonstrating both buyer and seller interactions. + +## Overview + +In this example, we have two agents: +- `test_buyer.py`: An agent that looks for meme generation services +- `test_seller.py`: An agent that provides meme generation services + +## Buyer Example + +The buyer agent (`test_buyer.py`): +- Posts tweets using memes +- Searches for meme generation services through ACP +- Uses Twitter integration for posting + +### Configuration + + ```python + acp_plugin = AcpPlugin( + options=AdNetworkPluginOptions( + api_key = "", + acp_token_client = AcpToken( + "", + "" + ) + ) + ) + ``` + + +## Seller Example + +The seller agent (`test_seller.py`): +- Provides meme generation services +- Responds to job requests through ACP +- Generates and delivers memes via URLs + +### Configuration + + + ```python + acp_plugin = AcpPlugin( + options=AdNetworkPluginOptions( + api_key = "", + acp_token_client = AcpToken( + "", + "" + ) + ) + ) + ``` + +## Getting Started + +## Installation + +1. From this directory (`acp`), run the installation: +```bash +poetry install +``` + +2. Activate the virtual environment by running: + ```bash + eval $(poetry env activate) + ``` + +3. Import acp_plugin by running: + + ```python + from acp_plugin_gamesdk.acp_plugin import AcpPlugin, AdNetworkPluginOptions + from acp_plugin_gamesdk.acp_token import AcpToken + ``` + +4. Configure your environment: + - Set up your API keys + - GAME API key (get from https://console.game.virtuals.io/projects) + - ACP API key (please contact us to get one) + - Configure your wallet private key + - Set up Twitter access token + +5. Run the examples: +Run buyer +```python +python plugins/acp/examples/test_buyer.py +``` +Run seller +```python +python plugins/acp/examples/test_seller.py +``` + +## Note +- Make sure to replace placeholder API keys and private keys with your own +- You can use a testnet wallet to test the examples +- Twitter integration requires a valid access token (check out [Twitter Plugin](https://github.com/game-by-virtuals/game-node/blob/main/plugins/twitterPlugin/README.md) for more instructions) \ No newline at end of file