# matrix2211/ai-task-breakdown architecture

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

- Interactive diagram: https://gitdiagram.com/matrix2211/ai-task-breakdown
- Repository: https://github.com/matrix2211/ai-task-breakdown

## Overview

AI Task Breakdown Agent accepts a goal in a browser, sends it to a FastAPI endpoint, and uses CrewAI agents to produce a structured plan and tool recommendations with a review stage. The frontend renders the result as an interactive checklist, tracks completion progress, and switches between plan and tools tabs. The source excerpts show the backend orchestration and frontend behavior; the README documents local Ollama use and UI capabilities. Styling and HTML structure are represented, but their implementation details were not sampled.

Main entry points: [`static/script.js`](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js) (Plan and tools UI), [`main.py`](https://github.com/matrix2211/ai-task-breakdown/blob/main/main.py) (FastAPI endpoint), [`tasks.py`](https://github.com/matrix2211/ai-task-breakdown/blob/main/tasks.py) (Task definitions), [`static/index.html`](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/index.html) (Web page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser interface"]
  node_page["Web page<br/>[index.html]"]
  node_styles["Interface styles<br/>[style.css]"]
  node_plan_ui["Plan and tools UI<br/>[script.js]"]
  node_checklist["Checklist state<br/>[script.js]"]
  node_progress["Progress display<br/>[script.js]"]
  node_tabs["Tabbed views<br/>[script.js]"]
end

subgraph group_backend["API and orchestration"]
  node_api["FastAPI endpoint<br/>[main.py]"]
  node_crew["CrewAI runtime"]
end

subgraph group_planning["Planning agents"]
  node_task_factory["Task definitions<br/>[tasks.py]"]
  node_planner["Step planner<br/>[agents.py]"]
  node_advisor["Tool advisor<br/>[agents.py]"]
  node_reviewer["Plan reviewer<br/>[agents.py]"]
end

subgraph group_model["Language model"]
  node_ollama["Local Ollama"]
end

node_user(("Goal setter"))
node_browser(("Browser"))

node_user -->|"enters goal"| node_page
node_browser -->|"requests page"| node_api
node_api -->|"serves page"| node_page
node_page -.->|"uses styles"| node_styles
node_page -.->|"loads script"| node_plan_ui
node_plan_ui -->|"posts goal"| node_api
node_api -->|"creates tasks"| node_task_factory
node_task_factory -->|"assigns agent"| node_planner
node_task_factory -->|"assigns agent"| node_advisor
node_task_factory -->|"assigns agent"| node_reviewer
node_api -->|"runs kickoff"| node_crew
node_crew -->|"dispatches tasks"| node_planner
node_crew -->|"dispatches tasks"| node_advisor
node_crew -->|"dispatches tasks"| node_reviewer
node_planner -->|"uses model"| node_ollama
node_advisor -->|"uses model"| node_ollama
node_reviewer -->|"uses model"| node_ollama
node_api -->|"returns result"| node_plan_ui
node_plan_ui -->|"renders steps"| node_checklist
node_plan_ui -->|"updates progress"| node_progress
node_plan_ui -->|"switches views"| node_tabs
node_user -->|"marks complete"| node_checklist

click node_page "https://github.com/matrix2211/ai-task-breakdown/blob/main/static/index.html"
click node_styles "https://github.com/matrix2211/ai-task-breakdown/blob/main/static/style.css"
click node_plan_ui "https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js"
click node_checklist "https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js"
click node_progress "https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js"
click node_tabs "https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js"
click node_api "https://github.com/matrix2211/ai-task-breakdown/blob/main/main.py"
click node_task_factory "https://github.com/matrix2211/ai-task-breakdown/blob/main/tasks.py"
click node_planner "https://github.com/matrix2211/ai-task-breakdown/blob/main/agents.py"
click node_advisor "https://github.com/matrix2211/ai-task-breakdown/blob/main/agents.py"
click node_reviewer "https://github.com/matrix2211/ai-task-breakdown/blob/main/agents.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_page,node_styles,node_plan_ui,node_checklist,node_progress,node_tabs,node_browser toneBlue
class node_api,node_crew toneAmber
class node_task_factory,node_planner,node_advisor,node_reviewer toneMint
class node_ollama toneRose
class node_user toneIndigo
```

## Components

### Browser interface

- [Web page](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/index.html): `static/index.html`
- [Interface styles](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/style.css): `static/style.css`
- [Plan and tools UI](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js): `static/script.js`
- [Checklist state](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js): `static/script.js`
- [Progress display](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js): `static/script.js`
- [Tabbed views](https://github.com/matrix2211/ai-task-breakdown/blob/main/static/script.js): `static/script.js`

### API and orchestration

- [FastAPI endpoint](https://github.com/matrix2211/ai-task-breakdown/blob/main/main.py): `main.py`
- **CrewAI runtime**

### Planning agents

- [Task definitions](https://github.com/matrix2211/ai-task-breakdown/blob/main/tasks.py): `tasks.py`
- [Step planner](https://github.com/matrix2211/ai-task-breakdown/blob/main/agents.py): `agents.py`
- [Tool advisor](https://github.com/matrix2211/ai-task-breakdown/blob/main/agents.py): `agents.py`
- [Plan reviewer](https://github.com/matrix2211/ai-task-breakdown/blob/main/agents.py): `agents.py`

### Language model

- **Local Ollama**

### Other components

- **Goal setter**
- **Browser**

## Connections

- Goal setter → Web page: enters goal (evidence: `README.md`)
- Browser → FastAPI endpoint: requests page (evidence: `main.py`)
- FastAPI endpoint → Web page: serves page (evidence: `main.py`)
- Web page → Interface styles: uses styles
- Web page → Plan and tools UI: loads script
- Plan and tools UI → FastAPI endpoint: posts goal (evidence: `static/script.js`)
- FastAPI endpoint → Task definitions: creates tasks (evidence: `main.py`)
- Task definitions → Step planner: assigns agent (evidence: `tasks.py`)
- Task definitions → Tool advisor: assigns agent (evidence: `tasks.py`)
- Task definitions → Plan reviewer: assigns agent (evidence: `tasks.py`)
- FastAPI endpoint → CrewAI runtime: runs kickoff (evidence: `main.py`)
- CrewAI runtime → Step planner: dispatches tasks
- CrewAI runtime → Tool advisor: dispatches tasks
- CrewAI runtime → Plan reviewer: dispatches tasks
- Step planner → Local Ollama: uses model (evidence: `agents.py`)
- Tool advisor → Local Ollama: uses model (evidence: `agents.py`)
- Plan reviewer → Local Ollama: uses model (evidence: `agents.py`)
- FastAPI endpoint → Plan and tools UI: returns result (evidence: `static/script.js`)
- Plan and tools UI → Checklist state: renders steps (evidence: `static/script.js`)
- Plan and tools UI → Progress display: updates progress (evidence: `static/script.js`)
- Plan and tools UI → Tabbed views: switches views (evidence: `static/script.js`)
- Goal setter → Checklist state: marks complete (evidence: `static/script.js`)
