This document defines the LangGraph architecture for lo6. We utilize a stateful graph approach where agents (Nodes) modify a shared state object.
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';
}
Goal: Ingest raw data and filter for relevance.
TriageManager: Orchestrator. Spawns specialized tools based on source type.RSSFetcher: Parses RSS feeds.APIConnector: Connects to external APIs.WebCrawler: Scrapes and crawls websites.SignalReceiver: Listens for verified leads from the lo6 Network.SignalReceiver: Listens for verified leads from the lo6 Network.ConfigAgent: Filters items based on “Interests”. Scores relevance (0-100).HumanTriage: Interrupt Node. Waits for user to Approve/Reject/Note.TriageManager -> RSSFetcher / APIConnector / WebCrawler / SignalReceiverRSSFetcher / APIConnector / WebCrawler / SignalReceiver -> ConfigAgentConfigAgent -> (Score > 50?) -> HumanTriageConfigAgent -> (Score <= 50?) -> ENDGoal: Turn an approved Lead into a Draft Story.
EditorialAgent: Orchestrator. Decides if research is needed.ResearchAgent: Uses tools to gather facts.JournalistAgent: Writes the markdown content.ImageGenAgent: Generates assets based on story content.HumanEditor: Interrupt Node. Review draft.EditorialAgent -> ResearchAgentResearchAgent -> JournalistAgentJournalistAgent -> ImageGenAgentImageGenAgent -> HumanEditorGoal: Distribute approved content.
PublisherAgent: Formats content for specific platforms (Twitter thread vs Blog post).HumanPublisher: Interrupt Node. Final “Go” button.Distributor: API calls to external platforms.| 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. |