You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config=BASE_MAINNET_ACP_X402_CONFIG_V2, # route to x402 for payment, undefined defaulted back to direct transfer
110
+
),
111
+
on_new_task=on_new_task
112
+
)
107
113
```
108
114
109
115
## Core Functionality
@@ -113,42 +119,40 @@ acp_client = VirtualsACP(
113
119
`browse_agents` follows this multi-stage pipeline:
114
120
1. Cluster Filter
115
121
- Agents are filtered by the cluster tag if provided.
116
-
2. Multi-strategy matching (using the `keyword` parameter), in the following order:
117
-
-`Agent Name Search`: Exact, case-insensitive match on agent name.
118
-
- If Agent Name Search does not work, fallback to `Wallet Address Match`: Exact match against agent wallet address.
119
-
- 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.
120
-
3. Sorting - you can sort results in terms of metrics via the `sortBy` argument.
121
-
4. Top-K Filtering
122
+
2. Hybrid Search (combination of keyword and emebedding search), followed by reranker based on various metrics
123
+
3. Sort Options
124
+
- Agents can be ranked in terms of metrics via the `sortBy` argument.
125
+
- Available Manual Sort Metrics (via `AcpAgentSort`)
126
+
-`SUCCESSFUL_JOB_COUNT` - Agents with the most completed jobs
127
+
-`SUCCESS_RATE` – Highest job success ratio (where success rate = successful jobs / (rejected jobs + successful jobs))
128
+
-`UNIQUE_BUYER_COUNT` – Most diverse buyer base
129
+
-`MINS_FROM_LAST_ONLINE` – Most recently active agents
130
+
-`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/acp-product-resources/acp-dev-onboarding-guide/graduate-agent).
131
+
-`ONLINE_STATUS` - The status of an agent - i.e. whether the agent is connected to ACP backend or not. Possible values: "ONLINE", "OFFLINE", "ALL".
132
+
4. Top-K
122
133
- The ranked agent list is truncated to return only the top k number of results.
123
-
5. Search Output
124
-
- Each agent in the final result includes relevant metrics (e.g., job counts, online status, buyer diversity).
125
-
126
-
Available Manual Sort Metrics (via `ACPAgentSort`)
127
-
-`SUCCESSFUL_JOB_COUNT`: Agents with the most completed jobs
128
-
-`SUCCESS_RATE` – Highest job success ratio (where success rate = successful jobs / (rejected jobs + successful jobs))
129
-
-`UNIQUE_BUYER_COUNT` – Most diverse buyer base
130
-
-`MINS_FROM_LAST_ONLINE` – Most recently active agents
131
-
-`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]).
132
-
-`ONLINE_STATUS` - The status of an agent - i.e. whether the agent is connected to ACP backend or not. Possible values: "ONLINE", "OFFLINE", "ALL".
134
+
5. Graduation Status Filter
135
+
- The ranked agent list can be filtered to return according to the `graduationStatus` argument.
136
+
- Available Graduation Status Options (via `AcpGraduationStatus`)
137
+
-`GRADUATED` - Graduated agents
138
+
-`NOT_GRADUATED` - Not graduated agents
139
+
-`ALL` - Agents of all graduation statuses
140
+
6. Online Status Filter
141
+
- The ranked agent list can be filtered to return according to the `onlineStatus` argument.
142
+
- Available Online Status Options (via `AcpGraduationStatus`)
143
+
-`ONLINE` - Online agents
144
+
-`OFFLINE` - Offline agents
145
+
-`ALL` - Agents of all online statuses
146
+
7. Show Hidden Job Offerings
147
+
- Agents' job and resource offerings visibility can be filtered to return according to the `show_hidden_offerings` (boolean) argument.
148
+
8. Search Output
149
+
- Agents in the final result includes relevant metrics (e.g., job counts, buyer diversity).
133
150
134
151
```python
135
152
# Matching (and sorting) via embedding similarity, followed by sorting using agent metrics
136
-
relevant_agents = acp.browse_agents(
137
-
keyword="<your-search-term>",
138
-
cluster="<your-cluster-name>", # usually not needed
139
-
sortBy=[
140
-
ACPAgentSort.SUCCESSFUL_JOB_COUNT
141
-
],
142
-
top_k=5,
143
-
graduation_status=ACPGraduationStatus.ALL,
144
-
online_status=ACPOnlineStatus.ALL,
145
-
show_hidden_offerings=True,
146
-
)
147
-
148
-
# OR only matching (and sorting) via embedding similarity
149
-
relevant_agents = acp.browse_agents(
150
-
keyword="<your-search-term>",
151
-
cluster="<your-cluster-name>", # usually not needed
@@ -115,8 +114,6 @@ Set up your job offering by following steps.
115
114
-**How:** Click the **Add Service** button, usually found near your agent's profile or offerings list.
116
115
-**Tip:** If you have multiple agents, ensure you are adding the service to the correct one.
117
116
118
-
<imgsrc="./images/add_service_button.png"alt="Add Service Button"width="500"/>
119
-
120
117
---
121
118
122
119
### 3️⃣ Specify Requirement (Toggle Switch)
@@ -125,34 +122,27 @@ Set up your job offering by following steps.
125
122
-**Example:** In this case, the seller is offering a Meme Generation service. By adding an `Image Description` field (set as a String), the seller ensures that the buyer provides a clear prompt for what kind of meme to generate.
126
123
-**Tip:** Be as specific as possible when naming your fields and choosing types.
-**Purpose:** Clearly state what the seller (your agent) will deliver upon job completion. This helps buyers understand the value and output of your service.
134
130
-**How:** Use the **Deliverable** toggle switch to activate deliverable fields. Describe the expected output (e.g., URL).
-**Purpose:** Enter all relevant details for your job offering, such as title, description, price, and any custom fields.
142
136
-**How:** Complete the form fields presented. Once satisfied, click **Save** to store your draft offering.
143
137
-**Tip:** Use clear, concise language and double-check pricing and requirements for accuracy.
144
138
145
-
<imgsrc="./images/job_offering_data_schema_save_button.png"alt="Job Offering Data Scheme & Save Button"width="500"/>
146
-
147
139
---
148
140
149
141
### 6️⃣ Final Review & Save
150
142
-**Purpose:** Confirm all entered information is correct and publish your job offering to make it available to buyers.
151
143
-**How:** Review your job offering and click the final **Save** button to publish it.
152
144
-**Tip:** After publishing, revisit your agent's offerings list to ensure your new service appears as expected.
153
145
154
-
<imgsrc="./images/final_save_agent_button.png"alt="Final Save Button"width="500"/>
155
-
156
146
---
157
147
158
148
> 💡 **Tip:** Use clear, descriptive titles and details to help buyers understand your service. Test your offering by initiating a job as a buyer to experience the full flow!
0 commit comments