A DeFi advisor agent that analyzes users' life stories to recommend personalized yield strategies on the Fraxtal network. Now with a beautiful web interface!
Built for the IQAI Agent Arena Hackathon using ADK-TS + Gemini 2.0 Flash.
- Node.js >= 22.0.0
# Install dependencies
npm install
cd frontend && npm install && cd ..- Create
.envfile with your API key:
GOOGLE_API_KEY=your_google_api_key_here
FRAXTAL_RPC_URL=https://rpc.frax.com
ATP_WALLET_PRIVATE_KEY=your_wallet_private_key # Optional- Frontend is pre-configured in
frontend/.env.local
Start both API server and frontend:
./start-dev.shThen open http://localhost:3000 in your browser!
npm startnpm run server- Real-time Chat: SSE streaming for instant AI responses
- Dark Mode UI: Beautiful purple/gold DeFi aesthetic
- Vault Display: Visual representation of deployed strategies
- Session Management: Persistent conversation history
- Split View: Chat on left, vault details on right
- Story Analysis: Share your financial story and get personalized recommendations
- Real-time Yields: Fetches current APY for sFRAX and sfrxETH on Fraxtal
- ATP Integration: Deploy strategies directly to Frax's Autonomous Tokenized Portfolio
- Risk Profiling: Intelligent matching of strategies to user risk tolerance
- Three Interfaces: Web UI, REST API, or Terminal CLI
- ADK-TS: AI agent framework with tool integration
- Hono: Lightweight web framework for API
- Viem: Ethereum blockchain interactions
- TypeScript: Type-safe development
- Next.js 14: React with App Router
- Tailwind CSS: Utility-first styling
- Lucide Icons: Beautiful icons
- SSE: Real-time streaming
- Fraxtal L2: High-yield DeFi strategies on Frax's Layer 2
- Real Contracts: Direct on-chain data fetching
- sFRAX: ~4.5% APY - Low risk, stablecoin yield
- sfrxETH: ~3.8% APY - Medium risk, ETH liquid staking
storyvault-steward/
βββ src/
β βββ agent.ts # Exportable agent configuration
β βββ cli.ts # Terminal interface
β βββ server.ts # REST API with SSE streaming
β βββ tools/
β βββ fraxTools.ts # Fraxtal yield data
β βββ realAtpTool.ts # ATP deployment
βββ frontend/ # Next.js web interface
β βββ app/
β β βββ page.tsx # Main page
β β βββ layout.tsx # Root layout
β β βββ globals.css # Global styles
β βββ components/
β β βββ ChatInterface.tsx # Chat UI with SSE
β β βββ VaultCard.tsx # Vault display
β βββ lib/
β βββ api.ts # API client
β βββ utils.ts # Utilities
βββ project_context/ # Specification files
βββ start-dev.sh # Startup script
βββ package.json
- Chain ID: 252
- RPC: https://rpc.frax.com
- Explorer: https://fraxscan.com
- ATP Dashboard: https://app.iqai.com/
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| POST | /api/chat |
Chat with SSE streaming |
| POST | /api/chat/simple |
Chat without streaming |
| GET | /api/sessions |
List active sessions |
| DELETE | /api/session/:id |
Delete a session |
- Split View: Chat interface on left, vault card on right
- Dark Theme: Deep space background with purple/gold accents
- Real-time Streaming: Watch AI responses appear in real-time
- Example Prompts: Quick start with pre-built scenarios
- Backend README - API server details
- Frontend README - Frontend setup and components
- ADK Spec - Agent framework documentation
- Fraxtal Spec - Fraxtal integration details
Deploy the API server to any Node.js hosting:
npm run serverDeploy to Vercel (recommended):
cd frontend
vercel deploySet environment variable: NEXT_PUBLIC_API_URL=your-api-url
- Start both servers:
./start-dev.sh - Open http://localhost:3000
- Enter a life story prompt
- Watch streaming response
- See vault card populate when strategy deploys
"I'm a 28-year-old teacher saving for a house in 3 years. Risk-averse."
"College student, 21, learning about DeFi. Want safe yields."
"Entrepreneur, 35, high risk tolerance. Looking for growth."
- β Phase 1: Basic scaffolding with ADK
- β Phase 2: Real Fraxtal blockchain integration
- β Phase 3: ATP deployment simulation
- β Phase 4: Real ATP integration + wallet verification
- β Phase 5: REST API + Web Interface
MIT License
Copyright (c) 2026 shreyas-sovani
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE aUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.