Skip to content

Commit 91556a4

Browse files
committed
docs: update acp plugin readme
1 parent 9464736 commit 91556a4

File tree

5 files changed

+104
-4
lines changed

5 files changed

+104
-4
lines changed

docs/imgs/Join-acp.png

1.25 MB
Loading

docs/imgs/connect-wallet.png

1.79 MB
Loading

docs/imgs/register-agent.png

72.2 KB
Loading

plugins/acp/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ The Agent Commerce Protocol (ACP) plugin is used to handle trading transactions
4242
- Post tweets and tag other agents for job requests
4343
- Respond to tweets from other agents
4444

45+
## Prerequisite
46+
⚠️⚠️⚠️ 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/).
47+
This step is a critical precursor. Without registration, the counterpart agent will not be able to discover or interact with your agent.
48+
4549
## Installation
4650

4751
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
177181

178182
## Agent Registry
179183

180-
To register your agent, please head over to the [agent registry](https://acp-dev.virtuals.io/).
184+
To register your agent, please head over to the [agent registry](https://acp-staging.virtuals.io/).
181185

182186
1. Click on "Join ACP" button
183187

184-
<img src="../../docs/imgs/Join-acp.png" width="400" alt="ACP Agent Registry">
188+
<img src="../../docs/imgs/Join-acp.png" width="400" alt="ACP Agent Registry">
185189

186190
2. Click on "Connect Wallet" button
187191

188-
<img src="../../docs/imgs/connect-wallet.png" width="400" alt="Connect Wallet">
192+
<img src="../../docs/imgs/connect-wallet.png" width="400" alt="Connect Wallet">
189193

190194
3. Register your agent there + include a service offering and a price (up to 5 max for now)
191195

192-
<img src="../../docs/imgs/register-agent.png" width="400" alt="Register Agent">
196+
<img src="../../docs/imgs/register-agent.png" width="400" alt="Register Agent">
193197

194198
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.
195199

plugins/acp/examples/README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# ACP Plugin Examples
2+
3+
This directory contains example implementations of the ACP (Agent Commerce Protocol) plugin, demonstrating both buyer and seller interactions.
4+
5+
## Overview
6+
7+
In this example, we have two agents:
8+
- `test_buyer.py`: An agent that looks for meme generation services
9+
- `test_seller.py`: An agent that provides meme generation services
10+
11+
## Buyer Example
12+
13+
The buyer agent (`test_buyer.py`):
14+
- Posts tweets using memes
15+
- Searches for meme generation services through ACP
16+
- Uses Twitter integration for posting
17+
18+
### Configuration
19+
20+
```python
21+
acp_plugin = AcpPlugin(
22+
options=AdNetworkPluginOptions(
23+
api_key = "<your-GAME-dev-api-key-here>",
24+
acp_token_client = AcpToken(
25+
"<your-agent-wallet-private-key>",
26+
"<your-chain-here>"
27+
)
28+
)
29+
)
30+
```
31+
32+
33+
## Seller Example
34+
35+
The seller agent (`test_seller.py`):
36+
- Provides meme generation services
37+
- Responds to job requests through ACP
38+
- Generates and delivers memes via URLs
39+
40+
### Configuration
41+
42+
43+
```python
44+
acp_plugin = AcpPlugin(
45+
options=AdNetworkPluginOptions(
46+
api_key = "<your-GAME-dev-api-key-here>",
47+
acp_token_client = AcpToken(
48+
"<your-agent-wallet-private-key>",
49+
"<your-chain-here>"
50+
)
51+
)
52+
)
53+
```
54+
55+
## Getting Started
56+
57+
## Installation
58+
59+
1. From this directory (`acp`), run the installation:
60+
```bash
61+
poetry install
62+
```
63+
64+
2. Activate the virtual environment by running:
65+
```bash
66+
eval $(poetry env activate)
67+
```
68+
69+
3. Import acp_plugin by running:
70+
71+
```python
72+
from acp_plugin_gamesdk.acp_plugin import AcpPlugin, AdNetworkPluginOptions
73+
from acp_plugin_gamesdk.acp_token import AcpToken
74+
```
75+
76+
4. Configure your environment:
77+
- Set up your API keys
78+
- GAME API key (get from https://console.game.virtuals.io/projects)
79+
- ACP API key (please contact us to get one)
80+
- Configure your wallet private key
81+
- Set up Twitter access token
82+
83+
5. Run the examples:
84+
Run buyer
85+
```python
86+
python plugins/acp/examples/test_buyer.py
87+
```
88+
Run seller
89+
```python
90+
python plugins/acp/examples/test_seller.py
91+
```
92+
93+
## Note
94+
- Make sure to replace placeholder API keys and private keys with your own
95+
- You can use a testnet wallet to test the examples
96+
- 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)

0 commit comments

Comments
 (0)