# chandanhk304/athena architecture

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

- Interactive diagram: https://gitdiagram.com/chandanhk304/athena
- Repository: https://github.com/chandanhk304/athena

## Overview

Athena is a PMO intelligence application: enterprise-like project events enter through the simulator’s webhook dispatcher and Athena’s API, are indexed into graph and vector knowledge stores, and can be queried or analyzed by the agent workflow. The dashboard provides the user-facing interface; risk alerts and proposed write actions pass through a human-approval gate. The README documents broader capabilities such as synthesis, proactive risk detection, and stakeholder communication; some implementation details are unsampled, so those links are omitted where source evidence is unavailable.

Main entry points: [`athena_core/api.py`](https://github.com/chandanhk304/athena/blob/main/athena_core/api.py) (Athena API), [`agent_brain/nodes.py`](https://github.com/chandanhk304/athena/blob/main/agent_brain/nodes.py) (Agent Nodes), [`simulator/webhook.py`](https://github.com/chandanhk304/athena/blob/main/simulator/webhook.py) (Webhook Dispatcher), [`simulator/api.py`](https://github.com/chandanhk304/athena/blob/main/simulator/api.py) (Simulator API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard"]
  node_dashboard["Next.js Dashboard<br/>[page.tsx]"]
  node_api_client["Dashboard API Client<br/>[api.ts]"]
end

subgraph group_ingestion["Event Ingestion"]
  node_core_api["Athena API<br/>[api.py]"]
  node_ingestion_pipe["Event Pipeline<br/>[ingestion.py]"]
end

subgraph group_knowledge["Knowledge Stores"]
  node_graph_syncer["Graph Syncer<br/>[graph_syncer.py]"]
  node_vector_indexer["Vector Indexer<br/>[vector_indexer.py]"]
  node_neo4j[("Neo4j Knowledge Graph")]
  node_pinecone[("Pinecone Vector Store")]
end

subgraph group_agents["Agent Workflow"]
  node_agent_graph["LangGraph Orchestrator<br/>[graph.py]"]
  node_agent_nodes["Agent Nodes<br/>[nodes.py]"]
  node_agent_state["Agent State<br/>[state.py]"]
  node_agent_tools["Agent Tools<br/>[tools.py]"]
end

subgraph group_simulator["Project Simulator"]
  node_sim_api["Simulator API<br/>[api.py]"]
  node_sim_db[("Simulator Database<br/>[database.py]")]
  node_chaos["Chaos Engine<br/>[chaos_engine.py]"]
  node_data_gen["Project Data Generator<br/>[data_gen.py]"]
  node_timeline["Timeline Simulator<br/>[timeline_sim.py]"]
  node_webhook["Webhook Dispatcher<br/>[webhook.py]"]
end

node_user(("Program Manager"))
node_llm["LLM Provider"]

node_user -->|"uses"| node_dashboard
node_dashboard -->|"requests data"| node_core_api
node_sim_api -->|"dispatches events"| node_webhook
node_chaos -.->|"notifies changes"| node_webhook
node_timeline -->|"replays events"| node_webhook
node_timeline -->|"uses"| node_data_gen
node_sim_api -->|"reads and writes"| node_sim_db
node_sim_api -->|"invokes"| node_chaos
node_chaos -->|"uses"| node_data_gen
node_webhook -->|"posts events"| node_core_api
node_core_api -->|"processes events"| node_ingestion_pipe
node_ingestion_pipe -->|"syncs entities"| node_graph_syncer
node_ingestion_pipe -->|"indexes events"| node_vector_indexer
node_graph_syncer -->|"writes graph"| node_neo4j
node_vector_indexer -->|"indexes vectors"| node_pinecone
node_core_api -->|"invokes"| node_agent_graph
node_agent_graph -->|"routes through"| node_agent_nodes
node_agent_nodes -->|"reads and updates"| node_agent_state
node_agent_nodes -->|"calls tools"| node_agent_tools
node_agent_tools -->|"queries graph"| node_neo4j
node_agent_tools -->|"searches vectors"| node_pinecone
node_agent_nodes -->|"requests inference"| node_llm
node_user -.->|"approves actions"| node_core_api

click node_dashboard "https://github.com/chandanhk304/athena/blob/main/frontend/src/app/page.tsx"
click node_api_client "https://github.com/chandanhk304/athena/blob/main/frontend/src/lib/api.ts"
click node_core_api "https://github.com/chandanhk304/athena/blob/main/athena_core/api.py"
click node_ingestion_pipe "https://github.com/chandanhk304/athena/blob/main/athena_core/ingestion.py"
click node_graph_syncer "https://github.com/chandanhk304/athena/blob/main/athena_core/graph_syncer.py"
click node_vector_indexer "https://github.com/chandanhk304/athena/blob/main/athena_core/vector_indexer.py"
click node_agent_graph "https://github.com/chandanhk304/athena/blob/main/agent_brain/graph.py"
click node_agent_nodes "https://github.com/chandanhk304/athena/blob/main/agent_brain/nodes.py"
click node_agent_state "https://github.com/chandanhk304/athena/blob/main/agent_brain/state.py"
click node_agent_tools "https://github.com/chandanhk304/athena/blob/main/agent_brain/tools.py"
click node_sim_api "https://github.com/chandanhk304/athena/blob/main/simulator/api.py"
click node_sim_db "https://github.com/chandanhk304/athena/blob/main/simulator/database.py"
click node_chaos "https://github.com/chandanhk304/athena/blob/main/simulator/chaos_engine.py"
click node_data_gen "https://github.com/chandanhk304/athena/blob/main/simulator/data_gen.py"
click node_timeline "https://github.com/chandanhk304/athena/blob/main/simulator/timeline_sim.py"
click node_webhook "https://github.com/chandanhk304/athena/blob/main/simulator/webhook.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_dashboard,node_api_client toneBlue
class node_core_api,node_ingestion_pipe toneAmber
class node_graph_syncer,node_vector_indexer,node_neo4j,node_pinecone toneMint
class node_agent_graph,node_agent_nodes,node_agent_state,node_agent_tools toneRose
class node_sim_api,node_sim_db,node_chaos,node_data_gen,node_timeline,node_webhook,node_user,node_llm toneIndigo
```

## Components

### Dashboard

- [Next.js Dashboard](https://github.com/chandanhk304/athena/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Dashboard API Client](https://github.com/chandanhk304/athena/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`

### Event Ingestion

- [Athena API](https://github.com/chandanhk304/athena/blob/main/athena_core/api.py): `athena_core/api.py`
- [Event Pipeline](https://github.com/chandanhk304/athena/blob/main/athena_core/ingestion.py): `athena_core/ingestion.py`

### Knowledge Stores

- [Graph Syncer](https://github.com/chandanhk304/athena/blob/main/athena_core/graph_syncer.py): `athena_core/graph_syncer.py`
- [Vector Indexer](https://github.com/chandanhk304/athena/blob/main/athena_core/vector_indexer.py): `athena_core/vector_indexer.py`
- **Neo4j Knowledge Graph**
- **Pinecone Vector Store**

### Agent Workflow

- [LangGraph Orchestrator](https://github.com/chandanhk304/athena/blob/main/agent_brain/graph.py): `agent_brain/graph.py`
- [Agent Nodes](https://github.com/chandanhk304/athena/blob/main/agent_brain/nodes.py): `agent_brain/nodes.py`
- [Agent State](https://github.com/chandanhk304/athena/blob/main/agent_brain/state.py): `agent_brain/state.py`
- [Agent Tools](https://github.com/chandanhk304/athena/blob/main/agent_brain/tools.py): `agent_brain/tools.py`

### Project Simulator

- [Simulator API](https://github.com/chandanhk304/athena/blob/main/simulator/api.py): `simulator/api.py`
- [Simulator Database](https://github.com/chandanhk304/athena/blob/main/simulator/database.py): `simulator/database.py`
- [Chaos Engine](https://github.com/chandanhk304/athena/blob/main/simulator/chaos_engine.py): `simulator/chaos_engine.py`
- [Project Data Generator](https://github.com/chandanhk304/athena/blob/main/simulator/data_gen.py): `simulator/data_gen.py`
- [Timeline Simulator](https://github.com/chandanhk304/athena/blob/main/simulator/timeline_sim.py): `simulator/timeline_sim.py`
- [Webhook Dispatcher](https://github.com/chandanhk304/athena/blob/main/simulator/webhook.py): `simulator/webhook.py`

### Other components

- **Program Manager**
- **LLM Provider**

## Connections

- Program Manager → Next.js Dashboard: uses (evidence: `README.md`)
- Next.js Dashboard → Athena API: requests data (evidence: `README.md`)
- Simulator API → Webhook Dispatcher: dispatches events (evidence: `simulator/api.py`)
- Chaos Engine → Webhook Dispatcher: notifies changes
- Timeline Simulator → Webhook Dispatcher: replays events (evidence: `simulator/webhook.py`)
- Timeline Simulator → Project Data Generator: uses (evidence: `simulator/timeline_sim.py`)
- Simulator API → Simulator Database: reads and writes (evidence: `simulator/api.py`)
- Simulator API → Chaos Engine: invokes (evidence: `simulator/api.py`)
- Chaos Engine → Project Data Generator: uses (evidence: `simulator/chaos_engine.py`)
- Webhook Dispatcher → Athena API: posts events (evidence: `simulator/webhook.py`)
- Athena API → Event Pipeline: processes events (evidence: `athena_core/api.py`)
- Event Pipeline → Graph Syncer: syncs entities (evidence: `athena_core/ingestion.py`)
- Event Pipeline → Vector Indexer: indexes events (evidence: `athena_core/ingestion.py`)
- Graph Syncer → Neo4j Knowledge Graph: writes graph (evidence: `athena_core/graph_syncer.py`)
- Vector Indexer → Pinecone Vector Store: indexes vectors (evidence: `athena_core/vector_indexer.py`)
- Athena API → LangGraph Orchestrator: invokes (evidence: `athena_core/api.py`)
- LangGraph Orchestrator → Agent Nodes: routes through (evidence: `agent_brain/graph.py`)
- Agent Nodes → Agent State: reads and updates (evidence: `agent_brain/nodes.py`)
- Agent Nodes → Agent Tools: calls tools (evidence: `agent_brain/nodes.py`)
- Agent Tools → Neo4j Knowledge Graph: queries graph (evidence: `agent_brain/tools.py`)
- Agent Tools → Pinecone Vector Store: searches vectors (evidence: `agent_brain/tools.py`)
- Agent Nodes → LLM Provider: requests inference (evidence: `agent_brain/nodes.py`)
- Program Manager → Athena API: approves actions (evidence: `README.md`)
