Skip to main content

CrewAI integration for PowerSun.vip — TRON Energy & Bandwidth marketplace and DEX swap aggregator with 27 MCP tools for AI agents

Project description

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 automatic energy delegation

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_powersun-1.2.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_powersun-1.2.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file crewai_powersun-1.2.0.tar.gz.

File metadata

  • Download URL: crewai_powersun-1.2.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for crewai_powersun-1.2.0.tar.gz
Algorithm Hash digest
SHA256 23a2280b7bec35fec65553dac3a40ef8eb3d0f445aea602d2a1d19d93e18f166
MD5 96971a20de60be1b82a388dadacf9883
BLAKE2b-256 51429197c6f742a7c6425561be33d6846f3647b16e68d6435b4f28260df32a53

See more details on using hashes here.

File details

Details for the file crewai_powersun-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_powersun-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2ef9517786f5876bacc3b0983c66339f6e6eec45c0ff83a6176ffc249441cfc
MD5 6b2e83f579723dcc6fac2eb0ea277607
BLAKE2b-256 c2e2b054ae9bf18c25dae7c8bc8a10258f677793121c8a262559c4dab8f77628

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page