lo6

Agentic Interface Specification

Overview

This document defines the LangGraph architecture for lo6. We utilize a stateful graph approach where agents (Nodes) modify a shared state object.

Shared Graph State

The NewsroomState interface defines the data passed between agents.

interface NewsroomState {
  // Messages for chat history
  messages: BaseMessage[];
  // The core entities (Optional as they populate over time)
  lead?: Lead;
  story?: Story;
  research?: ResearchDossier;
  assets?: Asset[];
  // Workflow control
  next_agent: string;
  human_feedback?: string;
  errors?: string[];
  // Status flags
  lead_status?: 'NEW' | 'APPROVED' | 'REJECTED' | 'MONITOR';
}

Workflows (Sub-Graphs)

1. Triage Workflow

Goal: Ingest raw data and filter for relevance.

2. Editorial Workflow

Goal: Turn an approved Lead into a Draft Story.

3. Publishing Workflow

Goal: Distribute approved content.

Agent Tools Definition

Agent Tools Available Description
Config Agent calculate_relevance(text, interests) Local NLP scoring function.
Research Agent tavily_search(query)
scrape_webpage(url)
Web browsing capabilities.
Journalist Agent read_research_dossier()
check_style_guide()
Context retrieval tools.
Image Gen Agent dalle_3(prompt)
stable_diffusion(prompt)
Image generation APIs.
Publisher Agent twitter_api_post()
wordpress_api_post()
External publishing tools.

System Prompts Strategy