Autonomous DeFi Coordination Layer for Hedera
Tell our AI agents what you want in plain English. They think, coordinate, and execute β every decision logged transparently on Hedera Consensus Service. No black boxes.
Hedera Hello Future Apex Hackathon 2026 Β· Architecture Β· Getting Started Β· Demo
| Event | Hedera Hello Future Apex Hackathon 2026 |
| Track | AI & Agents (Main Track) |
| Bounty | Bonzo Finance ($8K pool) β Intelligent Keeper Agent with Hedera Agent Kit |
YieldMind is an autonomous DeFi coordination layer where 4 specialized AI agents (Scout, Strategist, Executor, Sentinel) collaborate to manage yield strategies on Bonzo Finance. Users express intent in natural language β "I want safe yield on my HBAR" β and the agents scan vaults, build strategies, execute deposits, and harvest rewards autonomously via Hedera Agent Kit. An intelligent keeper loop analyzes volatility and sentiment data to optimize harvest timing. Every agent decision is logged to Hedera Consensus Service with human-readable reasoning, creating a fully auditable on-chain AI decision trail. No black boxes β every AI thought is verifiable on HashScan.
| Feature | Traditional DeFi | Rule-Based Keepers | YieldMind |
|---|---|---|---|
| Decision Making | Manual by user | if/else rules | AI reasoning with confidence scores |
| Transparency | Tx hash only | No logs | Full reasoning on HCS |
| Harvest Timing | Fixed interval | Fixed interval | Volatility + sentiment analysis |
| User Experience | Complex DeFi UI | N/A | Natural language chat |
| Audit Trail | None | None | Every decision on-chain via HCS |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend Layer (Next.js + Vercel AI SDK) β
β ββββββββββββββββ βββββββββββββββββββββββ βββββββββββββββ β
β β User Intent ββββΆβ Chat Interface ββββΆβ Dashboard β β
β β (plain text) β β (streaming + tools) β β + Portfolio β β
β ββββββββββββββββ βββββββββββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Agent Layer (LangChain) β
β βββββββββββββββββββββ β
β β Agent Coordinator β β
β ββββ¬ββββ¬ββββ¬ββββ¬ββββ β
β βββββββββββ β β βββββββββββ β
β βΌ βΌ βΌ βΌ β
β ββββββββββββ βββββββββββββ βββββββββββ ββββββββββββ β
β β Scout β βStrategist β βExecutor β β Sentinel β β
β βDiscovery β β Planning β β Actions β β Alerts β β
β ββββββββββββ βββββββββββββ βββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Blockchain & DeFi Layer (Hedera) β
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββββ β
β β Keeper Loop βββΆβ Hedera Agent βββΆβ Bonzo Finance β β
β β (autonomous) β β Kit (on-chain) β β (Lend + Vaults) β β
β ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββββ β
β ββββββββββββββββββ β
β β HCS Decision β βββ all agents log β
β β Trail (audit) β decisions here β
β ββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Agent | Color | Role | What It Does |
|---|---|---|---|
| Scout | π’ | Discovery & Analysis | Scans Bonzo Lend pools and Vaults live. Evaluates APY, TVL, liquidity, and risk. Scores opportunities for user's risk profile. |
| Strategist | π΅ | Strategy & Allocation | Interprets user intent into risk parameters. Builds allocation strategies across Bonzo Lend and Vaults. Explains trade-offs honestly (e.g., single-token limits). |
| Executor | π | On-Chain Execution | Deposits into Bonzo Lend & Vaults on mainnet. Executes autonomous harvests via Hedera Agent Kit. Manages the intelligent keeper loop. |
| Sentinel | π΄ | Monitoring & Protection | Watches market conditions and price feeds. Analyzes volatility and sentiment data. Triggers alerts when thresholds are breached. |
ββββββββββββββββββββ
β Keeper Loop Startβ
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Scan Bonzo Vaultsβ β 4 vaults: APY, TVL, strategy
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
βAnalyze Volatilityβ β 24h + 7d realized vol
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
βAnalyze Sentiment β β RAG pipeline, news headlines
ββββββββββ¬ββββββββββ
βΌ
βββββββββββββ
β AI Decisionβ
β Harvest? β
βββββββ€ββββββ
YES ββββββ΄βββββ NO
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
βExecute Harvestβ βMonitor/Delay β
βvia Agent Kit β βLog reasoning β
ββββββββ¬ββββββββ ββββββββ¬ββββββββ
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
β Log to HCS β β Log to HCS β
βharvest-exec β βharvest-delay β
ββββββββ¬ββββββββ ββββββββ¬ββββββββ
ββββββββββ¬βββββββββ
βΌ
ββββββββββββββββββββ
β Wait 5 min, loop β βββ back to start
ββββββββββββββββββββ
The keeper agent doesn't harvest on a fixed schedule β it uses AI-driven timing:
- Volatility > threshold β delay harvest (wait for stability)
- Bearish sentiment + high vol β delay (protect against dumps)
- Low volatility + neutral/bullish β harvest now (compound rewards)
- Pre-flight check via
eth_callbefore spending gas (avoids wasted txs)
| Category | Technology |
|---|---|
| Agent Framework | Hedera Agent Kit + LangChain.js (ReAct agent with 26 tools) |
| Blockchain | Hedera (HCS for consensus logging, EVM for smart contracts) |
| DeFi Protocol | Bonzo Finance (Lend pools + Vaults on mainnet) |
| LLM | OpenRouter (free tier, multi-model fallback chain) |
| Frontend | Next.js 14 (App Router) + Vercel AI SDK (streaming) |
| Styling | Tailwind CSS + Framer Motion |
| Wallets | MetaMask (EVM) + HashPack/Kabila (WalletConnect) |
| Database | Supabase (chat sessions, HCS topic persistence) |
| Language | TypeScript (strict mode, entire stack) |
YieldMind integrates with Bonzo Finance on Hedera mainnet:
- Bonzo Lend β Supply pools (HBAR, USDC, SAUCE, etc.) with variable APY
- Bonzo Vaults β Auto-compounding concentrated liquidity strategies on SaucerSwap V2:
- HBAR-USDC Single Asset Vault
- HBAR-USDC Dual Asset Vault
- USDC-USDC[hts] Vault
- HBAR-HBARX Leveraged LST Vault
The keeper agent uses Hedera Agent Kit in AUTONOMOUS mode to:
- Scan vaults β Custom
scan_bonzo_vaultstool wrapping BonzoVaultsClient - Analyze markets β Custom
analyze_volatilityandanalyze_sentimenttools - Execute harvests β
ContractExecuteTransactioncallingharvest(address)on strategy contracts - Deposit HBAR β
ContractExecuteTransactioncalling WETHGatewaydepositETH() - Log to HCS β
TopicMessageSubmitTransactionwith full decision reasoning
The agent signs transactions with a server-side Hedera account β no user wallet needed for keeper operations.
- Node.js 20+
- Hedera Testnet Account β Get one free
- Hedera Mainnet Account β For autonomous keeper operations (fund with ~20 HBAR)
- OpenRouter API Key β Free tier (no credit card needed)
# Clone the repo
git clone https://github.com/farouk-allani/yieldmind.git
cd yieldmind
# Install dependencies
npm install # root (installs workspaces)
cd agents && npm install
cd ../web && npm install
cd ..
# Configure environment
cp .env.example .env
# Edit .env with your credentials (see below)
# Start the app (agents + frontend in one process)
cd web && npm run devOpen http://localhost:3000 to see the app.
| Variable | Required | Description |
|---|---|---|
HEDERA_NETWORK |
Yes | testnet for HCS, mainnet for Bonzo |
HEDERA_ACCOUNT_ID |
Yes | Testnet account for HCS topics |
HEDERA_PRIVATE_KEY |
Yes | Testnet private key (DER-encoded) |
HEDERA_MAINNET_ACCOUNT_ID |
For keeper | Mainnet account for autonomous execution |
HEDERA_MAINNET_PRIVATE_KEY |
For keeper | Mainnet private key for Agent Kit |
OPENROUTER_API_KEY |
Yes | Free LLM API key from OpenRouter |
LLM_MODEL |
No | Default: qwen/qwen3-next-80b-a3b-instruct:free |
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID |
For HashPack | From cloud.walletconnect.com |
KEEPER_INTERVAL_MS |
No | Keeper loop interval (default: 300000 = 5 min) |
Create a Supabase project and add NEXT_PUBLIC_SUPABASE_URL + NEXT_PUBLIC_SUPABASE_ANON_KEY to .env. Run the schema from supabase-schema.sql.
- Open the app β Clean dark dashboard with chat interface
- Connect wallet β MetaMask or HashPack via WalletConnect
- State your intent β Type: "I want safe yield on 10 HBAR"
- Watch agents work β Scout scans β Strategist picks β Executor proposes
- Approve & deposit β Sign the transaction in your wallet
- View transparency β Every decision logged to HCS, verifiable on HashScan
- Toggle "Autonomous" in the chat header
- Start the keeper loop from the Keeper dashboard page
- Watch it analyze β Scans vaults, checks volatility, reads sentiment
- See decisions β "harvest-now", "harvest-delay", "monitoring" with full reasoning
- Verify on-chain β Click HCS topic link to see decisions on HashScan
| Page | Description |
|---|---|
/app |
Main chat interface + agent activity sidebar |
/app/portfolio |
Wallet positions, Bonzo deposits, harvest controls, withdraw |
/app/keeper |
Full keeper dashboard β stats, controls, decision history, HCS links |
/app/business |
Business model, pricing tiers, expansion roadmap |
/hcs |
HCS Decision Trail viewer β browse all agent decisions by session |
yieldmind/
βββ agents/ # Agent backend (TypeScript)
β βββ src/
β βββ agents/ # Scout, Strategist, Executor, Sentinel
β βββ bonzo/ # Bonzo Lend + Vaults clients
β βββ config/ # Bonzo contract addresses, network config
β βββ core/ # Agent coordinator, keeper agent, LLM client
β β βββ agent-coordinator.ts # Orchestrates 4-agent pipeline
β β βββ keeper-agent.ts # LangChain ReAct agent (26 tools)
β β βββ hedera-toolkit.ts # Hedera Agent Kit wrapper
β β βββ keeper-service.ts # Volatility + sentiment analysis
β βββ hedera/ # HCS service, Hedera client
β βββ types/ # Shared TypeScript types
βββ web/ # Next.js 14 frontend
β βββ src/
β βββ app/
β β βββ app/ # Main app, portfolio, keeper, business pages
β β βββ api/ # API routes (chat, keeper, HCS, decisions)
β β βββ hcs/ # HCS decision trail viewer
β βββ components/
β β βββ chat/ # Chat interface with streaming
β β βββ dashboard/ # Agent status, decision log, keeper panel
β β βββ landing/ # Landing page sections
β β βββ wallet/ # Connect button, network toggle
β βββ lib/ # API client, types, wallet context, vault hooks
βββ contracts/ # Solidity (Hardhat) β YieldMindVault
βββ .env.example # Environment template
βββ README.md # This file
Every agent decision is published to Hedera Consensus Service as a DecisionLog:
{
"agentId": "yieldmind-strategist",
"agentRole": "strategist",
"action": "strategy-proposed",
"reasoning": "User wants safe yield on HBAR. Allocating 100% to HBAR Supply Pool (Bonzo Lend) at 0.68% APY. Conservative β single token, no impermanent loss risk. For higher returns, user would need a second token for dual-asset Bonzo Vaults.",
"confidence": 0.85,
"timestamp": "2026-03-22T14:30:00.000Z",
"sessionId": "abc-123",
"data": { "strategy": { "totalExpectedApy": 0.68, "overallRisk": "conservative" } }
}Every decision includes:
- Who decided (agent ID + role)
- What they decided (action)
- Why they decided it (human-readable reasoning)
- How confident they are (0-1 score)
- When (Hedera consensus timestamp)
- Supporting data (vault metrics, strategy details)
Verify any decision on HashScan by clicking the HCS topic link in the app.
YieldMind is designed to scale beyond the hackathon:
- Performance Fees (5-10% of harvested yield) β Only charged when value is created
- Keeper Incentives β Bonzo Vault contracts pay
callFeeto harvest callers - Premium Subscriptions β Advanced features for power users and institutions
| Phase | Focus | Status |
|---|---|---|
| Phase 1 | Bonzo Finance (Lend + Vaults) | Current |
| Phase 2 | All Hedera DeFi (SaucerSwap, HeliSwap, Stader) | Planned |
| Phase 3 | Cross-chain (Ethereum, Arbitrum, Base) | Future |
| Phase 4 | Agent Marketplace (third-party strategy agents) | Vision |
See the full business model at /app/business in the live app.
| Requirement | Status | Implementation |
|---|---|---|
| Hedera Agent Kit | β | hedera-agent-kit@3.8.1 β autonomous mode, 26 tools |
| Intelligent Keeper | β | AI-driven harvest timing (volatility + sentiment) |
| Bonzo Vault Integration | β | 4 vaults + all Lend pools, live mainnet data |
| Autonomous Execution | β | Server-side account signs via Agent Kit |
| On-Chain Logging | β | Every decision β HCS with full reasoning |
| LangChain | β | ReAct agent with custom + Agent Kit tools |
| Vercel AI SDK | β | Streaming chat responses |
| Multi-Wallet Support | β | MetaMask + HashPack + Kabila |
Built by Farouk Allani for the Hedera Hello Future Apex Hackathon 2026.
MIT
Every AI decision, auditable on-chain. No black boxes.
