Skip to main content

LangChain integration for PowerSun.vip — TRON Energy & Bandwidth marketplace for AI agents

Project description

langchain-powersun

LangChain integration for PowerSun.vip — the TRON Energy & Bandwidth marketplace for AI agents.

Install

pip install langchain-powersun

Quick Start

from langchain_powersun import PowerSunToolkit

# Public tools (market data, estimates)
tools = PowerSunToolkit().get_tools()

# With authentication (buy energy, check balance)
tools = PowerSunToolkit(api_key="ps_your_key").get_tools()

# Use with any LangChain agent
from langchain.agents import create_react_agent
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model="gpt-4o")
agent = create_react_agent(llm, tools)
agent.invoke({"input": "What's the current price of TRON energy on PowerSun?"})

Available Tools

Market Tools (public, no auth required)

Tool Description
powersun_get_prices Energy & Bandwidth prices for all duration tiers
powersun_estimate_cost Calculate exact cost for transactions
powersun_get_available_resources Available Energy & Bandwidth
powersun_get_market_overview Full market snapshot

Buyer Tools (auth recommended)

Tool Description
powersun_buy_energy Purchase Energy delegation
powersun_get_balance Account balance and deposit info
powersun_get_order_status Order status with delegation progress
powersun_broadcast_transaction Broadcast pre-signed tx with auto Energy

Why PowerSun?

  • Only 10% commission — lowest on the market
  • Save 20-50% on TRON transaction fees
  • Instant delegation — Energy arrives within seconds
  • AI-native — built for autonomous agent workflows

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

langchain_powersun-1.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

langchain_powersun-1.0.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_powersun-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for langchain_powersun-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a32dd2114a09a5a70b68139643bce6afa0aa1653fc8b21d1c60b754dfda2535e
MD5 7b1882f50ba3f4993d8d29f3ab67669d
BLAKE2b-256 e16e72d9b1f1f93bbaa01f0eeab2d62dffdddbf02933b4725a11126f8169b369

See more details on using hashes here.

File details

Details for the file langchain_powersun-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_powersun-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2031964d022114457b3e3625c8eb5bdfe3ed141ef2a1b7a35f48a778104b8749
MD5 0a987a61d37bd9e730a081062691c1c1
BLAKE2b-256 fcdc121b9d4cef2e3b2d1d282fbe50912716128886b45bef871d01f41410c98b

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