Bulletin generation #2

Open
opened 2026-06-03 16:52:18 +00:00 by iannuzzelli · 2 comments
iannuzzelli commented 2026-06-03 16:52:18 +00:00 (Migrated from gitlab.com)

The assistant generates a branded PDF bulletin on a given topic or time period, pulling
content from RAG, MCP tools (Guardian, SIPRI, NAVCO, etc.), and synthesising it into a
structured document the user can download or publish.

Structure

A bulletin has a fixed template with named sections, e.g.:

  • Header (title, date, PeaceLink logo)
  • Editoriale (short intro generated by the agent)
  • One or more thematic sections (each maps to an intent / data source)
  • Fonti (auto-generated list of sources used)
  • Footer (contacts, licence)

Sections and their data sources are defined in the template, not hardcoded in the agent.

How the agent uses it

  1. User requests a bulletin: "genera il bollettino settimanale sulla pace" or similar
  2. A BOLLETTINO intent triggers a dedicated research profile that loads all relevant
    MCP servers and RAG sources
  3. The agent populates each section by querying sources in sequence, then calls a
    render_bulletin tool with the structured content
  4. The tool renders HTML template → PDF (WeasyPrint) and returns a download URL
  5. The assistant replies with a summary and the download link

Template management

  • Templates stored as HTML/CSS files (or in DB), selectable by name
  • Branded with PeaceLink styles
  • Managed via the Streamlit admin UI (same pattern as intents)

Rendering

  • HTML/CSS → PDF via WeasyPrint
  • Templates use Jinja2 for section injection
  • Images (charts from Superset?) can be embedded as base64 or fetched URLs
The assistant generates a branded PDF bulletin on a given topic or time period, pulling content from RAG, MCP tools (Guardian, SIPRI, NAVCO, etc.), and synthesising it into a structured document the user can download or publish. ### Structure A bulletin has a fixed template with named sections, e.g.: - Header (title, date, PeaceLink logo) - Editoriale (short intro generated by the agent) - One or more thematic sections (each maps to an intent / data source) - Fonti (auto-generated list of sources used) - Footer (contacts, licence) Sections and their data sources are defined in the template, not hardcoded in the agent. ### How the agent uses it 1. User requests a bulletin: "genera il bollettino settimanale sulla pace" or similar 2. A `BOLLETTINO` intent triggers a dedicated research profile that loads all relevant MCP servers and RAG sources 3. The agent populates each section by querying sources in sequence, then calls a `render_bulletin` tool with the structured content 4. The tool renders HTML template → PDF (WeasyPrint) and returns a download URL 5. The assistant replies with a summary and the download link ### Template management - Templates stored as HTML/CSS files (or in DB), selectable by name - Branded with PeaceLink styles - Managed via the Streamlit admin UI (same pattern as intents) ### Rendering - HTML/CSS → PDF via WeasyPrint - Templates use Jinja2 for section injection - Images (charts from Superset?) can be embedded as base64 or fetched URLs
iannuzzelli commented 2026-06-03 16:52:51 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
iannuzzelli commented 2026-06-04 07:45:00 +00:00 (Migrated from gitlab.com)

assigned to @iannuzzelli

assigned to @iannuzzelli
francesco added this to the (deleted) project 2026-08-05 15:10:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
peacelink/ai-assistant#2
No description provided.