File size: 2,967 Bytes
89575a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d8454d
 
89575a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d8454d
 
89575a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d8454d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
from phi.agent import Agent
from phi.tools.duckduckgo import DuckDuckGo
from phi.tools.exa import ExaTools
from phi.model.openai import OpenAIChat
from typing import List
from pydantic import BaseModel, Field

# Load environment variables (API keys, etc.)
from dotenv import load_dotenv
load_dotenv()

#####################################################################################
#                                    PHASE 2                                        #
#####################################################################################

##############################
# 1️⃣ Industry Trends Agent  #
##############################
industry_trends_agent = Agent(
    name="Industry Trends Agent",
    model=OpenAIChat(id="gpt-4o"),
    tools=[ExaTools(include_domains=["cnbc.com", "reuters.com", "bloomberg.com"])],
    description="Finds the latest AI advancements in a given industry.",
    show_tool_calls=True,
    markdown=True,
)

def get_industry_trends(industry: str):
    query = f"Find the latest AI advancements, innovations, and emerging technologies in the {industry} sector. Include breakthroughs, adoption trends, and notable implementations by leading companies. Provide references and insights from credible sources."
    response = industry_trends_agent.run(query)
    return response.content


##################################
# 2️⃣ AI Use Case Discovery Agent #
##################################
ai_use_case_agent = Agent(
    name="AI Use Case Discovery Agent",
    model=OpenAIChat(id="gpt-4o"),
    tools=[DuckDuckGo()],
    description="Identifies AI applications relevant to a given industry.",
    show_tool_calls=True,
    markdown=True,
)

def get_ai_use_cases(industry: str):
    query = f"Identify the most impactful AI use cases in the {industry} sector. Include real-world applications, automation improvements, cost-saving innovations, and data-driven decision-making processes. Provide case studies and examples of successful AI implementation."
    response = ai_use_case_agent.run(query)
    return response.content


####################################
# 3️⃣ Competitive Analysis Agent   #
####################################
competitive_analysis_agent = Agent(
    name="Competitive Analysis Agent",
    model=OpenAIChat(id="gpt-4o"),
    tools=[DuckDuckGo(), ExaTools(include_domains=["techcrunch.com", "forbes.com", "businessinsider.com"])],
    description="Analyzes how competitors are using AI in their businesses.",
    show_tool_calls=True,
    markdown=True,
)

def get_competitor_ai_strategies(company_name: str):
    query = f"Analyze how {company_name} is leveraging AI in its business operations. Find recent reports, product innovations, automation strategies, and AI-driven transformations. Highlight competitive advantages gained through AI adoption. Provide references and sources."
    response = competitive_analysis_agent.run(query)
    return response.content