Multi-Agent Conversations Using AutoGen to Analyze Stock Price and Generate Chart

Ferry Djaja
10 min readOct 20, 2023

In this blog post, I will guide you through the process of crafting multiple agents with AutoGen. These agents will be able to engage in conversations with each other to collaboratively assess stock prices and produce charts using AmCharts.

The aim of the conversation is to request the agents to analyze the stock price of a specific company, provide commentary, and produce a stock price chart.

To achieve this goal, we will have the following agents working collaboratively:

  1. Finance Analyst
    The Finance Analyst’s task is to acquire stock price data, conduct an analysis, and then pass the data to the UI designer for chart creation. It is also responsible for executing the UI designer’s code to generate and display the chart, and can request missing data if necessary.
  2. Software Engineer
    The Software Engineer’s primary role is to execute the function that retrieves the stock price information for the requested number of days, as specified by the Finance Analyst.
  3. UI Designer
    The UI Designer’s primary responsibility is to create stock charts using the Amcharts Stock Chart library. This involves generating the complete code, seamlessly integrating the stock price data provided by the Finance Analyst, and preparing the code for immediate execution.

AutoGen

AutoGen is a framework that facilitates the creation of Large Language Model (LLM) applications by employing multiple agents capable of engaging in conversations with each other to collectively address various tasks.

Source : https://microsoft.github.io/autogen

An agent has the ability to interact with other agents and carry out tasks. These agents are referred to as AssistantAgent, which are specifically designed to function as AI assistants to solve a task with LLM.

The UserProxyAgent serves as a proxy agent that primarily seeks human input as its default response during each interaction turn. Additionally, it possesses the ability to carry out code execution and invoke functions. This agent will automatically…

--

--