Skip to content
/ Hedron Public

Autonomous Agent Ecosystem on Hedera Hashgraph

Notifications You must be signed in to change notification settings

Hebx/Hedron

Repository files navigation

Hedron

Autonomous Agent Ecosystem SDK for Hedera Hashgraph

License: ISC TypeScript Hedera

Hedron is a complete SDK and framework for building autonomous agent-to-agent systems on the Hedera network. It combines Google's A2A Protocol, x402 Payment Standard, and Hedera Consensus Service (HCS) to enable truly autonomous, multi-protocol agent communication and settlement.


🌟 Vision

Hedron envisions a future where autonomous agents orchestrate complex workflows across blockchain networksβ€”negotiating contracts, processing payments, detecting fraud, and making intelligent decisionsβ€”all without human intervention.

Our ecosystem integrates:

  • AP2 Protocol - Agent-to-agent payment negotiations
  • A2A Protocol - Standardized agent communication
  • x402 Payment Standard - Autonomous cross-chain settlements
  • Hedera HCS - Decentralized messaging infrastructure

🎯 What Is Hedron?

Hedron is both a production-ready SDK and a complete framework that enables:

πŸ”„ Autonomous Workflows

  • Agent Negotiation: Buyers and sellers negotiate terms autonomously
  • Intelligent Verification: LLM-powered decision making and fraud detection
  • Automated Settlement: Cross-chain payments executed without intermediaries

🌐 Multi-Chain Support

  • Hedera Network: Native HBAR transfers, HCS messaging, fast finality
  • EVM Chains: USDC on Base, Ethereum, or any EVM-compatible network
  • Cross-Chain: Seamless settlements across networks

πŸ€– Smart Agents

  • AnalyzerAgent: Queries account data, generates insights, proposes actions
  • VerifierAgent: Validates proposals, applies business rules, makes decisions
  • SettlementAgent: Executes payments via x402, records settlements on-chain
  • IntelligentVerifierAgent: AI-powered validation with GPT-4 reasoning

πŸ“¦ SDK Installation

Hedron is available as an npm package for easy integration into your projects.

Install

npm install hedron-agent-sdk

Quick Start

import { 
  AnalyzerAgent, 
  VerifierAgent, 
  SettlementAgent,
  A2AProtocol 
} from 'hedron-agent-sdk'

// Initialize an agent
const agent = new AnalyzerAgent()
await agent.init()

// Query account data
const accountInfo = await agent.queryAccount('0.0.123456')

SDK Documentation


🎬 Demos & Examples

Hedron includes 8 production-ready demos showcasing real-world use cases with actual blockchain transactions. All demos support HCS-10 OpenConvAI Protocol for enhanced security and auditability.

πŸ”— HCS-10 OpenConvAI Protocol

All demos include optional HCS-10 features:

  • Connection Management - Establish trusted agent connections
  • Transaction Approval - Multi-signature workflows for high-value transactions
  • Fee-Based Connections - Agent monetization support
  • Enhanced Audit Trail - Complete on-chain transaction history

Enable HCS-10: export USE_HCS10_CONNECTIONS=true


Bounty 1: x402 Payment Standard Demos

1. NFT Royalty Payment (Cross-Chain x402)

npm run demo:nft-royalty 150

Demonstrates:

  • NFT sale simulation ($150)
  • Automatic 10% royalty calculation ($15)
  • Cross-chain x402 payment execution
  • USDC transfer on Base Sepolia
  • Fee-based connection configuration (HCS-10)
  • Complete payment receipt

Network: Base Sepolia | Asset: USDC | Protocol: x402

2. HBAR Direct Transfer (Native x402)

npm run demo:hbar-x402 10    # Small amount
npm run demo:hbar-x402 100   # Large amount (triggers HCS-10 approval)

Demonstrates:

  • Direct Hedera HBAR transfer
  • x402 verification on native Hedera
  • Fast, low-cost settlement
  • HCS-10 transaction approval for large amounts (>=50 HBAR)
  • Payment authorization and settlement

Network: Hedera Testnet | Asset: HBAR | Protocol: x402


Bounty 2: Hedera Agent Kit Demos

3. Main Orchestrator (Complete 3-Agent Workflow)

npm run demo 0.0.XXXXXX 10 hedera-testnet

Demonstrates:

  • Complete 3-agent coordination (Analyzer β†’ Verifier β†’ Settlement)
  • HCS-10 connection establishment between agents
  • Connection-based proposal messaging
  • HCS-10 transaction approval for HBAR payments
  • Cross-chain settlement execution
  • Full autonomous workflow

Technology: A2A Protocol + HCS-10 | Network: Hedera Testnet | Asset: HBAR

4. Intelligent Invoice with LLM Reasoning

npm run demo:invoice-llm 150      # Low-value (auto-approved)
npm run demo:invoice-llm 800      # High-value (HCS-10 approval)

Demonstrates:

  • LLM-powered invoice validation (GPT-4)
  • AI decision making with reasoning
  • HCS-10 transaction approval replaces CLI HITL prompts
  • On-chain storage of LLM reasoning in transaction memo
  • Autonomous approval/rejection
  • Hedera token settlement

Technology: LLM + A2A Protocol + HCS-10 | Network: Hedera Testnet | Asset: HBAR

5. Supply Chain Negotiation

npm run demo:negotiation

Demonstrates:

  • Multi-agent price negotiation
  • Vendor payment workflow
  • HCS-10 transaction approval for vendor payments
  • Multi-signature approval before execution
  • Hedera token settlement

Technology: A2A Protocol + HCS-10 | Network: Hedera Testnet | Asset: HBAR

6. Supply Chain Fraud Detection

npm run demo:supply-chain-fraud

Demonstrates:

  • Multi-agent price negotiation
  • AI fraud detection algorithms
  • Blockchain memo verification
  • HCS-10 transaction approval for fraud-checked payments
  • Enhanced security with multi-signature approval
  • Hedera token settlement

Technology: Fraud Detection + Memo Verification + A2A + HCS-10 | Network: Hedera Testnet | Asset: HBAR

7. Invoice Automation

npm run demo:invoice 150      # Low-value (direct execution)
npm run demo:invoice 600      # High-value (HCS-10 approval)

Demonstrates:

  • Automated invoice processing
  • HCS-10 connection establishment between Analyzer and Verifier
  • Agent-to-agent communication via connections
  • HCS-10 transaction approval for high-value invoices (>= $500)
  • Human-in-the-loop integration
  • Cross-chain payment support

Technology: A2A Protocol + HCS-10 + x402 | Network: Hedera Testnet + Base Sepolia | Asset: HBAR/USDC


Track 1: RWA Tokenization

8. Tokenized RWA Invoice

npm run demo:rwa-invoice 250      # Low-value
npm run demo:rwa-invoice 600      # High-value (HCS-10 approval)

Demonstrates:

  • Invoice tokenization as Real-World Asset (RWA)
  • Hedera Token Service (HTS) token creation
  • RWA token trading/transfer (invoice factoring)
  • HCS-10 transaction approval for high-value settlements (>= $500)
  • Automated settlement via x402 payment standard
  • Cross-chain payment execution (HBAR or USDC)
  • Complete RWA lifecycle on-chain

Technology: HTS Tokenization + x402 + HCS-10 | Network: Hedera Testnet + Base Sepolia | Asset: HTS Tokens + HBAR/USDC


Demo Feature Matrix

Demo HCS-10 Connections HCS-10 Approval Network Asset Command
Orchestrator βœ… βœ… (HBAR) Hedera HBAR npm run demo
NFT Royalty βœ… (fee config) ❌ Base USDC npm run demo:nft-royalty 150
HBAR Direct ❌ βœ… (>=50 HBAR) Hedera HBAR npm run demo:hbar-x402 100
Intelligent Invoice ❌ βœ… (>= $500) Hedera HBAR npm run demo:invoice-llm 800
Supply Chain Negotiation ❌ βœ… Hedera HBAR npm run demo:negotiation
Supply Chain Fraud ❌ βœ… Hedera HBAR npm run demo:supply-chain-fraud
Invoice Automation βœ… βœ… (>= $500) Hedera/Base HBAR/USDC npm run demo:invoice 600
RWA Invoice ❌ βœ… (>= $500) Hedera/Base HBAR/USDC npm run demo:rwa-invoice 600
npm run demo                    # Complete 3-agent workflow
npm run demo:invoice            # Invoice automation
npm run demo:negotiation        # Supply chain negotiation
npm run demo:rwa-invoice        # Tokenized RWA invoice demo

Demo Documentation


πŸ† Hackathon Submission

Hedron was built for the Hedera Africa Hackathon, implementing both bounties with production-ready code:

  • βœ… Bounty 1: Hedera x402 Payment Standard SDK - Complete cross-chain payment protocol
  • βœ… Bounty 2: Hedera Agent Kit & Google A2A Protocol - Autonomous agent systems with AI-powered decision making

Quick Hackathon Overview

What We Built:

  • 80+ files of production-ready code
  • 11 passing tests (unit, integration, e2e)
  • 7 working demos with real blockchain transactions
  • 21+ comprehensive documentation files
  • 2 deployed smart contracts

Key Highlights:

  • First x402 implementation connecting Hedera and Base
  • LLM reasoning for autonomous invoice validation
  • Fraud detection with blockchain memo verification
  • Multi-protocol agent communication (A2A, AP2, x402)

πŸ“– Read Complete Hackathon README for full submission details, setup instructions, and demo walkthroughs.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Agent Network                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ AnalyzerAgent    β”‚  VerifierAgent   β”‚ SettlementAgent  β”‚
β”‚                  β”‚                  β”‚                  β”‚
β”‚ β€’ Query Data     β”‚ β€’ Validate       β”‚ β€’ x402 Payments  β”‚
β”‚ β€’ Generate       β”‚ β€’ Approve/Reject β”‚ β€’ Cross-Chain    β”‚
β”‚   Proposals      β”‚ β€’ AI Reasoning   β”‚ β€’ Settlement     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                   β”‚                   β”‚
         β–Ό                   β–Ό                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Hedera Consensus Service (HCS) Messaging          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚ Analyzer β”‚  β”‚ Verifier β”‚  β”‚ Settlement   β”‚         β”‚
β”‚  β”‚ Topic    β”‚  β”‚ Topic    β”‚  β”‚ Topic        β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                   β”‚                   β”‚
         β–Ό                   β–Ό                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            Multi-Chain Settlement Layer                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚ Hedera   β”‚  β”‚ Base     β”‚  β”‚ x402         β”‚         β”‚
β”‚  β”‚ HBAR     β”‚  β”‚ USDC     β”‚  β”‚ Protocol     β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’‘ Use Cases

Hedron enables autonomous systems across multiple industries:

🧾 Invoice Automation

  • Autonomous Processing: AI analyzes invoices, validates business rules, and approves payments
  • Fraud Detection: ML algorithms flag suspicious transactions
  • Instant Settlement: Automated USDC or HBAR transfers

πŸ“¦ Supply Chain

  • Agent Negotiation: Buyer and vendor agents negotiate terms autonomously
  • Agreement Recording: Smart contracts record finalized terms on Hedera
  • Automated Payments: x402 protocol executes settlements

🎨 NFT Royalties

  • Automatic Calculation: 10% royalty calculated on each NFT sale
  • Cross-Chain Payments: Creators receive USDC on preferred network
  • Transparent Trail: All payments recorded on blockchain

πŸ’° Financial Services

  • Autonomous Trading: Agents execute trades based on market conditions
  • Risk Management: AI evaluates risk and makes decisions
  • Multi-Asset Settlement: USDC, HBAR, or any supported token

πŸ”’ Security & Compliance

  • Fraud Detection: AI analyzes transaction patterns
  • Memo Verification: Blockchain-verified agreement recording
  • Audit Trails: Complete transparency via HCS

πŸ’Ό Real-World SDK Use Cases

See comprehensive real-world use cases with complete code examples:

πŸ“– Real-World Use Cases Guide - 6 production-ready examples including:

  • E-Commerce Payment Platform (Stripe-like)
  • B2B Supply Chain Platform (automated procurement)
  • Freelancer Marketplace (automated payouts)
  • SaaS Subscription Billing (multi-chain)
  • NFT Marketplace (royalty distribution)
  • Invoice Factoring Platform (RWA tokenization)

Each use case includes TypeScript code examples, business impact metrics, and implementation scenarios.


πŸ—ΊοΈ Roadmap & Real-World Adoption

Phase 1: Launch βœ… (Complete)

  • Core agent framework with A2A Protocol
  • x402 payment standard (cross-chain & native)
  • HCS messaging infrastructure
  • HCS-10 OpenConvAI integration
  • Production SDK package (hedron-agent-sdk)
  • 8 production-ready demos

Phase 2: Real-World Integration (Q1 2025)

Target Markets:

  • E-Commerce Platforms - Integrate SDK for autonomous payment processing
  • B2B Marketplaces - Deploy supply chain automation
  • Freelancer Platforms - Automated payout systems
  • SaaS Companies - Multi-chain subscription billing

Technical Expansion:

  • Mainnet deployment
  • Additional EVM chains (Polygon, Arbitrum, Optimism)
  • Enterprise APIs and webhooks
  • HCS-10 agent registry integration
  • SDK performance optimizations

Phase 3: Scale (Q2-Q3 2025)

Market Expansion:

  • Financial Services - RWA tokenization platforms
  • NFT Marketplaces - Royalty distribution networks
  • Supply Chain Finance - Invoice factoring marketplaces
  • Enterprise Automation - Large-scale workflow systems

Platform Growth:

  • HCS-10 network expansion
  • SDK marketplace with pre-built templates
  • Community contributions and plugins
  • Framework integrations (React, Next.js, Express)
  • Governance tokens and DAO

Phase 4: Ecosystem (Q4 2025+)

  • Agent Marketplace - Discover and connect agents
  • Template Library - Pre-built workflows (invoice, royalty, supply chain)
  • Analytics Dashboard - Monitor agent performance
  • Multi-Network Support - Expand beyond Hedera/EVM
  • Enterprise Support - SLA guarantees, dedicated support

⚑ Quick Start (Development)

Installation

# Clone repository
git clone https://github.com/Hebx/hedron.git
cd hedron

# Install dependencies
npm install

# Configure environment
cp env.example .env
# Edit .env with your credentials

# Setup HCS-11 profile
npm run setup:hcs11-fixed

Configuration

Configure your .env file with:

  • Hedera testnet account ID and private key
  • Base Sepolia wallet with USDC
  • Agent credentials (auto-generated)
  • Payment network preference

See Environment Setup for detailed instructions.


πŸ§ͺ Testing

Run All Tests

npm run test:all  # Unit + Integration + E2E tests

Test Coverage

  • Unit Tests: Agent logic, protocol implementations
  • Integration Tests: Cross-protocol workflows, payment flows
  • E2E Tests: Complete agent coordination (requires HCS-11 setup)

Status: βœ… All tests passing


🌍 Network Support

Hedera Networks

  • Testnet: Primary development environment
  • Mainnet: Production deployments

EVM Networks

  • Base Sepolia: Primary settlement network for USDC
  • Ethereum Sepolia: Alternative network
  • Any EVM: Compatible with any EVM-compatible chain

πŸ”§ Development

Build

npm run build  # Build SDK and source code

Deploy Contracts

npm run deploy:simple        # Simple supply chain
npm run deploy:supply-chain  # Advanced supply chain

Check Status

npm run check:credentials    # Verify configuration
npm run check:wallets        # Check wallet status

πŸ“š Documentation

SDK Documentation

Bounty Submissions

Core Documentation

Setup Guides

Real-World Applications


πŸ“¦ Project Structure

hedron/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agents/              # Agent implementations (SDK)
β”‚   β”œβ”€β”€ protocols/           # A2A, AP2, x402 protocols (SDK)
β”‚   β”œβ”€β”€ facilitator/         # x402 facilitator server (SDK)
β”‚   β”œβ”€β”€ modes/              # Human-in-the-loop (SDK)
β”‚   β”œβ”€β”€ services/           # Token services (SDK)
β”‚   └── utils/              # Utility functions (SDK)
β”œβ”€β”€ contracts/              # Solidity smart contracts
β”œβ”€β”€ tests/                  # Test suite (unit, integration, e2e)
β”œβ”€β”€ demo/                   # Showcase demos
β”œβ”€β”€ docs/                   # Complete documentation
β”œβ”€β”€ dist/                   # Built SDK files
β”œβ”€β”€ SDK_README.md          # SDK-specific documentation
β”œβ”€β”€ HACKATHON_README.md    # Hackathon submission details
└── README.md              # This file

πŸš€ Key Features

βœ… Multi-Protocol Support

  • A2A for standardized communication
  • AP2 for payment negotiations
  • x402 for autonomous settlements
  • HCS for decentralized messaging

βœ… Intelligent Agents

  • AI-powered decision making
  • Fraud detection algorithms
  • Risk assessment
  • Business rule validation

βœ… Cross-Chain Capabilities

  • USDC on Base/Ethereum
  • HBAR on Hedera
  • Automatic network selection
  • Seamless bridging

βœ… Production Ready

  • Error handling
  • Human-in-the-loop (HITL)
  • Complete audit trails
  • Security best practices

βœ… SDK Ready

  • npm package available
  • TypeScript definitions
  • Modular exports
  • Optional environment configuration

🀝 Contributing

We welcome contributions! Please see our contributing guidelines in the documentation.


πŸ“„ License

ISC License - see LICENSE file for details.


πŸ”— Links


πŸ† Built For

  • Hedera x402 Payment Standard Bounty - Agentic Cross-chain payment protocol
  • Hedera Agent Kit Bounty - Autonomous agent systems and protocols
  • Hedera Africa Hackathon - Complete submission with both bounties

Hedron - Autonomous agents, intelligent decisions, seamless settlements.

About

Autonomous Agent Ecosystem on Hedera Hashgraph

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published