autogen-warppay402 0.1.0__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.
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: autogen-warppay402
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Microsoft AutoGen tool integration for WarpPay402 x402 monetized APIs
|
|
5
|
+
Author: WarpPay402
|
|
6
|
+
Author-email: warppay.402@gmail.com
|
|
7
|
+
Requires-Python: >=3.10,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Requires-Dist: autogen (>=0.2.0)
|
|
13
|
+
Requires-Dist: warppay402-mcp (>=1.2.6)
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# AutoGen Tools Integration for WarpPay402
|
|
17
|
+
|
|
18
|
+
This package integrates 29 WarpPay402 x402 monetized tools into Microsoft AutoGen agents.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install autogen-warppay402
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
import autogen
|
|
30
|
+
from autogen_warppay402 import WarpPayAutoGenTools
|
|
31
|
+
|
|
32
|
+
assistant = autogen.AssistantAgent(
|
|
33
|
+
"assistant",
|
|
34
|
+
llm_config={"config_list": [{"model": "gpt-4o"}]},
|
|
35
|
+
)
|
|
36
|
+
user_proxy = autogen.UserProxyAgent(
|
|
37
|
+
"user_proxy",
|
|
38
|
+
code_execution_config=False,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
warppay_tools = WarpPayAutoGenTools()
|
|
42
|
+
warppay_tools.register_all(assistant, user_proxy)
|
|
43
|
+
|
|
44
|
+
user_proxy.initiate_chat(
|
|
45
|
+
assistant,
|
|
46
|
+
message="What is the ETH spot price on Arc Mainnet?",
|
|
47
|
+
)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## What this package provides
|
|
51
|
+
|
|
52
|
+
- AutoGen-compatible registration helpers for WarpPay402 tools
|
|
53
|
+
- Support for 29 built-in x402 monetized tool actions
|
|
54
|
+
- Easy integration with an existing AutoGen assistant and user proxy setup
|
|
55
|
+
|
|
56
|
+
## Example tools
|
|
57
|
+
|
|
58
|
+
This package registers tools including:
|
|
59
|
+
|
|
60
|
+
- `public_data_feed`
|
|
61
|
+
- `base_analytics`
|
|
62
|
+
- `arc_analytics`
|
|
63
|
+
- `arc_dex_oracle`
|
|
64
|
+
- `pdf_extractor`
|
|
65
|
+
- `weather_oracle`
|
|
66
|
+
- `forex_oracle`
|
|
67
|
+
- `github_health_analyzer`
|
|
68
|
+
- `smart_contract_verifier`
|
|
69
|
+
- `render_screenshot`
|
|
70
|
+
|
|
71
|
+
For the full list, see the `WarpPayAutoGenTools.get_tool_functions()` method in the package source.
|
|
72
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# AutoGen Tools Integration for WarpPay402
|
|
2
|
+
|
|
3
|
+
This package integrates 29 WarpPay402 x402 monetized tools into Microsoft AutoGen agents.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install autogen-warppay402
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
import autogen
|
|
15
|
+
from autogen_warppay402 import WarpPayAutoGenTools
|
|
16
|
+
|
|
17
|
+
assistant = autogen.AssistantAgent(
|
|
18
|
+
"assistant",
|
|
19
|
+
llm_config={"config_list": [{"model": "gpt-4o"}]},
|
|
20
|
+
)
|
|
21
|
+
user_proxy = autogen.UserProxyAgent(
|
|
22
|
+
"user_proxy",
|
|
23
|
+
code_execution_config=False,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
warppay_tools = WarpPayAutoGenTools()
|
|
27
|
+
warppay_tools.register_all(assistant, user_proxy)
|
|
28
|
+
|
|
29
|
+
user_proxy.initiate_chat(
|
|
30
|
+
assistant,
|
|
31
|
+
message="What is the ETH spot price on Arc Mainnet?",
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## What this package provides
|
|
36
|
+
|
|
37
|
+
- AutoGen-compatible registration helpers for WarpPay402 tools
|
|
38
|
+
- Support for 29 built-in x402 monetized tool actions
|
|
39
|
+
- Easy integration with an existing AutoGen assistant and user proxy setup
|
|
40
|
+
|
|
41
|
+
## Example tools
|
|
42
|
+
|
|
43
|
+
This package registers tools including:
|
|
44
|
+
|
|
45
|
+
- `public_data_feed`
|
|
46
|
+
- `base_analytics`
|
|
47
|
+
- `arc_analytics`
|
|
48
|
+
- `arc_dex_oracle`
|
|
49
|
+
- `pdf_extractor`
|
|
50
|
+
- `weather_oracle`
|
|
51
|
+
- `forex_oracle`
|
|
52
|
+
- `github_health_analyzer`
|
|
53
|
+
- `smart_contract_verifier`
|
|
54
|
+
- `render_screenshot`
|
|
55
|
+
|
|
56
|
+
For the full list, see the `WarpPayAutoGenTools.get_tool_functions()` method in the package source.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
from typing import Dict, Any, Callable, List, Optional
|
|
2
|
+
import json
|
|
3
|
+
import warppay402_mcp as mcp
|
|
4
|
+
|
|
5
|
+
class WarpPayAutoGenTools:
|
|
6
|
+
"""Provides AutoGen-compatible tool registrations for WarpPay402 x402 tools."""
|
|
7
|
+
|
|
8
|
+
def __init__(self):
|
|
9
|
+
# Instantiate individual tool objects exported by warppay402_mcp
|
|
10
|
+
self.tools = {
|
|
11
|
+
"public_data_feed": mcp.PublicDataFeedTool(),
|
|
12
|
+
"data_feeds": mcp.DataFeedsTool(),
|
|
13
|
+
"web_scraper": mcp.WebScraperTool(),
|
|
14
|
+
"browser_scraper": mcp.BrowserScraperTool(),
|
|
15
|
+
"base_analytics": mcp.BaseAnalyticsTool(),
|
|
16
|
+
"arc_analytics": mcp.ArcAnalyticsTool(),
|
|
17
|
+
"arc_network_oracle_query": mcp.ArcNetworkQueryTool(),
|
|
18
|
+
"arc_dex_oracle": mcp.ArcDexOracleTool(),
|
|
19
|
+
"pdf_extractor": mcp.PdfExtractorTool(),
|
|
20
|
+
"render_screenshot": mcp.RenderScreenshotTool(),
|
|
21
|
+
"extract_json": mcp.ExtractJsonTool(),
|
|
22
|
+
"smart_contract_verifier": mcp.SmartContractVerifierTool(),
|
|
23
|
+
"get_aerodrome_yields": mcp.AerodromeYieldsTool(),
|
|
24
|
+
"aerodrome_swap": mcp.AerodromeSwapTool(),
|
|
25
|
+
"aerodrome_clamm": mcp.AerodromeClammTool(),
|
|
26
|
+
"aerodrome_veaero": mcp.AerodromeVeaeroTool(),
|
|
27
|
+
"deploy_contract": mcp.DeployBaseContractTool(),
|
|
28
|
+
"deploy_solana_contract": mcp.DeploySolanaContractTool(),
|
|
29
|
+
"deploy_arc_contract": mcp.DeployArcContractTool(),
|
|
30
|
+
"arc_cctp_bridge": mcp.ArcCctpBridgeTool(),
|
|
31
|
+
"real_estate_calculator": mcp.RealEstateCalculatorTool(),
|
|
32
|
+
"address_normalizer": mcp.AddressNormalizerTool(),
|
|
33
|
+
"weather_oracle": mcp.WeatherOracleTool(),
|
|
34
|
+
"forex_oracle": mcp.ForexOracleTool(),
|
|
35
|
+
"shipping_rate_estimator": mcp.ShippingRateEstimatorTool(),
|
|
36
|
+
"github_health_analyzer": mcp.GithubHealthAnalyzerTool(),
|
|
37
|
+
"property_comps_estimator": mcp.PropertyCompsEstimatorTool(),
|
|
38
|
+
"outage_oracle": mcp.OutageOracleTool(),
|
|
39
|
+
"ucp_deals_oracle": mcp.UcpDealsOracleTool(),
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
def get_tool_functions(self) -> Dict[str, Callable]:
|
|
43
|
+
"""Returns a dictionary mapping tool names to executable functions for AutoGen."""
|
|
44
|
+
functions = {}
|
|
45
|
+
for name, tool_obj in self.tools.items():
|
|
46
|
+
# Wrap execution via the tool's .invoke() interface
|
|
47
|
+
functions[name] = lambda kwargs, t=tool_obj: str(t.invoke(kwargs))
|
|
48
|
+
return functions
|
|
49
|
+
|
|
50
|
+
def register_all(self, assistant_agent, user_proxy_agent):
|
|
51
|
+
"""Helper to register all 29 tools between an AssistantAgent and UserProxyAgent."""
|
|
52
|
+
for name, tool_obj in self.tools.items():
|
|
53
|
+
func = lambda **kwargs: str(tool_obj.invoke(kwargs))
|
|
54
|
+
assistant_agent.register_for_llm(name=name, description=tool_obj.description)(func)
|
|
55
|
+
user_proxy_agent.register_for_execution(name=name)(func)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["poetry-core>=1.0.0"]
|
|
3
|
+
build-backend = "poetry.core.masonry.api"
|
|
4
|
+
|
|
5
|
+
[tool.poetry]
|
|
6
|
+
name = "autogen-warppay402"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Microsoft AutoGen tool integration for WarpPay402 x402 monetized APIs"
|
|
9
|
+
authors = ["WarpPay402 <warppay.402@gmail.com>"]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
packages = [{include = "autogen_warppay402"}]
|
|
12
|
+
|
|
13
|
+
[tool.poetry.dependencies]
|
|
14
|
+
python = "^3.10"
|
|
15
|
+
autogen = ">=0.2.0"
|
|
16
|
+
warppay402-mcp = ">=1.2.6"
|