Skip to content

Conversation

dhrumilbhut
Copy link

@dhrumilbhut dhrumilbhut commented Sep 26, 2025

This project demonstrates an agentic content generation pipeline using CrewAI and Mistral models.
It monitors live market news, analyzes data, generates blog + social content, and runs QA checks before outputting clean markdown.

Summary by CodeRabbit

  • New Features

    • Added a configurable multi-agent workflow for monitoring market news, analyzing data, creating content, and performing quality assurance.
    • Added environment helpers to load and expose API keys.
  • Documentation

    • Comprehensive README describing workflow, agents, use cases, models, benchmarks, and run instructions.
    • Included a sample generated blog/report demonstrating end-to-end outputs.
  • Chores

    • Added dependencies for environment management, YAML configs, Jupyter support, and orchestration tooling.

Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Walkthrough

Adds a new finnews multi-agent content pipeline including a README, a generated blog, four agent YAML configs, four task YAML configs, an env helper for API keys, and updated requirements for CrewAI and YAML tooling. All changes are additions; no existing code modified.

Changes

Cohort / File(s) Summary
Documentation
finnews-agent-writer-crewai/README.md, finnews-agent-writer-crewai/generated_blog.md
Added a comprehensive README describing the multi-agent workflow and a large generated Markdown blog/report with analysis and a blog post.
Agent Config
finnews-agent-writer-crewai/config/agents.yaml
Added four agent definitions (market_news_monitor_agent, data_analyst_agent, content_creator_agent, quality_assurance_agent) with role, goal, backstory, allow_delegation: false, and verbose: true.
Task Config
finnews-agent-writer-crewai/config/tasks.yaml
Added four task specs (monitor_financial_news, analyze_market_data, create_content, quality_assurance) each with description and expected_output fields using a {subject} placeholder.
Helper Utilities
finnews-agent-writer-crewai/helper.py
Added load_env() and getters get_mistral_api_key(), get_openai_api_key(), get_groq_api_key(), get_serper_api_key() which load env via python-dotenv and return values or None.
Dependencies
finnews-agent-writer-crewai/requirements.txt
Added dependencies: python-dotenv, ipykernel, pyyaml, crewai_tools, crewai.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant O as Orchestrator (CrewAI)
  participant H as Env Helper
  participant M as Market News Monitor
  participant A as Data Analyst
  participant C as Content Creator
  participant Q as Quality Assurance
  participant Out as Markdown Output

  U->>O: Submit {subject}
  O->>H: load_env() / get_*_api_key()
  Note right of H #lightgreen: Reads .env for MISTRAL/OPENAI/GROQ/SERPER

  O->>M: monitor_financial_news({subject})
  M-->>O: headlines summary

  O->>A: analyze_market_data({subject}, headlines)
  A-->>O: insights, analyses, visuals

  O->>C: create_content({subject}, insights)
  C-->>O: draft content (Markdown)

  O->>Q: quality_assurance(draft)
  Q-->>O: proofed, formatted Markdown

  O-->>Out: persist final Markdown
  O-->>U: deliver final content
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

A rabbit with a notepad, ears tuned to the news,
Hops between four agents, stitching market clues.
Keys fetched from the burrow, YAML maps our way,
Drafts turn to carrots, polished for the day.
Thump—Markdown sails off, hopped up and gay! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly refers to the main change—adding the finnews-agent-writer-crewai project—which aligns with the PR’s content and conveys the primary update without ambiguity.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7bae6a and 7199130.

📒 Files selected for processing (1)
  • finnews-agent-writer-crewai/generated_blog.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • finnews-agent-writer-crewai/generated_blog.md

Warning

Tools execution failed with the following error:

Failed to run tools: 14 UNAVAILABLE: read ECONNRESET


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
finnews-agent-writer-crewai/README.md (1)

84-96: Annotate fenced shell snippets with a language

Markdownlint flags these blocks, and adding a language hint (e.g., bash) also improves editor highlighting.

-```
+```bash
 pip install -r requirements.txt

...
- +bash
export MISTRAL_API_KEY=your_key_here
export SERPER_API_KEY=your_key_here

...
-```
+```bash
jupyter notebook main.ipynb

</blockquote></details>
<details>
<summary>finnews-agent-writer-crewai/helper.py (1)</summary><blockquote>

`4-24`: **Cache `.env` loading to avoid redundant disk hits.**

Every getter calls `load_env()`, which in turn re-reads the `.env` file. If these helpers are invoked multiple times during an agent run, that’s unnecessary disk I/O. Cache the load once and reuse it.



```diff
+_ENV_LOADED = False
+
 def load_env():
-  _ = load_dotenv(find_dotenv())
+  global _ENV_LOADED
+  if not _ENV_LOADED:
+    load_dotenv(find_dotenv())
+    _ENV_LOADED = True
finnews-agent-writer-crewai/config/agents.yaml (1)

58-67: Trim trailing blank lines to satisfy yamllint.

Lines 58 onward are empty, triggering the empty-lines warning from yamllint (10 blank lines). Removing them keeps the config tidy and silences the check.

-
-
-
-
-
-
-
-
-
-
finnews-agent-writer-crewai/config/tasks.yaml (1)

66-74: Drop the extra blank lines at EOF.

Similar to agents.yaml, the trailing empty lines violate yamllint’s empty-lines rule. Trimming them keeps CI quiet.

-
-
-
-
-
-
-
-
-
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a0389b1 and d60d03a.

📒 Files selected for processing (6)
  • finnews-agent-writer-crewai/README.md (1 hunks)
  • finnews-agent-writer-crewai/config/agents.yaml (1 hunks)
  • finnews-agent-writer-crewai/config/tasks.yaml (1 hunks)
  • finnews-agent-writer-crewai/generated_blog.md (1 hunks)
  • finnews-agent-writer-crewai/helper.py (1 hunks)
  • finnews-agent-writer-crewai/requirements.txt (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
finnews-agent-writer-crewai/config/agents.yaml

[warning] 66-66: too many blank lines (10 > 2)

(empty-lines)

🪛 markdownlint-cli2 (0.18.1)
finnews-agent-writer-crewai/README.md

84-84: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


89-89: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


94-94: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

…rify references section; modify requirements.txt to ensure python-dotenv is listed correctly.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d60d03a and f7bae6a.

📒 Files selected for processing (2)
  • finnews-agent-writer-crewai/generated_blog.md (1 hunks)
  • finnews-agent-writer-crewai/requirements.txt (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • finnews-agent-writer-crewai/requirements.txt

@dhrumilbhut
Copy link
Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant