This project introduces an AI-powered portfolio assistant designed to analyze investment portfolios, evaluate risks, conduct market research, and provide actionable recommendations. Unlike traditional static tools, the system leverages a multi-agent architecture that allows specialized agents to collaborate asynchronously and deliver structured insights with minimal user input. At its core, the platform integrates large language models through the Gemini API, a custom Google Programmable Search tool for research, and automated ingestion pipelines for CSV and PDF data. The result is a scalable solution that demonstrates the potential of agentic AI in financial decision-making.
Investors today face a wide range of challenges in managing their portfolios. It can be time-consuming to track performance across multiple assets, difficult to assess potential risks in real time, and overwhelming to stay updated with ever-changing market research. Many existing tools either lack flexibility or require significant manual effort from the user.
This project aims to address these challenges by building PortfoliAI, an intelligent portfolio assistant that automates much of this workload. The system is designed around the concept of specialized agents, each responsible for a distinct task, and orchestrated through a structured workflow. Users simply upload portfolio files in CSV or PDF format, and the system handles the rest—from parsing raw data to producing actionable recommendations.
The motivations behind this project are threefold. First, to provide real-time insights that help investors make informed decisions quickly. Second, to automate processes such as risk evaluation and market research, reducing the burden of manual analysis. And third, to demonstrate how frameworks like LangGraph can orchestrate complex agent workflows effectively in financial applications.
The architecture of PortfoliAI is based on a modular, asynchronous multi-agent workflow, where each agent performs a specific role in the analysis pipeline. This design allows the system to scale efficiently while maintaining clarity in its responsibilities.
The process begins when a user uploads a CSV or PDF file containing portfolio details. The InputConverter agent automatically extracts relevant tables and transforms them into a structured format suitable for analysis. Once this data is ready, the PortfolioAgent evaluates the holdings, their quantities, and overall valuations.
The next stage involves the RiskAgent, which applies both quantitative checks and contextual reasoning to highlight assets that may exhibit high volatility or concentration risk. To enrich this information, two independent ResearchAgents are triggered. They query a custom Google Programmable Search tool, retrieving up-to-date market news and insights that may affect the portfolio’s performance.
Finally, the RecommendationAgent synthesizes the findings from all previous stages. By combining the structured portfolio data, identified risks, and contextual research, it produces a set of actionable recommendations. These may include suggestions to diversify holdings, rebalance allocations, or monitor specific risk factors.
This orchestration is managed through LangGraph, which ensures that the agents communicate efficiently, maintain context, and handle errors gracefully. The Gemini API provides advanced natural language understanding to interpret results and craft human-readable insights. Supporting technologies such as Pandas enable efficient data handling, PDFPlumber assists with document parsing, and Streamlit provides a user-friendly frontend interface.
Architecture Overview:
User Upload (CSV/PDF) → InputConverter → PortfolioAgent → RiskAgent → ResearchAgents → RecommendationAgent → Output Results

To evaluate the effectiveness of the system, PortfoliAI was tested using several sample portfolios in both CSV and PDF formats. The experiments were designed to validate accuracy, robustness, and user experience.
The portfolio analysis stage consistently generated accurate summaries of asset allocations, including holdings, quantities, and valuations. The risk assessment component proved effective in highlighting exposure to volatile assets and detecting potential over-concentrations within a portfolio. The research stage successfully identified market trends and company-specific developments, providing context that numerical analysis alone could not capture. Finally, the recommendation engine synthesized all the information into clear, actionable steps tailored for optimization.
From a usability perspective, the workflow is seamless. Users only need to upload their file and wait a short time for results. The output is presented in well-structured sections—Portfolio Analysis, Risk Assessment, Research Insights, and Recommendations. Each section contains both tabular data and explanatory text, ensuring that even complex findings are accessible to a broad audience.
The results highlight the strengths of combining multi-agent systems with advanced LLMs in the context of finance. By automating tedious tasks, the platform reduces the manual burden on investors and accelerates the decision-making process. Importantly, the asynchronous nature of the workflow ensures that research and risk evaluation can run in parallel, improving efficiency.
The system also demonstrates robustness when dealing with varying input formats. CSV files are parsed reliably, while PDFs—often a challenge due to formatting—were successfully processed with high accuracy. One limitation observed is the reliance on external search APIs for research; while this provides real-time information, results may vary depending on search coverage. Future versions could incorporate additional financial data APIs to enhance consistency.
This work demonstrates that multi-agent systems can serve as a powerful foundation for financial applications. By combining the strengths of large language models, orchestration frameworks, and search tools, PortfoliAI transforms raw portfolio data into meaningful insights and practical recommendations. The project not only offers value to investors seeking better portfolio management but also illustrates the broader potential of agentic AI in financial technology.
The lessons learned here can be extended to other domains where structured analysis, contextual research, and automated recommendations are essential. Moving forward, PortfoliAI could integrate advanced risk models, real-time trading simulations, or personalized investor profiles to further enhance its capabilities.
GitHub Repository: https://github.com/shanks1554/portfoliai.git
Live Demo: https://portfoliai.onrender.com/