In this post, we'll traverse the architecture of BriefNow, a real-time intelligence agent that scouts the web for the latest news on any topic and synthesizes it into an executive brief using local LLMs.
The Problem
Executives and analysts spend hours manually searching, reading, and summarizing news. We wanted to automate this pipeline:
- Search global news sources.
- Scrape full article content (bypassing noise).
- Synthesize a concise, decision-first brief.
The Solution: Agentic Architecture
We built a lightweight, modular system using Node.js, Bright Data's MCP (Model Context Protocol), and Ollama.
Tech Stack
- Frontend: Vanilla JS + HTML5 (Clean, minimal UI)
- Backend: Node.js + Express
- Search & Scraping: Bright Data MCP Server
- Intelligence: Ollama (Llama 3.2 locally)
- Communication: Server-Sent Events (SSE) for real-time feedback
detailed Architecture
1. The MCP Integration (Bright Data)
Instead of building custom scrapers, we used the Model Context Protocol (MCP). This allowed our Node.js server to "talk" to Bright Data tools natively.
mcpClient.js:
// We initialize a client that connects to the Bright Data MCP server
transport = new StdioClientTransport({
command: "npx",
args: ["-y", "@brightdata/mcp"],
env: { API_TOKEN: process.env.BRIGHT_DATA_API_TOKEN }
});
// We can then call tools like functions
const result = await client.callTool({
name: "search_engine",
arguments: { query }
});
This abstraction saves roughly 40% of the codebase typically dedicated to scraper maintenance.
2. The Intelligence Layer (Ollama)
Once we have the raw text from Bright Data, we need to make sense of it. We pipe the scraped markdown into Ollama running Llama 3.
summarizeService.js: We use a structured prompt to enforce a strict executive format (Risks, Opportunities, Strategic Impact).
const PROMPT_TEMPLATE = \`
STRICT OUTPUT FORMAT (Markdown):
### EXECUTIVE BRIEF
(One paragraph summary)
...
\`;
By keeping the temperature low (0.2), we ensure the model acts as an analyst, not a creative writer.
3. Real-Time Streaming (SSE)
We used Server-Sent Events to stream the agent's "thought process" found to the UI.
- "Searching global news..."
- "Found 10 articles."
- "Scraping content..."
- "Generating Brief..."
This keeps the user engaged during the 20-30 second process.
How to Run It
- Clone the Repo:
git clone harishkotra/briefnow - Install Dependencies:
npm install - Set Environment:
-
BRIGHT_DATA_API_TOKEN=... -
OLLAMA_BASE_URL=http://localhost:11434
-
- Run:
npm start
By combining purpose-built tools - Bright Data for retrieval and Ollama for synthesis, we built a powerful market intelligence tool in under 200 lines of core logic. This defines the next generation of "Agentic" software: small, modular, and highly effective.
Here's the Github Repo: https://github.com/harishkotra/briefnow/
Top comments (0)