# gouthamkumar-r/multi-agent-k-panel architecture

> Architecture diagram of the GitHub repository gouthamkumar-r/multi-agent-k-panel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gouthamkumar-r/multi-agent-k-panel
- Repository: https://github.com/gouthamkumar-r/multi-agent-k-panel

## Overview

K-Panel is a workshop platform that turns a user’s prompt into a multi-agent discussion, a synthesized PRD, and a generated web prototype. The main path runs from the browser UI through the backend’s orchestration endpoint; persona management and one-to-one chat are additional capabilities. The README documents these workflows and provider integrations. The sampled backend excerpt shows registry handling, retry logic, orchestration, chat, and prototype streaming, but omits parts of the implementation, so internal call relationships not shown there are based only on documented behavior.

Main entry points: [`k-panel.py`](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py) (LLM requests), [`k-panel.html`](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.html) (K-Panel UI), [`agents`](https://github.com/gouthamkumar-r/multi-agent-k-panel/tree/main/agents) (Agent personas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Workshop experience"]
  node_web_ui["K-Panel UI<br/>[k-panel.html]"]
  node_backend_api["Backend API<br/>[k-panel.py]"]
end

subgraph group_agents["Agent management"]
  node_persona_files["Agent personas"]
  node_agent_registry["Agent registry<br/>[k-panel.py]"]
  node_custom_agents["Custom agent creation<br/>[k-panel.py]"]
end

subgraph group_generation["Content generation"]
  node_panel_orchestration["Panel orchestration<br/>[k-panel.py]"]
  node_one_to_one_chat["Agent chat<br/>[k-panel.py]"]
  node_prd_synthesis["PRD synthesis<br/>[k-panel.py]"]
  node_prototype_generation["Prototype generation<br/>[k-panel.py]"]
end

subgraph group_runtime["Model runtime"]
  node_llm_client["LLM requests<br/>[k-panel.py]"]
  node_streaming_retries["Streaming and retries<br/>[k-panel.py]"]
end

node_participant(("Workshop participant"))
node_llm_provider{{"OpenAI-compatible provider"}}

node_participant -->|"uses"| node_web_ui
node_web_ui -->|"requests endpoints"| node_backend_api
node_backend_api -->|"lists and fetches"| node_agent_registry
node_custom_agents -->|"saves YAML"| node_persona_files
node_backend_api -->|"registers agents"| node_custom_agents
node_panel_orchestration -->|"uses selected agents"| node_agent_registry
node_panel_orchestration -->|"requests agent turns"| node_llm_client
node_panel_orchestration -->|"synthesizes discussion"| node_prd_synthesis
node_one_to_one_chat -->|"requests replies"| node_llm_client
node_prototype_generation -->|"requests HTML"| node_llm_client
node_prd_synthesis -->|"provides PRD"| node_prototype_generation
node_llm_client -->|"sends completions"| node_llm_provider
node_llm_client -->|"uses retry handling"| node_streaming_retries
node_prototype_generation -->|"streams prototype"| node_web_ui

click node_web_ui "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.html"
click node_backend_api "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_persona_files "https://github.com/gouthamkumar-r/multi-agent-k-panel/tree/main/agents"
click node_agent_registry "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_custom_agents "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_panel_orchestration "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_one_to_one_chat "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_prd_synthesis "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_prototype_generation "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_llm_client "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py"
click node_streaming_retries "https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.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_ui,node_backend_api toneBlue
class node_persona_files,node_agent_registry,node_custom_agents toneAmber
class node_panel_orchestration,node_one_to_one_chat,node_prd_synthesis,node_prototype_generation toneMint
class node_llm_client,node_streaming_retries toneRose
class node_participant,node_llm_provider toneIndigo
```

## Components

### Workshop experience

- [K-Panel UI](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.html): `k-panel.html`
- [Backend API](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`

### Agent management

- [Agent personas](https://github.com/gouthamkumar-r/multi-agent-k-panel/tree/main/agents): `agents`
- [Agent registry](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`
- [Custom agent creation](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`

### Content generation

- [Panel orchestration](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`
- [Agent chat](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`
- [PRD synthesis](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`
- [Prototype generation](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`

### Model runtime

- [LLM requests](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`
- [Streaming and retries](https://github.com/gouthamkumar-r/multi-agent-k-panel/blob/main/k-panel.py): `k-panel.py`

### Other components

- **Workshop participant**
- **OpenAI-compatible provider**

## Connections

- Workshop participant → K-Panel UI: uses (evidence: `README.md`)
- K-Panel UI → Backend API: requests endpoints (evidence: `README.md`)
- Backend API → Agent registry: lists and fetches (evidence: `k-panel.py`)
- Custom agent creation → Agent personas: saves YAML (evidence: `k-panel.py`)
- Backend API → Custom agent creation: registers agents (evidence: `k-panel.py`)
- Panel orchestration → Agent registry: uses selected agents (evidence: `README.md`)
- Panel orchestration → LLM requests: requests agent turns (evidence: `README.md`)
- Panel orchestration → PRD synthesis: synthesizes discussion (evidence: `README.md`)
- Agent chat → LLM requests: requests replies (evidence: `k-panel.py`)
- Prototype generation → LLM requests: requests HTML (evidence: `k-panel.py`)
- PRD synthesis → Prototype generation: provides PRD (evidence: `README.md`)
- LLM requests → OpenAI-compatible provider: sends completions (evidence: `README.md`)
- LLM requests → Streaming and retries: uses retry handling (evidence: `k-panel.py`)
- Prototype generation → K-Panel UI: streams prototype (evidence: `README.md`)
