๐ง Investment Elicitation Profiling Assistant
This project is an AI-powered conversational assistant that guides users step-by-step (elicitation) to build their investment profile through a friendly dialogue. It uses LangChain, OpenAI, FastAPI, and WebSocket for a real-time interactive experience.
๐ Features
- Conversational investment profiling via WebSocket
- Guided 4-step elicitation:
- Purpose โ Why you're investing
- Timeline โ How long you plan to invest
- Risk Tolerance โ How much risk you can handle
- Investment Entry โ How and how much you plan to invest
- Structured and validated input via Pydantic
- Real-time messaging powered by LangChain + OpenAI
- WebSocket support for frontend integration
๐ฆ Tech Stack
- Python
- FastAPI โ REST + WebSocket API
- LangChain โ agent logic and prompt orchestration
- OpenAI GPT โ language understanding and generation
- Pydantic โ validation and type safety
- Loguru โ logging
- dotenv โ environment management
- FastMCP โ multi-step conversational pipeline manager
๐ ๏ธ Setup
1. Clone the Repository
git clone https://github.com/your-username/investment-assistant.git
cd investment-assistant
2. Install Dependencies
uv sync
3. Add .env File
Create a .env file with your OpenAI API key:
OPENAI_API_KEY=your-openai-api-key
4. Run the servers
uv run python client.py
uv run python mcp_server.py