agent0-sdk 0.3rc1__tar.gz → 0.5__tar.gz
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.
- agent0_sdk-0.5/MANIFEST.in +10 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/PKG-INFO +78 -5
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/README.md +77 -4
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/__init__.py +1 -1
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/agent.py +303 -29
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/contracts.py +93 -58
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/feedback_manager.py +90 -161
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/indexer.py +54 -26
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/models.py +7 -19
- agent0_sdk-0.5/agent0_sdk/core/oasf_validator.py +98 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/sdk.py +31 -16
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/subgraph_client.py +34 -15
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/web3_client.py +184 -17
- agent0_sdk-0.5/agent0_sdk/taxonomies/all_domains.json +1565 -0
- agent0_sdk-0.5/agent0_sdk/taxonomies/all_skills.json +1030 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk.egg-info/PKG-INFO +78 -5
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk.egg-info/SOURCES.txt +4 -13
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/pyproject.toml +4 -1
- agent0_sdk-0.3rc1/tests/__init__.py +0 -1
- agent0_sdk-0.3rc1/tests/config.py +0 -46
- agent0_sdk-0.3rc1/tests/conftest.py +0 -22
- agent0_sdk-0.3rc1/tests/discover_test_data.py +0 -445
- agent0_sdk-0.3rc1/tests/test_feedback.py +0 -417
- agent0_sdk-0.3rc1/tests/test_models.py +0 -224
- agent0_sdk-0.3rc1/tests/test_multi_chain.py +0 -588
- agent0_sdk-0.3rc1/tests/test_real_public_servers.py +0 -103
- agent0_sdk-0.3rc1/tests/test_registration.py +0 -267
- agent0_sdk-0.3rc1/tests/test_registrationIpfs.py +0 -227
- agent0_sdk-0.3rc1/tests/test_sdk.py +0 -240
- agent0_sdk-0.3rc1/tests/test_search.py +0 -415
- agent0_sdk-0.3rc1/tests/test_transfer.py +0 -255
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/LICENSE +0 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/endpoint_crawler.py +0 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk/core/ipfs_client.py +0 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk.egg-info/dependency_links.txt +0 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk.egg-info/requires.txt +0 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/agent0_sdk.egg-info/top_level.txt +0 -0
- {agent0_sdk-0.3rc1 → agent0_sdk-0.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent0-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5
|
|
4
4
|
Summary: Python SDK for agent portability, discovery and trust based on ERC-8004
|
|
5
5
|
Author-email: Marco De Rossi <marco.derossi@consensys.net>
|
|
6
6
|
License: MIT License
|
|
@@ -76,10 +76,11 @@ Agent0 is the SDK for agentic economies. It enables agents to register, advertis
|
|
|
76
76
|
|
|
77
77
|
## What Does Agent0 SDK Do?
|
|
78
78
|
|
|
79
|
-
Agent0 SDK v0.
|
|
79
|
+
Agent0 SDK v0.31 enables you to:
|
|
80
80
|
|
|
81
81
|
- **Create and manage agent identities** - Register your AI agent on-chain with a unique identity, configure presentation fields (name, description, image), set wallet addresses, and manage trust models with x402 support
|
|
82
82
|
- **Advertise agent capabilities** - Publish MCP and A2A endpoints, with automated extraction of MCP tools and A2A skills from endpoints
|
|
83
|
+
- **OASF taxonomies** - Advertise standardized skills and domains using the Open Agentic Schema Framework (OASF) taxonomies for better discovery and interoperability
|
|
83
84
|
- **Enable permissionless discovery** - Make your agent discoverable by other agents and platforms using rich search by attributes, capabilities, skills, tools, tasks, and x402 support
|
|
84
85
|
- **Build reputation** - Give and receive feedback, retrieve feedback history, and search agents by reputation with cryptographic authentication
|
|
85
86
|
- **Cross-chain registration** - One-line registration with IPFS nodes, Pinata, Filecoin, or HTTP URIs
|
|
@@ -87,7 +88,7 @@ Agent0 SDK v0.2 enables you to:
|
|
|
87
88
|
|
|
88
89
|
## ⚠️ Alpha Release
|
|
89
90
|
|
|
90
|
-
Agent0 SDK v0.
|
|
91
|
+
Agent0 SDK v0.31 is in **alpha** with bugs and is not production ready. We're actively testing and improving it.
|
|
91
92
|
|
|
92
93
|
**Bug reports & feedback:** GitHub: [Report issues](https://github.com/agent0lab/agent0-py/issues) | Telegram: [@marcoderossi](https://t.me/marcoderossi) | Email: marco.derossi@consensys.net
|
|
93
94
|
|
|
@@ -149,8 +150,17 @@ agent.setMCP("https://mcp.example.com/") # Extracts tools, prompts, resources
|
|
|
149
150
|
agent.setA2A("https://a2a.example.com/agent-card.json") # Extracts skills
|
|
150
151
|
agent.setENS("myagent.eth")
|
|
151
152
|
|
|
153
|
+
# Add OASF skills and domains (standardized taxonomies)
|
|
154
|
+
agent.addSkill("data_engineering/data_transformation_pipeline", validate_oasf=True)
|
|
155
|
+
agent.addSkill("natural_language_processing/natural_language_generation/summarization", validate_oasf=True)
|
|
156
|
+
agent.addDomain("finance_and_business/investment_services", validate_oasf=True)
|
|
157
|
+
agent.addDomain("technology/data_science/data_science", validate_oasf=True)
|
|
158
|
+
|
|
152
159
|
# Configure wallet and trust
|
|
153
|
-
|
|
160
|
+
# Note: agentWallet is an on-chain verified attribute. setAgentWallet() is on-chain only.
|
|
161
|
+
# EOAs: the NEW wallet must sign an EIP-712 message. If you pass new_wallet_signer, the SDK will
|
|
162
|
+
# build + sign the typed data automatically.
|
|
163
|
+
# If the current SDK signer address matches the new wallet, it can auto-sign without new_wallet_signer.
|
|
154
164
|
agent.setTrust(reputation=True, cryptoEconomic=True)
|
|
155
165
|
|
|
156
166
|
# Add metadata and set status
|
|
@@ -161,6 +171,16 @@ agent.setActive(True)
|
|
|
161
171
|
agent.registerIPFS()
|
|
162
172
|
print(f"Agent registered: {agent.agentId}") # e.g., "11155111:123"
|
|
163
173
|
print(f"Agent URI: {agent.agentURI}") # e.g., "ipfs://Qm..."
|
|
174
|
+
|
|
175
|
+
# (Optional) Change the agent wallet after registration
|
|
176
|
+
# - On mint/registration, `agentWallet` defaults to the current owner address.
|
|
177
|
+
# - Call this only if you want a DIFFERENT wallet (or after a transfer, since the wallet resets to zero).
|
|
178
|
+
# - Transaction is sent by the SDK signer (agent owner), but the signature must be produced by the NEW wallet.
|
|
179
|
+
agent.setAgentWallet(
|
|
180
|
+
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
|
|
181
|
+
chainId=11155111,
|
|
182
|
+
new_wallet_signer=os.getenv("NEW_WALLET_PRIVATE_KEY"),
|
|
183
|
+
)
|
|
164
184
|
```
|
|
165
185
|
|
|
166
186
|
### 3. Load and Edit Agent
|
|
@@ -206,7 +226,8 @@ agent_summary = sdk.getAgent("11155111:123")
|
|
|
206
226
|
feedback_file = sdk.prepareFeedback(
|
|
207
227
|
agentId="11155111:123",
|
|
208
228
|
score=85, # 0-100 (mandatory)
|
|
209
|
-
tags=["data_analyst", "finance"], # Optional
|
|
229
|
+
tags=["data_analyst", "finance"], # Optional: tags are now strings (not bytes32)
|
|
230
|
+
endpoint="https://example.com/endpoint", # Optional: endpoint URI associated with feedback
|
|
210
231
|
capability="tools", # Optional: MCP capability
|
|
211
232
|
name="code_generation", # Optional: MCP tool name
|
|
212
233
|
skill="python" # Optional: A2A skill
|
|
@@ -263,6 +284,58 @@ sdk = SDK(chainId=11155111, rpcUrl="...", signer=private_key)
|
|
|
263
284
|
agent.register("https://example.com/agent-registration.json")
|
|
264
285
|
```
|
|
265
286
|
|
|
287
|
+
## OASF Taxonomies
|
|
288
|
+
|
|
289
|
+
The SDK includes support for the **Open Agentic Schema Framework (OASF)** taxonomies, enabling agents to advertise standardized skills and domains. This improves discoverability and interoperability across agent platforms.
|
|
290
|
+
|
|
291
|
+
### Adding Skills and Domains
|
|
292
|
+
|
|
293
|
+
```python
|
|
294
|
+
# Add OASF skills (with optional validation)
|
|
295
|
+
agent.addSkill("advanced_reasoning_planning/strategic_planning", validate_oasf=True)
|
|
296
|
+
agent.addSkill("data_engineering/data_transformation_pipeline", validate_oasf=True)
|
|
297
|
+
|
|
298
|
+
# Add OASF domains (with optional validation)
|
|
299
|
+
agent.addDomain("finance_and_business/investment_services", validate_oasf=True)
|
|
300
|
+
agent.addDomain("technology/data_science/data_visualization", validate_oasf=True)
|
|
301
|
+
|
|
302
|
+
# Remove skills/domains
|
|
303
|
+
agent.removeSkill("old_skill")
|
|
304
|
+
agent.removeDomain("old_domain")
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### OASF in Registration Files
|
|
308
|
+
|
|
309
|
+
OASF skills and domains appear in your agent's registration file:
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"endpoints": [
|
|
314
|
+
{
|
|
315
|
+
"name": "OASF",
|
|
316
|
+
"endpoint": "https://github.com/agntcy/oasf/",
|
|
317
|
+
"version": "v0.8.0",
|
|
318
|
+
"skills": [
|
|
319
|
+
"advanced_reasoning_planning/strategic_planning",
|
|
320
|
+
"data_engineering/data_transformation_pipeline"
|
|
321
|
+
],
|
|
322
|
+
"domains": [
|
|
323
|
+
"finance_and_business/investment_services",
|
|
324
|
+
"technology/data_science/data_science"
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Taxonomy Files
|
|
332
|
+
|
|
333
|
+
The SDK includes complete OASF v0.8.0 taxonomy files:
|
|
334
|
+
- **Skills**: `agent0_sdk/taxonomies/all_skills.json` (136 skills)
|
|
335
|
+
- **Domains**: `agent0_sdk/taxonomies/all_domains.json` (204 domains)
|
|
336
|
+
|
|
337
|
+
Browse these files to find appropriate skill and domain slugs. For more information, see the [OASF specification](https://github.com/agntcy/oasf) and [Release Notes v0.31](RELEASE_NOTES_0.31.md).
|
|
338
|
+
|
|
266
339
|
## Use Cases
|
|
267
340
|
|
|
268
341
|
- **Building agent marketplaces** - Create platforms where developers can discover, evaluate, and integrate agents based on their capabilities and reputation
|
|
@@ -6,10 +6,11 @@ Agent0 is the SDK for agentic economies. It enables agents to register, advertis
|
|
|
6
6
|
|
|
7
7
|
## What Does Agent0 SDK Do?
|
|
8
8
|
|
|
9
|
-
Agent0 SDK v0.
|
|
9
|
+
Agent0 SDK v0.31 enables you to:
|
|
10
10
|
|
|
11
11
|
- **Create and manage agent identities** - Register your AI agent on-chain with a unique identity, configure presentation fields (name, description, image), set wallet addresses, and manage trust models with x402 support
|
|
12
12
|
- **Advertise agent capabilities** - Publish MCP and A2A endpoints, with automated extraction of MCP tools and A2A skills from endpoints
|
|
13
|
+
- **OASF taxonomies** - Advertise standardized skills and domains using the Open Agentic Schema Framework (OASF) taxonomies for better discovery and interoperability
|
|
13
14
|
- **Enable permissionless discovery** - Make your agent discoverable by other agents and platforms using rich search by attributes, capabilities, skills, tools, tasks, and x402 support
|
|
14
15
|
- **Build reputation** - Give and receive feedback, retrieve feedback history, and search agents by reputation with cryptographic authentication
|
|
15
16
|
- **Cross-chain registration** - One-line registration with IPFS nodes, Pinata, Filecoin, or HTTP URIs
|
|
@@ -17,7 +18,7 @@ Agent0 SDK v0.2 enables you to:
|
|
|
17
18
|
|
|
18
19
|
## ⚠️ Alpha Release
|
|
19
20
|
|
|
20
|
-
Agent0 SDK v0.
|
|
21
|
+
Agent0 SDK v0.31 is in **alpha** with bugs and is not production ready. We're actively testing and improving it.
|
|
21
22
|
|
|
22
23
|
**Bug reports & feedback:** GitHub: [Report issues](https://github.com/agent0lab/agent0-py/issues) | Telegram: [@marcoderossi](https://t.me/marcoderossi) | Email: marco.derossi@consensys.net
|
|
23
24
|
|
|
@@ -79,8 +80,17 @@ agent.setMCP("https://mcp.example.com/") # Extracts tools, prompts, resources
|
|
|
79
80
|
agent.setA2A("https://a2a.example.com/agent-card.json") # Extracts skills
|
|
80
81
|
agent.setENS("myagent.eth")
|
|
81
82
|
|
|
83
|
+
# Add OASF skills and domains (standardized taxonomies)
|
|
84
|
+
agent.addSkill("data_engineering/data_transformation_pipeline", validate_oasf=True)
|
|
85
|
+
agent.addSkill("natural_language_processing/natural_language_generation/summarization", validate_oasf=True)
|
|
86
|
+
agent.addDomain("finance_and_business/investment_services", validate_oasf=True)
|
|
87
|
+
agent.addDomain("technology/data_science/data_science", validate_oasf=True)
|
|
88
|
+
|
|
82
89
|
# Configure wallet and trust
|
|
83
|
-
|
|
90
|
+
# Note: agentWallet is an on-chain verified attribute. setAgentWallet() is on-chain only.
|
|
91
|
+
# EOAs: the NEW wallet must sign an EIP-712 message. If you pass new_wallet_signer, the SDK will
|
|
92
|
+
# build + sign the typed data automatically.
|
|
93
|
+
# If the current SDK signer address matches the new wallet, it can auto-sign without new_wallet_signer.
|
|
84
94
|
agent.setTrust(reputation=True, cryptoEconomic=True)
|
|
85
95
|
|
|
86
96
|
# Add metadata and set status
|
|
@@ -91,6 +101,16 @@ agent.setActive(True)
|
|
|
91
101
|
agent.registerIPFS()
|
|
92
102
|
print(f"Agent registered: {agent.agentId}") # e.g., "11155111:123"
|
|
93
103
|
print(f"Agent URI: {agent.agentURI}") # e.g., "ipfs://Qm..."
|
|
104
|
+
|
|
105
|
+
# (Optional) Change the agent wallet after registration
|
|
106
|
+
# - On mint/registration, `agentWallet` defaults to the current owner address.
|
|
107
|
+
# - Call this only if you want a DIFFERENT wallet (or after a transfer, since the wallet resets to zero).
|
|
108
|
+
# - Transaction is sent by the SDK signer (agent owner), but the signature must be produced by the NEW wallet.
|
|
109
|
+
agent.setAgentWallet(
|
|
110
|
+
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
|
|
111
|
+
chainId=11155111,
|
|
112
|
+
new_wallet_signer=os.getenv("NEW_WALLET_PRIVATE_KEY"),
|
|
113
|
+
)
|
|
94
114
|
```
|
|
95
115
|
|
|
96
116
|
### 3. Load and Edit Agent
|
|
@@ -136,7 +156,8 @@ agent_summary = sdk.getAgent("11155111:123")
|
|
|
136
156
|
feedback_file = sdk.prepareFeedback(
|
|
137
157
|
agentId="11155111:123",
|
|
138
158
|
score=85, # 0-100 (mandatory)
|
|
139
|
-
tags=["data_analyst", "finance"], # Optional
|
|
159
|
+
tags=["data_analyst", "finance"], # Optional: tags are now strings (not bytes32)
|
|
160
|
+
endpoint="https://example.com/endpoint", # Optional: endpoint URI associated with feedback
|
|
140
161
|
capability="tools", # Optional: MCP capability
|
|
141
162
|
name="code_generation", # Optional: MCP tool name
|
|
142
163
|
skill="python" # Optional: A2A skill
|
|
@@ -193,6 +214,58 @@ sdk = SDK(chainId=11155111, rpcUrl="...", signer=private_key)
|
|
|
193
214
|
agent.register("https://example.com/agent-registration.json")
|
|
194
215
|
```
|
|
195
216
|
|
|
217
|
+
## OASF Taxonomies
|
|
218
|
+
|
|
219
|
+
The SDK includes support for the **Open Agentic Schema Framework (OASF)** taxonomies, enabling agents to advertise standardized skills and domains. This improves discoverability and interoperability across agent platforms.
|
|
220
|
+
|
|
221
|
+
### Adding Skills and Domains
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
# Add OASF skills (with optional validation)
|
|
225
|
+
agent.addSkill("advanced_reasoning_planning/strategic_planning", validate_oasf=True)
|
|
226
|
+
agent.addSkill("data_engineering/data_transformation_pipeline", validate_oasf=True)
|
|
227
|
+
|
|
228
|
+
# Add OASF domains (with optional validation)
|
|
229
|
+
agent.addDomain("finance_and_business/investment_services", validate_oasf=True)
|
|
230
|
+
agent.addDomain("technology/data_science/data_visualization", validate_oasf=True)
|
|
231
|
+
|
|
232
|
+
# Remove skills/domains
|
|
233
|
+
agent.removeSkill("old_skill")
|
|
234
|
+
agent.removeDomain("old_domain")
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### OASF in Registration Files
|
|
238
|
+
|
|
239
|
+
OASF skills and domains appear in your agent's registration file:
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"endpoints": [
|
|
244
|
+
{
|
|
245
|
+
"name": "OASF",
|
|
246
|
+
"endpoint": "https://github.com/agntcy/oasf/",
|
|
247
|
+
"version": "v0.8.0",
|
|
248
|
+
"skills": [
|
|
249
|
+
"advanced_reasoning_planning/strategic_planning",
|
|
250
|
+
"data_engineering/data_transformation_pipeline"
|
|
251
|
+
],
|
|
252
|
+
"domains": [
|
|
253
|
+
"finance_and_business/investment_services",
|
|
254
|
+
"technology/data_science/data_science"
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Taxonomy Files
|
|
262
|
+
|
|
263
|
+
The SDK includes complete OASF v0.8.0 taxonomy files:
|
|
264
|
+
- **Skills**: `agent0_sdk/taxonomies/all_skills.json` (136 skills)
|
|
265
|
+
- **Domains**: `agent0_sdk/taxonomies/all_domains.json` (204 domains)
|
|
266
|
+
|
|
267
|
+
Browse these files to find appropriate skill and domain slugs. For more information, see the [OASF specification](https://github.com/agntcy/oasf) and [Release Notes v0.31](RELEASE_NOTES_0.31.md).
|
|
268
|
+
|
|
196
269
|
## Use Cases
|
|
197
270
|
|
|
198
271
|
- **Building agent marketplaces** - Create platforms where developers can discover, evaluate, and integrate agents based on their capabilities and reputation
|