Prerequisites
- Python 3.8+
- Agno (
pip install agno
) - Maxim Python SDK (
pip install maxim-py
) - python-dotenv (
pip install python-dotenv
) - API keys for OpenAI and Maxim (and optionally Google Gemini)
- (Optional) Set up a
.env
file with your API keys
1. Import Required Libraries
2. Load Environment Variables and Instrument Agno with Maxim
3. Define the Web Search Agent
This agent uses an LLM and Google Search tools to fetch financial information from the web.4. Define the Finance Agent
This agent uses an LLM and YFinance tools to retrieve financial data such as stock prices, analyst recommendations, and company information.5. Aggregate Agents into a Multi-Agent System
Combine both agents into a multi-agent system that can answer user questions by leveraging both web search and financial data tools.6. Interactive Loop for the Financial Conversational Agent
This loop allows users to input queries and receive responses from the multi-agent system.7. Observability with Maxim
All agent interactions, tool calls, and responses are automatically traced and can be visualized in your Maxim dashboard. This provides deep insights into agent reasoning, tool usage, and user interactions.
For more details, see the Agno documentation and the Maxim Python SDK documentation.