How wtlow003/investment-advisor-gpt works
Main Components
a) Client Layer:
• Chainlit UI (Port 8080)
• REST API endpoints (Port 8000)
b) Application Layer:
• FastAPI Server (src/api.py)
• Agent Controller (src/model/agents/controller.py)
• Conversation Management System
c) Core Components:
• LLM Integration (OpenAI)
• Knowledge Base (ChromaDB)
• External Services (Serper API for web search)
d) Storage Layer:
• Vector Database (ChromaDB)
• Conversation History Storage
Component Relationships
• User interactions through either UI or API
• Request processing through the application layer
• Agent's decision-making process
• Knowledge retrieval flow
• External API interactions
Specific Design Elements
• Blue rectangles for user-facing components (UI, API)
• Green rectangles for core processing components
• Yellow diamonds for external services
• Orange rectangles for agent components
Key Flows to Highlight
a) Main Conversation Flow:
User Input → API/UI → Agent Controller → LLM → Response Generation → User
b) Knowledge Retrieval Flow:
Agent → Knowledge Base Query → ChromaDB → Retrieved Context → Response Generation
c) Tool Usage Flow:
Agent → Tool Selection (ProductSearch/WebSearch) → External APIs → Response Integration
Important Subsystems to Detail
a) Agent System:
• Conversation Stage Analyzer
• Context Management
• Tool Selection Logic
• Response Generation
b) Knowledge Base:
• Document Storage
• Vector Embeddings
• Retrieval System
Technical Details
• Docker container boundaries
• API endpoints
• Database connections
• Configuration management
• Memory management system
Architectural Patterns to Emphasize
• Microservices architecture (Docker containers)
• Event-driven conversation flow
• Tool-augmented agent pattern
• Vector-based knowledge retrieval