dominusnode-camel 1.0.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.
- dominusnode_camel-1.0.0/LICENSE +21 -0
- dominusnode_camel-1.0.0/PKG-INFO +258 -0
- dominusnode_camel-1.0.0/README.md +244 -0
- dominusnode_camel-1.0.0/dominusnode_camel/__init__.py +6 -0
- dominusnode_camel-1.0.0/dominusnode_camel/tools.py +1502 -0
- dominusnode_camel-1.0.0/dominusnode_camel.egg-info/PKG-INFO +258 -0
- dominusnode_camel-1.0.0/dominusnode_camel.egg-info/SOURCES.txt +11 -0
- dominusnode_camel-1.0.0/dominusnode_camel.egg-info/dependency_links.txt +1 -0
- dominusnode_camel-1.0.0/dominusnode_camel.egg-info/requires.txt +6 -0
- dominusnode_camel-1.0.0/dominusnode_camel.egg-info/top_level.txt +1 -0
- dominusnode_camel-1.0.0/pyproject.toml +18 -0
- dominusnode_camel-1.0.0/setup.cfg +4 -0
- dominusnode_camel-1.0.0/tests/test_tools.py +1147 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DomiNode
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dominusnode-camel
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: DomiNode rotating proxy tools for CAMEL-AI agents
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: httpx>=0.24.0
|
|
10
|
+
Requires-Dist: camel-ai>=0.2.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
13
|
+
Requires-Dist: pytest-mock; extra == "dev"
|
|
14
|
+
|
|
15
|
+
# dominusnode-camel
|
|
16
|
+
|
|
17
|
+
CAMEL-AI toolkit for the [DomiNode](https://dominusnode.com) rotating proxy-as-a-service platform. Provides 22 tools as CAMEL `FunctionTool` objects for proxy management, wallet operations, team administration, and payment processing.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install dominusnode-camel
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Or install from source:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
cd integrations/camel-ai
|
|
29
|
+
pip install -e ".[dev]"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Environment Setup
|
|
33
|
+
|
|
34
|
+
Set your DomiNode API key as an environment variable:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
export DOMINUSNODE_API_KEY="dn_live_your_api_key_here"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Optionally configure the API base URL and proxy host:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
export DOMINUSNODE_BASE_URL="https://api.dominusnode.com"
|
|
44
|
+
export DOMINUSNODE_PROXY_HOST="proxy.dominusnode.com"
|
|
45
|
+
export DOMINUSNODE_PROXY_PORT="8080"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from camel.agents import ChatAgent
|
|
52
|
+
from camel.models import ModelFactory
|
|
53
|
+
from camel.types import ModelPlatformType, ModelType
|
|
54
|
+
from dominusnode_camel import DominusNodeToolkit
|
|
55
|
+
|
|
56
|
+
# Create toolkit (picks up DOMINUSNODE_API_KEY from environment)
|
|
57
|
+
toolkit = DominusNodeToolkit()
|
|
58
|
+
|
|
59
|
+
# Or pass the API key explicitly
|
|
60
|
+
toolkit = DominusNodeToolkit(api_key="dn_live_...")
|
|
61
|
+
|
|
62
|
+
# Get CAMEL FunctionTool objects
|
|
63
|
+
tools = toolkit.get_tools()
|
|
64
|
+
|
|
65
|
+
# Create a CAMEL agent with DomiNode tools
|
|
66
|
+
model = ModelFactory.create(
|
|
67
|
+
model_platform=ModelPlatformType.OPENAI,
|
|
68
|
+
model_type=ModelType.GPT_4O,
|
|
69
|
+
)
|
|
70
|
+
agent = ChatAgent(
|
|
71
|
+
system_message="You are a web research agent with proxy access.",
|
|
72
|
+
model=model,
|
|
73
|
+
tools=tools,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# The agent can now use DomiNode proxy tools
|
|
77
|
+
response = agent.step("Check my wallet balance")
|
|
78
|
+
print(response.msgs[0].content)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Direct Method Usage
|
|
82
|
+
|
|
83
|
+
You can also call toolkit methods directly without CAMEL agents:
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from dominusnode_camel import DominusNodeToolkit
|
|
87
|
+
|
|
88
|
+
toolkit = DominusNodeToolkit(api_key="dn_live_...")
|
|
89
|
+
|
|
90
|
+
# Check wallet balance (returns dict)
|
|
91
|
+
result = toolkit.check_balance()
|
|
92
|
+
print(result)
|
|
93
|
+
|
|
94
|
+
# Fetch a URL through rotating proxies
|
|
95
|
+
result = toolkit.proxied_fetch(url="https://example.com", country="US")
|
|
96
|
+
print(result)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Tools (22 total)
|
|
100
|
+
|
|
101
|
+
### Proxy Tools
|
|
102
|
+
|
|
103
|
+
| Tool | Description | Required Parameters |
|
|
104
|
+
|------|-------------|-------------------|
|
|
105
|
+
| `proxied_fetch` | Fetch URL through rotating proxy | `url` |
|
|
106
|
+
| `get_proxy_config` | Get proxy configuration | - |
|
|
107
|
+
| `list_sessions` | List active proxy sessions | - |
|
|
108
|
+
|
|
109
|
+
### Wallet Tools
|
|
110
|
+
|
|
111
|
+
| Tool | Description | Required Parameters |
|
|
112
|
+
|------|-------------|-------------------|
|
|
113
|
+
| `check_balance` | Check wallet balance | - |
|
|
114
|
+
| `check_usage` | Check usage statistics | - |
|
|
115
|
+
| `topup_paypal` | Create PayPal top-up order | `amount_cents` |
|
|
116
|
+
| `x402_info` | Get x402 micropayment info | - |
|
|
117
|
+
|
|
118
|
+
### Agentic Wallet Tools
|
|
119
|
+
|
|
120
|
+
| Tool | Description | Required Parameters |
|
|
121
|
+
|------|-------------|-------------------|
|
|
122
|
+
| `create_agentic_wallet` | Create sub-wallet with spending limit | `label`, `spending_limit_cents` |
|
|
123
|
+
| `fund_agentic_wallet` | Fund agentic wallet from main wallet | `wallet_id`, `amount_cents` |
|
|
124
|
+
| `agentic_wallet_balance` | Check agentic wallet balance | `wallet_id` |
|
|
125
|
+
| `list_agentic_wallets` | List all agentic wallets | - |
|
|
126
|
+
| `agentic_transactions` | Get agentic wallet transactions | `wallet_id` |
|
|
127
|
+
| `freeze_agentic_wallet` | Freeze agentic wallet | `wallet_id` |
|
|
128
|
+
| `unfreeze_agentic_wallet` | Unfreeze agentic wallet | `wallet_id` |
|
|
129
|
+
| `delete_agentic_wallet` | Delete agentic wallet | `wallet_id` |
|
|
130
|
+
|
|
131
|
+
### Team Tools
|
|
132
|
+
|
|
133
|
+
| Tool | Description | Required Parameters |
|
|
134
|
+
|------|-------------|-------------------|
|
|
135
|
+
| `create_team` | Create team with shared wallet | `name` |
|
|
136
|
+
| `list_teams` | List all teams | - |
|
|
137
|
+
| `team_details` | Get team details | `team_id` |
|
|
138
|
+
| `team_fund` | Fund team wallet | `team_id`, `amount_cents` |
|
|
139
|
+
| `team_create_key` | Create team API key | `team_id`, `label` |
|
|
140
|
+
| `team_usage` | Get team usage history | `team_id` |
|
|
141
|
+
| `update_team` | Update team settings | `team_id` |
|
|
142
|
+
| `update_team_member_role` | Change member role | `team_id`, `user_id`, `role` |
|
|
143
|
+
|
|
144
|
+
## Usage Examples
|
|
145
|
+
|
|
146
|
+
### Proxied Fetch with Geo-Targeting
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
# Fetch through a US datacenter proxy ($3/GB)
|
|
150
|
+
result = toolkit.proxied_fetch(
|
|
151
|
+
url="https://example.com",
|
|
152
|
+
country="US",
|
|
153
|
+
proxy_type="dc",
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
# Fetch through a German residential proxy ($5/GB)
|
|
157
|
+
result = toolkit.proxied_fetch(
|
|
158
|
+
url="https://example.de",
|
|
159
|
+
country="DE",
|
|
160
|
+
proxy_type="residential",
|
|
161
|
+
)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Agentic Wallet Management
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
# Create a sub-wallet for an AI agent with $10 spending limit
|
|
168
|
+
wallet = toolkit.create_agentic_wallet(
|
|
169
|
+
label="Research Agent",
|
|
170
|
+
spending_limit_cents=1000,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
# Fund it with $5 from main wallet
|
|
174
|
+
toolkit.fund_agentic_wallet(
|
|
175
|
+
wallet_id=wallet["id"],
|
|
176
|
+
amount_cents=500,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
# Check balance
|
|
180
|
+
print(toolkit.agentic_wallet_balance(wallet_id=wallet["id"]))
|
|
181
|
+
|
|
182
|
+
# Freeze if needed
|
|
183
|
+
toolkit.freeze_agentic_wallet(wallet_id=wallet["id"])
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Team Management
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
# Create a team
|
|
190
|
+
team = toolkit.create_team(name="Research Team", max_members=10)
|
|
191
|
+
|
|
192
|
+
# Fund the team wallet
|
|
193
|
+
toolkit.team_fund(team_id=team["id"], amount_cents=5000)
|
|
194
|
+
|
|
195
|
+
# Create a team API key
|
|
196
|
+
key = toolkit.team_create_key(
|
|
197
|
+
team_id=team["id"],
|
|
198
|
+
label="Agent Key",
|
|
199
|
+
)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### CAMEL Multi-Agent System
|
|
203
|
+
|
|
204
|
+
```python
|
|
205
|
+
from camel.agents import ChatAgent
|
|
206
|
+
from camel.models import ModelFactory
|
|
207
|
+
from camel.types import ModelPlatformType, ModelType
|
|
208
|
+
from dominusnode_camel import DominusNodeToolkit
|
|
209
|
+
|
|
210
|
+
toolkit = DominusNodeToolkit()
|
|
211
|
+
tools = toolkit.get_tools()
|
|
212
|
+
|
|
213
|
+
# Research agent with proxy access
|
|
214
|
+
researcher = ChatAgent(
|
|
215
|
+
system_message="You are a web researcher. Use proxied_fetch to gather data.",
|
|
216
|
+
model=ModelFactory.create(
|
|
217
|
+
model_platform=ModelPlatformType.OPENAI,
|
|
218
|
+
model_type=ModelType.GPT_4O,
|
|
219
|
+
),
|
|
220
|
+
tools=tools,
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
# Finance agent for wallet management
|
|
224
|
+
finance = ChatAgent(
|
|
225
|
+
system_message="You manage proxy budgets. Monitor balance and usage.",
|
|
226
|
+
model=ModelFactory.create(
|
|
227
|
+
model_platform=ModelPlatformType.OPENAI,
|
|
228
|
+
model_type=ModelType.GPT_4O,
|
|
229
|
+
),
|
|
230
|
+
tools=tools,
|
|
231
|
+
)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Security
|
|
235
|
+
|
|
236
|
+
This toolkit includes comprehensive security measures:
|
|
237
|
+
|
|
238
|
+
- **SSRF Prevention**: Blocks requests to private IPs (10.x, 172.16-31.x, 192.168.x, 127.x, 0.0.0.0/8, 169.254.x, 100.64-127.x CGNAT, 224+ multicast), IPv6 loopback/ULA/link-local, IPv4-mapped/compatible IPv6, Teredo (2001:0000::/32), 6to4 (2002::/16), hex/octal/decimal encoded IPs
|
|
239
|
+
- **DNS Rebinding Protection**: Resolves hostnames and validates all IP addresses before connecting
|
|
240
|
+
- **TLD Blocking**: .localhost, .local, .internal, .arpa
|
|
241
|
+
- **Credential Protection**: Embedded URL credentials blocked; API keys scrubbed from all error output
|
|
242
|
+
- **OFAC Compliance**: Cuba, Iran, North Korea, Russia, Syria blocked for geo-targeting
|
|
243
|
+
- **HTTP Method Restriction**: Only GET, HEAD, OPTIONS allowed through proxy
|
|
244
|
+
- **Prototype Pollution Prevention**: Dangerous keys stripped from all JSON responses
|
|
245
|
+
- **Response Limits**: 10 MB body cap, 4000 char truncation for LLM context
|
|
246
|
+
- **Redirect Disabled**: No redirect following to prevent open redirect abuse
|
|
247
|
+
|
|
248
|
+
## Running Tests
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
cd integrations/camel-ai
|
|
252
|
+
pip install -e ".[dev]"
|
|
253
|
+
pytest tests/ -v
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## License
|
|
257
|
+
|
|
258
|
+
MIT
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# dominusnode-camel
|
|
2
|
+
|
|
3
|
+
CAMEL-AI toolkit for the [DomiNode](https://dominusnode.com) rotating proxy-as-a-service platform. Provides 22 tools as CAMEL `FunctionTool` objects for proxy management, wallet operations, team administration, and payment processing.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install dominusnode-camel
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or install from source:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd integrations/camel-ai
|
|
15
|
+
pip install -e ".[dev]"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Environment Setup
|
|
19
|
+
|
|
20
|
+
Set your DomiNode API key as an environment variable:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
export DOMINUSNODE_API_KEY="dn_live_your_api_key_here"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Optionally configure the API base URL and proxy host:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
export DOMINUSNODE_BASE_URL="https://api.dominusnode.com"
|
|
30
|
+
export DOMINUSNODE_PROXY_HOST="proxy.dominusnode.com"
|
|
31
|
+
export DOMINUSNODE_PROXY_PORT="8080"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from camel.agents import ChatAgent
|
|
38
|
+
from camel.models import ModelFactory
|
|
39
|
+
from camel.types import ModelPlatformType, ModelType
|
|
40
|
+
from dominusnode_camel import DominusNodeToolkit
|
|
41
|
+
|
|
42
|
+
# Create toolkit (picks up DOMINUSNODE_API_KEY from environment)
|
|
43
|
+
toolkit = DominusNodeToolkit()
|
|
44
|
+
|
|
45
|
+
# Or pass the API key explicitly
|
|
46
|
+
toolkit = DominusNodeToolkit(api_key="dn_live_...")
|
|
47
|
+
|
|
48
|
+
# Get CAMEL FunctionTool objects
|
|
49
|
+
tools = toolkit.get_tools()
|
|
50
|
+
|
|
51
|
+
# Create a CAMEL agent with DomiNode tools
|
|
52
|
+
model = ModelFactory.create(
|
|
53
|
+
model_platform=ModelPlatformType.OPENAI,
|
|
54
|
+
model_type=ModelType.GPT_4O,
|
|
55
|
+
)
|
|
56
|
+
agent = ChatAgent(
|
|
57
|
+
system_message="You are a web research agent with proxy access.",
|
|
58
|
+
model=model,
|
|
59
|
+
tools=tools,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# The agent can now use DomiNode proxy tools
|
|
63
|
+
response = agent.step("Check my wallet balance")
|
|
64
|
+
print(response.msgs[0].content)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Direct Method Usage
|
|
68
|
+
|
|
69
|
+
You can also call toolkit methods directly without CAMEL agents:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from dominusnode_camel import DominusNodeToolkit
|
|
73
|
+
|
|
74
|
+
toolkit = DominusNodeToolkit(api_key="dn_live_...")
|
|
75
|
+
|
|
76
|
+
# Check wallet balance (returns dict)
|
|
77
|
+
result = toolkit.check_balance()
|
|
78
|
+
print(result)
|
|
79
|
+
|
|
80
|
+
# Fetch a URL through rotating proxies
|
|
81
|
+
result = toolkit.proxied_fetch(url="https://example.com", country="US")
|
|
82
|
+
print(result)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Tools (22 total)
|
|
86
|
+
|
|
87
|
+
### Proxy Tools
|
|
88
|
+
|
|
89
|
+
| Tool | Description | Required Parameters |
|
|
90
|
+
|------|-------------|-------------------|
|
|
91
|
+
| `proxied_fetch` | Fetch URL through rotating proxy | `url` |
|
|
92
|
+
| `get_proxy_config` | Get proxy configuration | - |
|
|
93
|
+
| `list_sessions` | List active proxy sessions | - |
|
|
94
|
+
|
|
95
|
+
### Wallet Tools
|
|
96
|
+
|
|
97
|
+
| Tool | Description | Required Parameters |
|
|
98
|
+
|------|-------------|-------------------|
|
|
99
|
+
| `check_balance` | Check wallet balance | - |
|
|
100
|
+
| `check_usage` | Check usage statistics | - |
|
|
101
|
+
| `topup_paypal` | Create PayPal top-up order | `amount_cents` |
|
|
102
|
+
| `x402_info` | Get x402 micropayment info | - |
|
|
103
|
+
|
|
104
|
+
### Agentic Wallet Tools
|
|
105
|
+
|
|
106
|
+
| Tool | Description | Required Parameters |
|
|
107
|
+
|------|-------------|-------------------|
|
|
108
|
+
| `create_agentic_wallet` | Create sub-wallet with spending limit | `label`, `spending_limit_cents` |
|
|
109
|
+
| `fund_agentic_wallet` | Fund agentic wallet from main wallet | `wallet_id`, `amount_cents` |
|
|
110
|
+
| `agentic_wallet_balance` | Check agentic wallet balance | `wallet_id` |
|
|
111
|
+
| `list_agentic_wallets` | List all agentic wallets | - |
|
|
112
|
+
| `agentic_transactions` | Get agentic wallet transactions | `wallet_id` |
|
|
113
|
+
| `freeze_agentic_wallet` | Freeze agentic wallet | `wallet_id` |
|
|
114
|
+
| `unfreeze_agentic_wallet` | Unfreeze agentic wallet | `wallet_id` |
|
|
115
|
+
| `delete_agentic_wallet` | Delete agentic wallet | `wallet_id` |
|
|
116
|
+
|
|
117
|
+
### Team Tools
|
|
118
|
+
|
|
119
|
+
| Tool | Description | Required Parameters |
|
|
120
|
+
|------|-------------|-------------------|
|
|
121
|
+
| `create_team` | Create team with shared wallet | `name` |
|
|
122
|
+
| `list_teams` | List all teams | - |
|
|
123
|
+
| `team_details` | Get team details | `team_id` |
|
|
124
|
+
| `team_fund` | Fund team wallet | `team_id`, `amount_cents` |
|
|
125
|
+
| `team_create_key` | Create team API key | `team_id`, `label` |
|
|
126
|
+
| `team_usage` | Get team usage history | `team_id` |
|
|
127
|
+
| `update_team` | Update team settings | `team_id` |
|
|
128
|
+
| `update_team_member_role` | Change member role | `team_id`, `user_id`, `role` |
|
|
129
|
+
|
|
130
|
+
## Usage Examples
|
|
131
|
+
|
|
132
|
+
### Proxied Fetch with Geo-Targeting
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
# Fetch through a US datacenter proxy ($3/GB)
|
|
136
|
+
result = toolkit.proxied_fetch(
|
|
137
|
+
url="https://example.com",
|
|
138
|
+
country="US",
|
|
139
|
+
proxy_type="dc",
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
# Fetch through a German residential proxy ($5/GB)
|
|
143
|
+
result = toolkit.proxied_fetch(
|
|
144
|
+
url="https://example.de",
|
|
145
|
+
country="DE",
|
|
146
|
+
proxy_type="residential",
|
|
147
|
+
)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Agentic Wallet Management
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
# Create a sub-wallet for an AI agent with $10 spending limit
|
|
154
|
+
wallet = toolkit.create_agentic_wallet(
|
|
155
|
+
label="Research Agent",
|
|
156
|
+
spending_limit_cents=1000,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
# Fund it with $5 from main wallet
|
|
160
|
+
toolkit.fund_agentic_wallet(
|
|
161
|
+
wallet_id=wallet["id"],
|
|
162
|
+
amount_cents=500,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
# Check balance
|
|
166
|
+
print(toolkit.agentic_wallet_balance(wallet_id=wallet["id"]))
|
|
167
|
+
|
|
168
|
+
# Freeze if needed
|
|
169
|
+
toolkit.freeze_agentic_wallet(wallet_id=wallet["id"])
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Team Management
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
# Create a team
|
|
176
|
+
team = toolkit.create_team(name="Research Team", max_members=10)
|
|
177
|
+
|
|
178
|
+
# Fund the team wallet
|
|
179
|
+
toolkit.team_fund(team_id=team["id"], amount_cents=5000)
|
|
180
|
+
|
|
181
|
+
# Create a team API key
|
|
182
|
+
key = toolkit.team_create_key(
|
|
183
|
+
team_id=team["id"],
|
|
184
|
+
label="Agent Key",
|
|
185
|
+
)
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### CAMEL Multi-Agent System
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
from camel.agents import ChatAgent
|
|
192
|
+
from camel.models import ModelFactory
|
|
193
|
+
from camel.types import ModelPlatformType, ModelType
|
|
194
|
+
from dominusnode_camel import DominusNodeToolkit
|
|
195
|
+
|
|
196
|
+
toolkit = DominusNodeToolkit()
|
|
197
|
+
tools = toolkit.get_tools()
|
|
198
|
+
|
|
199
|
+
# Research agent with proxy access
|
|
200
|
+
researcher = ChatAgent(
|
|
201
|
+
system_message="You are a web researcher. Use proxied_fetch to gather data.",
|
|
202
|
+
model=ModelFactory.create(
|
|
203
|
+
model_platform=ModelPlatformType.OPENAI,
|
|
204
|
+
model_type=ModelType.GPT_4O,
|
|
205
|
+
),
|
|
206
|
+
tools=tools,
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
# Finance agent for wallet management
|
|
210
|
+
finance = ChatAgent(
|
|
211
|
+
system_message="You manage proxy budgets. Monitor balance and usage.",
|
|
212
|
+
model=ModelFactory.create(
|
|
213
|
+
model_platform=ModelPlatformType.OPENAI,
|
|
214
|
+
model_type=ModelType.GPT_4O,
|
|
215
|
+
),
|
|
216
|
+
tools=tools,
|
|
217
|
+
)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Security
|
|
221
|
+
|
|
222
|
+
This toolkit includes comprehensive security measures:
|
|
223
|
+
|
|
224
|
+
- **SSRF Prevention**: Blocks requests to private IPs (10.x, 172.16-31.x, 192.168.x, 127.x, 0.0.0.0/8, 169.254.x, 100.64-127.x CGNAT, 224+ multicast), IPv6 loopback/ULA/link-local, IPv4-mapped/compatible IPv6, Teredo (2001:0000::/32), 6to4 (2002::/16), hex/octal/decimal encoded IPs
|
|
225
|
+
- **DNS Rebinding Protection**: Resolves hostnames and validates all IP addresses before connecting
|
|
226
|
+
- **TLD Blocking**: .localhost, .local, .internal, .arpa
|
|
227
|
+
- **Credential Protection**: Embedded URL credentials blocked; API keys scrubbed from all error output
|
|
228
|
+
- **OFAC Compliance**: Cuba, Iran, North Korea, Russia, Syria blocked for geo-targeting
|
|
229
|
+
- **HTTP Method Restriction**: Only GET, HEAD, OPTIONS allowed through proxy
|
|
230
|
+
- **Prototype Pollution Prevention**: Dangerous keys stripped from all JSON responses
|
|
231
|
+
- **Response Limits**: 10 MB body cap, 4000 char truncation for LLM context
|
|
232
|
+
- **Redirect Disabled**: No redirect following to prevent open redirect abuse
|
|
233
|
+
|
|
234
|
+
## Running Tests
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
cd integrations/camel-ai
|
|
238
|
+
pip install -e ".[dev]"
|
|
239
|
+
pytest tests/ -v
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
MIT
|