# sii-1111/ai-engineering-command-center architecture

> Architecture diagram of the GitHub repository sii-1111/ai-engineering-command-center, 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/sii-1111/ai-engineering-command-center
- Repository: https://github.com/sii-1111/ai-engineering-command-center

## Overview

AI Engineering Command Center is a scaffold for investigating engineering tasks and preparing evidence-backed changes, with human approval before risky mutations. The documented workflow starts in the web workspace, enters the API, and is orchestrated as a task graph: plan and investigate through GitHub tools, propose a change, pause for approval, then verify and review. Evaluation and observability capture outcomes. Source confirms the API, planner, GitHub MCP boundary, reviewer, evaluation, and state models; several broader capabilities are documented but not yet represented by sampled implementations, so their wiring is omitted.

Main entry points: [`core/graph.py`](https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/graph.py) (Task Graph), [`apps/api/app/main.py`](https://github.com/sii-1111/ai-engineering-command-center/blob/main/apps/api/app/main.py) (FastAPI Service), [`agents/llm_planner.py`](https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/llm_planner.py) (Investigation Planner), [`agents/github_investigator.py`](https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/github_investigator.py) (Research Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["User Workspace"]
  node_web["Web Command Center<br/>[page.tsx]"]
  node_api["FastAPI Service<br/>[main.py]"]
end

subgraph group_orchestration["Task Orchestration"]
  node_graph["Task Graph<br/>[graph.py]"]
  node_planner["Investigation Planner<br/>[llm_planner.py]"]
  node_research["Research Agent"]
  node_codeagent["Code Agent<br/>[planner.py]"]
  node_testing["Testing Agent<br/>[tool_executor.py]"]
  node_llm["Azure OpenAI Client<br/>[llm.py]"]
end

subgraph group_tools["Tooling and Changes"]
  node_mcpclient["MCP Client<br/>[mcp_client.py]"]
  node_githubserver["GitHub MCP Tools<br/>[server.py]"]
  node_githubclient["GitHub Client<br/>[client.py]"]
end

subgraph group_assurance["Assurance and State"]
  node_reviewer["Reviewer Agent<br/>[reviewer.py]"]
  node_state["Engineering State<br/>[models.py]"]
  node_memory["Memory Layer"]
  node_evaluation["Task Evaluation<br/>[metrics.py]"]
  node_observability["Event Recording<br/>[observability.py]"]
end

node_engineer(("Engineer"))
node_github["GitHub"]
node_approval(("Human Approval"))

node_engineer -->|"submits task"| node_web
node_web -->|"sends task"| node_api
node_api -->|"invokes graph"| node_graph
node_graph -->|"routes task"| node_planner
node_planner -->|"requests plan"| node_llm
node_planner -->|"plans investigation"| node_research
node_graph -->|"dispatches research"| node_research
node_graph -->|"dispatches change work"| node_codeagent
node_graph -->|"dispatches verification"| node_testing
node_graph -->|"dispatches review"| node_reviewer
node_research -->|"calls GitHub tools"| node_mcpclient
node_testing -->|"executes tools"| node_mcpclient
node_mcpclient -->|"calls tools"| node_githubserver
node_githubserver -->|"invokes API client"| node_githubclient
node_githubclient -->|"reads or writes"| node_github
node_graph -->|"updates task state"| node_state
node_graph -.->|"uses memory"| node_memory
node_api -->|"requests decision"| node_approval
node_approval -->|"submits decision"| node_api
node_api -->|"evaluates task"| node_evaluation
node_evaluation -->|"records event"| node_observability
node_api -->|"reads task state"| node_state
node_api -->|"resumes task"| node_graph
node_reviewer -->|"requests review"| node_llm

click node_web "https://github.com/sii-1111/ai-engineering-command-center/blob/main/apps/web/app/page.tsx"
click node_api "https://github.com/sii-1111/ai-engineering-command-center/blob/main/apps/api/app/main.py"
click node_graph "https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/graph.py"
click node_planner "https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/llm_planner.py"
click node_research "https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/github_investigator.py"
click node_codeagent "https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/planner.py"
click node_testing "https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/tool_executor.py"
click node_reviewer "https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/reviewer.py"
click node_state "https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/state/models.py"
click node_memory "https://github.com/sii-1111/ai-engineering-command-center/tree/main/core/memory"
click node_llm "https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/llm.py"
click node_mcpclient "https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/mcp_client.py"
click node_githubserver "https://github.com/sii-1111/ai-engineering-command-center/blob/main/tooling/github/server.py"
click node_githubclient "https://github.com/sii-1111/ai-engineering-command-center/blob/main/tooling/github/client.py"
click node_evaluation "https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/evaluation/metrics.py"
click node_observability "https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/observability.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_web,node_api toneBlue
class node_graph,node_planner,node_research,node_codeagent,node_testing,node_llm toneAmber
class node_mcpclient,node_githubserver,node_githubclient toneMint
class node_reviewer,node_state,node_memory,node_evaluation,node_observability toneRose
class node_engineer,node_github,node_approval toneIndigo
```

## Components

### User Workspace

- [Web Command Center](https://github.com/sii-1111/ai-engineering-command-center/blob/main/apps/web/app/page.tsx): `apps/web/app/page.tsx`
- [FastAPI Service](https://github.com/sii-1111/ai-engineering-command-center/blob/main/apps/api/app/main.py): `apps/api/app/main.py`

### Task Orchestration

- [Task Graph](https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/graph.py): `core/graph.py`
- [Investigation Planner](https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/llm_planner.py): `agents/llm_planner.py`
- [Research Agent](https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/github_investigator.py): `agents/github_investigator.py`
- [Code Agent](https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/planner.py): `agents/planner.py`
- [Testing Agent](https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/tool_executor.py): `agents/tool_executor.py`
- [Azure OpenAI Client](https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/llm.py): `core/llm.py`

### Tooling and Changes

- [MCP Client](https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/mcp_client.py): `core/mcp_client.py`
- [GitHub MCP Tools](https://github.com/sii-1111/ai-engineering-command-center/blob/main/tooling/github/server.py): `tooling/github/server.py`
- [GitHub Client](https://github.com/sii-1111/ai-engineering-command-center/blob/main/tooling/github/client.py): `tooling/github/client.py`

### Assurance and State

- [Reviewer Agent](https://github.com/sii-1111/ai-engineering-command-center/blob/main/agents/reviewer.py): `agents/reviewer.py`
- [Engineering State](https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/state/models.py): `core/state/models.py`
- [Memory Layer](https://github.com/sii-1111/ai-engineering-command-center/tree/main/core/memory): `core/memory`
- [Task Evaluation](https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/evaluation/metrics.py): `core/evaluation/metrics.py`
- [Event Recording](https://github.com/sii-1111/ai-engineering-command-center/blob/main/core/observability.py): `core/observability.py`

### Other components

- **Engineer**
- **GitHub**
- **Human Approval**

## Connections

- Engineer → Web Command Center: submits task
- Web Command Center → FastAPI Service: sends task
- FastAPI Service → Task Graph: invokes graph
- Task Graph → Investigation Planner: routes task
- Investigation Planner → Azure OpenAI Client: requests plan
- Investigation Planner → Research Agent: plans investigation
- Task Graph → Research Agent: dispatches research
- Task Graph → Code Agent: dispatches change work
- Task Graph → Testing Agent: dispatches verification
- Task Graph → Reviewer Agent: dispatches review
- Research Agent → MCP Client: calls GitHub tools
- Testing Agent → MCP Client: executes tools
- MCP Client → GitHub MCP Tools: calls tools
- GitHub MCP Tools → GitHub Client: invokes API client
- GitHub Client → GitHub: reads or writes
- Task Graph → Engineering State: updates task state
- Task Graph → Memory Layer: uses memory
- FastAPI Service → Human Approval: requests decision
- Human Approval → FastAPI Service: submits decision
- FastAPI Service → Task Evaluation: evaluates task
- Task Evaluation → Event Recording: records event
- FastAPI Service → Engineering State: reads task state
- FastAPI Service → Task Graph: resumes task
- Reviewer Agent → Azure OpenAI Client: requests review
