Skip to content

🤖⛓️ ergo-agent SDK

Give any LLM agent the power to interact with the Ergo blockchain.


What is ergo-agent?

ergo-agent is an open-source Python SDK that lets AI agents (Claude, GPT-4, LangChain, CrewAI) autonomously read wallet balances, fetch live prices, and swap tokens on Spectrum DEX — with built-in safety guardrails so the agent can't drain a wallet.

Install

pip install ergo-agent

5-Line Quickstart

from ergo_agent import ErgoNode, Wallet
from ergo_agent.tools import ErgoToolkit

node = ErgoNode()
wallet = Wallet.read_only("9f4QF8jQSBiHrgqrCDuS3L62MY6MaBFW5UeqNqfEi1mCfmPFxVo")
toolkit = ErgoToolkit(node=node, wallet=wallet)

print(toolkit.get_erg_price())    # → {"erg_usd": 0.31, "source": "oracle_pool_v2"}
print(toolkit.get_wallet_balance())  # → {"erg": "1.2345", "tokens": [...]}

That's it. No node required, no wallet keys, no setup. The public Explorer API is used by default.

Key Features

Feature Description
🔍 Read-only queries Balance, price, mempool — no keys needed
💱 DEX integration Swap quotes and orders on Spectrum Finance
📊 Oracle prices Live ERG/USD from Oracle Pool v2
🔧 LLM-ready OpenAI, Anthropic, and LangChain tool schemas
🛡️ Safety layer Per-tx limits, daily caps, rate limiting, contract whitelist
🔑 Wallet signing Sign transactions via Ergo node wallet API

Next Steps

  • Getting Started — detailed setup for all three modes (read-only, node wallet, LLM agent)
  • Tutorial: Hello, Ergo! — step-by-step walkthrough from zero to a working agent
  • Architecture — how the SDK is structured and how Ergo's eUTXO model works
  • API Reference — complete reference for all classes and methods