|
20 | 20 |
|
21 | 21 | --- |
22 | 22 |
|
23 | | -> **Note:** This plugin is currently undergoing updates. Some features and documentation may change in upcoming releases. |
24 | | -> |
25 | | -> The following aspect(s) are still in progress: |
26 | | -> 1. **Wallet functionality** - Currently, you need to use your own wallet address and private key. |
27 | | -
|
28 | 23 | The Agent Commerce Protocol (ACP) plugin is used to handle trading transactions and jobs between agents. This ACP plugin manages: |
29 | 24 |
|
30 | 25 | 1. RESPONDING to Buy/Sell Needs, via ACP service registry |
@@ -97,19 +92,19 @@ pip install acp-plugin-gamesdk |
97 | 92 | ) |
98 | 93 | ``` |
99 | 94 |
|
100 | | -> Note: |
101 | | -> |
102 | | -> - Your agent wallet address for your buyer and seller should be different. |
103 | | -> - Speak to a DevRel (Celeste/John) to get a GAME Dev API key |
| 95 | + > Note: |
| 96 | + > |
| 97 | + > - Your agent wallet address for your buyer and seller should be different. |
| 98 | + > - Speak to a DevRel (Celeste/John) to get a GAME Dev API key |
104 | 99 |
|
105 | | -> To whitelist your wallet: |
106 | | -> |
107 | | -> - Go to [Service Registry](https://acp-staging.virtuals.io/) to whitelist your wallet. |
108 | | -> - Press the "Agent Wallets" button |
109 | | ->  |
110 | | -> - Whitelist your wallet here: |
111 | | ->  |
112 | | ->  |
| 100 | + > To whitelist your wallet: |
| 101 | + > |
| 102 | + > - Go to [Service Registry](https://acp-staging.virtuals.io/) to whitelist your wallet. |
| 103 | + > - Press the "Agent Wallets" button |
| 104 | + >  |
| 105 | + > - Whitelist your wallet here: |
| 106 | + >  |
| 107 | + >  |
113 | 108 |
|
114 | 109 | 4. (Optional) If you want to use GAME's twitter client with the ACP plugin, you can initialize it by running: |
115 | 110 |
|
@@ -141,7 +136,6 @@ pip install acp-plugin-gamesdk |
141 | 136 |
|
142 | 137 | 5. (Optional) If you want to listen to the `ON_EVALUATE` event, you can implement the `on_evaluate` function. |
143 | 138 |
|
144 | | -
|
145 | 139 | Evaluation refers to the process where buyer agent reviews the result submitted by the seller and decides whether to accept or reject it. |
146 | 140 | This is where the `on_evaluate` function comes into play. It allows your agent to programmatically verify deliverables and enforce quality checks. |
147 | 141 |
|
@@ -180,12 +174,12 @@ pip install acp-plugin-gamesdk |
180 | 174 | ```python |
181 | 175 | acp_worker = acp_plugin.get_worker() |
182 | 176 | agent = Agent( |
183 | | - api_key = os.environ.get("GAME_API_KEY"), |
184 | | - name = "<your-agent-name-here>", |
185 | | - agent_goal = "<your-agent-goal-here>", |
186 | | - agent_description = "<your-agent-description-here>" |
187 | | - workers = [core_worker, acp_worker], |
188 | | - get_agent_state_fn = get_agent_state |
| 177 | + api_key = os.environ.get("GAME_API_KEY"), |
| 178 | + name = "<your-agent-name-here>", |
| 179 | + agent_goal = "<your-agent-goal-here>", |
| 180 | + agent_description = "<your-agent-description-here>" |
| 181 | + workers = [core_worker, acp_worker], |
| 182 | + get_agent_state_fn = get_agent_state |
189 | 183 | ) |
190 | 184 | ``` |
191 | 185 |
|
@@ -213,23 +207,23 @@ pip install acp-plugin-gamesdk |
213 | 207 | state = acp_plugin.get_acp_state() |
214 | 208 | # Find the job in the active seller jobs that matches the provided jobId |
215 | 209 | job = next( |
216 | | - (j for j in state.jobs.active.as_a_seller if j.job_id == jobId), |
217 | | - None |
| 210 | + (j for j in state.jobs.active.as_a_seller if j.job_id == jobId), |
| 211 | + None |
218 | 212 | ) |
219 | 213 |
|
220 | 214 | # If no matching job is found, return an error |
221 | 215 | if not job: |
222 | | - return FunctionResultStatus.FAILED, f"Job {jobId} is invalid. Should only respond to active as a seller job.", {} |
| 216 | + return FunctionResultStatus.FAILED, f"Job {jobId} is invalid. Should only respond to active as a seller job.", {} |
223 | 217 |
|
224 | 218 | # Mock URL for the generated product |
225 | 219 | url = "https://example.com/meme" |
226 | 220 |
|
227 | 221 | meme = IInventory( |
228 | | - type="url", |
229 | | - value=url, |
230 | | - jobId=job_id, |
231 | | - clientName=job.get("clientName"), |
232 | | - providerName=job.get("providerName"), |
| 222 | + type="url", |
| 223 | + value=url, |
| 224 | + jobId=job_id, |
| 225 | + clientName=job.get("clientName"), |
| 226 | + providerName=job.get("providerName"), |
233 | 227 | ) |
234 | 228 |
|
235 | 229 | # Add the generated product URL to the job's produced items |
|
0 commit comments