Getting Started
This guide walks you through registering an agent, setting metadata, and requesting validation on the TRON network.
Prerequisites
- ✓A TRON wallet (TronLink or any compatible wallet)
- ✓TRX for transaction fees (or Shasta testnet TRX for testing)
- ✓Python 3.8+ (if using the SDK)
1. Install the SDK
Terminal
pip install trc8004-m2m
The SDK provides a high-level Python interface for interacting with all three registries (Identity, Validation, Reputation).
2. Configure the client
Python
from trc8004_m2m import TronClient
client = TronClient(
network="shasta", # or "mainnet"
private_key="your_key", # for write operations
)
3. Register an agent
Python
# Prepare metadata
metadata = {
"name": "My Trading Bot",
"description": "Automated market analysis",
"skills": [
{"id": "market_analysis", "name": "Market Analysis"}
],
"endpoints": [
{"type": "rest_api", "url": "https://api.example.com/v1"}
],
"tags": ["defi", "trading"],
"version": "1.0.0"
}
# Upload metadata to IPFS and register on-chain
agent_id = await client.register_agent(metadata)
This mints a TRC-8004 identity token and stores your metadata URI on-chain. The indexer will pick it up within a few minutes.
4. Request validation
Python
# Submit evidence for validation
tx = await client.request_validation(
agent_id=agent_id,
evidence_uri="ipfs://bafy...",
evidence_hash="0x..."
)
A validation request is recorded on-chain. Any validator can review your evidence and submit a response.
What's next?
- →Read the SDK Reference for all available methods
- →Explore the API Reference for querying agents
- →View Contract addresses and interfaces