Skip to content

A multi-agent system that interacts with web search and financial data. The system contains two main agents: a Web Search agent and a Finance AI agent. These agents collaborate to gather comprehensive information about stocks, news, and market analysis.

Notifications You must be signed in to change notification settings

orbimatrix/Multi_agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Agent System for Web and Financial Search

This project utilizes the Phi framework to create a multi-agent system that interacts with web search and financial data. The system contains two main agents: a Web Search agent and a Finance AI agent. These agents collaborate to gather comprehensive information about stocks, news, and market analysis.

Requirements

  • Python 3.x
  • Phi Framework (phi)
  • yfinance package for financial data
  • duckduckgo package for web searches

You can install the necessary dependencies using:

pip install phi yfinance duckduckgo

Agents

Web Search Agent

The Web Search Agent is designed to search the web for in-depth information using DuckDuckGo. It provides detailed search results and includes sources in the output.

websearch_agent = Agent(
    name="Web Search agent",
    role="Search the web for the Complete indepth information",
    add_chat_history_to_messages=True,
    model=Groq(id="llama3-70b-8192"),
    tools=[DuckDuckGo()],
    instructions=["Always include sources"],
    show_tool_calls=True,
    markdown=True
)
  1. Role: Searches the web and provides sources.
  2. Tools: DuckDuckGo search engine.
  3. Instructions: Always include sources in responses.

Finance AI Agent

The Finance AI Agent specializes in gathering financial information, such as stock prices, analyst recommendations, company info, and news using Yahoo Finance and DuckDuckGo.

finance_agent = Agent(
    name="Finance AI Agent",
    tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True), DuckDuckGo()],
    model=Groq(id="llama3-70b-8192"),
    instructions=['Give me information about NVIDIA stocks and its 5 latest news'],
    show_tool_calls=True,
    markdown=True
)
  1. Role: Provides stock and financial information about companies.
  2. Tools: Yahoo Finance (for stock-related data) and DuckDuckGo (for supplementary search).
  3. Instructions: Fetch information about NVIDIA stocks and the latest news.

Multi-Agent System

The Multi-Agent System brings together the Web Search agent and the Finance AI agent to work collaboratively. It is instructed to always include sources and display data in a table format.

multi_ai_agent = Agent(
    team=[websearch_agent, finance_agent],
    instructions=["Always include sources", "use Table to display the data"],
    markdown=True,
    show_tool_calls=True
)

Team: Combines the Web Search agent and Finance AI agent. Instructions: Always include sources and use tables for data presentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A multi-agent system that interacts with web search and financial data. The system contains two main agents: a Web Search agent and a Finance AI agent. These agents collaborate to gather comprehensive information about stocks, news, and market analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages