# yashraorane25/content_pipeline_multi_agent architecture

> Architecture diagram of the GitHub repository yashraorane25/content_pipeline_multi_agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashraorane25/content_pipeline_multi_agent
- Repository: https://github.com/yashraorane25/content_pipeline_multi_agent

## Overview

This repository generates LinkedIn content through a stateful multi-agent revision workflow, then compares it with a single-prompt baseline using blind judging and telemetry. The graph and README establish the workflow and benchmark stages; sampled agent code shows model calls, research search, and telemetry recording. Some orchestration and evaluation details are documented rather than shown in full source excerpts, so those links cite the README where appropriate.

Main entry points: [`src/graph.py`](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/graph.py) (Revision Workflow), [`src/tracker.py`](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/tracker.py) (Telemetry Tracker), [`main.py`](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/main.py) (CLI Orchestrator), [`src/agents/researcher.py`](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/researcher.py) (Researcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline Orchestration"]
  node_cli["CLI Orchestrator<br/>[main.py]"]
  node_workflow["Revision Workflow<br/>[graph.py]"]
  node_finalize["Finalize Post<br/>[graph.py]"]
end

subgraph group_agents["Content Agents"]
  node_ideator["Ideator<br/>[ideator.py]"]
  node_researcher["Researcher<br/>[researcher.py]"]
  node_writer["Writer<br/>[writer.py]"]
  node_fact_checker["Fact Checker<br/>[fact_checker.py]"]
  node_editor["Editor<br/>[editor.py]"]
end

subgraph group_benchmark["Benchmarking"]
  node_baseline["Single-Prompt Baseline<br/>[baseline.py]"]
  node_judge_report["Blind Judge &amp; Report<br/>[evaluate.py]"]
end

subgraph group_runtime["Shared Runtime"]
  node_state["Pipeline State<br/>[state.py]"]
  node_tracker["Telemetry Tracker<br/>[tracker.py]"]
  node_config["Model Configuration<br/>[config.py]"]
end

node_topic_author(("Topic Author"))
node_gemini["Google Gemini"]
node_duckduckgo["DuckDuckGo Search"]

node_topic_author -->|"provides topic"| node_cli
node_cli -->|"streams workflow"| node_workflow
node_cli -->|"runs concurrently"| node_baseline
node_cli -->|"compares outputs"| node_judge_report
node_workflow -->|"starts at"| node_ideator
node_workflow -->|"routes next"| node_researcher
node_workflow -->|"routes next"| node_writer
node_workflow -->|"routes next"| node_fact_checker
node_workflow -->|"routes next"| node_editor
node_workflow -->|"routes when ready"| node_finalize
node_workflow -->|"revises when needed"| node_writer
node_researcher -->|"searches web"| node_duckduckgo
node_ideator -->|"generates angles"| node_gemini
node_researcher -->|"synthesizes findings"| node_gemini
node_writer -->|"drafts revisions"| node_gemini
node_fact_checker -->|"audits claims"| node_gemini
node_editor -->|"scores draft"| node_gemini
node_baseline -->|"generates post"| node_gemini
node_ideator -->|"records usage"| node_tracker
node_researcher -->|"records usage"| node_tracker
node_writer -->|"records usage"| node_tracker
node_fact_checker -->|"records usage"| node_tracker
node_editor -->|"records usage"| node_tracker
node_baseline -->|"records usage"| node_tracker
node_tracker -->|"reads pricing"| node_config
node_judge_report -->|"judges drafts"| node_gemini
node_judge_report -->|"compares telemetry"| node_tracker
node_workflow -->|"uses shared schema"| node_state
node_cli -->|"renders telemetry"| node_tracker

click node_cli "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/main.py"
click node_workflow "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/graph.py"
click node_state "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/state.py"
click node_ideator "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/ideator.py"
click node_researcher "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/researcher.py"
click node_writer "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/writer.py"
click node_fact_checker "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/fact_checker.py"
click node_editor "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/editor.py"
click node_finalize "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/graph.py"
click node_baseline "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/baseline.py"
click node_judge_report "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/evaluate.py"
click node_tracker "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/tracker.py"
click node_config "https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/config.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_workflow,node_finalize toneBlue
class node_ideator,node_researcher,node_writer,node_fact_checker,node_editor toneAmber
class node_baseline,node_judge_report toneMint
class node_state,node_tracker,node_config toneRose
class node_topic_author,node_gemini,node_duckduckgo toneIndigo
```

## Components

### Pipeline Orchestration

- [CLI Orchestrator](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/main.py): `main.py`
- [Revision Workflow](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/graph.py): `src/graph.py`
- [Finalize Post](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/graph.py): `src/graph.py`

### Content Agents

- [Ideator](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/ideator.py): `src/agents/ideator.py`
- [Researcher](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/researcher.py): `src/agents/researcher.py`
- [Writer](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/writer.py): `src/agents/writer.py`
- [Fact Checker](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/fact_checker.py): `src/agents/fact_checker.py`
- [Editor](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/agents/editor.py): `src/agents/editor.py`

### Benchmarking

- [Single-Prompt Baseline](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/baseline.py): `src/baseline.py`
- [Blind Judge & Report](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/evaluate.py): `src/evaluate.py`

### Shared Runtime

- [Pipeline State](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/state.py): `src/state.py`
- [Telemetry Tracker](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/tracker.py): `src/tracker.py`
- [Model Configuration](https://github.com/yashraorane25/content_pipeline_multi_agent/blob/main/src/config.py): `src/config.py`

### Other components

- **Topic Author**
- **Google Gemini**
- **DuckDuckGo Search**

## Connections

- Topic Author → CLI Orchestrator: provides topic (evidence: `README.md`)
- CLI Orchestrator → Revision Workflow: streams workflow (evidence: `main.py`)
- CLI Orchestrator → Single-Prompt Baseline: runs concurrently (evidence: `README.md`)
- CLI Orchestrator → Blind Judge & Report: compares outputs (evidence: `README.md`)
- Revision Workflow → Ideator: starts at (evidence: `src/graph.py`)
- Revision Workflow → Researcher: routes next (evidence: `src/graph.py`)
- Revision Workflow → Writer: routes next (evidence: `src/graph.py`)
- Revision Workflow → Fact Checker: routes next (evidence: `src/graph.py`)
- Revision Workflow → Editor: routes next (evidence: `src/graph.py`)
- Revision Workflow → Finalize Post: routes when ready (evidence: `src/graph.py`)
- Revision Workflow → Writer: revises when needed (evidence: `src/graph.py`)
- Researcher → DuckDuckGo Search: searches web (evidence: `src/agents/researcher.py`)
- Ideator → Google Gemini: generates angles (evidence: `src/agents/ideator.py`)
- Researcher → Google Gemini: synthesizes findings (evidence: `src/agents/researcher.py`)
- Writer → Google Gemini: drafts revisions (evidence: `src/agents/writer.py`)
- Fact Checker → Google Gemini: audits claims (evidence: `src/agents/fact_checker.py`)
- Editor → Google Gemini: scores draft (evidence: `src/agents/editor.py`)
- Single-Prompt Baseline → Google Gemini: generates post (evidence: `src/baseline.py`)
- Ideator → Telemetry Tracker: records usage (evidence: `src/agents/ideator.py`)
- Researcher → Telemetry Tracker: records usage (evidence: `src/agents/researcher.py`)
- Writer → Telemetry Tracker: records usage (evidence: `src/agents/writer.py`)
- Fact Checker → Telemetry Tracker: records usage (evidence: `src/agents/fact_checker.py`)
- Editor → Telemetry Tracker: records usage (evidence: `src/agents/editor.py`)
- Single-Prompt Baseline → Telemetry Tracker: records usage (evidence: `src/baseline.py`)
- Telemetry Tracker → Model Configuration: reads pricing (evidence: `src/tracker.py`)
- Blind Judge & Report → Google Gemini: judges drafts (evidence: `README.md`)
- Blind Judge & Report → Telemetry Tracker: compares telemetry (evidence: `src/evaluate.py`)
- Revision Workflow → Pipeline State: uses shared schema (evidence: `src/graph.py`)
- CLI Orchestrator → Telemetry Tracker: renders telemetry (evidence: `main.py`)
