# shyam-26/instagram-content-generator-agent architecture

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

- Interactive diagram: https://gitdiagram.com/shyam-26/instagram-content-generator-agent
- Repository: https://github.com/shyam-26/instagram-content-generator-agent

## Overview

This is a single-file terminal agent that turns a personal or business topic, account type, tone, and optional website into an Instagram content package. The documented workflow is interactive or command-line input, optional website grounding, Gemini-assisted strategy and package generation, terminal presentation, and optional Markdown saving. The source excerpts show the Gemini request and rendering logic, but omit parts of the orchestration and save flow; those links are included only where the README documents them.

Main entry points: [`main.py`](https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py) (Terminal workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input and grounding"]
  node_cli["Terminal workflow<br/>[main.py]"]
  node_scraper["Website scraper<br/>[main.py]"]
end

subgraph group_generation["Content generation"]
  node_strategy["Post strategy<br/>[main.py]"]
  node_package["Post package<br/>[main.py]"]
end

subgraph group_delivery["Package delivery"]
  node_renderer["Terminal renderer<br/>[main.py]"]
  node_markdown["Markdown output<br/>[main.py]"]
end

node_user(("Content creator"))
node_website["Product website"]
node_gemini["Gemini API"]

node_user -->|"provides inputs"| node_cli
node_cli -->|"optionally scrapes"| node_scraper
node_scraper -->|"fetches content"| node_website
node_strategy -->|"requests strategy"| node_gemini
node_cli -.->|"generates content"| node_gemini
node_cli -->|"presents package"| node_renderer
node_cli -->|"optionally saves"| node_markdown
node_renderer -->|"renders fields"| node_package

click node_cli "https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py"
click node_scraper "https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py"
click node_strategy "https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py"
click node_package "https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py"
click node_renderer "https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py"
click node_markdown "https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.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_scraper toneBlue
class node_strategy,node_package toneAmber
class node_renderer,node_markdown,node_gemini toneMint
class node_user,node_website toneIndigo
```

## Components

### Input and grounding

- [Terminal workflow](https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py): `main.py`
- [Website scraper](https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py): `main.py`

### Content generation

- [Post strategy](https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py): `main.py`
- [Post package](https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py): `main.py`

### Package delivery

- [Terminal renderer](https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py): `main.py`
- [Markdown output](https://github.com/shyam-26/instagram-content-generator-agent/blob/main/main.py): `main.py`

### Other components

- **Content creator**
- **Product website**
- **Gemini API**

## Connections

- Content creator → Terminal workflow: provides inputs (evidence: `README.md`)
- Terminal workflow → Website scraper: optionally scrapes (evidence: `README.md`)
- Website scraper → Product website: fetches content (evidence: `main.py`)
- Post strategy → Gemini API: requests strategy (evidence: `main.py`)
- Terminal workflow → Gemini API: generates content
- Terminal workflow → Terminal renderer: presents package (evidence: `README.md`)
- Terminal workflow → Markdown output: optionally saves (evidence: `README.md`)
- Terminal renderer → Post package: renders fields (evidence: `main.py`)
