# vishal0205/multi-agent-coding-assistant architecture

> Architecture diagram of the GitHub repository vishal0205/multi-agent-coding-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vishal0205/multi-agent-coding-assistant
- Repository: https://github.com/vishal0205/multi-agent-coding-assistant

## Overview

This is a multi-agent coding assistant: a user submits a Python task, independent test and solution generation feed a sandboxed execution loop, and results are presented and persisted. The graph distinguishes workflow stages from the agent/runtime layer and includes the documented Streamlit, checkpoint, and history capabilities. The test-generator implementation is not present in the supplied tree or excerpts, so its path is unknown; its role and Groq integration come from the README.

Main entry points: [`graph_agent.py`](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py) (LangGraph workflow), [`streamlit_app.py`](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/streamlit_app.py) (Streamlit interface), [`agent.py`](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/agent.py) (Gemini code agent), [`logger.py`](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/logger.py) (Task history logs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_ui["Streamlit interface<br/>[streamlit_app.py]"]
end

subgraph group_workflow["Task workflow"]
  node_workflow["LangGraph workflow<br/>[graph_agent.py]"]
  node_test_stage["Test generation stage<br/>[graph_agent.py]"]
  node_code_stage["Solution generation stage<br/>[graph_agent.py]"]
  node_execute_stage["Execution stage<br/>[graph_agent.py]"]
  node_repair_stage["Repair stage<br/>[graph_agent.py]"]
end

subgraph group_agents["Generation agents"]
  node_test_generator["Independent test generator"]
  node_coder["Gemini code agent<br/>[agent.py]"]
  node_secrets["Secret configuration<br/>[config.py]"]
end

subgraph group_runtime["Execution and persistence"]
  node_sandbox["Docker sandbox runner<br/>[agent.py]"]
  node_checkpoints[("SQLite checkpoints<br/>[graph_agent.py]")]
  node_history[("Task history logs<br/>[logger.py]")]
end

node_user(("Task submitter"))
node_gemini{{"Gemini API"}}
node_groq{{"Groq API"}}
node_docker{{"Docker runtime"}}

node_user -->|"submits task"| node_ui
node_ui -->|"invokes workflow"| node_workflow
node_workflow -->|"routes first"| node_test_stage
node_test_stage -->|"requests tests"| node_test_generator
node_test_generator -->|"generates tests"| node_groq
node_workflow -->|"routes next"| node_code_stage
node_code_stage -->|"requests solution"| node_coder
node_coder -->|"gets API key"| node_secrets
node_coder -->|"generates code"| node_gemini
node_workflow -->|"routes execution"| node_execute_stage
node_execute_stage -->|"runs code and tests"| node_sandbox
node_sandbox -->|"runs container"| node_docker
node_workflow -->|"routes failures"| node_repair_stage
node_repair_stage -->|"requests repair"| node_coder
node_workflow -->|"persists state"| node_checkpoints
node_ui -->|"saves result"| node_history
node_ui -->|"loads history"| node_history

click node_ui "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/streamlit_app.py"
click node_workflow "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py"
click node_test_stage "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py"
click node_code_stage "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py"
click node_execute_stage "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py"
click node_repair_stage "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py"
click node_coder "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/agent.py"
click node_secrets "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/config.py"
click node_sandbox "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/agent.py"
click node_checkpoints "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py"
click node_history "https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/logger.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 toneBlue
class node_workflow,node_test_stage,node_code_stage,node_execute_stage,node_repair_stage toneAmber
class node_test_generator,node_coder,node_secrets,node_gemini,node_groq toneMint
class node_sandbox,node_checkpoints,node_history,node_user toneRose
class node_docker toneIndigo
```

## Components

### User interface

- [Streamlit interface](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/streamlit_app.py): `streamlit_app.py`

### Task workflow

- [LangGraph workflow](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py): `graph_agent.py`
- [Test generation stage](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py): `graph_agent.py`
- [Solution generation stage](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py): `graph_agent.py`
- [Execution stage](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py): `graph_agent.py`
- [Repair stage](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py): `graph_agent.py`

### Generation agents

- **Independent test generator**
- [Gemini code agent](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/agent.py): `agent.py`
- [Secret configuration](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/config.py): `config.py`

### Execution and persistence

- [Docker sandbox runner](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/agent.py): `agent.py`
- [SQLite checkpoints](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/graph_agent.py): `graph_agent.py`
- [Task history logs](https://github.com/vishal0205/multi-agent-coding-assistant/blob/main/logger.py): `logger.py`

### Other components

- **Task submitter**
- **Gemini API**
- **Groq API**
- **Docker runtime**

## Connections

- Task submitter → Streamlit interface: submits task (evidence: `README.md`)
- Streamlit interface → LangGraph workflow: invokes workflow (evidence: `streamlit_app.py`)
- LangGraph workflow → Test generation stage: routes first (evidence: `graph_agent.py`)
- Test generation stage → Independent test generator: requests tests (evidence: `graph_agent.py`)
- Independent test generator → Groq API: generates tests (evidence: `README.md`)
- LangGraph workflow → Solution generation stage: routes next (evidence: `graph_agent.py`)
- Solution generation stage → Gemini code agent: requests solution (evidence: `graph_agent.py`)
- Gemini code agent → Secret configuration: gets API key (evidence: `agent.py`)
- Gemini code agent → Gemini API: generates code (evidence: `agent.py`)
- LangGraph workflow → Execution stage: routes execution (evidence: `graph_agent.py`)
- Execution stage → Docker sandbox runner: runs code and tests (evidence: `graph_agent.py`)
- Docker sandbox runner → Docker runtime: runs container (evidence: `agent.py`)
- LangGraph workflow → Repair stage: routes failures (evidence: `graph_agent.py`)
- Repair stage → Gemini code agent: requests repair (evidence: `graph_agent.py`)
- LangGraph workflow → SQLite checkpoints: persists state (evidence: `graph_agent.py`)
- Streamlit interface → Task history logs: saves result (evidence: `streamlit_app.py`)
- Streamlit interface → Task history logs: loads history (evidence: `streamlit_app.py`)
