Inspiration

The financial markets move at lightning speed, but retail investors often lack the resources for 24/7 market monitoring and instant decision-making. I wanted to democratize access to autonomous trading by building an AI agent that never sleeps—continuously monitoring news, analyzing market sentiment, and executing trades transparently on the blockchain. Our vision was to create a system where every decision is explainable, every trade is verifiable, and users maintain complete control over their portfolio strategy.

What it does

Hound AI is an autonomous financial trading agent that operates through a sophisticated state machine:

  1. Monitors - Continuously scans financial news using Tavily API, filtering for articles relevant to your portfolio holdings
  2. Analyzes - Leverages Google Gemini AI to evaluate news sentiment, market impact, and confidence levels
  3. Decides - Determines optimal trading actions (buy/sell/hold) with transparent reasoning and risk assessment
  4. Executes - Executes trades on the XRP Ledger using RLUSD stablecoin for transparent, immutable transaction records
  5. Explains - Generates human-readable explanations for every decision, creating a complete audit trail

The system features multi-user support with isolated portfolios, real-time WebSocket updates, comprehensive risk management (daily trade limits, position sizing, confidence thresholds), and a beautiful dark-mode dashboard built with Next.js and shadcn/ui.

How we built it

  • Frontend: Built with Next.js 15, React 19, and TypeScript, styled with Tailwind CSS 4 and shadcn/ui components. Auth0 handles secure authentication, and WebSocket connections provide real-time updates.

  • Backend: Express.js powers the REST API with a WebSocket server for live client communication. The autonomous agent uses a state machine architecture to orchestrate decision-making across multiple concurrent users.

  • AI & Data: Google Gemini AI analyzes news sentiment and market impact, while Tavily API provides real-time financial news monitoring. Finance Query API supplies accurate stock pricing data.

  • Blockchain: Integrated XRPL (XRP Ledger) for transparent trade execution using RLUSD stablecoin, providing an immutable audit trail of all transactions.

  • Infrastructure: Redis for data persistence (portfolios, trades, logs, news), hosted on Render for low latency.

Challenges we ran into

  • State Machine Complexity: Designing an autonomous agent that could handle multiple users simultaneously while maintaining isolated state proved challenging. We implemented a Map-based orchestration system where each user gets their own agent instance.

  • Blockchain Integration: Working with XRPL's testnet and RLUSD trustlines required deep understanding of blockchain transactions. Setting up proper wallet management and ensuring secure trade execution took significant iteration.

  • AI Decision Quality: Tuning Gemini AI to provide consistent, actionable trading insights required extensive prompt engineering and implementing confidence thresholds to filter low-quality signals.

  • Portfolio Synchronization Bug: We encountered a critical bug where selling all shares didn't remove holdings from the portfolio due to floating-point precision issues.

  • Real-time Updates: Coordinating WebSocket updates across frontend/backend while maintaining data consistency required careful event-driven architecture design.

Accomplishments that we're proud of

  • Fully Autonomous Operation: Built a complete state machine that makes intelligent trading decisions without human intervention

  • Multi-User Architecture: Successfully implemented isolated agent instances supporting concurrent users with real-time updates

  • Blockchain Transparency: Integrated XRPL for immutable, verifiable trade execution with full audit trails

  • AI-Powered Analysis: Leveraged Google Gemini to analyze complex financial news and generate actionable insights with confidence scoring

  • Risk Management: Implemented comprehensive safeguards including position limits, daily trade caps, and confidence thresholds

  • Beautiful UX: Created an intuitive dashboard with real-time monitoring, dark mode support, and clear visualization of agent reasoning

What we learned

  • State Machine Architecture: Gained deep understanding of building autonomous agents using state machines for predictable, debuggable behavior.

  • Blockchain Development: Learned XRPL integration, wallet management, trustline setup, and working with RLUSD stablecoin for testnet transactions.

  • WebSocket Real-time Systems: Mastered building real-time multi-user applications with isolated data streams and event-driven updates.

  • Risk Management: Understood the critical importance of position sizing, trade limits, and confidence filtering in autonomous trading systems.

What's next for Hound AI

📊 Backtesting Engine: Allow users to test their risk tolerance settings against historical data before running the live agent

🤖 Customizable Strategies: Let users define custom trading strategies, technical indicators, and sentiment weightings

🔔 Smart Notifications: Push notifications and email alerts for significant trades, portfolio milestones, and breaking news

🔗 DeFi Integration: Explore integration with decentralized exchanges and liquidity pools beyond XRPL

🧠 Multi-Model AI: Combine multiple AI models (Gemini, Claude, GPT) for consensus-based decision making to improve accuracy

Built With

Share this project:

Updates