Sarath0x8f commited on
Commit
a9923c5
Β·
verified Β·
1 Parent(s): 1faac5b

Upload 8 files

Browse files
TripPlanner.py ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from crewai import Agent, Task, Crew, Process
2
+ from textwrap import dedent
3
+ from datetime import date
4
+
5
+ from config.TripPlanner import browser_tools, calculator_tools, search_tools
6
+ import os
7
+
8
+ #Model options
9
+ llm_models = [
10
+ "gemini/gemini-1.5-flash",
11
+ "gemini/gemini-1.5-pro",
12
+ "gemini/gemini-pro"
13
+ ]
14
+
15
+ selected_model = llm_models[0]
16
+ def configure_api_keys(gemini_api_key):
17
+ if not gemini_api_key:
18
+ raise ValueError("Gemini API key is required")
19
+ os.environ['GEMINI_API_KEY'] = gemini_api_key
20
+
21
+ def set_model(selected_model_name):
22
+ global selected_model
23
+ selected_model = selected_model_name
24
+
25
+ def run_crew_tp(gemini_api_key, origin, cities, trip_date, interests):
26
+ try:
27
+ # Configure API keys (no search tool used)
28
+ configure_api_keys(gemini_api_key)
29
+
30
+ # Agents
31
+ city_selection_agent = Agent(
32
+ role='City Selection Expert',
33
+ goal='Select the best city based on weather, season, and prices',
34
+ backstory='An expert in analyzing travel data to pic idea; destinations',
35
+ tools=[
36
+ search_tools.SearchTools.search_internet, browser_tools.
37
+ BrowserTools.scrape_and_summarize_website
38
+ ],
39
+ llm=selected_model,
40
+ verbose=True)
41
+
42
+ local_expert = Agent(
43
+ role='Local Expert at this city',
44
+ goal='Provide the BEST insights about the selected city',
45
+ backstory="""A knowledgeable local guide with extensive information
46
+ about the city, it's attractions and customs""",
47
+ tools=[
48
+ search_tools.SearchTools.search_internet,
49
+ browser_tools.BrowserTools.scrape_and_summarize_website,
50
+ ],
51
+ llm=selected_model,
52
+ verbose=True)
53
+
54
+ travel_concierge = Agent(
55
+ role='Amazing Travel Concierge',
56
+ goal="""Create the most amazing travel itineraries with budget and
57
+ packing suggestions for the city""",
58
+ backstory="""Specialist in travel planning and logistics with
59
+ decades of experience""",
60
+ tools=[
61
+ search_tools.SearchTools.search_internet,
62
+ browser_tools.BrowserTools.scrape_and_summarize_website,
63
+ calculator_tools.CalculatorTools.calculate,
64
+ ],
65
+ llm=selected_model,
66
+ verbose=True)
67
+
68
+ #Tasks
69
+ identity_task = Task(
70
+ description=dedent(f"""
71
+ Analyze and select the best city for the trip based
72
+ on specific criteria such as weather patterns, seasonal
73
+ events, and travel costs. This task involves comparing
74
+ multiple cities, considering factors like current weather
75
+ conditions, upcoming cultural or seasonal events, and
76
+ overall travel expenses.
77
+
78
+ Your final answer must be a detailed
79
+ report on the chosen city, and everything you found out
80
+ about it, including the actual flight costs, weather
81
+ forecast and attractions.
82
+
83
+ Traveling from: {origin}
84
+ City Options: {cities}
85
+ Trip Date: {trip_date}
86
+ Traveler Interests: {interests}
87
+ """),
88
+ agent=city_selection_agent,
89
+ expected_output="Detailed report on the chosen city including flight costs, weather forecast, and attractions"
90
+ )
91
+
92
+ gather_task = Task(
93
+ description=dedent(f"""
94
+ As a local expert on this city you must compile an
95
+ in-depth guide for someone traveling there and wanting
96
+ to have THE BEST trip ever!
97
+ Gather information about key attractions, local customs,
98
+ special events, and daily activity recommendations.
99
+ Find the best spots to go to, the kind of place only a
100
+ local would know.
101
+ This guide should provide a thorough overview of what
102
+ the city has to offer, including hidden gems, cultural
103
+ hotspots, must-visit landmarks, weather forecasts, and
104
+ high level costs.
105
+
106
+ The final answer must be a comprehensive city guide,
107
+ rich in cultural insights and practical tips,
108
+ tailored to enhance the travel experience.
109
+
110
+ Trip Date: {trip_date}
111
+ Traveling from: {origin}
112
+ Traveler Interests: {interests}
113
+ """),
114
+ agent=local_expert,
115
+ expected_output="Comprehensive city guide including hidden gems, cultural hotspots, and practical travel tips"
116
+ )
117
+
118
+ plan_task = Task(
119
+ description=dedent(f"""
120
+ Expand this guide into a full 7-day travel
121
+ itinerary with detailed per-day plans, including
122
+ weather forecasts, places to eat, packing suggestions,
123
+ and a budget breakdown.
124
+
125
+ You MUST suggest actual places to visit, actual hotels
126
+ to stay and actual restaurants to go to.
127
+
128
+ This itinerary should cover all aspects of the trip,
129
+ from arrival to departure, integrating the city guide
130
+ information with practical travel logistics.
131
+
132
+ Your final answer MUST be a complete expanded travel plan,
133
+ formatted as markdown, encompassing a daily schedule,
134
+ anticipated weather conditions, recommended clothing and
135
+ items to pack, and a detailed budget, ensuring THE BEST
136
+ TRIP EVER. Be specific and give it a reason why you picked
137
+ each place, what makes them special!
138
+
139
+ Trip Date: {trip_date}
140
+ Traveling from: {origin}
141
+ Traveler Interests: {interests}
142
+ """),
143
+ agent=travel_concierge,
144
+ expected_output="Complete expanded travel plan with daily schedule, weather conditions, packing suggestions, and budget breakdown",
145
+ output_file = 'trip_planner.md'
146
+ )
147
+
148
+ crew = Crew(
149
+ agents=[city_selection_agent, local_expert, travel_concierge],
150
+ tasks=[identity_task, gather_task, plan_task],
151
+ process=Process.sequential,
152
+ output_log_file=True,
153
+ verbose=True
154
+ )
155
+
156
+ crew.kickoff(inputs={
157
+ 'origin': origin,
158
+ 'cities': cities,
159
+ 'trip_date': trip_date,
160
+ 'interests': interests
161
+ })
162
+
163
+ with open("trip_planner.md", "r", encoding='utf-8') as f:
164
+ plan = f.read()
165
+ with open("logs.txt", 'r', encoding='utf-8') as f:
166
+ logs = f.read()
167
+ with open("logs.txt", 'w', encoding='utf-8') as f:
168
+ f.truncate(0)
169
+ return plan, logs
170
+
171
+ except Exception as e:
172
+ return f"Error: {str(e)}", str(e)
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
app.py CHANGED
@@ -4,8 +4,10 @@ import yaml
4
  from ContentGeneratorAgent import run_crew_cga, set_model, llm_models
5
  from GameBuilderAgent import run_crew_game
6
  from MarketingPostGeneratorAgent import run_crew_mpga
 
7
  import base64
8
 
 
9
  def toggle_serper_input(choice):
10
  return gr.Textbox(visible=(choice == "Yes"))
11
 
@@ -27,11 +29,12 @@ website_logo_encoded = encode_image("Images/ai-logo.png")
27
  # UI Setup
28
  with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Roboto Mono")]),
29
  css='footer {visibility: hidden}') as demo:
30
- gr.Markdown("# AI Agents πŸ€–πŸ•΅πŸ»")
31
 
32
  with gr.Tabs():
33
  with gr.TabItem("Intro"):
34
  gr.Markdown(md.description)
 
35
  # Tab for SEO Content Generator Agent
36
  with gr.TabItem("SEO Content Agent"):
37
  with gr.Accordion("πŸ“” Description:", open=False):
@@ -109,7 +112,8 @@ with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Roboto Mono")]),
109
  placeholder="Paste your Gemini API key here..."
110
  )
111
  game_example_dropdown = gr.Dropdown(
112
- choices=["pacman", "pacman2", "snake", "space_invaders", "Tetris", "Frogger", "Chess", "Go", "Reversi"],
 
113
  label="3. Select Example",
114
  value="pacman"
115
  )
@@ -193,6 +197,61 @@ with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Roboto Mono")]),
193
  show_progress="full"
194
  )
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  gr.HTML(md.footer.format(github_logo_encoded, linkedin_logo_encoded, website_logo_encoded))
197
 
198
  if __name__ == "__main__":
 
4
  from ContentGeneratorAgent import run_crew_cga, set_model, llm_models
5
  from GameBuilderAgent import run_crew_game
6
  from MarketingPostGeneratorAgent import run_crew_mpga
7
+ from TripPlanner import run_crew_tp
8
  import base64
9
 
10
+
11
  def toggle_serper_input(choice):
12
  return gr.Textbox(visible=(choice == "Yes"))
13
 
 
29
  # UI Setup
30
  with gr.Blocks(theme=gr.themes.Soft(font=[gr.themes.GoogleFont("Roboto Mono")]),
31
  css='footer {visibility: hidden}') as demo:
32
+ gr.Markdown("# AI Agent Nexus πŸ€–πŸ•΅πŸ»")
33
 
34
  with gr.Tabs():
35
  with gr.TabItem("Intro"):
36
  gr.Markdown(md.description)
37
+
38
  # Tab for SEO Content Generator Agent
39
  with gr.TabItem("SEO Content Agent"):
40
  with gr.Accordion("πŸ“” Description:", open=False):
 
112
  placeholder="Paste your Gemini API key here..."
113
  )
114
  game_example_dropdown = gr.Dropdown(
115
+ choices=["pacman", "pacman2", "snake", "space_invaders", "Tetris", "Frogger", "Chess", "Go",
116
+ "Reversi"],
117
  label="3. Select Example",
118
  value="pacman"
119
  )
 
197
  show_progress="full"
198
  )
199
 
200
+ # Tab for Trip Planner Agent
201
+ with gr.TabItem("Trip Planner Agent"):
202
+ with gr.Accordion("πŸ“” Description: ", open=False):
203
+ gr.Markdown(md.trip_planner_agent)
204
+ with gr.Accordion("How to get GEMINI API KEY", open=False):
205
+ gr.Markdown(md.gemini_api_key)
206
+ with gr.Row():
207
+ with gr.Column(scale=1):
208
+ tp_model_dropdown = gr.Dropdown(
209
+ llm_models,
210
+ label="1. Select AI Model",
211
+ value=llm_models[0]
212
+ )
213
+ tp_gemini_key = gr.Textbox(
214
+ label="2. Enter Gemini API Key",
215
+ type="password",
216
+ placeholder="Paste your Gemini API key here..."
217
+ )
218
+ origin_input = gr.Textbox(
219
+ label="3. Enter Origin (Your Starting Location)",
220
+ placeholder="Enter your origin city..."
221
+ )
222
+ cities_input = gr.Textbox(
223
+ label="4. Enter City Options",
224
+ placeholder="List the cities you're interested in visiting..."
225
+ )
226
+ trip_date_input = gr.Textbox(
227
+ label="5. Enter Trip Date",
228
+ placeholder="Enter your trip date (e.g., YYYY-MM-DD to YYYY-MM-DD)..."
229
+ )
230
+ interests_input = gr.Textbox(
231
+ label="6. Enter Traveler Interests",
232
+ placeholder="Enter your interests/hobbies..."
233
+ )
234
+ tp_run_btn = gr.Button("Generate Trip Plan", variant="primary")
235
+ with gr.Column(scale=3):
236
+ tp_output = gr.Markdown(
237
+ label="Trip Plan",
238
+ value="Your trip plan will appear here..."
239
+ )
240
+ with gr.Accordion("Process Logs", open=True):
241
+ tp_logs = gr.Markdown()
242
+
243
+ # Event handlers for Trip Planner Agent
244
+ tp_model_dropdown.change(set_model, tp_model_dropdown)
245
+ tp_run_btn.click(
246
+ run_crew_tp,
247
+ inputs=[tp_gemini_key, origin_input, cities_input, trip_date_input, interests_input],
248
+ outputs=[tp_output, tp_logs],
249
+ show_progress="full"
250
+ )
251
+
252
+ with gr.TabItem("AI Agent Dev Agent"):
253
+ gr.Markdown("# Comming soon ...")
254
+
255
  gr.HTML(md.footer.format(github_logo_encoded, linkedin_logo_encoded, website_logo_encoded))
256
 
257
  if __name__ == "__main__":
config/TripPlanner/browser_tools.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+
4
+ import requests
5
+ from crewai import Agent, Task
6
+ from langchain.tools import tool
7
+ from unstructured.partition.html import partition_html
8
+
9
+ class BrowserTools():
10
+
11
+ @tool("Scrape website content")
12
+ def scrape_and_summarize_website(website):
13
+ """Useful to scrape and summarize a website content"""
14
+ url = f"https://chrome.browserless.io/content?token={os.environ['BROWSERLESS_API_KEY']}"
15
+ payload = json.dumps({"url": website})
16
+ headers = {'cache-control': 'no-cache', 'content-type': 'application/json'}
17
+ response = requests.request("POST", url, headers=headers, data=payload)
18
+ elements = partition_html(text=response.text)
19
+ content = "\n\n".join([str(el) for el in elements])
20
+ content = [content[i:i + 8000] for i in range(0, len(content), 8000)]
21
+ summaries = []
22
+ for chunk in content:
23
+ agent = Agent(
24
+ role='Principal Researcher',
25
+ goal=
26
+ 'Do amazing researches and summaries based on the content you are working with',
27
+ backstory=
28
+ "You're a Principal Researcher at a big company and you need to do a research about a given topic.",
29
+ allow_delegation=False)
30
+ task = Task(
31
+ agent=agent,
32
+ description=
33
+ f'Analyze and summarize the content bellow, make sure to include the most relevant information in the summary, return only the summary nothing else.\n\nCONTENT\n----------\n{chunk}'
34
+ )
35
+ summary = task.execute()
36
+ summaries.append(summary)
37
+ return "\n\n".join(summaries)
config/TripPlanner/calculator_tools.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain.tools import tool
2
+
3
+ class CalculatorTools():
4
+
5
+ @tool("Make a calculation")
6
+ def calculate(operation):
7
+ """Useful to perform any mathematical calculations,
8
+ like sum, minus, multiplication, division, etc.
9
+ The input to this tool should be a mathematical
10
+ expression, a couple examples are `200*7` or `5000/2*10`
11
+ """
12
+ try:
13
+ return eval(operation)
14
+ except SyntaxError:
15
+ return "Error: Invalid syntax in mathematical expression"
config/TripPlanner/search_tools.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import requests
4
+ from langchain.tools import tool
5
+
6
+ class SearchTools():
7
+ @tool("Search the internet")
8
+ def search_internet(query):
9
+ """Useful to search the internet
10
+ about a a given topic and return relevant results"""
11
+ top_result_to_return = 10
12
+ url = "https://google.serper.dev/search"
13
+ payload = json.dumps({"q": query})
14
+ headers = {
15
+ 'X-API-KEY': os.environ['SERPER_API_KEY'],
16
+ 'content-type': 'application/json'
17
+ }
18
+ response = requests.request("POST", url, headers=headers, data=payload)
19
+ # check if there is an organic key
20
+ if 'organic' not in response.json():
21
+ return "Sorry, I couldn't find anything about that, there could be an error with you serper api key."
22
+ else:
23
+ results = response.json()['organic']
24
+ string = []
25
+ for result in results[:top_result_to_return]:
26
+ try:
27
+ string.append('\n'.join([
28
+ f"Title: {result['title']}", f"Link: {result['link']}",
29
+ f"Snippet: {result['snippet']}", "\n-----------------"
30
+ ]))
31
+ except KeyError:
32
+ next
33
+
34
+ return '\n'.join(string)
markdown.py CHANGED
@@ -1,7 +1,8 @@
1
- description='''# πŸ€– **AI Agents Suite: A Multi-Agent System for Content and Game Generation**
 
2
 
3
  ## ✨ **Project Overview**
4
- The **AI Agents Suite** is a collection of intelligent agents designed to automate content generation, game development, and marketing content creation using advanced language models. This system utilizes **CrewAI**, **Gemini LLMs**, and **Serper API** to perform structured, high-quality content generation and game-building tasks.
5
 
6
  ## πŸ“ƒ **Key Components**
7
  ### 1. **SEO Content Generator Agent**
@@ -14,14 +15,20 @@ The **AI Agents Suite** is a collection of intelligent agents designed to automa
14
  - Ensures **code quality** by integrating multiple levels of **quality control** through AI agents.
15
  - Supports **multiple game genres**, including classic arcade, board games, and more.
16
 
17
- ### 3. **Marketing Post Generator Agent (Future Integration)**
18
- - Will create **engaging marketing content** tailored for different domains.
19
  - Enables structured **campaign planning** for digital outreach.
 
 
 
 
 
 
20
 
21
  ---
22
 
23
  ## πŸš€ **How the Application Works**
24
- The system is structured into **three main AI-driven agents** that interact through the **CrewAI** framework:
25
 
26
  ### 🌟 **1. SEO Content Generator Agent**
27
  - Accepts a **topic** input from the user.
@@ -36,7 +43,7 @@ The system is structured into **three main AI-driven agents** that interact thro
36
 
37
  ---
38
 
39
- ### πŸš€ **2. Game Development Agent**
40
  - Converts **game design instructions** into fully functional **Python game code**.
41
  - Implements **multi-step quality control** using dedicated agents.
42
  - Generates **error-free, optimized game logic**.
@@ -50,6 +57,34 @@ The system is structured into **three main AI-driven agents** that interact thro
50
 
51
  ---
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  ### πŸ‘©β€πŸ’» **Agents in Action**
54
  #### **SEO Content Generator Agents**
55
  - **Researcher Agent**: Collects data for SEO optimization.
@@ -60,6 +95,16 @@ The system is structured into **three main AI-driven agents** that interact thro
60
  - **QA Engineer**: Identifies syntax errors, missing imports, and logic issues.
61
  - **Chief QA Engineer**: Ensures the game works correctly and optimally.
62
 
 
 
 
 
 
 
 
 
 
 
63
  ---
64
 
65
  ## πŸ“… **Usage Instructions**
@@ -75,6 +120,16 @@ The system is structured into **three main AI-driven agents** that interact thro
75
  2. Enter **Game Instructions**.
76
  3. Click **Generate Game Code**.
77
 
 
 
 
 
 
 
 
 
 
 
78
  ---
79
 
80
  ## πŸ“ˆ **Supported AI Models**
@@ -88,15 +143,18 @@ The system is structured into **three main AI-driven agents** that interact thro
88
  ## πŸ“„ **Project Benefits**
89
  - **Automated Content Generation**: Saves time by generating high-quality SEO articles.
90
  - **Efficient Game Development**: Automates coding and quality checks for Python games.
 
 
91
  - **Scalability**: Supports multiple AI models and frameworks.
92
  - **Future Expansion**: New AI-powered agents can be integrated for additional tasks.
93
 
94
  ---
95
 
96
  ## πŸ† **Future Enhancements**
97
- - **Marketing Post Generator** for social media campaigns.
98
  - **Integration with Cloud-Based AI models** for enhanced scalability.
99
  - **Support for additional Game Development tools** beyond Python.
 
 
100
 
101
  ### πŸ“š **Get Started Today!**
102
  Explore the power of AI-driven automation and enhance your workflow with the **AI Agents Suite**!
@@ -296,6 +354,48 @@ The Marketing Post Generator Agent leverages the CrewAI framework to automate th
296
  Experience streamlined marketing post generation with CrewAI's advanced automation capabilities.
297
  '''
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  footer = """
300
  <div style="background-color: #1d2938; color: white; padding: 10px; width: 100%; bottom: 0; left: 0; display: flex; justify-content: space-between; align-items: center; padding: .2rem 35px; box-sizing: border-box; font-size: 16px;">
301
  <div style="text-align: left;">
 
1
+ description = '''
2
+ # πŸ€– **AI Agents Suite: A Multi-Agent System for Content, Game, Marketing, and Travel Planning**
3
 
4
  ## ✨ **Project Overview**
5
+ The **AI Agents Suite** is a collection of intelligent agents designed to automate content generation, game development, marketing content creation, and travel planning using advanced language models. This system utilizes **CrewAI**, **Gemini LLMs**, and **Serper API** to perform structured, high-quality content generation, game-building, marketing tasks, and travel itineraries.
6
 
7
  ## πŸ“ƒ **Key Components**
8
  ### 1. **SEO Content Generator Agent**
 
15
  - Ensures **code quality** by integrating multiple levels of **quality control** through AI agents.
16
  - Supports **multiple game genres**, including classic arcade, board games, and more.
17
 
18
+ ### 3. **Marketing Post Generator Agent**
19
+ - Creates **engaging marketing content** tailored for different domains.
20
  - Enables structured **campaign planning** for digital outreach.
21
+ - Leverages **Gemini AI models** for innovative and impactful post creation.
22
+
23
+ ### 4. **Trip Planner Agent**
24
+ - Automates the creation of **personalized travel itineraries**.
25
+ - Utilizes various tools to gather information, select the best city, and generate a comprehensive travel plan.
26
+ - Ensures high-quality, personalized travel itineraries with detailed per-day plans, including weather forecasts, places to eat, packing suggestions, and a budget breakdown.
27
 
28
  ---
29
 
30
  ## πŸš€ **How the Application Works**
31
+ The system is structured into **four main AI-driven agents** that interact through the **CrewAI** framework:
32
 
33
  ### 🌟 **1. SEO Content Generator Agent**
34
  - Accepts a **topic** input from the user.
 
43
 
44
  ---
45
 
46
+ ### 🌟 **2. Game Development Agent**
47
  - Converts **game design instructions** into fully functional **Python game code**.
48
  - Implements **multi-step quality control** using dedicated agents.
49
  - Generates **error-free, optimized game logic**.
 
57
 
58
  ---
59
 
60
+ ### πŸ“’ **3. Marketing Post Generator Agent**
61
+ - Creates **compelling marketing posts** for social media campaigns.
62
+ - Conducts **market research** to tailor content to the target audience.
63
+ - Ensures posts are **aligned with marketing strategies**.
64
+
65
+ #### **Workflow:**
66
+ 1. User provides **campaign details** and selects an **AI model**.
67
+ 2. **Market Research Analyst Agent** gathers insights on the target audience and competitors.
68
+ 3. **Creative Content Writer Agent** drafts engaging marketing posts.
69
+ 4. **Social Media Strategist Agent** ensures posts are optimized for engagement.
70
+ 5. Outputs a set of **polished marketing posts**.
71
+
72
+ ---
73
+
74
+ ### 🌟 **4. Trip Planner Agent**
75
+ - Automates the creation of **personalized travel itineraries**.
76
+ - Utilizes various tools to gather information, select the best city, and generate a comprehensive travel plan.
77
+ - Ensures high-quality, personalized travel itineraries with detailed per-day plans, including weather forecasts, places to eat, packing suggestions, and a budget breakdown.
78
+
79
+ #### **Workflow:**
80
+ 1. User provides **trip details** and selects an **AI model**.
81
+ 2. **City Selection Expert Agent** analyzes and selects the best city for the trip.
82
+ 3. **Local Expert Agent** compiles an in-depth guide about the selected city.
83
+ 4. **Travel Concierge Agent** develops a full 7-day travel itinerary with detailed per-day plans.
84
+ 5. Outputs a **comprehensive travel plan** and detailed logs.
85
+
86
+ ---
87
+
88
  ### πŸ‘©β€πŸ’» **Agents in Action**
89
  #### **SEO Content Generator Agents**
90
  - **Researcher Agent**: Collects data for SEO optimization.
 
95
  - **QA Engineer**: Identifies syntax errors, missing imports, and logic issues.
96
  - **Chief QA Engineer**: Ensures the game works correctly and optimally.
97
 
98
+ #### **Marketing Post Generator Agents**
99
+ - **Market Research Analyst**: Gathers insights on the target audience and competitors.
100
+ - **Creative Content Writer**: Crafts engaging marketing posts.
101
+ - **Social Media Strategist**: Ensures posts are aligned with marketing strategies and optimized for engagement.
102
+
103
+ #### **Trip Planner Agents**
104
+ - **City Selection Expert**: Analyzes travel data to select the best city based on weather, season, and prices.
105
+ - **Local Expert**: Provides in-depth insights about the selected city, including attractions and local customs.
106
+ - **Travel Concierge**: Creates detailed travel itineraries with budget and packing suggestions.
107
+
108
  ---
109
 
110
  ## πŸ“… **Usage Instructions**
 
120
  2. Enter **Game Instructions**.
121
  3. Click **Generate Game Code**.
122
 
123
+ ### πŸ“’ **Marketing Post Generator**
124
+ 1. Select **AI Model**.
125
+ 2. Enter **Campaign Details**.
126
+ 3. Click **Generate Marketing Posts**.
127
+
128
+ ### 🌍 **Trip Planner Agent**
129
+ 1. Select **AI Model**.
130
+ 2. Enter **Trip Details**.
131
+ 3. Click **Generate Travel Plan**.
132
+
133
  ---
134
 
135
  ## πŸ“ˆ **Supported AI Models**
 
143
  ## πŸ“„ **Project Benefits**
144
  - **Automated Content Generation**: Saves time by generating high-quality SEO articles.
145
  - **Efficient Game Development**: Automates coding and quality checks for Python games.
146
+ - **Engaging Marketing Content**: Creates impactful marketing posts tailored to the target audience.
147
+ - **Personalized Travel Planning**: Automates the creation of personalized travel itineraries.
148
  - **Scalability**: Supports multiple AI models and frameworks.
149
  - **Future Expansion**: New AI-powered agents can be integrated for additional tasks.
150
 
151
  ---
152
 
153
  ## πŸ† **Future Enhancements**
 
154
  - **Integration with Cloud-Based AI models** for enhanced scalability.
155
  - **Support for additional Game Development tools** beyond Python.
156
+ - **Advanced Marketing Analytics** for better campaign performance tracking.
157
+ - **Real-Time Updates** for weather, events, and travel advisories in travel planning.
158
 
159
  ### πŸ“š **Get Started Today!**
160
  Explore the power of AI-driven automation and enhance your workflow with the **AI Agents Suite**!
 
354
  Experience streamlined marketing post generation with CrewAI's advanced automation capabilities.
355
  '''
356
 
357
+ trip_planner_agent = '''
358
+ # CrewAI Trip Planner Agent
359
+
360
+ ## Overview
361
+
362
+ The Trip Planner Agent leverages the CrewAI framework to automate the creation of personalized travel itineraries. It integrates with the Gemini language model and utilizes various tools to gather information, select the best city, and generate a comprehensive travel plan.
363
+
364
+ ## Roles
365
+
366
+ - **City Selection Expert**: Analyzes travel data to select the best city based on weather, season, and prices.
367
+ - **Local Expert**: Provides in-depth insights about the selected city, including attractions and local customs.
368
+ - **Travel Concierge**: Creates detailed travel itineraries with budget and packing suggestions.
369
+
370
+ ## Tasks
371
+
372
+ - **City Selection Task**: Analyzes and selects the best city for the trip based on specific criteria.
373
+ - **Information Gathering Task**: Compiles an in-depth guide about the selected city, including key attractions and local customs.
374
+ - **Itinerary Planning Task**: Develops a full 7-day travel itinerary with detailed per-day plans, including weather forecasts, places to eat, packing suggestions, and a budget breakdown.
375
+
376
+ ## Usage
377
+
378
+ 1. **Set Model**: Choose the desired Gemini model.
379
+ 2. **Configure API Keys**: Provide the necessary API key for Gemini.
380
+ 3. **Run Crew**: Execute the crew with the specified trip details to generate the travel plan.
381
+
382
+ ## Features
383
+
384
+ - **Model Selection**: Supports multiple Gemini language models for flexibility.
385
+ - **API Configuration**: Manages API keys for Gemini.
386
+ - **Agent Roles**: Defines specialized agents for city selection, local expertise, and travel planning.
387
+ - **Task Management**: Orchestrates sequential tasks for city selection, information gathering, and itinerary planning.
388
+ - **Output**: Generates a comprehensive travel plan and detailed logs.
389
+
390
+ ## Benefits
391
+
392
+ - **Efficiency**: Automates the travel planning process, saving time and effort.
393
+ - **Quality**: Ensures high-quality, personalized travel itineraries.
394
+ - **Flexibility**: Allows for easy integration of additional tools for enhanced functionality.
395
+
396
+ Experience streamlined travel planning with CrewAI's advanced automation capabilities.
397
+ '''
398
+
399
  footer = """
400
  <div style="background-color: #1d2938; color: white; padding: 10px; width: 100%; bottom: 0; left: 0; display: flex; justify-content: space-between; align-items: center; padding: .2rem 35px; box-sizing: border-box; font-size: 16px;">
401
  <div style="text-align: left;">