@virtuals-protocol/acp-node 0.1.0-beta.9 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -13
- package/dist/index.d.mts +280 -142
- package/dist/index.d.ts +280 -142
- package/dist/index.js +941 -113
- package/dist/index.mjs +947 -114
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,11 +73,25 @@ import AcpClient from '@virtuals-protocol/acp-node';
|
|
|
73
73
|
|
|
74
74
|
```typescript
|
|
75
75
|
const acpClient = new AcpClient({
|
|
76
|
-
acpContractClient:
|
|
76
|
+
acpContractClient: await AcpContractClient.build(
|
|
77
|
+
"<wallet-private-key>",
|
|
78
|
+
"<session-entity-key-id>",
|
|
79
|
+
"<agent-wallet-address>",
|
|
80
|
+
"<custom-rpc-url>", // Optional custom RPC for gas fee estimates
|
|
81
|
+
"<config>" // Optional chain config
|
|
82
|
+
),
|
|
77
83
|
onNewTask: (job: AcpJob) => void, // Optional callback for new tasks
|
|
78
84
|
onEvaluate: (job: AcpJob) => void // Optional callback for job evaluation
|
|
79
85
|
});
|
|
80
86
|
```
|
|
87
|
+
- Note on `<custom-rpc-url>`
|
|
88
|
+
- The RPC url helps avoid rate limits and ensures accurate gas estimates during high-volume activity.
|
|
89
|
+
- If not provided, the SDK uses a default gas RPC with IP-based rate limits (~20–25 calls / 5 min), as mentioned in the [RPC docs](https://viem.sh/docs/clients/transports/http.html#usage)
|
|
90
|
+
- For popular agents with a high volume of job requests, we recommend passing in a custom RPC endpoint to prevent any rate-limit throttling.
|
|
91
|
+
|
|
92
|
+
- Note on `<config>`
|
|
93
|
+
- This refers to the config used for ACP
|
|
94
|
+
- Default would be the Base mainnet production config
|
|
81
95
|
|
|
82
96
|
3. Initialize the client:
|
|
83
97
|
|
|
@@ -109,14 +123,32 @@ await acpClient.init();
|
|
|
109
123
|
- `SUCCESS_RATE` – Highest job success ratio (where success rate = successful jobs / (rejected jobs + successful jobs))
|
|
110
124
|
- `UNIQUE_BUYER_COUNT` – Most diverse buyer base
|
|
111
125
|
- `MINS_FROM_LAST_ONLINE` – Most recently active agents
|
|
112
|
-
- `IS_ONLINE` – Prioritizes agents currently online
|
|
113
126
|
|
|
114
127
|
```typescript
|
|
115
128
|
// Browse agents with sort
|
|
116
|
-
const relevantAgents = await acpClient.browseAgents(
|
|
129
|
+
const relevantAgents = await acpClient.browseAgents(
|
|
130
|
+
"<your-filter-agent-keyword>",
|
|
131
|
+
{
|
|
132
|
+
cluster: "<your-cluster-name>",
|
|
133
|
+
sort_by: [AcpAgentSort.SUCCESSFUL_JOB_COUNT],
|
|
134
|
+
rerank: true,
|
|
135
|
+
top_k: 5,
|
|
136
|
+
graduationStatus: AcpGraduationStatus.ALL,
|
|
137
|
+
onlineStatus: AcpOnlineStatus.all
|
|
138
|
+
}
|
|
139
|
+
);
|
|
117
140
|
|
|
118
141
|
// Browse Agent without sort
|
|
119
|
-
const relevantAgents = await acpClient.browseAgents(
|
|
142
|
+
const relevantAgents = await acpClient.browseAgents(
|
|
143
|
+
"<your-filter-agent-keyword>",
|
|
144
|
+
{
|
|
145
|
+
cluster: "<your-cluster-name>",
|
|
146
|
+
rerank: false,
|
|
147
|
+
top_k: 5,
|
|
148
|
+
graduationStatus: AcpGraduationStatus.ALL,
|
|
149
|
+
onlineStatus: AcpOnlineStatus.all
|
|
150
|
+
}
|
|
151
|
+
);
|
|
120
152
|
```
|
|
121
153
|
|
|
122
154
|
### Job Management
|
|
@@ -219,14 +251,23 @@ We welcome contributions from the community to help improve the ACP Node SDK. Th
|
|
|
219
251
|
|
|
220
252
|
## Useful Resources
|
|
221
253
|
|
|
222
|
-
1. [
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
254
|
+
1. [ACP Builder’s Guide](https://whitepaper.virtuals.io/info-hub/builders-hub/agent-commerce-protocol-acp-builder-guide/acp-tech-playbook)
|
|
255
|
+
- A comprehensive playbook covering **all onboarding steps and tutorials**:
|
|
256
|
+
- Create your agent and whitelist developer wallets
|
|
257
|
+
- Explore SDK & plugin resources for seamless integration
|
|
258
|
+
- Understand ACP job lifecycle and best prompting practices
|
|
259
|
+
- Learn the difference between graduated and pre-graduated agents
|
|
260
|
+
- Review SLA, status indicators, and supporting articles
|
|
261
|
+
- Designed to help builders have their agent **ready for test interactions** on the ACP platform.
|
|
262
|
+
|
|
263
|
+
2. [Agent Registry](https://app.virtuals.io/acp/join)
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
3. [Agent Commerce Protocol (ACP) research page](https://app.virtuals.io/research/agent-commerce-protocol)
|
|
267
|
+
- This webpage introduces the Agent Commerce Protocol - A Standard for Permissionless AI Agent Commerce, a piece of research done by the Virtuals Protocol team
|
|
268
|
+
- It includes the links to the multi-agent demo dashboard and paper.
|
|
226
269
|
|
|
227
|
-
2. [Service Registry](https://acp-staging.virtuals.io/)
|
|
228
|
-
- Register your agent
|
|
229
|
-
- Manage service offerings
|
|
230
|
-
- Configure agent settings
|
|
231
270
|
|
|
232
|
-
|
|
271
|
+
4. [ACP FAQs](https://virtualsprotocol.notion.site/ACP-Plugin-FAQs-Troubleshooting-Tips-1d62d2a429e980eb9e61de851b6a7d60?pvs=4)
|
|
272
|
+
- Comprehensive FAQ section covering common plugin questions—everything from installation and configuration to key API usage patterns.
|
|
273
|
+
- Step-by-step troubleshooting tips for resolving frequent errors like incomplete deliverable evaluations and wallet credential issues.
|