Your Personal AI Investment Advisor
Chamil Jay
I am not a heavy stock market investor, but I have a keen interest in finance and investing. As a result, I occasionally invest a small portion of my savings in the stock market. However, I often find myself overwhelmed by the sheer volume of information available and the complexity of making well-informed investment decisions.
I don’t have a formal finance background, and keeping up with the latest market trends, financial news, company developments, and analyst commentary can be challenging. More importantly, making sense of all that information and turning it into a coherent investment decision is even harder.
That got me thinking: why not leverage the power of AI to help?
Perhaps I could offload much of the research and analysis to an AI system capable of processing large volumes of financial data, news articles, and market information. I could then combine that analysis with the output of my own stock forecasting model to generate a more comprehensive view of a company and, ultimately, provide actionable investment insights.
And that is how FinAI was born.
I initially designed FinAI specifically for the Australian Securities Exchange (ASX), but the underlying architecture is not limited to the ASX and could be extended to other stock markets. The goal of the project is to build a personal AI investment advisor that can help me make more informed investment decisions by bringing together financial data, market intelligence, news, and quantitative forecasting in a single system.
In this blog post, I will explain how FinAI works and walk through its overall architecture and some of the key design decisions behind it. I won’t be sharing the source code, but I will share the architecture, the approach, and the thinking behind the system. Hopefully, it will inspire you to build your own AI-powered investment research system.
What It Does
FinAI consists of two main components: a frontend and a backend.
The frontend is a simple React application that communicates with a FastAPI backend. The backend is where most of the intelligence lives. It is a LangGraph-orchestrated AI system designed to research and analyse financial information and turn it into a structured investment report.
The AI agents are equipped with a number of tools that allow them to:
- Perform internet-based research on companies, industries, and market developments
- Retrieve and analyse stock-specific financial and market data from Yahoo Finance
- Analyse recent financial news and other relevant information
- Incorporate predictions from a custom-built stock forecasting model
- Synthesise all of this information into a structured investment analysis
The combination of LLM-based research and reasoning, real-time financial data, and quantitative forecasting is what makes FinAI different from a simple stock-analysis chatbot. Rather than relying solely on the language model’s existing knowledge, the system actively gathers current information and combines it with a dedicated forecasting model.

The user can simply enter a query about a stock, and FinAI takes care of the research and analysis behind the scenes. It then returns a detailed report covering the key findings, relevant market information, the model’s forecast, and an overall assessment of the stock.


The final output is designed to turn a large amount of fragmented financial information into something much easier to understand and act upon, essentially providing a personal AI-powered investment research assistant.
Of course, FinAI is not intended to replace professional financial advice or eliminate the uncertainty inherent in investing. Rather, the goal is to use AI to make the research process faster, more systematic, and more accessible.
How It Works
The way I built FinAI is inspired by how would a normal organisation work. In a typical organisation, we will have multiple teams, each with a specific area of expertise. Each team will have a team lead who is responsible for coordinating the team’s work and reporting back to the management. The management will then make decisions based on the information provided by the teams.

At the top level, the system is organized as a small orchestration graph with three core nodes:
- supervisor
- Web_Search_Team
- Investment_Analysis_Team
Every request enters through START and immediately lands at the supervisor.
The supervisor acts like an intelligent traffic controller. It looks at the user’s request, reviews the available team capabilities, and decides what should happen next. For each decision, it returns two things:
next: which destination to route to next (or FINISH if the job is done)message: the task brief to pass to that destination
Team Architecture
Each team follows the same reusable contract through a shared base class pattern.
- it runs its own internal workflow graph
- it places its final result in payload
- if a supervisor is active, it hands the result back as a routed command plus a message update
This design makes each team modular and composable, so the supervisor can call the right team at the right time, chain multiple teams in sequence, and stop once the overall objective is complete.
High-Level Request Flow
- Client sends a POST request to FastAPI backend with a
message. - Backend invoke the LngGraph AI workflow passing the content of the
message. AIModelruns a top-level LangGraph with aSupervisorand team nodes.Supervisordecides which team should handle the task.- Selected team runs its internal graph of agents.
- Team output is returned to the supervisor as a message.
- Supervisor can route to another team or
FINISH. - Final response is returned by the API.
Team 1: Web Search Team
Every good investment decision starts with good research. The Web Search Team is FinAI’s dedicated research desk — its job is to scour the internet for relevant information, critically evaluate what it finds, and keep digging until it has enough evidence to write a solid research brief.
What makes this team interesting is that it doesn’t just run a search and call it done. It reflects on what it found, identifies gaps, and loops back for more targeted searches if needed. Think of it as a researcher who keeps asking “do I actually know enough to answer this properly?” before putting pen to paper.
I did a write up on a simplified version of this in a blog post, which you can read here.
Workflow:
START -> Search_PlannerSearch_Planner -> Web_Searcher(fan-out via conditional routing)Web_Searcher -> ReflectionsReflections -> Search_Plannerif insufficientReflections -> Report_Writerif sufficientReport_Writer -> END
Agents in the Web Search Team
Think of this team as an iterative research desk that keeps refining its work until it has enough evidence to produce a useful answer.
Search_Planner
- Translates the user question into a focused set of search queries.
- Organizes each query with an explicit reason, so every search has a purpose.
- Can generate follow-up queries when the first pass is not enough.
Web_Searcher
- Runs the planned searches across the web.
- Captures structured outputs for each query, including what was searched and what was found.
- Acts as the evidence-collection engine for the team.
Reflections
- Reviews the collected evidence against the original user request.
- Decides whether the information is sufficient.
- If not sufficient, identifies knowledge gaps and proposes follow-up queries.
ReflectionRouter
- Sends the workflow forward to report writing when the evidence is strong.
- Sends the workflow back to planning when more research is needed.
Report_Writer
- Synthesizes all gathered search outputs into a coherent research brief.
- Produces the final narrative response for the web research stage.
Team 2: Investment Analysis Team
This team is designed for deep, stock-level analysis at scale. It can break a broad request into multiple stock analyses, run those analyses independently, and combine everything into a single recommendation report.
Workflow:
START -> DispatcherDispatcher -> Investment_Analyst(fan-out)Investment_Analyst -> Report_WriterReport_Writer -> END
Agents in the Investment Analysis Team
Dispatcher
- Breaks a user request into a list of stock-specific analysis tasks.
- Packages context for each stock, including any supporting web research.
- Enables fan-out so each stock can be analyzed independently.
Investment_Analyst
- Performs in-depth analysis for each stock task.
- Uses financial signals, analyst sentiment, and core market indicators.
- Produces a standalone investment assessment per stock.
InvestmentReportWriter
- Combines all per-stock analyses into one consolidated report.
- Ranks or compares opportunities and summarizes key recommendations.
- Produces the final investment-facing output.