Skip to content

Autonomous AI Newsroom that researches, writes, and designs content.

License

Notifications You must be signed in to change notification settings

Eatosin/NewsAgent-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—ž๏ธ NewsAgent Pro v2

The Autonomous, Self-Correcting AI Newsroom

Python Streamlit LangGraph Groq Flux

NewsAgent Pro Demo



ย  ย 


โšก The Problem: "Content Fatigue"

To run a high-quality media channel today, you need a Researcher to find facts, a Writer to draft hooks, an Editor to fix mistakes, and a Designer to make thumbnails. Doing this manually takes hours. Most "AI Writers" just hallucinate generic slop.

๐Ÿง  The Solution: Agentic Workflow

NewsAgent Pro is not a chatbot. It is a Multi-Agent Swarm that mimics a real newsroom. It reads the internet, plans a strategy, drafts content, critiques its own work, and designs branded visualsโ€”all in 60 seconds.

โœจ Key Innovations (v2.0)

  • ๐Ÿ”„ Self-Correction Loop: The Critic Agent reads the draft and grades it (1-10). If the score is low, it sends it back to the Writer with specific feedback. It iterates until perfection.
  • โšก Hyper-Fast Inference: Powered by Groq (Llama 3.3) for sub-second logic and planning.
  • ๐Ÿ•ต๏ธโ€โ™‚๏ธ Real-Time Truth: Uses Tavily API to scrape live news (last 48 hours), preventing hallucinations.
  • ๐ŸŽจ AI Graphic Design: Uses Flux.1-Schnell to generate cinematic backgrounds, then uses Python Pillow to programmatically overlay "Newsflash" headlines.

โš™๏ธ System Architecture

The system uses a Stateful Graph (LangGraph) with conditional routing.

graph LR
    A[User Input] --> B(๐Ÿง  Planner)
    B -->|Strategy| C(๐Ÿ•ต๏ธโ€โ™‚๏ธ Researcher)
    C -->|Facts| D(โœ๏ธ Writer)
    D --> E{โš–๏ธ Critic}
    E -->|Score < 8| D
    E -->|Score > 8| F(๐ŸŽจ Designer)
    F -->|Visuals| G[Final Output]

    style E fill:#ff9999,stroke:#333,stroke-width:2px,color:black
    style F fill:#99ff99,stroke:#333,stroke-width:2px,color:black
Loading

The "Newsroom" Staff

Role Model / Tool Function
Planner Llama 3.3 (Groq) Analyzes the topic and determines the "Viral Angle."
Researcher Tavily API Scrapes the web for facts/quotes from the last 48 hours.
Writer Gemini 2.5 / Groq Drafts platform-specific content (Threads vs Posts).
Critic Llama 3.3 (Groq) The Gatekeeper. Rejects low-quality drafts and forces rewrites.
Designer Flux.1-Schnell Generates 16:9 cinematic cover art in <4 steps.

๐Ÿ–ผ๏ธ Sample Outputs

Twitter Thread (Viral Style) LinkedIn Post (Professional)
Topic: "AI Agents 2026"
Twitter Sample
Topic: "Venezuela Oil Crisis"
LinkedIn Sample
Short, punchy, thread-formatted. Deep dive, strategic analysis.
AI agents aren't hype anymoreโ€”they're quietly taking over dev workflows in 2026.

(thread ๐Ÿงต)
|||Groq just dropped free-tier Llama 3.1 70B inference that's faster than most paid APIs.

Sub-100ms latency. No card needed.

This changes everything.
|||LangGraph + critique loops = agents that self-improve until viral-ready.

No more generic slop.
|||Real wins: Teams reporting 40โ€“60% faster prototyping.

The gap between indie hackers and big tech is closing FAST.
|||But risks remain: Hallucinations without strong guardrails.

The best setups route Groq โ†” Gemini for speed + context.
|||2026 prediction: Every company ships internal agent tools.

The ones who master hybrid routing win.
|||I'm building with this exact stack daily.

What's your biggest agent win so far? Reply below ๐Ÿ‘‡

#AI #Agents #Productivity

๐Ÿš€ Live Demo

Try the Production Build on Hugging Face Spaces:

Hugging Face Spaces

Try searching: "DeepSeek vs OpenAI" or "SpaceX Starship Launch"


๐Ÿ“ฆ Installation (Local & Cloud)

1. Clone & Setup

git clone https://github.com/Eatosin/NewsAgent-Pro.git
cd NewsAgent-Pro
pip install -r requirements.txt

2. Configure Environment

Create a .env file with your keys (Get Groq for free speed!):

GROQ_API_KEY=gsk_...
GEMINI_API_KEY=AIza...
TAVILY_API_KEY=tvly-...
HF_TOKEN=hf_...

3. Run the App

streamlit run src/app.py

4. Docker (Production)

We use a custom multi-stage build to handle system dependencies (Fonts, Pillow):

docker build -t newsagent .
docker run -p 7860:7860 --env-file .env newsagent

๐Ÿ“ˆ Star History

Star History Chart


๐Ÿ‘จโ€๐Ÿ’ป Author

Owadokun Tosin Tobi Senior AI Engineer & Product Builder


Built with the Lexpertz R&D Stack.

About

Autonomous AI Newsroom that researches, writes, and designs content.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published