Back to articles
Technology Insight

Building an Automated Financial News Aggregator and Analyzer Using CrewAI and Ollama on a VPS

June 3, 2026

Introduction

In the fast-paced world of finance, information is the ultimate currency. Every second, thousands of articles, press releases, and market reports are published globally. For financial analysts, traders, and business executives, filtering through this noise to extract actionable insights is both critical and time-consuming. Traditional automated aggregators often fall short because they lack contextual understanding, delivering a flood of links rather than synthesised intelligence.

The convergence of advanced Multi-Agent AI frameworks and localized Large Language Models (LLMs) has fundamentally changed this landscape. By leveraging CrewAI for structural orchestration and Ollama for hosting open-source LLMs, businesses can now deploy sophisticated, autonomous research teams directly on their own infrastructure. This guide provides a comprehensive blueprint for building a fully automated, privacy-focused financial news aggregator and analyzer designed to run persistently in the background on a Virtual Private Server (VPS).

The Core Architecture: Why CrewAI and Ollama?

Building an enterprise-ready financial intelligence tool requires a system that is robust, cost-effective, and secure. Our architecture relies on three primary pillars:

  • CrewAI: An open-source framework that enables the creation of role-based AI agents that can collaborate autonomously. Unlike simple linear pipelines, CrewAI allows agents to share context, assign tasks to one another, and refine outputs dynamically.
  • Ollama: A lightweight, highly efficient tool for running Large Language Models locally. By hosting models like Llama 3 or Mistral via Ollama, we eliminate recurring API costs and ensure that sensitive financial queries and data never leave our controlled environment.
  • VPS Deployment: Running the system on a remote virtual server ensures continuous, 24/7 operation without relying on local hardware, allowing the AI agents to monitor global markets around the clock.

Step 1: Setting Up the Infrastructure on the VPS

Before writing the orchestration script, the VPS environment must be provisioned with the necessary dependencies. This setup assumes a Linux-based environment (e.g., Ubuntu 22.04 LTS).

1. System Updates and Essential Dependencies

First, update the package manager and install Python, pip, and essential build tools:

sudo apt update && sudo apt upgrade -y
sudo apt install python3-pip python3-venv curl build-essential -y

2. Installing and Configuring Ollama

Install Ollama using the official automated script. Once installed, pull a high-performance open-source model optimized for reasoning, such as llama3 or mistral:

curl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh) | sh
ollama pull llama3

To ensure Ollama runs efficiently as a background daemon, verify its systemd service status using systemctl status ollama.

Step 2: Developing the Multi-Agent Financial Crew

With the environment prepared, we define our CrewAI architecture. To achieve high-quality financial analysis, we divide the responsibilities among three specialized agents: the Scraper Agent, the Financial Analyst Agent, and the Investment Editor Agent.

1. Setting Up the Project Environment

Create a dedicated directory and install the required Python libraries:

mkdir financial-news-crew && cd financial-news-crew
python3 -m venv venv
source venv/bin/activate
pip install crewai langchain-community duckduckgo-search

2. Configuring the Local LLM Connection

We connect CrewAI to our local Ollama instance using the LangChain community adapter. This forces the agents to route all processing requests to the VPS's local resources.

from langchain_community.llms import Ollama

ollama_llm = Ollama(model="llama3")

3. Defining the Agents and Tasks

Each agent is given a specific role, goal, and backstory to guide its decision-making process:

The Senior Market Researcher: Tasked with scanning financial news platforms, RSS feeds, and market data sources using search tools to identify macroeconomic shifts and company-specific announcements.
The Financial Analyst: Responsible for digesting raw text, calculating potential market impact, evaluating sentiment (bullish/bearish), and cross-referencing information against historical context.
The Chief Editor: Responsible for aggregating the analyst's findings into a concise, professional executive briefing tailored for C-suite decision-makers.

The Python implementation chains these agents sequentially, ensuring that the output of the researcher feeds into the analyst, which ultimately culminates in the editor's finalized report.

Step 3: Implementing Background Persistence via Systemd

A critical requirement for a corporate financial monitor is continuity. The script cannot depend on an open SSH session. To ensure the script runs perpetually and survives system reboots, we configure it as a systemd service.

1. Creating the Automation Script

Wrap the CrewAI execution logic into a master script, main.py, which includes an infinite loop with a defined cooldown period (e.g., executing every 4 hours) or triggers based on real-time cron jobs.

2. Configuring the Systemd Service File

Create a service definition file at /etc/systemd/system/financial-crew.service:

[Unit]
Description=CrewAI Financial News Aggregator Service
After=network.target ollama.service

[Service]
Type=simple
User=root
WorkingDirectory=/root/financial-news-crew
ExecStart=/root/financial-news-crew/venv/bin/python3 main.py
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

3. Enabling and Starting the Service

Reload the systemd daemon, enable the service to start on boot, and initiate the background process:

sudo systemctl daemon-reload
sudo systemctl enable financial-crew.service
sudo systemctl start financial-crew.service

To monitor operations in real-time, administrators can audit the live logs using the journalctl utility: journalctl -u financial-crew.service -f.

SEO and Security Best Practices for VPS Deployment

Deploying automated AI infrastructure on a VPS requires careful attention to resource management and data handling. Consider the following architectural optimizations:

  • Resource Allocation: Running local LLMs is heavily CPU and RAM intensive. Ensure your VPS has at least 16GB of RAM and multiple CPU cores, or opt for a GPU-enabled VPS to drastically reduce token generation latency.
  • Data Exfiltration Prevention: Because Ollama processes data entirely within your local VPS loopback network (127.0.0.1), corporate financial intelligence remains strictly confidential and secure from external exposure.
  • Structured Output Storage: Configure the Chief Editor agent to write its final output to structured markdown files or direct them to an internal database or secure webhook (e.g., Slack or Microsoft Teams) for immediate distribution.

Conclusion

By combining CrewAI's robust agent orchestration with Ollama's efficient, local inference engine, you create an autonomous, private, and highly scalable financial intelligence pipeline. Operating silently in the background of a VPS, this digital workforce systematically filters out market noise, allowing financial professionals to focus exclusively on execution and strategic decision-making. As open-source models continue to mature, the capabilities of this self-hosted AI architecture will only expand, offering an increasingly profound competitive advantage.

Building an Automated Financial News Aggregator and Analyzer Using CrewAI and Ollama on a VPS | DPTCloud