# bostnishak/distributed-ai-dev-platform architecture

> Architecture diagram of the GitHub repository bostnishak/distributed-ai-dev-platform, 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/bostnishak/distributed-ai-dev-platform
- Repository: https://github.com/bostnishak/distributed-ai-dev-platform

## Overview

This is a local-first platform for turning requirements documents into structured specifications and dependency-ordered development tasks, with a browser UI, a master service, and pull-based member agents. The primary workflow is browser submission → document extraction and analysis by the master’s local Ollama model → task-plan storage → project/task display. The assistant is a separate, earlier chat feature using LiteLLM. Agent task execution, capability-based assignment, and integration are documented future work, not implemented runtime stages in the sampled code.

Main entry points: [`master/projects_api.py`](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/projects_api.py) (Project API), [`master/static/js/app.js`](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/app.js) (UI navigation), [`master/agents_api.py`](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/agents_api.py) (Agent registry API), [`master/app.py`](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/app.py) (FastAPI application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_ui_shell["UI navigation<br/>[app.js]"]
  node_project_ui["Project views<br/>[projects.js]"]
  node_agent_ui["Agent view<br/>[agents.js]"]
  node_assistant_ui["Chat view<br/>[assistant.js]"]
  node_markdown["Markdown rendering<br/>[markdown.js]"]
end

subgraph group_master["Master service"]
  node_master_app["FastAPI application<br/>[app.py]"]
  node_project_api["Project API<br/>[projects_api.py]"]
  node_agent_api["Agent registry API<br/>[agents_api.py]"]
  node_database[("SQLite platform data<br/>[db.py]")]
end

subgraph group_analysis["Requirements analysis"]
  node_file_extract["Document extraction<br/>[extract.py]"]
  node_spec_plan["Specification and task planning<br/>[decompose.py]"]
  node_master_llm["Master model client<br/>[llm.py]"]
end

subgraph group_agents["Agent network"]
  node_agent_runtime["Member agent service<br/>[agent.py]"]
  node_model_info["Model and host discovery<br/>[model_info.py]"]
  node_task_assignment["Capability-based assignment"]
  node_task_execution["Agent task execution"]
  node_integration["Integration and review"]
end

subgraph group_assistant["Chat assistant"]
  node_assistant_api["Assistant API<br/>[assistant.py]"]
  node_python_run["Optional Python runner<br/>[assistant.py]"]
end

node_browser(("Team member"))
node_ollama{{"Local Ollama"}}
node_gateway{{"LiteLLM gateway"}}

node_browser -->|"uses"| node_ui_shell
node_ui_shell -->|"routes to"| node_project_ui
node_ui_shell -->|"routes to"| node_agent_ui
node_ui_shell -->|"routes to"| node_assistant_ui
node_assistant_ui -->|"renders with"| node_markdown
node_ui_shell -->|"requests"| node_master_app
node_master_app -->|"mounts"| node_project_api
node_master_app -->|"mounts"| node_agent_api
node_master_app -->|"mounts"| node_assistant_api
node_project_ui -->|"calls"| node_project_api
node_agent_ui -->|"calls"| node_agent_api
node_assistant_ui -->|"posts chat"| node_assistant_api
node_project_api -->|"extracts text"| node_file_extract
node_project_api -->|"analyzes and plans"| node_spec_plan
node_project_api -->|"supplies model call"| node_master_llm
node_master_llm -->|"calls local API"| node_ollama
node_project_api -->|"reads and writes"| node_database
node_agent_api -->|"reads and writes"| node_database
node_agent_runtime -->|"collects capabilities"| node_model_info
node_agent_runtime -->|"registers with"| node_agent_api
node_agent_runtime -->|"reads model data"| node_ollama
node_agent_api -.->|"planned registry input"| node_task_assignment
node_task_assignment -.->|"planned dispatch"| node_task_execution
node_task_execution -.->|"planned results"| node_integration
node_assistant_api -->|"calls chat API"| node_gateway
node_assistant_api -->|"dispatches optionally"| node_python_run

click node_ui_shell "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/app.js"
click node_project_ui "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/projects.js"
click node_agent_ui "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/agents.js"
click node_assistant_ui "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/assistant.js"
click node_markdown "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/markdown.js"
click node_master_app "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/app.py"
click node_project_api "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/projects_api.py"
click node_agent_api "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/agents_api.py"
click node_database "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/db.py"
click node_file_extract "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/extract.py"
click node_spec_plan "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/decompose.py"
click node_master_llm "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/llm.py"
click node_agent_runtime "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/agent/agent.py"
click node_model_info "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/agent/model_info.py"
click node_assistant_api "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/assistant.py"
click node_gateway "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/gateway/litellm_config.yaml"
click node_python_run "https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/assistant.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_ui_shell,node_project_ui,node_agent_ui,node_assistant_ui,node_markdown toneBlue
class node_master_app,node_project_api,node_agent_api,node_database toneAmber
class node_file_extract,node_spec_plan,node_master_llm toneMint
class node_agent_runtime,node_model_info,node_task_assignment,node_task_execution,node_integration toneRose
class node_assistant_api,node_python_run,node_browser,node_ollama toneIndigo
class node_gateway toneTeal
```

## Components

### Web interface

- [UI navigation](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/app.js): `master/static/js/app.js`
- [Project views](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/projects.js): `master/static/js/projects.js`
- [Agent view](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/agents.js): `master/static/js/agents.js`
- [Chat view](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/assistant.js): `master/static/js/assistant.js`
- [Markdown rendering](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/static/js/markdown.js): `master/static/js/markdown.js`

### Master service

- [FastAPI application](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/app.py): `master/app.py`
- [Project API](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/projects_api.py): `master/projects_api.py`
- [Agent registry API](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/agents_api.py): `master/agents_api.py`
- [SQLite platform data](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/db.py): `master/db.py`

### Requirements analysis

- [Document extraction](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/extract.py): `master/extract.py`
- [Specification and task planning](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/decompose.py): `master/decompose.py`
- [Master model client](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/llm.py): `master/llm.py`

### Agent network

- [Member agent service](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/agent/agent.py): `agent/agent.py`
- [Model and host discovery](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/agent/model_info.py): `agent/model_info.py`
- **Capability-based assignment**
- **Agent task execution**
- **Integration and review**

### Chat assistant

- [Assistant API](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/assistant.py): `master/assistant.py`
- [Optional Python runner](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/master/assistant.py): `master/assistant.py`

### Other components

- **Team member**
- **Local Ollama**
- [LiteLLM gateway](https://github.com/bostnishak/distributed-ai-dev-platform/blob/main/gateway/litellm_config.yaml): `gateway/litellm_config.yaml`

## Connections

- Team member → UI navigation: uses (evidence: `README.md`)
- UI navigation → Project views: routes to (evidence: `master/static/js/app.js`)
- UI navigation → Agent view: routes to (evidence: `master/static/js/app.js`)
- UI navigation → Chat view: routes to (evidence: `master/static/js/app.js`)
- Chat view → Markdown rendering: renders with (evidence: `master/static/js/assistant.js`)
- UI navigation → FastAPI application: requests (evidence: `README.md`)
- FastAPI application → Project API: mounts (evidence: `master/app.py`)
- FastAPI application → Agent registry API: mounts (evidence: `master/app.py`)
- FastAPI application → Assistant API: mounts (evidence: `master/app.py`)
- Project views → Project API: calls (evidence: `master/static/js/projects.js`)
- Agent view → Agent registry API: calls (evidence: `README.md`)
- Chat view → Assistant API: posts chat (evidence: `master/static/js/assistant.js`)
- Project API → Document extraction: extracts text (evidence: `master/projects_api.py`)
- Project API → Specification and task planning: analyzes and plans (evidence: `master/projects_api.py`)
- Project API → Master model client: supplies model call (evidence: `master/projects_api.py`)
- Master model client → Local Ollama: calls local API (evidence: `master/llm.py`)
- Project API → SQLite platform data: reads and writes (evidence: `master/projects_api.py`)
- Agent registry API → SQLite platform data: reads and writes (evidence: `master/agents_api.py`)
- Member agent service → Model and host discovery: collects capabilities (evidence: `agent/agent.py`)
- Member agent service → Agent registry API: registers with (evidence: `README.md`)
- Member agent service → Local Ollama: reads model data (evidence: `README.md`)
- Agent registry API → Capability-based assignment: planned registry input (evidence: `README.md`)
- Capability-based assignment → Agent task execution: planned dispatch (evidence: `README.md`)
- Agent task execution → Integration and review: planned results (evidence: `README.md`)
- Assistant API → LiteLLM gateway: calls chat API (evidence: `master/assistant.py`)
- Assistant API → Optional Python runner: dispatches optionally (evidence: `master/assistant.py`)
