# satyamshivam13/multi_agent_campaign_creator architecture

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

- Interactive diagram: https://gitdiagram.com/satyamshivam13/multi_agent_campaign_creator
- Repository: https://github.com/satyamshivam13/multi_agent_campaign_creator

## Overview

The product is a CLI that turns a product description into a research-backed marketing campaign. Its default CrewAI workflow runs research, copywriting, visual direction, and campaign synthesis before saving Markdown and JSON; LangGraph is a documented alternative runner with failure-aware stage routing. The graph also shows research tools and persistent run tracking. Some tool assignments and output details are documented but their full implementation was not sampled, so those links are marked unverified or omitted.

Main entry points: [`src/agents/research_agent.py`](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/research_agent.py) (Research agent), [`src/agents/base_agent.py`](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/base_agent.py) (LLM factory), [`src/workflow/crew_workflow.py`](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/workflow/crew_workflow.py) (CrewAI workflow), [`src/workflow/langgraph_workflow.py`](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/workflow/langgraph_workflow.py) (LangGraph runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_cli["CLI entry<br/>[main.py]"]
  node_request["Campaign models<br/>[campaign_models.py]"]
end

subgraph group_orchestration["Campaign orchestration"]
  node_crew["CrewAI workflow<br/>[crew_workflow.py]"]
  node_langgraph["LangGraph runner"]
  node_tasks["Task factory<br/>[campaign_tasks.py]"]
end

subgraph group_capabilities["Campaign capabilities"]
  node_research["Research agent<br/>[research_agent.py]"]
  node_copywriter["Copywriter agent"]
  node_art["Art director"]
  node_manager["Campaign manager<br/>[manager_agent.py]"]
  node_trend["Trend research"]
  node_competitor["Competitor analysis"]
  node_copy_eval["Copy evaluation"]
  node_image_prompt["Image prompts"]
end

subgraph group_runtime["Runtime and persistence"]
  node_config["Settings<br/>[config.py]"]
  node_llm["LLM factory<br/>[base_agent.py]"]
  node_run_store["Run tracking<br/>[run_store.py]"]
  node_sqlite[("SQLite run store")]
  node_campaign_files["Campaign files"]
end

node_user(("Campaign user"))
node_groq{{"Groq LLM"}}
node_serper{{"Serper search"}}

node_user -->|"enters request"| node_cli
node_cli -->|"builds request"| node_request
node_cli -->|"starts default runner"| node_crew
node_cli -->|"selects alternative"| node_langgraph
node_crew -->|"creates tasks"| node_tasks
node_crew -->|"runs first"| node_research
node_research -->|"passes research context"| node_copywriter
node_copywriter -->|"passes copy context"| node_art
node_art -->|"passes visual context"| node_manager
node_manager -->|"produces campaign brief"| node_campaign_files
node_langgraph -->|"runs stage"| node_research
node_langgraph -->|"routes on success"| node_copywriter
node_langgraph -->|"routes on success"| node_art
node_langgraph -->|"routes on success"| node_manager
node_research -->|"uses research tool"| node_trend
node_research -->|"uses analysis tool"| node_competitor
node_copywriter -.->|"may use tool"| node_copy_eval
node_art -.->|"may use tool"| node_image_prompt
node_research -->|"creates agent LLM"| node_llm
node_copywriter -->|"creates agent LLM"| node_llm
node_art -->|"creates agent LLM"| node_llm
node_manager -->|"creates agent LLM"| node_llm
node_llm -->|"reads settings"| node_config
node_llm -->|"calls provider"| node_groq
node_trend -->|"checks search key"| node_config
node_trend -->|"searches when configured"| node_serper
node_crew -->|"records run and artifacts"| node_run_store
node_run_store -->|"reads and writes metadata"| node_sqlite
node_crew -->|"saves Markdown and JSON"| node_campaign_files

click node_cli "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/main.py"
click node_request "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/models/campaign_models.py"
click node_crew "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/workflow/crew_workflow.py"
click node_langgraph "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/workflow/langgraph_workflow.py"
click node_tasks "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tasks/campaign_tasks.py"
click node_research "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/research_agent.py"
click node_copywriter "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/copywriter_agent.py"
click node_art "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/art_director_agent.py"
click node_manager "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/manager_agent.py"
click node_trend "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/trend_research_tool.py"
click node_competitor "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/competitor_analysis_tool.py"
click node_copy_eval "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/copy_evaluation_tool.py"
click node_image_prompt "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/image_prompt_tool.py"
click node_config "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/config.py"
click node_llm "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/base_agent.py"
click node_run_store "https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/runtime/run_store.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_request,node_user toneBlue
class node_crew,node_langgraph,node_tasks toneAmber
class node_research,node_copywriter,node_art,node_manager,node_trend,node_competitor,node_copy_eval,node_image_prompt toneMint
class node_config,node_llm,node_run_store,node_sqlite,node_campaign_files toneRose
class node_groq,node_serper toneIndigo
```

## Components

### User entry

- [CLI entry](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/main.py): `src/main.py`
- [Campaign models](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/models/campaign_models.py): `src/models/campaign_models.py`

### Campaign orchestration

- [CrewAI workflow](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/workflow/crew_workflow.py): `src/workflow/crew_workflow.py`
- [LangGraph runner](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/workflow/langgraph_workflow.py): `src/workflow/langgraph_workflow.py`
- [Task factory](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tasks/campaign_tasks.py): `src/tasks/campaign_tasks.py`

### Campaign capabilities

- [Research agent](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/research_agent.py): `src/agents/research_agent.py`
- [Copywriter agent](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/copywriter_agent.py): `src/agents/copywriter_agent.py`
- [Art director](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/art_director_agent.py): `src/agents/art_director_agent.py`
- [Campaign manager](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/manager_agent.py): `src/agents/manager_agent.py`
- [Trend research](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/trend_research_tool.py): `src/tools/trend_research_tool.py`
- [Competitor analysis](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/competitor_analysis_tool.py): `src/tools/competitor_analysis_tool.py`
- [Copy evaluation](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/copy_evaluation_tool.py): `src/tools/copy_evaluation_tool.py`
- [Image prompts](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/tools/image_prompt_tool.py): `src/tools/image_prompt_tool.py`

### Runtime and persistence

- [Settings](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/config.py): `src/config.py`
- [LLM factory](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/agents/base_agent.py): `src/agents/base_agent.py`
- [Run tracking](https://github.com/satyamshivam13/multi_agent_campaign_creator/blob/main/src/runtime/run_store.py): `src/runtime/run_store.py`
- **SQLite run store**
- **Campaign files**

### Other components

- **Campaign user**
- **Groq LLM**
- **Serper search**

## Connections

- Campaign user → CLI entry: enters request (evidence: `README.md`)
- CLI entry → Campaign models: builds request (evidence: `src/main.py`)
- CLI entry → CrewAI workflow: starts default runner (evidence: `src/main.py`)
- CLI entry → LangGraph runner: selects alternative (evidence: `src/main.py`)
- CrewAI workflow → Task factory: creates tasks (evidence: `src/workflow/crew_workflow.py`)
- CrewAI workflow → Research agent: runs first (evidence: `README.md`)
- Research agent → Copywriter agent: passes research context (evidence: `README.md`)
- Copywriter agent → Art director: passes copy context (evidence: `README.md`)
- Art director → Campaign manager: passes visual context (evidence: `README.md`)
- Campaign manager → Campaign files: produces campaign brief (evidence: `README.md`)
- LangGraph runner → Research agent: runs stage (evidence: `src/workflow/langgraph_workflow.py`)
- LangGraph runner → Copywriter agent: routes on success (evidence: `src/workflow/langgraph_workflow.py`)
- LangGraph runner → Art director: routes on success (evidence: `src/workflow/langgraph_workflow.py`)
- LangGraph runner → Campaign manager: routes on success (evidence: `src/workflow/langgraph_workflow.py`)
- Research agent → Trend research: uses research tool (evidence: `src/agents/research_agent.py`)
- Research agent → Competitor analysis: uses analysis tool (evidence: `src/agents/research_agent.py`)
- Copywriter agent → Copy evaluation: may use tool
- Art director → Image prompts: may use tool
- Research agent → LLM factory: creates agent LLM (evidence: `src/agents/research_agent.py`)
- Copywriter agent → LLM factory: creates agent LLM (evidence: `src/agents/copywriter_agent.py`)
- Art director → LLM factory: creates agent LLM (evidence: `src/agents/art_director_agent.py`)
- Campaign manager → LLM factory: creates agent LLM (evidence: `src/agents/manager_agent.py`)
- LLM factory → Settings: reads settings (evidence: `src/agents/base_agent.py`)
- LLM factory → Groq LLM: calls provider (evidence: `README.md`)
- Trend research → Settings: checks search key (evidence: `src/tools/trend_research_tool.py`)
- Trend research → Serper search: searches when configured (evidence: `src/tools/trend_research_tool.py`)
- CrewAI workflow → Run tracking: records run and artifacts (evidence: `src/workflow/crew_workflow.py`)
- Run tracking → SQLite run store: reads and writes metadata (evidence: `src/runtime/run_store.py`)
- CrewAI workflow → Campaign files: saves Markdown and JSON (evidence: `README.md`)
