# ivancontreras-m/asistente architecture

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

- Interactive diagram: https://gitdiagram.com/ivancontreras-m/asistente
- Repository: https://github.com/ivancontreras-m/asistente

## Overview

Avril Lab’s prototype accepts marketing briefings through a CLI or REST API, researches the web, generates campaign copy, checks claims, and saves materials and an execution report for human review; it does not publish automatically. The README documents the four-stage workflow and optional search providers. The sampled implementation is one file, so the stages are conceptual responsibilities within `agente.py`, not separately verified modules; unsampled API and chat wiring is not expanded.

Main entry points: [`agente.py`](https://github.com/ivancontreras-m/asistente/blob/main/agente.py) (Briefing runner), [`output_marketing`](https://github.com/ivancontreras-m/asistente/tree/main/output_marketing) (Markdown and JSON files)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["Briefing CLI<br/>[agente.py]"]
  node_rest["REST API<br/>[agente.py]"]
  node_chat["Interactive chat<br/>[agente.py]"]
end

subgraph group_workflow["Campaign workflow"]
  node_pipeline["Briefing runner<br/>[agente.py]"]
  node_research["Web research<br/>[agente.py]"]
  node_generation["Copy generation<br/>[agente.py]"]
  node_factcheck["Claim verification<br/>[agente.py]"]
  node_preparation["Material preparation<br/>[agente.py]"]
end

subgraph group_integrations["External services"]
  node_llm{{"NVIDIA LLM"}}
  node_search{{"Brave / DuckDuckGo"}}
end

subgraph group_outputs["Review materials"]
  node_artifacts["Markdown and JSON files"]
end

node_user(("Marketing user"))
node_reviewer(("Human reviewer"))

node_user -->|"submits briefing"| node_cli
node_user -->|"posts briefing"| node_rest
node_user -->|"requests content"| node_chat
node_cli -->|"runs briefing"| node_pipeline
node_rest -.->|"submits briefing"| node_pipeline
node_chat -.->|"requests generation"| node_pipeline
node_pipeline -->|"starts research"| node_research
node_research -->|"searches web"| node_search
node_pipeline -->|"generates copy"| node_generation
node_generation -.->|"requests completion"| node_llm
node_pipeline -->|"checks claims"| node_factcheck
node_factcheck -.->|"requests verification"| node_llm
node_pipeline -->|"prepares materials"| node_preparation
node_preparation -->|"writes files"| node_artifacts
node_artifacts -->|"awaits approval"| node_reviewer

click node_cli "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_rest "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_chat "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_pipeline "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_research "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_generation "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_factcheck "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_preparation "https://github.com/ivancontreras-m/asistente/blob/main/agente.py"
click node_artifacts "https://github.com/ivancontreras-m/asistente/tree/main/output_marketing"

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_rest,node_chat,node_user,node_reviewer toneBlue
class node_pipeline,node_research,node_generation,node_factcheck,node_preparation toneAmber
class node_llm,node_search toneMint
class node_artifacts toneRose
```

## Components

### User interfaces

- [Briefing CLI](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`
- [REST API](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`
- [Interactive chat](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`

### Campaign workflow

- [Briefing runner](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`
- [Web research](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`
- [Copy generation](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`
- [Claim verification](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`
- [Material preparation](https://github.com/ivancontreras-m/asistente/blob/main/agente.py): `agente.py`

### External services

- **NVIDIA LLM**
- **Brave / DuckDuckGo**

### Review materials

- [Markdown and JSON files](https://github.com/ivancontreras-m/asistente/tree/main/output_marketing): `output_marketing`

### Other components

- **Marketing user**
- **Human reviewer**

## Connections

- Marketing user → Briefing CLI: submits briefing (evidence: `README.md`)
- Marketing user → REST API: posts briefing (evidence: `README.md`)
- Marketing user → Interactive chat: requests content (evidence: `README.md`)
- Briefing CLI → Briefing runner: runs briefing (evidence: `README.md`)
- REST API → Briefing runner: submits briefing (evidence: `agente.py`)
- Interactive chat → Briefing runner: requests generation (evidence: `agente.py`)
- Briefing runner → Web research: starts research (evidence: `README.md`)
- Web research → Brave / DuckDuckGo: searches web (evidence: `agente.py`)
- Briefing runner → Copy generation: generates copy (evidence: `README.md`)
- Copy generation → NVIDIA LLM: requests completion (evidence: `README.md`)
- Briefing runner → Claim verification: checks claims (evidence: `README.md`)
- Claim verification → NVIDIA LLM: requests verification (evidence: `README.md`)
- Briefing runner → Material preparation: prepares materials (evidence: `README.md`)
- Material preparation → Markdown and JSON files: writes files (evidence: `README.md`)
- Markdown and JSON files → Human reviewer: awaits approval (evidence: `README.md`)
