agent0-sdk 0.3rc1__py3-none-any.whl → 0.5__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent0-sdk
3
- Version: 0.3rc1
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.2 enables you to:
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.2 is in **alpha** with bugs and is not production ready. We're actively testing and improving it.
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
- agent.setAgentWallet("0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb", chainId=11155111)
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
@@ -0,0 +1,19 @@
1
+ agent0_sdk/__init__.py,sha256=2Wl6gXZTVEdQxueLl7YHpYyAm-uh-DaELEVdRson8yg,917
2
+ agent0_sdk/core/agent.py,sha256=L8pDTXUWZ5ZmFgGjBwdheKTvMcGu9SlUP9MQD9TQ0MU,45061
3
+ agent0_sdk/core/contracts.py,sha256=euFfjnmpYHNfzzQFvYTvSI-xJGgzFTo2CNny6YaUKTg,21618
4
+ agent0_sdk/core/endpoint_crawler.py,sha256=QBkFc3tBSQqHj6PtSTZ5D3_HVB00KJZJdxE3uYpI9po,13611
5
+ agent0_sdk/core/feedback_manager.py,sha256=ndGROPISrQvfKjwrWiB_xJ9QIh0cLs4oHh666Ru-A_8,37650
6
+ agent0_sdk/core/indexer.py,sha256=BUL4QbbL9sN8eZ1osUdIn_Kgj-MF0SET8RtjbBERQm0,70326
7
+ agent0_sdk/core/ipfs_client.py,sha256=fml1ai1BdBkgb95xAkf-ft8QsahV1HL30hBYRz7rQwI,13929
8
+ agent0_sdk/core/models.py,sha256=1BSAX2LVbw0kL_qHK7DxBrIFx8PF3wQvzkzblcQTMUg,12042
9
+ agent0_sdk/core/oasf_validator.py,sha256=ZOtYYzQd7cJj3eJegi7Ch5ydoapJEjaJSxMvwzKSp5o,2980
10
+ agent0_sdk/core/sdk.py,sha256=c9vSKTer50aJr8VcJ6huj6N1pTRwCUtbCxl5G_5oXhk,40955
11
+ agent0_sdk/core/subgraph_client.py,sha256=VSK9gCB5uYc2OqAVQ659IgeF0N-tXwxPUbv7NK8Kz0U,29575
12
+ agent0_sdk/core/web3_client.py,sha256=h7s-Al3E1xfbb3QNcPvmQBotKJRg23Jm9xot4emr-hU,12283
13
+ agent0_sdk/taxonomies/all_domains.json,sha256=buM8_6mpY8_AMbBIPzM-gtu14Tl30QDmhuQxxrlJU4c,74625
14
+ agent0_sdk/taxonomies/all_skills.json,sha256=WVsutw3fqoj1jfDPru3CyWTr1kc1a5-EhBOWPfXnEi8,47483
15
+ agent0_sdk-0.5.dist-info/licenses/LICENSE,sha256=rhZZbZm_Ovz4Oa9LNQ-ms8a1tA36wWh90ZkC0OR7WMw,1072
16
+ agent0_sdk-0.5.dist-info/METADATA,sha256=W49qOkBpho8iDVe2OIcZ3Nr8IWT4QzuhTMqpp6OuvKY,14567
17
+ agent0_sdk-0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
+ agent0_sdk-0.5.dist-info/top_level.txt,sha256=p4520WUKNfhU0lVWJgkrB_jdeUfvHSY3K18k4oYLNfI,11
19
+ agent0_sdk-0.5.dist-info/RECORD,,
@@ -1,29 +0,0 @@
1
- agent0_sdk/__init__.py,sha256=XrY2VSPzM6axhVSb1yTY-oYhJBbTTNJP5mKSFeMRPvk,920
2
- agent0_sdk/core/agent.py,sha256=RQND8F3Hmmpnt-PqCXBP7T8KfrjTXo0_X2nZoMJh01w,33343
3
- agent0_sdk/core/contracts.py,sha256=LJY07PIyAb3ZSH_m2xD4OdXawsXKxaTUGhYHwGWUpmI,20435
4
- agent0_sdk/core/endpoint_crawler.py,sha256=QBkFc3tBSQqHj6PtSTZ5D3_HVB00KJZJdxE3uYpI9po,13611
5
- agent0_sdk/core/feedback_manager.py,sha256=MV3srP-rgFaDXXELeLTJBj2aDUPdENy0tzWUsJUqrL4,39860
6
- agent0_sdk/core/indexer.py,sha256=erkDKrtyvAtfrblz0YHekPB2Hpw7tJm-1KJjafTMaHc,68470
7
- agent0_sdk/core/ipfs_client.py,sha256=fml1ai1BdBkgb95xAkf-ft8QsahV1HL30hBYRz7rQwI,13929
8
- agent0_sdk/core/models.py,sha256=5uXZmAtkLa5wKfnwU0-yuGkpmz00H_83Ta8zq2K7B-8,12487
9
- agent0_sdk/core/sdk.py,sha256=CQUpKaP7g1Lu7aokRYs-QChv78XIdkfz6Yax6nhaWqQ,40166
10
- agent0_sdk/core/subgraph_client.py,sha256=Iw-YEtT1-Rm9f-kY4EXZlCuwEkJQAq5-bHDpxrMVyGg,28419
11
- agent0_sdk/core/web3_client.py,sha256=859ntu5dAmNlcJ3YM1w_VV2gI3mpCC9QEr-GN1236zU,6850
12
- agent0_sdk-0.3rc1.dist-info/licenses/LICENSE,sha256=rhZZbZm_Ovz4Oa9LNQ-ms8a1tA36wWh90ZkC0OR7WMw,1072
13
- tests/__init__.py,sha256=60ffheccPhuMCtwiiKP1X-CJJXKpxJ_Ywa0aXGHR9bY,23
14
- tests/config.py,sha256=1uePvkLBNubOQsvYkQSno0m007PMD1VACgm33fCYY6s,1429
15
- tests/conftest.py,sha256=P-HCtVVYwSvscuaJqhrgZcv39XXNnr932ekEamzIqis,589
16
- tests/discover_test_data.py,sha256=Fu0uQKnFk8m7qEqEp293BWbo_mT1CK5szVZcdcdlJQw,17678
17
- tests/test_feedback.py,sha256=7lszWYSmseJE0I4BhKzZdBiIzf2bgpPqZTZvhRrCTjY,14638
18
- tests/test_models.py,sha256=kCZdoPasIIcOjEw7ToPldqARdbGVK8v8byOhFwVo7OI,7115
19
- tests/test_multi_chain.py,sha256=6C-HD037Lsjd7_H0pwp7NDU04jLTjhardT1LHBjahFM,26711
20
- tests/test_real_public_servers.py,sha256=pCo4aLSCG9qv4D6T7jbyVmP1gt3r1jWxdes6z5XSNhU,3433
21
- tests/test_registration.py,sha256=pYanDPLAFETIfabBUvO34ZDmyD0Rbcv8vecSfgSrQ70,9542
22
- tests/test_registrationIpfs.py,sha256=9O3IBiN2CVMKzB19bqb-jN-nhqsN22kQINMpe9THqiI,8400
23
- tests/test_sdk.py,sha256=dALLFm_A6aXx0ec-CNOLGQoadaSPZ08EEeCS6Tgnm0M,9362
24
- tests/test_search.py,sha256=SiUio8H-M6Za8OXD_h9tUZdln0ayzkPJ3doTrkHv-Fs,18382
25
- tests/test_transfer.py,sha256=zRBllpoMs6NhagAmaZWmD4ckbYjSvsSUerBK4oS-HlA,9258
26
- agent0_sdk-0.3rc1.dist-info/METADATA,sha256=AHT6_T6pc63NLD3g1YS01A_TELbzmxRT8tEVN5kSpFI,11377
27
- agent0_sdk-0.3rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- agent0_sdk-0.3rc1.dist-info/top_level.txt,sha256=rgGBfOJlLi1zInQ85jBL2MpDu_ZJNbPjIGz-3Vn5rZs,17
29
- agent0_sdk-0.3rc1.dist-info/RECORD,,
tests/__init__.py DELETED
@@ -1 +0,0 @@
1
- # Tests for Agent0 SDK
tests/config.py DELETED
@@ -1,46 +0,0 @@
1
- """
2
- Shared configuration loader for test examples.
3
- Loads configuration from environment variables (.env file).
4
- """
5
-
6
- import os
7
- from pathlib import Path
8
- from dotenv import load_dotenv
9
-
10
- # Load environment variables from .env file
11
- # Look for .env in parent directory (project root)
12
- env_path = Path(__file__).parent.parent.parent / ".env"
13
- load_dotenv(dotenv_path=env_path)
14
-
15
- # Chain Configuration
16
- CHAIN_ID = int(os.getenv("CHAIN_ID", "11155111"))
17
- RPC_URL = os.getenv(
18
- "RPC_URL",
19
- "https://eth-sepolia.g.alchemy.com/v2/7nkA4bJ0tKWcl2-5Wn15c5eRdpGZ8DDr"
20
- )
21
- AGENT_PRIVATE_KEY = os.getenv("AGENT_PRIVATE_KEY", "")
22
-
23
- # IPFS Configuration (Pinata)
24
- PINATA_JWT = os.getenv("PINATA_JWT", "")
25
-
26
- # Subgraph Configuration
27
- SUBGRAPH_URL = os.getenv(
28
- "SUBGRAPH_URL",
29
- "https://gateway.thegraph.com/api/00a452ad3cd1900273ea62c1bf283f93/subgraphs/id/6wQRC7geo9XYAhckfmfo8kbMRLeWU8KQd3XsJqFKmZLT"
30
- )
31
-
32
- # Agent ID for testing (can be overridden via env)
33
- AGENT_ID = os.getenv("AGENT_ID", "11155111:374")
34
-
35
-
36
- def print_config():
37
- """Print current configuration (hiding sensitive values)."""
38
- print("Configuration:")
39
- print(f" CHAIN_ID: {CHAIN_ID}")
40
- print(f" RPC_URL: {RPC_URL[:50]}...")
41
- print(f" AGENT_PRIVATE_KEY: {'***' if AGENT_PRIVATE_KEY else 'NOT SET'}")
42
- print(f" PINATA_JWT: {'***' if PINATA_JWT else 'NOT SET'}")
43
- print(f" SUBGRAPH_URL: {SUBGRAPH_URL[:50]}...")
44
- print(f" AGENT_ID: {AGENT_ID}")
45
- print()
46
-
tests/conftest.py DELETED
@@ -1,22 +0,0 @@
1
- """
2
- Pytest configuration file for Agent0 SDK tests.
3
- Sets up logging to debug level for agent0_sdk only.
4
- """
5
-
6
- import logging
7
- import sys
8
-
9
- # Configure logging: root logger at WARNING to suppress noisy dependencies
10
- logging.basicConfig(
11
- level=logging.WARNING,
12
- format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
13
- datefmt='%Y-%m-%d %H:%M:%S',
14
- handlers=[
15
- logging.StreamHandler(sys.stdout)
16
- ]
17
- )
18
-
19
- # Set debug level ONLY for agent0_sdk loggers
20
- logging.getLogger('agent0_sdk').setLevel(logging.DEBUG)
21
- logging.getLogger('agent0_sdk.core').setLevel(logging.DEBUG)
22
-