IVAN is an intelligent agent designed to help users manage their financial portfolios by providing proactive suggestions on stocks and cryptocurrencies to buy or sell. The agent uses real-time stock changes and news to make informed recommendations.
-
Market Data Analysis The system provides comprehensive market data monitoring:
- Cryptocurrency Tracking: Real-time and historical cryptocurrency price data via CoinAPI integration
- Stock Market Data: Historical stock price data through Alpha Vantage API
- News Integration: Financial news monitoring and analysis via NewsAPI
-
Personalized Portfolio Management The system offers portfolio-based features:
- Portfolio Tracking: Store and manage user investment portfolios
- News Relevance: Smart news filtering using BM25 algorithm to deliver portfolio-relevant updates
- Contextual Analysis: AI-powered analysis considering user's specific portfolio holdings
-
Communication Support Automated communication features:
- Market Updates: Periodic news monitoring and automated notifications
- Portfolio-Specific Alerts: Personalized alerts based on portfolio relevance
- Interactive Queries: Process user messages and provide contextual responses
Ivan is useful for a variety of financial management activities:
- Stock Market Analysis: Analyze the best stocks to buy or sell based on current market trends and news.
- Crypto Investments: Get recommendations on the best cryptocurrencies to invest in.
- Portfolio Monitoring: Keep track of portfolio performance and get timely suggestions for improvement.
- Telegram Bot: Receive all communications, updates, and recommendations through a dedicated Telegram bot for seamless interaction and notifications.
-
Clone the repository.
-
Choose one of the installation methods:
- Install Docker and Docker Compose on your system
- Create a
.envfile with required environment variables - Run the application:
docker compose up -dThis will start all necessary services:
- Telegram Bot (port 8002)
- Client API (port 8000)
- LLM Agent (port 8001)
- PostgreSQL Database (port 5432)
- Install Poetry:
pip install poetry- Install dependencies:
poetry shell
poetry installBefore running IVAN, ensure you have one of the following LLM servers running:
- LM Studio: Running on port 5001 (default configuration)
- Download and install LM Studio
- Load your preferred model
- Start the local server on port 5001
OR
- KoboldAI: Running on port 5001
- Set up KoboldAI
- Configure it to run on port 5001
- Set up environment variables in
.envfile:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
DATABASE_URL=postgresql://ivan:ivan@localhost:5432/ivan_db
# Other required variables...-
Start the services:
- If using Docker:
docker compose up -d - If running manually:
# Terminal 1: Start PostgreSQL (or use existing installation) # Terminal 2: Start LLM Agent uvicorn src.agent.run:app --host 0.0.0.0 --port 8001 # Terminal 3: Start Client API uvicorn src.client.app:app --host 0.0.0.0 --port 8000 # Terminal 4: Start Telegram Bot python -m src.telegram_server.telegram_bot
- If using Docker:
-
Profile Setup: Set up your portfolio profile by providing necessary financial details.
-
Data Analysis: IVAN will gather and analyze data from market trends and news sources to form recommendations.
-
Receive Recommendations: Get daily or real-time suggestions on investments to make adjustments to your portfolio.
-
Track Performance: Use the visualization tools to monitor the performance of your investments regularly.
IVAN's architecture consists of three main layers: Telegram Layer for user interaction, Client Layer for business logic, and Agent Layer for LLM integration.
For detailed information about IVAN's architecture and technical implementation, please refer to our design documentation.
We welcome contributions! Please add an issue or pull request if you have an ideas about how we can improve IVAN.
This project is licensed under the Apache 2.0 License. For more details, see the LICENSE.
