# chittesh249/evoacademy-llm-agents architecture

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

- Interactive diagram: https://gitdiagram.com/chittesh249/evoacademy-llm-agents
- Repository: https://github.com/chittesh249/evoacademy-llm-agents

## Overview

1. **What this repository is**
   - A small Python application that runs an AI-driven, multi-step agent workflow.
   - The repo is organized around a staged pipeline rather than a traditional web server or library API.

2. **Entry point and runtime**
   - `app/main.py` is the executable entry point invoked with `python -m app.main`.
   - The app is meant to run locally in a Python virtual environment, with configuration coming from `.env` values.

3. **Top-level orchestration**
   - `app/agents/workflows.py` is the central orchestrator.
   - It likely wires together the agent stages, manages execution order, and passes shared state between steps.

4. **Agent pipeline stages**
   - `app/agents/nodes/generation.py` handles the first pass: producing an initial output.
   - `app/agents/nodes/refinement.py` represents an improvement or rewrite step.
   - `app/agents/nodes/verification.py` checks correctness or quality before completion.
   - Architecturally, these are distinct processing nodes in a staged workflow, not isolated services.

5. **Shared workflow state**
   - `app/agents/state.py` defines the mutable state object passed through the workflow.
   - This is the main boundary for data flowing between generation, refinement, and verification.
   - An architecture diagram should show the state object as the connective tissue between nodes.

6. **LLM integration boundary**
   - `app/core/llm.py` is the abstraction layer for talking to the language model.
   - This is the key external dependency boundary: application logic stays in the agent nodes, while model access is centralized in core.
   - The `.env.example` strongly suggests model/provider credentials and runtime settings live outside the codebase.

7. **Memory / persistence layer**
   - `app/core/memory.py` provides memory management for the workflow.
   - This likely stores context across steps or runs, separating transient workflow state from longer-lived remembered context.
   - In a diagram, treat this as a supporting service used by the agent pipeline rather than part of the node logic itself.

8. **Code structure analysis utility**
   - `app/utils/ast_parser.py` is a utility for parsing Python source structure via AST.
   - This implies the agent workflow may inspect or transform code, using syntax-aware analysis instead of plain text only.
   - It forms a supporting input-processing boundary before or during model-driven steps.

9. **Main data flow**
   - Input enters through `main.py`.
   - `workflows.py` coordinates the sequence of agent nodes.
   - Each node reads and updates shared state.
   - The LLM layer is called during generation/refinement/verification.
   - Memory and AST parsing support the workflow as needed.
   - Output is produced at the end of the workflow, after verification.

10. **Subsystem boundaries to show in an architecture diagram**
   - **Entry/runtime layer:** `main.py`
   - **Workflow orchestration layer:** `agents/workflows.py`
   - **Agent step layer:** generation / refinement / verification nodes
   - **State layer:** shared workflow state
   - **Core services:** LLM access and memory
   - **Utility layer:** AST parsing

11. **Practical architectural characterization**
   - This is best diagrammed as a modular AI pipeline with a single orchestrator and several sequential processing stages.
   - It is not a microservices system; the boundaries are in-process modules with clear responsibilities.

Main entry points: [`app/agents/workflows.py`](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/workflows.py) (Workflow), [`app/agents/nodes/verification.py`](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/verification.py) (Verify), [`app/agents/state.py`](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/state.py) (State), [`app/agents/nodes/generation.py`](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/generation.py) (Generate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_app_main["Main<br/>entrypoint<br/>[main.py]"]
end

subgraph group_orchestration["Orchestration"]
  node_workflow["Workflow<br/>orchestrator<br/>[workflows.py]"]
  node_state[("State<br/>[state.py]")]
  node_output["Output<br/>result"]
end

subgraph group_agents["Agent Steps"]
  node_generation["Generate<br/>agent node<br/>[generation.py]"]
  node_refinement["Refine<br/>agent node<br/>[refinement.py]"]
  node_verification["Verify<br/>agent node<br/>[verification.py]"]
end

subgraph group_core["Core Services"]
  node_llm["LLM<br/>model adapter<br/>[llm.py]"]
  node_memory[("Memory<br/>context store<br/>[memory.py]")]
end

subgraph group_utils["Utilities"]
  node_ast_parser["AST Parser<br/>code analysis<br/>[ast_parser.py]"]
end

node_app_main -->|"starts"| node_workflow
node_workflow -->|"reads/writes"| node_state
node_workflow -->|"runs"| node_generation
node_generation -->|"calls"| node_llm
node_generation -->|"updates"| node_state
node_workflow -->|"runs"| node_refinement
node_refinement -->|"calls"| node_llm
node_refinement -->|"updates"| node_state
node_workflow -->|"runs"| node_verification
node_verification -->|"calls"| node_llm
node_verification -->|"updates"| node_state
node_workflow -->|"uses"| node_memory
node_workflow -->|"uses"| node_ast_parser
node_verification -->|"produces"| node_output

click node_app_main "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/main.py"
click node_workflow "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/workflows.py"
click node_state "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/state.py"
click node_generation "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/generation.py"
click node_refinement "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/refinement.py"
click node_verification "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/verification.py"
click node_llm "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/core/llm.py"
click node_memory "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/core/memory.py"
click node_ast_parser "https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/utils/ast_parser.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_app_main toneBlue
class node_workflow,node_state,node_output toneAmber
class node_generation,node_refinement,node_verification toneMint
class node_llm,node_memory toneRose
class node_ast_parser toneIndigo
```

## Components

### Runtime

Entry point and process startup

- [Main](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/main.py): entrypoint · CLI entry that starts the local workflow runtime · `app/main.py`

### Orchestration

Workflow control and shared state

- [Workflow](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/workflows.py): orchestrator · Coordinates the staged agent pipeline and execution order · `app/agents/workflows.py`
- [State](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/state.py): workflow state · Mutable shared state passed between stages · `app/agents/state.py`
- **Output**: result · Final verified result emitted by the workflow

### Agent Steps

Sequential AI processing stages

- [Generate](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/generation.py): agent node · Creates the initial model-driven output · `app/agents/nodes/generation.py`
- [Refine](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/refinement.py): agent node · Improves or rewrites the initial result · `app/agents/nodes/refinement.py`
- [Verify](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/agents/nodes/verification.py): agent node · Checks quality and correctness before completion · `app/agents/nodes/verification.py`

### Core Services

Model and memory infrastructure

- [LLM](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/core/llm.py): model adapter · Central abstraction for language model access · `app/core/llm.py`
- [Memory](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/core/memory.py): context store · Supports longer-lived workflow context across steps · `app/core/memory.py`

### Utilities

Supporting analysis tools

- [AST Parser](https://github.com/chittesh249/evoacademy-llm-agents/blob/main/app/utils/ast_parser.py): code analysis · Parses Python source structure for syntax-aware analysis · `app/utils/ast_parser.py`

## Connections

- Main → Workflow: starts · Launches the application workflow
- Workflow → State: reads/writes · Uses shared state to coordinate execution
- Workflow → Generate: runs · Invokes the first pipeline stage
- Generate → LLM: calls · Uses the model abstraction to generate content
- Generate → State: updates · Stores generated content in shared state
- Workflow → Refine: runs · Invokes the improvement stage
- Refine → LLM: calls · Uses the model abstraction to rewrite or improve output
- Refine → State: updates · Persists refined content back into state
- Workflow → Verify: runs · Invokes the quality check stage
- Verify → LLM: calls · Uses the model abstraction for validation or critique
- Verify → State: updates · Records verification results in state
- Workflow → Memory: uses · Accesses supporting context storage when needed
- Workflow → AST Parser: uses · Consumes syntax-aware code analysis during processing
- Verify → Output: produces · Emits the final verified result
