# vivekdeshmukhrepos/multi_agent_requirement_to_code_generator architecture

> Architecture diagram of the GitHub repository vivekdeshmukhrepos/multi_agent_requirement_to_code_generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator
- Repository: https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator

## Overview

##### Project type and purpose
- This is a single-service, full-stack (UI + backend logic) Streamlit application whose goal is to take plain software requirements, clarify them via a series of AI “agents,” break them into user stories, generate jQuery code for each story, then aggregate it all into one file.
- It is not a microservices architecture in the traditional sense but rather an internal multi-agent pipeline orchestrated in one Python process (app.py).

##### File structure
- Top-level files:
- app.py — the entry point: sets up Streamlit UI, manages the multi-agent workflow.
- requirements.txt — Python dependencies including streamlit, openai, semantic-kernel, asyncio.
- Resources/ — folder containing supplementary assets (demo video, sample inputs).
- There are no separate “frontend” or “backend” directories; the UI and orchestration live together in app.py.
- No databases, but there are external HTTP calls to the OpenAI API.

##### README for additional insights
- The README lists four autonomous agents: RequirementsAgent, UserStoryAgent, CodeGenAgent, AggregatorAgent.
- Technologies: Streamlit (UI), Semantic Kernel (agent framework), OpenAI GPT-4 (LLM), Async Python (concurrency).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% UI Layer
    StreamlitUI["Streamlit UI"]:::ui
    click StreamlitUI "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/app.py"

    %% Backend Orchestrator with Agents
    subgraph "Backend Orchestrator"
        direction TB
        ReqAgent["1. RequirementsAgent"]:::agent
        UserStoryAgent["2. UserStoryAgent"]:::agent
        CodeGenAgent["3. CodeGenAgent"]:::agent
        AggregatorAgent["4. AggregatorAgent"]:::agent
    end
    click ReqAgent "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/app.py"
    click UserStoryAgent "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/app.py"
    click CodeGenAgent "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/app.py"
    click AggregatorAgent "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/app.py"

    %% External Service
    OpenAIAPI["OpenAI GPT-4 API\n(LLM calls)"]:::external
    click OpenAIAPI "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/app.py"
    click OpenAIAPI "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/requirements.txt"

    %% Static Resources
    Resources["Static Resources\n(sample inputs, demo video)"]:::resource
    click Resources "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/tree/main/Resources/"

    %% Documentation
    README["Project Docs\n(overview, architecture)"]:::doc
    click README "https://github.com/vivekdeshmukhrepos/multi_agent_requirement_to_code_generator/blob/main/README.md"

    %% Flow connections
    StreamlitUI -->|requirements| ReqAgent
    ReqAgent -->|"clarified requirements"| UserStoryAgent
    UserStoryAgent -->|"user stories"| CodeGenAgent
    CodeGenAgent -->|"code snippets"| AggregatorAgent
    AggregatorAgent -->|aggregated code| StreamlitUI

    %% Agent <-> OpenAI interactions
    ReqAgent -->|LLM calls| OpenAIAPI
    OpenAIAPI -->|response| ReqAgent
    UserStoryAgent -->|LLM calls| OpenAIAPI
    OpenAIAPI -->|response| UserStoryAgent
    CodeGenAgent -->|LLM calls| OpenAIAPI
    OpenAIAPI -->|response| CodeGenAgent
    AggregatorAgent -->|LLM calls| OpenAIAPI
    OpenAIAPI -->|response| AggregatorAgent

    %% Resource usage
    StreamlitUI -->|loads assets| Resources

    %% Styles
    classDef ui fill:#cfe2f3,stroke:#6d9eeb,color:#000;
    classDef orchestrator fill:#d9ead3,stroke:#93c47d,color:#000;
    classDef agent fill:#fce5cd,stroke:#f6b26b,color:#000;
    classDef external fill:#f4cccc,stroke:#e06666,color:#000;
    classDef resource fill:#d0e0e3,stroke:#76a5af,color:#000;
    classDef doc fill:#ececec,stroke:#888888,color:#000;
```
