crewai-powersun
CrewAI integration for PowerSun.vip — the TRON Energy & Bandwidth marketplace and DEX swap aggregator for AI agents.
Install
pip install crewai-powersun
Quick Start
from crewai import Agent, Task, Crew
from crewai_powersun import PowerSunEstimateCostTool, PowerSunBuyEnergyTool
# Create an agent with PowerSun tools
energy_manager = Agent(
role="TRON Energy Manager",
goal="Minimize transaction costs by renting energy instead of burning TRX",
backstory="Expert in TRON network resource management",
tools=[
PowerSunEstimateCostTool(),
PowerSunBuyEnergyTool(api_key="ps_your_key"),
],
)
# Create a task
task = Task(
description="Estimate cost and buy 65000 energy for address TYourAddress for 1 hour",
agent=energy_manager,
)
crew = Crew(agents=[energy_manager], tasks=[task])
result = crew.kickoff()
Environment Variable
Set POWERSUN_API_KEY to avoid passing the key to each tool:
export POWERSUN_API_KEY=ps_your_key
Available Tools (9)
| Tool | Auth | Description |
|---|---|---|
PowerSunRegisterTool |
No | Start registration — get challenge to sign |
PowerSunVerifyRegistrationTool |
No | Submit signature → get API key |
PowerSunMarketOverviewTool |
No | Market snapshot: prices, availability, stats |
PowerSunEstimateCostTool |
No | Calculate energy rental cost |
PowerSunBuyEnergyTool |
Yes | Purchase energy delegation |
PowerSunGetBalanceTool |
Yes | Account balance and deposit info |
PowerSunGetOrderStatusTool |
Yes | Order status with delegation progress |
PowerSunGetSwapQuoteTool |
Yes | Get swap quote for SunSwap DEX (TRX, USDT, USDC, SUN, BTT, WIN, JST) |
PowerSunExecuteSwapTool |
Yes | Execute signed swap TX with auto Energy (API key, x402, or 402) |
Links
- Platform: powersun.vip
- MCP Server: powersun.vip/mcp
- API Docs: powersun.vip/api-docs
License
MIT
Metadata
Release files for crewai-powersun 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crewai_powersun-1.3.0.tar.gz | 4.9 kB | Without provenance | Details for crewai_powersun-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crewai_powersun-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for crewai_powersun-1.3.0-py3-none-any.whl |
Total release size: 10.2 kB
Release files / crewai_powersun-1.3.0.tar.gz
| Download URL | crewai_powersun-1.3.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d3ef026494bbbd7a3f5f818bae2521b319443f74e2061458572aba50c4f0581
|
|
BLAKE2b-256 checksum How to use checksums |
fa99f5912353188f7f05a4ef5313e030bf32c1461a237eb7995bba641173a086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / crewai_powersun-1.3.0-py3-none-any.whl
| Download URL | crewai_powersun-1.3.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30c59bacae5347e68614258dee2b5d73226807e0ab40ef610ab02e025475583d
|
|
BLAKE2b-256 checksum How to use checksums |
fcbef265dfd7f6cf1965435c4c8e609b9acd739a88ca5a63c2602566b808126a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for crewai-powersun 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.