# ayushtiwari134/linkedin_agent architecture

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

- Interactive diagram: https://gitdiagram.com/ayushtiwari134/linkedin_agent
- Repository: https://github.com/ayushtiwari134/linkedin_agent

## Overview

This is a small CrewAI application that generates a LinkedIn post through research, drafting, and humanization. The run is configured and started in `crew.py`; task definitions assign each stage to an agent, and the final task writes `linkedin_post.txt`. Agent definitions configure a shared local ChatOpenAI endpoint. The workflow is supported by the sampled source; the README describes the same stages. `tools.py` is empty, so it is not represented.

Main entry points: [`crew.py`](https://github.com/ayushtiwari134/linkedin_agent/blob/main/crew.py) (Sequential Crew), [`tasks.py`](https://github.com/ayushtiwari134/linkedin_agent/blob/main/tasks.py) (Humanizing Task), [`agents.py`](https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py) (Chat Model), [`linkedin_post.txt`](https://github.com/ayushtiwari134/linkedin_agent/blob/main/linkedin_post.txt) (Generated Post)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_runner["Crew Runner<br/>[crew.py]"]
  node_crew_engine["Sequential Crew<br/>[crew.py]"]
end

subgraph group_content_workflow["Content Workflow"]
  node_research_task["Research Task<br/>[tasks.py]"]
  node_research_agent["Research Agent<br/>[agents.py]"]
  node_writing_task["Writing Task<br/>[tasks.py]"]
  node_writer_agent["Post Writer<br/>[agents.py]"]
  node_humanizing_task["Humanizing Task<br/>[tasks.py]"]
  node_humanizer_agent["Humanizer Agent<br/>[agents.py]"]
end

subgraph group_model_runtime["Model Runtime"]
  node_chat_model["Chat Model<br/>[agents.py]"]
end

node_post_file["Generated Post<br/>[linkedin_post.txt]"]
node_console(("Console"))

node_runner -->|"starts"| node_crew_engine
node_crew_engine -->|"runs first"| node_research_task
node_crew_engine -->|"runs next"| node_writing_task
node_crew_engine -->|"runs last"| node_humanizing_task
node_research_task -->|"assigned to"| node_research_agent
node_writing_task -->|"assigned to"| node_writer_agent
node_humanizing_task -->|"assigned to"| node_humanizer_agent
node_research_agent -->|"uses"| node_chat_model
node_writer_agent -->|"uses"| node_chat_model
node_humanizer_agent -->|"uses"| node_chat_model
node_humanizing_task -->|"writes output"| node_post_file
node_runner -->|"prints result"| node_console

click node_runner "https://github.com/ayushtiwari134/linkedin_agent/blob/main/crew.py"
click node_crew_engine "https://github.com/ayushtiwari134/linkedin_agent/blob/main/crew.py"
click node_research_task "https://github.com/ayushtiwari134/linkedin_agent/blob/main/tasks.py"
click node_research_agent "https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py"
click node_writing_task "https://github.com/ayushtiwari134/linkedin_agent/blob/main/tasks.py"
click node_writer_agent "https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py"
click node_humanizing_task "https://github.com/ayushtiwari134/linkedin_agent/blob/main/tasks.py"
click node_humanizer_agent "https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py"
click node_chat_model "https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py"
click node_post_file "https://github.com/ayushtiwari134/linkedin_agent/blob/main/linkedin_post.txt"

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_runner,node_crew_engine toneBlue
class node_research_task,node_research_agent,node_writing_task,node_writer_agent,node_humanizing_task,node_humanizer_agent toneAmber
class node_chat_model toneMint
class node_post_file toneTeal
class node_console toneIndigo
```

## Components

### Orchestration

- [Crew Runner](https://github.com/ayushtiwari134/linkedin_agent/blob/main/crew.py): `crew.py`
- [Sequential Crew](https://github.com/ayushtiwari134/linkedin_agent/blob/main/crew.py): `crew.py`

### Content Workflow

- [Research Task](https://github.com/ayushtiwari134/linkedin_agent/blob/main/tasks.py): `tasks.py`
- [Research Agent](https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py): `agents.py`
- [Writing Task](https://github.com/ayushtiwari134/linkedin_agent/blob/main/tasks.py): `tasks.py`
- [Post Writer](https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py): `agents.py`
- [Humanizing Task](https://github.com/ayushtiwari134/linkedin_agent/blob/main/tasks.py): `tasks.py`
- [Humanizer Agent](https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py): `agents.py`

### Model Runtime

- [Chat Model](https://github.com/ayushtiwari134/linkedin_agent/blob/main/agents.py): `agents.py`

### Other components

- [Generated Post](https://github.com/ayushtiwari134/linkedin_agent/blob/main/linkedin_post.txt): `linkedin_post.txt`
- **Console**

## Connections

- Crew Runner → Sequential Crew: starts
- Sequential Crew → Research Task: runs first
- Sequential Crew → Writing Task: runs next
- Sequential Crew → Humanizing Task: runs last
- Research Task → Research Agent: assigned to
- Writing Task → Post Writer: assigned to
- Humanizing Task → Humanizer Agent: assigned to
- Research Agent → Chat Model: uses
- Post Writer → Chat Model: uses
- Humanizer Agent → Chat Model: uses
- Humanizing Task → Generated Post: writes output
- Crew Runner → Console: prints result
