resham-dilawari

Product Requirements Document (PRD)

Multi-Agent AI Portfolio Advisor


Document Information


1. Executive Summary

1.1 Product Vision

To democratize institutional-grade investment advisory by providing retail investors with a sophisticated, AI-powered multi-agent system that analyzes portfolios from multiple expert perspectives simultaneously.

1.2 Problem Statement

Current State: Individual investors in India face:

Pain Points:

  1. Fragmented Analysis: Investors must consult multiple sources (research reports, news, charts)
  2. Expertise Gap: Lack of skills in technical analysis, risk assessment, tax optimization
  3. Time Constraints: Working professionals lack time for thorough research
  4. Costly Advisory: Professional wealth management requires minimum ₹10-25 lakh AUM
  5. Decision Paralysis: Too much contradictory information leads to inaction

1.3 Proposed Solution

A Multi-Agent AI System that:

1.4 Success Metrics


2. User Personas

Persona 1: “Novice Nisha”

Persona 2: “Mid-Career Mohit”

Persona 3: “Sophisticated Sanjay”


3. User Stories & Requirements

3.1 Epic 1: Portfolio Analysis

User Story 1.1: Current Holdings Analysis

As a portfolio investor
I want to analyze my current holdings from multiple perspectives
So that I can understand the strengths and weaknesses of my portfolio

Acceptance Criteria:

Priority: P0 (Must Have)

User Story 1.2: Multi-Agent Synthesis

As a user receiving multiple agent analyses
I want to see a unified recommendation
So that I don’t get confused by conflicting viewpoints

Acceptance Criteria:

Priority: P0 (Must Have)


3.2 Epic 2: Investment Recommendations

User Story 2.1: Personalized Stock Suggestions

As a user with available capital
I want to receive personalized investment suggestions
So that I can deploy capital optimally based on my risk profile

Acceptance Criteria:

Priority: P0 (Must Have)

User Story 2.2: Portfolio Optimization

As a user with existing portfolio
I want to optimize my asset allocation
So that I can improve risk-adjusted returns

Acceptance Criteria:

Priority: P1 (Should Have)


3.3 Epic 3: Risk Management

User Story 3.1: Portfolio Risk Assessment

As a risk-conscious investor
I want to understand my portfolio’s risk profile
So that I can ensure it aligns with my risk tolerance

Acceptance Criteria:

Priority: P0 (Must Have)

User Story 3.2: Stress Testing

As a user concerned about market downturns
I want to see how my portfolio would perform in adverse scenarios
So that I can prepare for worst-case situations

Acceptance Criteria:

Priority: P2 (Nice to Have)


3.4 Epic 4: Tax Optimization

User Story 4.1: Tax-Loss Harvesting

As a taxpayer with realized gains
I want to identify tax-loss harvesting opportunities
So that I can reduce my tax liability

Acceptance Criteria:

Priority: P1 (Should Have)


3.5 Epic 5: Market Intelligence

User Story 5.1: Sector Analysis

As a thematic investor
I want to understand sector trends and opportunities
So that I can invest in high-growth themes

Acceptance Criteria:

Priority: P1 (Should Have)


4. Technical Requirements

4.1 Functional Requirements

FR-1: Data Ingestion

FR-2: Agent System

FR-3: User Interface

FR-4: AI/ML Integration

4.2 Non-Functional Requirements

NFR-1: Performance

NFR-2: Reliability

NFR-3: Security

NFR-4: Scalability

NFR-5: Usability


5. Design & User Experience

5.1 User Flow

Start
  ↓
Enter Stock Tickers
  ↓
Configure Profile (Risk, Goals, Corpus)
  ↓
Select Analysis Mode
  ↓
Click "Run Multi-Agent Analysis"
  ↓
[Loading Screen with Agent Status]
  ↓
View Results
  ├─ Executive Summary Tab
  ├─ Agent Insights Tab
  ├─ Detailed Analysis Tab
  └─ Execution Log Tab
  ↓
Download Report (Optional)
  ↓
End

5.2 Key UI Components

  1. Sidebar Configuration Panel
    • Portfolio input (textarea)
    • Corpus slider
    • Risk tolerance selector
    • Goals multi-select
    • Preferences text area
  2. Agent Status Indicator
    • Real-time status of each agent
    • Progress bar
    • Estimated time remaining
  3. Results Dashboard
    • Tab-based navigation
    • Markdown rendering for AI outputs
    • JSON viewer for raw data
    • Download button
  4. Agent Cards (Home Screen)
    • Visual representation of each agent
    • Specialization description
    • Status indicator

5.3 Wireframes

[To be added - visual mockups of key screens]


6. Technical Architecture

6.1 System Components

┌─────────────────────────────────────┐
│   Streamlit Frontend (User Interface)│
└─────────────┬───────────────────────┘
              │
┌─────────────┴───────────────────────┐
│   Application Layer (app_multiagent.py)│
└─────────────┬───────────────────────┘
              │
┌─────────────┴───────────────────────┐
│   Orchestrator Agent                │
│   (agents/orchestrator.py)          │
└───┬───────────────────────────┬─────┘
    │                           │
    ├──────┬──────┬──────┬──────┤
    │      │      │      │      │
┌───┴──┐ ┌─┴──┐ ┌─┴──┐ ┌─┴──┐ ┌─┴──┐
│Fund. │ │Tech│ │Sent│ │Risk│ │...│
│Agent │ │Agt │ │Agt │ │Agt │ │   │
└──────┘ └────┘ └────┘ └────┘ └────┘
              │
┌─────────────┴───────────────────────┐
│   Data Layer                        │
│   (financial_data_enhanced.py)      │
└─────────────┬───────────────────────┘
              │
┌─────────────┴───────────────────────┐
│   External APIs                     │
│   - Yahoo Finance (yfinance)        │
│   - Google Gemini AI                │
└─────────────────────────────────────┘

6.2 Data Models

Stock Data Model

{
    "ticker": str,
    "company_name": str,
    "sector": str,
    "current_price": float,
    "pe_ratio": float,
    "market_cap": int,
    "beta": float,
    "rsi": float,
    "news": list[dict],
    ...
}

Analysis Result Model

{
    "orchestrator": str,
    "workflow": str,
    "agent_results": dict,
    "synthesis": str,
    "timestamp": str
}

7. Development Roadmap

Phase 1: MVP (Current - Week 4)

Phase 2: Enhancement (Week 5-8)

Phase 3: Scale (Week 9-12)

Phase 4: Enterprise (Month 4-6)


8. Risks & Mitigation

Risk 1: API Rate Limits

Impact: High
Probability: Medium
Mitigation:

Risk 2: AI Hallucinations

Impact: High
Probability: Medium
Mitigation:

Risk 3: Market Data Accuracy

Impact: Medium
Probability: Low
Mitigation:

Risk 4: Regulatory Compliance

Impact: High
Probability: Medium
Mitigation:

Risk 5: User Privacy

Impact: High
Probability: Low
Mitigation:


9. Success Criteria

Launch Criteria (MVP Ready)

30-Day Post-Launch

90-Day Post-Launch


10. Open Questions

  1. Monetization: Freemium vs subscription vs transaction-based?
  2. Data Retention: Should we store user portfolio history?
  3. Personalization: How to improve recommendations over time?
  4. Compliance: Do we need SEBI registration as RIA?
  5. Scale: What’s the cost per analysis at 10K, 100K, 1M users?

11. Appendix

A. Glossary

B. References

C. Stakeholders


Document Status: Living Document - Updated as requirements evolve
Last Updated: August 26, 2026
Next Review: September 2, 2026