# akshayetukuri/nexus-multi-agent-ai architecture

> Architecture diagram of the GitHub repository akshayetukuri/nexus-multi-agent-ai, 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/akshayetukuri/nexus-multi-agent-ai
- Repository: https://github.com/akshayetukuri/nexus-multi-agent-ai

## Overview

NEXUS accepts requests through a web or terminal interface, classifies them with an LLM-backed router, and returns a response from one of four role-specific agents. Notes requests can also read or persist notes. The README describes Groq for the web version and Ollama for the terminal version, but the sampled source sends routing requests to local Ollama and agent responses to Groq from both interfaces; the graph reflects that code. The agent features are documented, but their implementations are not separately sampled.

Main entry points: [`app.py`](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/app.py) (Web interface), [`main.py`](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/main.py) (Terminal interface), [`router.py`](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/router.py) (Request router), [`agent.py`](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agent.py) (Agent behavior)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_web["Web interface<br/>[app.py]"]
  node_cli["Terminal interface<br/>[main.py]"]
end

subgraph group_routing["Intent routing"]
  node_router["Request router<br/>[router.py]"]
end

subgraph group_agents["Specialist agents"]
  node_setup["Agent instances<br/>[agents_setup.py]"]
  node_base_agent["Agent behavior<br/>[agent.py]"]
  node_calendar["Calendar agent<br/>[agents_setup.py]"]
  node_email["Email agent<br/>[agents_setup.py]"]
  node_task["Task agent<br/>[agents_setup.py]"]
  node_notes_agent["Notes agent<br/>[agents_setup.py]"]
end

subgraph group_notes["Notes persistence"]
  node_storage["Notes storage<br/>[notes_storage.py]"]
  node_notes_data[("Persistent notes")]
end

subgraph group_services["Model services"]
  node_ollama["Ollama service"]
  node_groq["Groq API"]
end

node_user(("User"))

node_user -->|"submits request"| node_web
node_user -->|"enters request"| node_cli
node_web -->|"routes request"| node_router
node_cli -->|"routes request"| node_router
node_router -->|"classifies request"| node_ollama
node_router -->|"selects agent"| node_setup
node_setup -->|"creates agents"| node_base_agent
node_web -->|"requests response"| node_base_agent
node_cli -->|"requests response"| node_base_agent
node_base_agent -->|"generates response"| node_groq
node_web -->|"reads or saves notes"| node_storage
node_cli -->|"reads or saves notes"| node_storage
node_storage -->|"reads and writes"| node_notes_data

click node_web "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/app.py"
click node_cli "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/main.py"
click node_router "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/router.py"
click node_setup "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py"
click node_base_agent "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agent.py"
click node_calendar "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py"
click node_email "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py"
click node_task "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py"
click node_notes_agent "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py"
click node_storage "https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/notes_storage.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_cli,node_user toneBlue
class node_router toneAmber
class node_setup,node_base_agent,node_calendar,node_email,node_task,node_notes_agent toneMint
class node_storage,node_notes_data toneRose
class node_ollama,node_groq toneIndigo
```

## Components

### User interfaces

- [Web interface](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/app.py): `app.py`
- [Terminal interface](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/main.py): `main.py`

### Intent routing

- [Request router](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/router.py): `router.py`

### Specialist agents

- [Agent instances](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py): `agents_setup.py`
- [Agent behavior](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agent.py): `agent.py`
- [Calendar agent](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py): `agents_setup.py`
- [Email agent](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py): `agents_setup.py`
- [Task agent](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py): `agents_setup.py`
- [Notes agent](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/agents_setup.py): `agents_setup.py`

### Notes persistence

- [Notes storage](https://github.com/akshayetukuri/nexus-multi-agent-ai/blob/main/notes_storage.py): `notes_storage.py`
- **Persistent notes**

### Model services

- **Ollama service**
- **Groq API**

### Other components

- **User**

## Connections

- User → Web interface: submits request
- User → Terminal interface: enters request
- Web interface → Request router: routes request
- Terminal interface → Request router: routes request
- Request router → Ollama service: classifies request
- Request router → Agent instances: selects agent
- Agent instances → Agent behavior: creates agents
- Web interface → Agent behavior: requests response
- Terminal interface → Agent behavior: requests response
- Agent behavior → Groq API: generates response
- Web interface → Notes storage: reads or saves notes
- Terminal interface → Notes storage: reads or saves notes
- Notes storage → Persistent notes: reads and writes
