Skip to content

Commit d60d03a

Browse files
committed
Add finnews-agent-writer-crewai with necessary dependencies
1 parent a0389b1 commit d60d03a

File tree

7 files changed

+8907
-0
lines changed

7 files changed

+8907
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# 🧠 AI-Powered Financial Content Creator
2+
3+
A multi-agent AI system that autonomously creates, refines, and formats high-quality financial content — including blog posts and social media snippets — using real-time market data and news.
4+
5+
---
6+
7+
## 🚀 What It Does
8+
9+
This system uses **CrewAI agents** to automate the entire content creation pipeline:
10+
11+
1. **📡 Market News Monitor Agent**
12+
Tracks the latest financial news based on a given subject (e.g. “US-China tariffs”), summarizing impactful headlines.
13+
14+
2. **📊 Data Analyst Agent**
15+
Analyzes market trends and economic indicators to identify actionable insights.
16+
17+
3. **✍️ Content Creator Agent**
18+
Generates engaging blog content and social media posts from insights provided by the above agents.
19+
20+
4. **🧐 Quality Assurance Agent**
21+
Refines and formats the content using markdown, ensuring clarity, structure, and brand alignment.
22+
23+
---
24+
25+
## 💼 Use Case
26+
27+
Ideal for:
28+
- Financial blogs and media platforms
29+
- Automated newsletter creation
30+
- Market intelligence publishing
31+
- Anyone needing timely, data-driven financial content
32+
33+
---
34+
35+
36+
## 🛠️ Tech Stack
37+
38+
- **CrewAI** – Multi-agent orchestration
39+
- **LangChain / LLMs** – Natural language generation
40+
- **YAML Configs** – Agent & task modular setup
41+
- **Jupyter Notebook** – For testing and orchestration
42+
- **Markdown output** – For clean blog-ready formatting
43+
44+
---
45+
46+
47+
## 🧪 Performance Benchmarks
48+
49+
| Agent | Task Description | Avg Time (approx) |
50+
|---------------------------|-----------------------------------------|-------------------|
51+
| 📡 Market News Monitor | Scrapes live financial news | ~45 seconds |
52+
| 📊 Data Analyst Agent | Extracts and interprets insights | ~60 seconds |
53+
| ✍️ Content Creator Agent | Generates blog + social media content | ~75 seconds |
54+
| ✅ Quality Assurance Agent | Formats content in markdown | ~30 seconds |
55+
| ⏱️ **Total Runtime** | End-to-end pipeline execution | **~3.5 minutes** |
56+
57+
> 🧠 Benchmarks based on `mistral-large-latest` model and real-time web scraping.
58+
59+
---
60+
61+
62+
## 🤖 LLM Models Used
63+
64+
This project uses open-weight models from [Mistral](https://mistral.ai/).
65+
66+
### 🔹 `mistral-small-latest`
67+
- Lightweight and fast
68+
- Best for retrieval tasks and embeddings
69+
- Used in: `WebsiteSearchTool`, `embedder`, lightweight analysis
70+
71+
### 🔹 `mistral-large-latest`
72+
- Strong reasoning and summarization capabilities
73+
- Handles long, structured generation tasks
74+
- Used in: All core agents (`llm=llms['large']`) — blog writing, analysis, formatting
75+
76+
77+
---
78+
79+
80+
## 🧪 How to Run
81+
82+
1. Install dependencies:
83+
84+
```
85+
pip install -r requirements.txt
86+
```
87+
2. Set your environment variables:
88+
89+
```
90+
export MISTRAL_API_KEY=your_key_here
91+
export SERPER_API_KEY=your_key_here
92+
```
93+
3. Launch the notebook:
94+
```
95+
jupyter notebook main.ipynb
96+
```
97+
4. Provide your topic (e.g. "US-China tariffs") and let the agents do the rest.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
market_news_monitor_agent:
2+
role: >
3+
Lead Market Analyst
4+
goal: >
5+
Conduct in-depth, real-time analysis of financial news and market updates,
6+
providing insightful summaries to guide content creation.
7+
backstory: >
8+
As the Lead Market Analyst at a premier financial content platform, you
9+
specialize in dissecting market trends and economic shifts, ensuring
10+
that your content stays ahead of the curve and delivers the most
11+
relevant insights to your audience.
12+
allow_delegation: false
13+
verbose: true
14+
15+
data_analyst_agent:
16+
role: >
17+
Chief Data Strategist
18+
goal: >
19+
Synthesize complex market data into actionable insights that can be
20+
transformed into compelling content.
21+
backstory: >
22+
As the Chief Data Strategist at a leading financial advisory firm,
23+
your expertise lies in analyzing vast datasets to uncover trends and
24+
opportunities that inform high-impact investment strategies.
25+
allow_delegation: false
26+
verbose: true
27+
28+
content_creator_agent:
29+
role: >
30+
Creative Content Director
31+
goal: >
32+
Develop and oversee the creation of high-quality, engaging content that
33+
educates and captivates the target audience, with a focus on the latest
34+
financial trends and insights.
35+
backstory: >
36+
As the Creative Content Director at a top financial publishing house,
37+
you excel in crafting narratives that resonate with investors, blending
38+
in-depth analysis with compelling storytelling to create content that
39+
drives engagement and trust.
40+
allow_delegation: false
41+
verbose: true
42+
43+
quality_assurance_agent:
44+
role: >
45+
Chief Content Officer
46+
goal: >
47+
Oversee and refine the content creation process, ensuring that all
48+
outputs are accurate, aligned with brand voice, and optimized for
49+
engagement.
50+
backstory: >
51+
You are the Chief Content Officer of a leading financial media company.
52+
Your role is to ensure that every piece of content not only meets high
53+
editorial standards but also delivers clear, actionable insights that
54+
can help your audience make informed decisions.
55+
allow_delegation: false
56+
verbose: true
57+
58+
59+
60+
61+
62+
63+
64+
65+
66+
67+
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
monitor_financial_news:
2+
description: >
3+
Monitor and analyze the latest news and updates related to
4+
the financial markets, with a particular focus on {subject}.
5+
Identify and summarize the most relevant and impactful news items
6+
that could influence market trends or investor decisions.
7+
Utilize financial news APIs and real-time market data tools to
8+
gather up-to-date information. Focus on detecting trends,
9+
regulatory changes, or significant economic indicators that
10+
directly relate to {subject}.
11+
expected_output: >
12+
A detailed summary report highlighting the most impactful financial
13+
news and updates related to {subject}. This report should include
14+
key insights and their potential implications for the market and
15+
content strategy.
16+
17+
analyze_market_data:
18+
description: >
19+
Analyze market data and trends related to {subject}, with a focus
20+
on uncovering patterns, opportunities, and risks that could be
21+
leveraged in content creation. Use advanced data analytics tools
22+
to process large datasets and generate actionable insights.
23+
Pay special attention to how {subject} influences market movements,
24+
investor sentiment, and economic indicators.
25+
expected_output: >
26+
A comprehensive analysis report that highlights key market trends
27+
and actionable insights related to {subject}. The report should
28+
include data visualizations and clear recommendations for content
29+
creation.
30+
31+
create_content:
32+
description: >
33+
Based on the insights provided by the Market News Monitor and
34+
Data Analyst agents, create high-quality, engaging content that
35+
educates and informs the target audience about {subject}.
36+
Produce various types of content, including blog posts and
37+
social media updates, that effectively communicate the insights
38+
gathered. Ensure the content clearly conveys the key findings
39+
and recommendations related to {subject}. Incorporate data
40+
visualizations, infographics, or other multimedia elements to
41+
enhance the content where applicable.
42+
expected_output: >
43+
A collection of high-quality content pieces related to {subject},
44+
including blog posts and social media updates, complete with
45+
integrated multimedia elements.
46+
47+
quality_assurance:
48+
description: >
49+
Review and refine the content created on {subject} to ensure it
50+
meets the highest standards of accuracy, clarity, and brand
51+
alignment. Thoroughly proofread and edit the content, checking
52+
for errors, inconsistencies, and alignment with the brand voice.
53+
Ensure that the content accurately reflects the key insights and
54+
recommendations provided by the Data Analyst and Market News
55+
Monitor agents. Ensure that the final content is well-formatted
56+
in markdown, using appropriate headers, bullet points, links,
57+
and other markdown features to enhance readability and engagement.
58+
expected_output: >
59+
A finalized set of content pieces related to {subject}, thoroughly
60+
reviewed, and formatted in markdown. The content should be
61+
well-structured, with appropriate use of headers, bullet points,
62+
links, and other markdown features to ensure it is both visually
63+
appealing and easy to read. Each section should have at least 2
64+
paragraphs.
65+
66+
67+
68+
69+
70+
71+
72+
73+

0 commit comments

Comments
 (0)