Skip to main content
AI agent that researches threats and generates security newsletters.

Code

Create cybersecurity-newsletter-editor.py with the code below, or save it directly from your editor.
"""Cybersecurity Newsletter Editor Agent — powered by Bindu"""

import os
from dotenv import load_dotenv
from agno.agent import Agent
from agno.models.openrouter import OpenRouter
from agno.tools.duckduckgo import DuckDuckGoTools
from bindu.penguin import bindufy

# Environment
load_dotenv(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".env"))

OPENROUTER_API_KEY: str = os.environ["OPENROUTER_API_KEY"]

# Agent
agent = Agent(
    name="Cybersecurity Newsletter Editor",
    instructions="""
    You are an expert Cybersecurity Newsletter Editor. When given a topic or request:
    1. Search the web for the latest cybersecurity news and CVEs
    2. Write a professional newsletter section in this format:

    # 🔐 Cybersecurity Newsletter — [Topic/Date]

    ## 🔥 Top Threats This Week
    - Critical active threats with actor names, sectors, and attack vectors

    ## 🛡️ CVE Spotlight
    - 2–3 high-severity CVEs: **CVE-YYYY-XXXXX** | Affected: `software` | CVSS: `score` | Status: `patched/unpatched` 

    ## 📰 News Digest
    - 3–5 short summaries: bold headline + 1–2 sentence summary + source link

    ## ✅ Recommendations
    - 3–5 actionable recommendations for security teams

    ---
    *Newsletter generated by Cybersecurity Newsletter Editor — powered by Bindu*

    Rules: Always search before writing. Return clean Markdown only.
    """,
    model=OpenRouter(id="openai/gpt-oss-120b", api_key=OPENROUTER_API_KEY),
    tools=[DuckDuckGoTools()],
    markdown=True,
)

# Bindu Configuration
config = {
    "author": "your.email@example.com",
    "name": "cybersecurity-newsletter-editor",
    "description": "AI-powered cybersecurity newsletter editor that researches threats, CVEs, and security news.",
    "deployment": {
        "url": "http://localhost:3773",
        "expose": True,
        "cors_origins": ["http://localhost:5173"],
    },
    "skills": [
        "skills/cybersecurity-newsletter-editor",
    ],
}

# Handler
def handler(messages: list[dict[str, str]]):
    return agent.run(input=messages)

# Start
bindufy(config, handler)

Skill Configuration

Create skills/cybersecurity-newsletter-editor/skill.yaml:
# Cybersecurity Newsletter Editor Skill
# Provides intelligent newsletter generation capabilities for cybersecurity topics

id: cybersecurity-newsletter-editor-v1
name: cybersecurity-newsletter-editor
version: 1.0.0
author: your.email@example.com

description: |
  Provides intelligent newsletter generation capabilities for cybersecurity topics.
  Use when users need professional cybersecurity newsletters with threat intelligence,
  CVE analysis, and security recommendations.

tags:
  - newsletter
  - cybersecurity
  - threat-intelligence
  - content-generation
  - cve-analysis

input_modes:
  - text/plain
  - application/json

output_modes:
  - text/plain
  - application/json

examples:
  - "Generate this week's cybersecurity newsletter"
  - "Create newsletter focusing on ransomware threats"
  - "Write newsletter about latest CVEs"

requirements:
  packages: []
  system: []
  min_memory_mb: 100

assessment:
  keywords:
    - newsletter
    - cybersecurity
    - threats
    - cve
    - ransomware
    - security
    - newsletter-generation

How It Works

Newsletter Structure
  • Top Threats This Week: Critical active threats with actor details
  • CVE Spotlight: High-severity vulnerabilities with CVSS scores
  • News Digest: 3-5 summarized security news items
  • Recommendations: Actionable security team guidance
Research Process
  • DuckDuckGoTools(): Searches for latest cybersecurity news
  • Web research before content generation
  • Source verification and link inclusion
Content Generation
  • Professional newsletter formatting with Markdown
  • Structured sections with emoji headers
  • CVE details in standardized format
  • Clean, publication-ready output
Agent Capabilities
  • Expert Cybersecurity Editor persona
  • Proactive threat intelligence gathering
  • Automated newsletter composition
  • Consistent formatting and style

Dependencies

uv init
uv add bindu agno python-dotenv

Environment Setup

Create .env file:
OPENROUTER_API_KEY=your_openrouter_api_key_here

Run

uv run cybersecurity-newsletter-editor.py
Examples:
  • “Generate this week’s cybersecurity newsletter focusing on ransomware threats”
  • “Create a monthly security briefing for our executive team”
  • “Summarize the latest phishing attack trends and prevention measures”

Example API Calls

{
  "jsonrpc": "2.0",
  "method": "message/send",
  "params": {
    "message": {
      "role": "user",
      "kind": "message",
      "messageId": "9f11c870-5616-49ad-b187-d93cbb100001",
      "contextId": "9f11c870-5616-49ad-b187-d93cbb100002",
      "taskId": "9f11c870-5616-49ad-b187-d93cbb100003",
      "parts": [
        {
          "kind": "text",
          "text": "Generate this week's cybersecurity newsletter focusing on ransomware threats"
        }
      ]
    },
     "skillId": "cybersecurity-newsletter-editor-v1",
    "configuration": {
      "acceptedOutputModes": ["application/json"]
    }
  },
  "id": "9f11c870-5616-49ad-b187-d93cbb100003"
}
{
  "jsonrpc": "2.0",
  "method": "tasks/get",
  "params": {
    "taskId": "9f11c870-5616-49ad-b187-d93cbb100003"
  },
  "id": "9f11c870-5616-49ad-b187-d93cbb100004"
}

Frontend Setup

# Clone the Bindu repository
git clone https://github.com/GetBindu/Bindu

# Navigate to frontend directory
cd frontend

# Install dependencies
npm install

# Start frontend development server
npm run dev
Open http://localhost:5173 and try to chat with the cybersecurity newsletter editor