# ojaskrisshnan/pm_pilot_multi_agent architecture

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

- Interactive diagram: https://gitdiagram.com/ojaskrisshnan/pm_pilot_multi_agent
- Repository: https://github.com/ojaskrisshnan/pm_pilot_multi_agent

## Overview

PMPilot takes a manager’s project brief through authenticated project setup, a dependency-aware 17-agent SDLC run, human approval gates, and persisted deliverables and metrics. The frontend provides project and workflow workspaces; its orchestration client can use the FastAPI run API, while the backend engine coordinates agent execution and LLM inference. The README documents major review, reporting, analytics, and artifact capabilities. Some feature routes and UI wiring are unsampled, so those links are shown only where supported by the README or excerpts.

Main entry points: [`backend/app/database.py`](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/database.py) (Relational Database), [`backend/app/main.py`](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/main.py) (FastAPI Application), [`src/App.tsx`](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/App.tsx) (Application Shell), [`backend/app/orchestration/engine.py`](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/orchestration/engine.py) (Run Orchestrator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Project Workspace"]
  node_app["Application Shell<br/>[App.tsx]"]
  node_project_ui["Project Dashboard"]
  node_workflow_ui["Workflow Workspace"]
  node_review_ui["Review &amp; Insights<br/>[ApprovalsView.tsx]"]
  node_api_client["API Client<br/>[client.ts]"]
  node_frontend_engine["Workflow Client Engine"]
  node_frontend_state["Project State<br/>[ProjectState.ts]"]
end

subgraph group_api["Backend API"]
  node_api_app["FastAPI Application<br/>[main.py]"]
  node_auth["Authentication Routes<br/>[auth.py]"]
  node_project_routes["Project Routes<br/>[projects.py]"]
  node_run_routes["Run &amp; Approval Routes<br/>[runs.py]"]
  node_feature_routes["Feature Routes"]
end

subgraph group_execution["Agent Execution"]
  node_orchestrator["Run Orchestrator<br/>[engine.py]"]
  node_agent_defs["17-Agent Definitions<br/>[definitions.py]"]
  node_agent_runtime["Agent Runtime<br/>[runtime.py]"]
end

subgraph group_inference["LLM Providers"]
  node_provider_router["Provider Router<br/>[router.py]"]
  node_llm_providers["LLM Provider Adapters"]
end

subgraph group_persistence["Project State"]
  node_database[("Relational Database<br/>[database.py]")]
  node_models["Project &amp; Run Records"]
end

node_manager(("Manager / Employee"))
node_external_llm(("Cloud / Local LLMs"))

node_manager -->|"uses"| node_app
node_app -->|"shows projects"| node_project_ui
node_app -->|"opens workflow"| node_workflow_ui
node_app -->|"checks session"| node_api_client
node_project_ui -->|"manages projects"| node_api_client
node_workflow_ui -->|"dispatches runs"| node_frontend_engine
node_workflow_ui -->|"presents reviews"| node_review_ui
node_frontend_engine -->|"starts and polls"| node_api_client
node_frontend_engine -->|"updates workflow"| node_frontend_state
node_api_client -->|"sends REST requests"| node_api_app
node_api_app -->|"mounts routes"| node_auth
node_api_app -->|"mounts routes"| node_project_routes
node_api_app -->|"mounts routes"| node_run_routes
node_api_app -->|"mounts routes"| node_feature_routes
node_run_routes -->|"controls runs"| node_orchestrator
node_orchestrator -->|"loads definitions"| node_agent_defs
node_orchestrator -->|"executes agents"| node_agent_runtime
node_agent_runtime -->|"requests inference"| node_provider_router
node_provider_router -->|"selects provider"| node_llm_providers
node_llm_providers -.->|"requests inference"| node_external_llm
node_orchestrator -->|"persists run state"| node_database
node_database -->|"stores records"| node_models
node_auth -->|"reads and writes users"| node_database
node_project_routes -->|"reads and writes projects"| node_database
node_feature_routes -->|"serves deliverables and metrics"| node_database
node_run_routes -->|"reads run status"| node_database

click node_app "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/App.tsx"
click node_project_ui "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/components/ProjectsDashboard.tsx"
click node_workflow_ui "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/components/WorkflowWorkspace.tsx"
click node_review_ui "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/components/ApprovalsView.tsx"
click node_api_client "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/api/client.ts"
click node_frontend_engine "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/engine/OrchestrationEngine.ts"
click node_frontend_state "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/engine/ProjectState.ts"
click node_api_app "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/main.py"
click node_auth "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/routers/auth.py"
click node_project_routes "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/routers/projects.py"
click node_run_routes "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/routers/runs.py"
click node_feature_routes "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/tree/main/backend/app/routers"
click node_orchestrator "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/orchestration/engine.py"
click node_agent_defs "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/agents/definitions.py"
click node_agent_runtime "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/agents/runtime.py"
click node_provider_router "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/providers/router.py"
click node_llm_providers "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/tree/main/backend/app/providers"
click node_database "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/database.py"
click node_models "https://github.com/ojaskrisshnan/pm_pilot_multi_agent/tree/main/backend/app/models"

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_app,node_project_ui,node_workflow_ui,node_review_ui,node_api_client,node_frontend_engine,node_frontend_state toneBlue
class node_api_app,node_auth,node_project_routes,node_run_routes,node_feature_routes toneAmber
class node_orchestrator,node_agent_defs,node_agent_runtime toneMint
class node_provider_router,node_llm_providers toneRose
class node_database,node_models,node_manager,node_external_llm toneIndigo
```

## Components

### Project Workspace

- [Application Shell](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/App.tsx): `src/App.tsx`
- [Project Dashboard](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/components/ProjectsDashboard.tsx): `src/components/ProjectsDashboard.tsx`
- [Workflow Workspace](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/components/WorkflowWorkspace.tsx): `src/components/WorkflowWorkspace.tsx`
- [Review & Insights](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/components/ApprovalsView.tsx): `src/components/ApprovalsView.tsx`
- [API Client](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/api/client.ts): `src/api/client.ts`
- [Workflow Client Engine](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/engine/OrchestrationEngine.ts): `src/engine/OrchestrationEngine.ts`
- [Project State](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/src/engine/ProjectState.ts): `src/engine/ProjectState.ts`

### Backend API

- [FastAPI Application](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication Routes](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Project Routes](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/routers/projects.py): `backend/app/routers/projects.py`
- [Run & Approval Routes](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/routers/runs.py): `backend/app/routers/runs.py`
- [Feature Routes](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/tree/main/backend/app/routers): `backend/app/routers`

### Agent Execution

- [Run Orchestrator](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/orchestration/engine.py): `backend/app/orchestration/engine.py`
- [17-Agent Definitions](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/agents/definitions.py): `backend/app/agents/definitions.py`
- [Agent Runtime](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/agents/runtime.py): `backend/app/agents/runtime.py`

### LLM Providers

- [Provider Router](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/providers/router.py): `backend/app/providers/router.py`
- [LLM Provider Adapters](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/tree/main/backend/app/providers): `backend/app/providers`

### Project State

- [Relational Database](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/blob/main/backend/app/database.py): `backend/app/database.py`
- [Project & Run Records](https://github.com/ojaskrisshnan/pm_pilot_multi_agent/tree/main/backend/app/models): `backend/app/models`

### Other components

- **Manager / Employee**
- **Cloud / Local LLMs**

## Connections

- Manager / Employee → Application Shell: uses
- Application Shell → Project Dashboard: shows projects
- Application Shell → Workflow Workspace: opens workflow
- Application Shell → API Client: checks session
- Project Dashboard → API Client: manages projects
- Workflow Workspace → Workflow Client Engine: dispatches runs
- Workflow Workspace → Review & Insights: presents reviews
- Workflow Client Engine → API Client: starts and polls
- Workflow Client Engine → Project State: updates workflow
- API Client → FastAPI Application: sends REST requests
- FastAPI Application → Authentication Routes: mounts routes
- FastAPI Application → Project Routes: mounts routes
- FastAPI Application → Run & Approval Routes: mounts routes
- FastAPI Application → Feature Routes: mounts routes
- Run & Approval Routes → Run Orchestrator: controls runs
- Run Orchestrator → 17-Agent Definitions: loads definitions
- Run Orchestrator → Agent Runtime: executes agents
- Agent Runtime → Provider Router: requests inference
- Provider Router → LLM Provider Adapters: selects provider
- LLM Provider Adapters → Cloud / Local LLMs: requests inference
- Run Orchestrator → Relational Database: persists run state
- Relational Database → Project & Run Records: stores records
- Authentication Routes → Relational Database: reads and writes users
- Project Routes → Relational Database: reads and writes projects
- Feature Routes → Relational Database: serves deliverables and metrics
- Run & Approval Routes → Relational Database: reads run status
