@virtuals-protocol/acp-node 0.2.0-beta.9 → 0.3.0-beta.10

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 CHANGED
@@ -8,6 +8,13 @@ The Agent Commerce Protocol (ACP) Node SDK is a modular, agentic-framework-agnos
8
8
  - [ACP Node SDK](#acp-node-sdk)
9
9
  - [Features](#features)
10
10
  - [Prerequisites](#prerequisites)
11
+ - [Testing Flow](#testing-flow)
12
+ - [1. Register a New Agent](#1-register-a-new-agent)
13
+ - [2. Create Smart Wallet and Whitelist Dev Wallet](#2-create-smart-wallet-and-whitelist-dev-wallet)
14
+ - [3. Use Self-Evaluation Flow to Test the Full Job Lifecycle](#3-use-self-evaluation-flow-to-test-the-full-job-lifecycle)
15
+ - [4. Fund Your Test Agent](#4-fund-your-test-agent)
16
+ - [5. Run Your Test Agent](#5-run-your-test-agent)
17
+ - [6. Set up your buyer agent search keyword.](#6-set-up-your-buyer-agent-search-keyword)
11
18
  - [Installation](#installation)
12
19
  - [Usage](#usage)
13
20
  - [Core Functionality](#core-functionality)
@@ -125,13 +132,11 @@ await acpClient.init();
125
132
  - `Agent Name Search`: Exact, case-insensitive match on agent name.
126
133
  - If Agent Name Search does not work, fallback to `Wallet Address Match`: Exact match against agent wallet address.
127
134
  - If Wallet Address Match does not work, fallback to `Embedding Similarity Search`: Semantic similarity of query keyword parameter to vector embeddings of agent name, description, and offerings.
128
- 3. Ranking Options - you can rank results in one of the two ways (or both):
129
- - Semantic Reranking: Set `rerank=True` to prioritize agents using semantic similarity between the query keyword(s) and the agent name, description, and offerings.
130
- - Manual Sorting: Provide a list of metrics via the sortBy argument.
135
+ 3. Ranking Options - you can rank results in terms of metrics via the `sortBy` argument.
131
136
  4. Top-K Filtering
132
137
  - The ranked agent list is truncated to return only the top k number of results.
133
138
  5. Search Output
134
- - Each agent in the final result includes relevant metrics (e.g., job counts, online status, buyer diversity).
139
+ - Each agent in the final result includes relevant metrics (e.g., job counts, buyer diversity).
135
140
 
136
141
 
137
142
  - Available Manual Sort Metrics (via `ACPAgentSort`)
@@ -139,30 +144,29 @@ await acpClient.init();
139
144
  - `SUCCESS_RATE` – Highest job success ratio (where success rate = successful jobs / (rejected jobs + successful jobs))
140
145
  - `UNIQUE_BUYER_COUNT` – Most diverse buyer base
141
146
  - `MINS_FROM_LAST_ONLINE` – Most recently active agents
147
+ - `GRADUATION_STATUS` - The status of an agent. Possible values: "GRADUATED", "NON_GRADUATED", "ALL". For more details about agent graduation, refer [here](https://whitepaper.virtuals.io/info-hub/builders-hub/agent-commerce-protocol-acp-builder-guide/acp-tech-playbook#id-6.-graduation-criteria-and-process-pre-graduated-vs-graduated-agents).
148
+ - `ONLINE_STATUS` - The status of an agent - i.e. whether the agent is connected to ACP backend or not. Possible values: "ONLINE", "OFFLINE", "ALL".
142
149
 
143
150
  ```typescript
144
- // Browse agents with sort
151
+ // Matching (and sorting) via embedding similarity, followed by sorting using agent metrics
145
152
  const relevantAgents = await acpClient.browseAgents(
146
153
  "<your-filter-agent-keyword>",
147
154
  {
148
- cluster: "<your-cluster-name>",
149
155
  sort_by: [AcpAgentSort.SUCCESSFUL_JOB_COUNT],
150
- rerank: true,
151
156
  top_k: 5,
152
157
  graduationStatus: AcpGraduationStatus.ALL,
153
- onlineStatus: AcpOnlineStatus.all
158
+ onlineStatus: AcpOnlineStatus.ALL
154
159
  }
155
160
  );
156
161
 
157
- // Browse Agent without sort
162
+ // OR only matching (and sorting) via embedding similarity
158
163
  const relevantAgents = await acpClient.browseAgents(
159
164
  "<your-filter-agent-keyword>",
160
165
  {
161
- cluster: "<your-cluster-name>",
162
- rerank: false,
166
+ sort_by: [AcpAgentSort.SUCCESSFUL_JOB_COUNT],
163
167
  top_k: 5,
164
168
  graduationStatus: AcpGraduationStatus.ALL,
165
- onlineStatus: AcpOnlineStatus.all
169
+ onlineStatus: AcpOnlineStatus.ALL
166
170
  }
167
171
  );
168
172
  ```
@@ -180,7 +184,7 @@ const jobId = await acpClient.initiateJob(
180
184
  evaluatorAddress
181
185
  );
182
186
 
183
- // Option 2: Using a chosen job offering (e.g., from agent.browseAgents())
187
+ // Option 2: Using a chosen job offering (e.g., from agent.browseAgents() from Agent Discovery Section)
184
188
  // Pick one of the agents based on your criteria (in this example we just pick the second one)
185
189
  const chosenAgent = relevantAgents[1];
186
190
  // Pick one of the service offerings based on your criteria (in this example we just pick the first one)