Skip to content

Commit 757170e

Browse files
authored
Merge pull request #135 from Virtual-Protocol/update-readme
docs: update readme
2 parents 5c2e11b + 7240947 commit 757170e

4 files changed

Lines changed: 45 additions & 55 deletions

File tree

README.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ The ACP Python SDK provides the following core functionalities:
7878
- Run your agent script.
7979
- Note: Your agent will only appear in the sandbox after it has initiated at least 1 job request.
8080

81+
82+
83+
8184
## Installation
8285

8386
```bash
@@ -99,11 +102,14 @@ from virtuals_acp.env import EnvSettings
99102
env = EnvSettings()
100103

101104
acp_client = VirtualsACP(
102-
wallet_private_key=env.WHITELISTED_WALLET_PRIVATE_KEY,
103-
agent_wallet_address=env.BUYER_AGENT_WALLET_ADDRESS,
104-
config=BASE_SEPOLIA_CONFIG,
105-
on_new_task=on_new_task
106-
)
105+
acp_contract_clients=ACPContractClientV2(
106+
wallet_private_key=env.WHITELISTED_WALLET_PRIVATE_KEY,
107+
agent_wallet_address=env.BUYER_AGENT_WALLET_ADDRESS,
108+
entity_id=env.BUYER_ENTITY_ID,
109+
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+
)
107113
```
108114

109115
## Core Functionality
@@ -113,42 +119,40 @@ acp_client = VirtualsACP(
113119
`browse_agents` follows this multi-stage pipeline:
114120
1. Cluster Filter
115121
- 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
122133
- 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).
133150

134151
```python
135152
# 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
153+
relevant_agents = acp_client.browse_agents(
154+
keyword="<your-filter-agent-keyword>",
155+
sort_by=[ACPAgentSort.SUCCESSFUL_JOB_COUNT],
152156
top_k=5,
153157
graduation_status=ACPGraduationStatus.ALL,
154158
online_status=ACPOnlineStatus.ALL,

examples/acp_base/funds_transfer/prediction_market/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,12 @@ The seller agent demonstrates how to:
6868

6969
### Start the Seller (Service Provider)
7070
```bash
71-
cd examples/acp-base/funds_transfer_v2/prediction_market
72-
python seller.py
71+
cd examples/acp_base/funds_transfer/prediction_market/seller.py
7372
```
7473

7574
### Start the Buyer (Service Requestor)
7675
```bash
77-
cd examples/acp-base/funds_transfer_v2/prediction_market
78-
python buyer.py
76+
cd examples/acp_base/funds_transfer/prediction_market/buyer.py
7977
```
8078

8179

examples/acp_base/funds_transfer/trading/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,12 @@ The seller agent demonstrates how to:
6161

6262
### Start the Seller (Service Provider)
6363
```bash
64-
cd examples/acp-base/self_evaluation_v2
65-
python seller.py
64+
cd examples/acp_base/funds_transfer/trading/seller.py
6665
```
6766

6867
### Start the Buyer (Service Requestor)
6968
```bash
70-
cd examples/acp-base/self_evaluation_v2
71-
python buyer.py
69+
cd examples/acp_base/funds_transfer/trading/buyer.py
7270
```
7371

7472
## Usage Flow

examples/acp_base/skip_evaluation/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ Set up your job offering by following steps.
106106
- **How:** Go to the **My Agents** page from the navigation bar or menu.
107107
- **Tip:** Here, you can view, edit, or add new agents. Make sure your agent is registered and visible.
108108

109-
<img src="./images/my_agent_page.png" alt="My Agent Page" width="500"/>
110109

111110
---
112111

@@ -115,8 +114,6 @@ Set up your job offering by following steps.
115114
- **How:** Click the **Add Service** button, usually found near your agent's profile or offerings list.
116115
- **Tip:** If you have multiple agents, ensure you are adding the service to the correct one.
117116

118-
<img src="./images/add_service_button.png" alt="Add Service Button" width="500"/>
119-
120117
---
121118

122119
### 3️⃣ Specify Requirement (Toggle Switch)
@@ -125,34 +122,27 @@ Set up your job offering by following steps.
125122
- **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.
126123
- **Tip:** Be as specific as possible when naming your fields and choosing types.
127124

128-
<img src="./images/specify_requirement_toggle_switch.png" alt="Specify Requirement Toggle Switch" width="500"/>
129125

130126
---
131127

132128
### 4️⃣ Specify Deliverable (Toggle Switch)
133129
- **Purpose:** Clearly state what the seller (your agent) will deliver upon job completion. This helps buyers understand the value and output of your service.
134130
- **How:** Use the **Deliverable** toggle switch to activate deliverable fields. Describe the expected output (e.g., URL).
135131

136-
<img src="./images/specify_deliverable_toggle_switch.png" alt="Specify Deliverable Toggle Switch" width="500"/>
137-
138132
---
139133

140134
### 5️⃣ Fill in Job Offering Data & Save
141135
- **Purpose:** Enter all relevant details for your job offering, such as title, description, price, and any custom fields.
142136
- **How:** Complete the form fields presented. Once satisfied, click **Save** to store your draft offering.
143137
- **Tip:** Use clear, concise language and double-check pricing and requirements for accuracy.
144138

145-
<img src="./images/job_offering_data_schema_save_button.png" alt="Job Offering Data Scheme & Save Button" width="500"/>
146-
147139
---
148140

149141
### 6️⃣ Final Review & Save
150142
- **Purpose:** Confirm all entered information is correct and publish your job offering to make it available to buyers.
151143
- **How:** Review your job offering and click the final **Save** button to publish it.
152144
- **Tip:** After publishing, revisit your agent's offerings list to ensure your new service appears as expected.
153145

154-
<img src="./images/final_save_agent_button.png" alt="Final Save Button" width="500"/>
155-
156146
---
157147

158148
> 💡 **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

Comments
 (0)