ergo-agent-pay (Python)
Python reference SDK for the Ergo rail of Accord Protocol. Agent payments, Note operations, balance + UTxO inspection, LangChain / OpenAI integrations.
The package keeps its legacy npm-mirror name. A canonical Python Accord layer (port of @accord-protocol/core) is not yet published; when it is, it will live under a different PyPI name and import from this package as a rail dependency.
Zero required dependencies — uses Python standard library only.
pip install ergo-agent-pay
Quick start
from ergo_agent_pay import ErgoAgentPay
agent = ErgoAgentPay(address="YOUR_ADDRESS", network="testnet")
# Check balance
balance = agent.get_balance()
print(f"Balance: {balance['ergs']} ERG")
# Inspect a Note
note = agent.check_note("abc123...")
print(f"Note value: {note.value_erg} ERG")
print(f"Expired: {note.is_expired}")
print(f"Task hash: {note.task_hash}")
# Compute task hash for acceptance predicate
task_hash = ErgoAgentPay.compute_task_hash("task output here")
LangChain integration
from ergo_agent_pay import ErgoAgentPay
agent = ErgoAgentPay(address="YOUR_ADDRESS", network="testnet")
tool = agent.as_langchain_tool(server_url="http://localhost:3000")
# Use in any LangChain agent
from langchain.agents import AgentExecutor
tools = [tool]
OpenAI function calling
definition = agent.as_openai_function()
response = openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Pay 0.001 ERG to <address>"}],
tools=[{"type": "function", "function": definition}],
)
Transaction building
Python doesn't have a Fleet SDK equivalent. For full transaction building, use:
- TypeScript SDK (recommended): run
ergo-agent-payTypeScript server, call via HTTP - ergpy:
pip install ergpy— AppKit JVM wrapper - sigma-rust: Python bindings for Rust-based TX builder
See example 06 for the HTTP delegation pattern.
Note lifecycle — what Python can do
| Operation | Python | TypeScript |
|---|---|---|
| Get balance | ✅ | ✅ |
| Get UTxOs | ✅ | ✅ |
| Check note (decode registers) | ✅ | ✅ |
| Compute task hash | ✅ (BLAKE2b-256) | ✅ (BLAKE2b-256) |
| LangChain tool | ✅ | ✅ |
| OpenAI function | ✅ | ✅ |
| Build TX (issueNote, pay) | Via HTTP server | ✅ native |
| Sign TX | External | ✅ signer fn |
| Submit TX | ✅ | ✅ |
API reference
Full API reference: docs/api-reference.md
Metadata
Release files for ergo-agent-pay 0.3.2
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 |
|---|---|---|---|---|
| ergo_agent_pay-0.3.2.tar.gz | 14.0 kB | With provenance | Details for ergo_agent_pay-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ergo_agent_pay-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for ergo_agent_pay-0.3.2-py3-none-any.whl |
Total release size: 25.8 kB
Release files / ergo_agent_pay-0.3.2.tar.gz
| Download URL | ergo_agent_pay-0.3.2.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cbac445f810c65376f80241768e80e61da507612e6e8f4a3574cff91742619e
|
|
BLAKE2b-256 checksum How to use checksums |
7005b1eef2fccc333a9831bf03540d7717b6548be327aab87c0d19007020d8e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logRelease files / ergo_agent_pay-0.3.2-py3-none-any.whl
| Download URL | ergo_agent_pay-0.3.2-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ba3af199fd765bf5e7b3af6dec3be5ccf0fb09b53f370711337b9914723822f
|
|
BLAKE2b-256 checksum How to use checksums |
ac742bfb8d3a54e7482cacd6e08131aa4a7375ae42b0ad7feb296ea4bbe711c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logSecurity for ergo-agent-pay 0.3.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ergo_agent_pay-0.3.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 24, 2026.
Transparency logA 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.