# bpdeepak/athena architecture

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

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

## Overview

Project Athena combines enterprise-event ingestion and knowledge indexing with a LangGraph PMO assistant, simulator, and dashboard. The documented user workflow is a dashboard query or incoming webhook through backend processing to knowledge-backed analysis and risk/approval actions. The graph preserves the simulator and dashboard capabilities; source excerpts are partial, so unshown wiring is included only where README or SOURCE INDEX references support it.

Main entry points: [`agent_brain/nodes.py`](https://github.com/bpdeepak/athena/blob/main/agent_brain/nodes.py) (Agent Nodes), [`athena_core/api.py`](https://github.com/bpdeepak/athena/blob/main/athena_core/api.py) (FastAPI Core), [`simulator/api.py`](https://github.com/bpdeepak/athena/blob/main/simulator/api.py) (Simulator API), [`athena_core/ingestion.py`](https://github.com/bpdeepak/athena/blob/main/athena_core/ingestion.py) (Event Ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_front["Dashboard"]
  node_dashboard["PMO Dashboard<br/>[page.tsx]"]
  node_chat["Chat Panel<br/>[chat-panel.tsx]"]
  node_views["Portfolio Views<br/>[risk-feed.tsx]"]
  node_frontend_api["API Client<br/>[api.ts]"]
end

subgraph group_core["Core Data Services"]
  node_api["FastAPI Core<br/>[api.py]"]
  node_ingestion["Event Ingestion<br/>[ingestion.py]"]
  node_graph_sync["Graph Syncer<br/>[graph_syncer.py]"]
  node_vectors["Vector Indexer<br/>[vector_indexer.py]"]
  node_cache["Risk Cache<br/>[cache.py]"]
  node_config["Core Configuration<br/>[config.py]"]
end

subgraph group_brain["Agent Brain"]
  node_agents["LangGraph Workflow<br/>[graph.py]"]
  node_router["Query Router<br/>[router.py]"]
  node_agent_nodes["Agent Nodes<br/>[nodes.py]"]
  node_state["Agent State<br/>[state.py]"]
  node_memory["Chat Memory<br/>[memory_manager.py]"]
  node_llm["LLM Balancer<br/>[llm_balancer.py]"]
  node_jira_tools["Jira Tools<br/>[jira_tools.py]"]
  node_pmo_tools["PMO Analytics<br/>[pmo_tools.py]"]
  node_notifications["Notifications<br/>[notifications.py]"]
end

subgraph group_sim["Project Universe"]
  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_webhook["Webhook Dispatcher<br/>[webhook.py]"]
end

node_user(("Program Manager"))
node_neo4j[("Neo4j Graph")]
node_pinecone[("Pinecone Vectors")]
node_llm_service{{"LLM Provider"}}
node_stakeholders(("Stakeholders"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"presents"| node_chat
node_dashboard -->|"presents"| node_views
node_chat -.->|"requests"| node_frontend_api
node_frontend_api -.->|"calls"| node_api
node_api -->|"routes events"| node_ingestion
node_ingestion -->|"syncs entities"| node_graph_sync
node_ingestion -->|"indexes text"| node_vectors
node_ingestion -->|"checks risks"| node_cache
node_graph_sync -->|"writes graph"| node_neo4j
node_vectors -->|"upserts vectors"| node_pinecone
node_api -->|"orchestrates"| node_agents
node_agents -->|"dispatches"| node_router
node_agents -->|"runs nodes"| node_agent_nodes
node_agents -->|"uses state"| node_state
node_agent_nodes -->|"compresses history"| node_memory
node_agent_nodes -->|"invokes models"| node_llm
node_memory -->|"summarizes with"| node_llm
node_agent_nodes -->|"invokes tools"| node_jira_tools
node_agent_nodes -->|"invokes tools"| node_pmo_tools
node_agent_nodes -->|"uses tools"| node_notifications
node_pmo_tools -->|"queries analytics"| node_api
node_llm -.->|"routes inference"| node_llm_service
node_api -.->|"simulator integration"| node_sim_api
node_sim_api -->|"reads and writes"| node_sim_db
node_sim_api -->|"dispatches faults"| node_chaos
node_sim_api -->|"dispatches events"| node_webhook
node_chaos -->|"injects faults"| node_sim_api
node_webhook -->|"pushes events"| node_api
node_agent_nodes -.->|"notifies after approval"| node_stakeholders

click node_dashboard "https://github.com/bpdeepak/athena/blob/main/frontend/app/page.tsx"
click node_chat "https://github.com/bpdeepak/athena/blob/main/frontend/components/dashboard/chat-panel.tsx"
click node_views "https://github.com/bpdeepak/athena/blob/main/frontend/components/dashboard/risk-feed.tsx"
click node_frontend_api "https://github.com/bpdeepak/athena/blob/main/frontend/lib/api.ts"
click node_api "https://github.com/bpdeepak/athena/blob/main/athena_core/api.py"
click node_ingestion "https://github.com/bpdeepak/athena/blob/main/athena_core/ingestion.py"
click node_graph_sync "https://github.com/bpdeepak/athena/blob/main/athena_core/graph_syncer.py"
click node_vectors "https://github.com/bpdeepak/athena/blob/main/athena_core/vector_indexer.py"
click node_cache "https://github.com/bpdeepak/athena/blob/main/athena_core/cache.py"
click node_config "https://github.com/bpdeepak/athena/blob/main/athena_core/config.py"
click node_agents "https://github.com/bpdeepak/athena/blob/main/agent_brain/graph.py"
click node_router "https://github.com/bpdeepak/athena/blob/main/agent_brain/router.py"
click node_agent_nodes "https://github.com/bpdeepak/athena/blob/main/agent_brain/nodes.py"
click node_state "https://github.com/bpdeepak/athena/blob/main/agent_brain/state.py"
click node_memory "https://github.com/bpdeepak/athena/blob/main/agent_brain/memory_manager.py"
click node_llm "https://github.com/bpdeepak/athena/blob/main/agent_brain/llm_balancer.py"
click node_jira_tools "https://github.com/bpdeepak/athena/blob/main/agent_brain/tools/jira_tools.py"
click node_pmo_tools "https://github.com/bpdeepak/athena/blob/main/agent_brain/tools/pmo_tools.py"
click node_notifications "https://github.com/bpdeepak/athena/blob/main/agent_brain/tools/notifications.py"
click node_sim_api "https://github.com/bpdeepak/athena/blob/main/simulator/api.py"
click node_sim_db "https://github.com/bpdeepak/athena/blob/main/simulator/database.py"
click node_chaos "https://github.com/bpdeepak/athena/blob/main/simulator/chaos_engine.py"
click node_webhook "https://github.com/bpdeepak/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_chat,node_views,node_frontend_api toneBlue
class node_api,node_ingestion,node_graph_sync,node_vectors,node_cache,node_config,node_neo4j,node_pinecone toneAmber
class node_agents,node_router,node_agent_nodes,node_state,node_memory,node_llm,node_jira_tools,node_pmo_tools,node_notifications toneMint
class node_sim_api,node_sim_db,node_chaos,node_webhook toneRose
class node_user,node_llm_service,node_stakeholders toneIndigo
```

## Components

### Dashboard

- [PMO Dashboard](https://github.com/bpdeepak/athena/blob/main/frontend/app/page.tsx): `frontend/app/page.tsx`
- [Chat Panel](https://github.com/bpdeepak/athena/blob/main/frontend/components/dashboard/chat-panel.tsx): `frontend/components/dashboard/chat-panel.tsx`
- [Portfolio Views](https://github.com/bpdeepak/athena/blob/main/frontend/components/dashboard/risk-feed.tsx): `frontend/components/dashboard/risk-feed.tsx`
- [API Client](https://github.com/bpdeepak/athena/blob/main/frontend/lib/api.ts): `frontend/lib/api.ts`

### Core Data Services

- [FastAPI Core](https://github.com/bpdeepak/athena/blob/main/athena_core/api.py): `athena_core/api.py`
- [Event Ingestion](https://github.com/bpdeepak/athena/blob/main/athena_core/ingestion.py): `athena_core/ingestion.py`
- [Graph Syncer](https://github.com/bpdeepak/athena/blob/main/athena_core/graph_syncer.py): `athena_core/graph_syncer.py`
- [Vector Indexer](https://github.com/bpdeepak/athena/blob/main/athena_core/vector_indexer.py): `athena_core/vector_indexer.py`
- [Risk Cache](https://github.com/bpdeepak/athena/blob/main/athena_core/cache.py): `athena_core/cache.py`
- [Core Configuration](https://github.com/bpdeepak/athena/blob/main/athena_core/config.py): `athena_core/config.py`

### Agent Brain

- [LangGraph Workflow](https://github.com/bpdeepak/athena/blob/main/agent_brain/graph.py): `agent_brain/graph.py`
- [Query Router](https://github.com/bpdeepak/athena/blob/main/agent_brain/router.py): `agent_brain/router.py`
- [Agent Nodes](https://github.com/bpdeepak/athena/blob/main/agent_brain/nodes.py): `agent_brain/nodes.py`
- [Agent State](https://github.com/bpdeepak/athena/blob/main/agent_brain/state.py): `agent_brain/state.py`
- [Chat Memory](https://github.com/bpdeepak/athena/blob/main/agent_brain/memory_manager.py): `agent_brain/memory_manager.py`
- [LLM Balancer](https://github.com/bpdeepak/athena/blob/main/agent_brain/llm_balancer.py): `agent_brain/llm_balancer.py`
- [Jira Tools](https://github.com/bpdeepak/athena/blob/main/agent_brain/tools/jira_tools.py): `agent_brain/tools/jira_tools.py`
- [PMO Analytics](https://github.com/bpdeepak/athena/blob/main/agent_brain/tools/pmo_tools.py): `agent_brain/tools/pmo_tools.py`
- [Notifications](https://github.com/bpdeepak/athena/blob/main/agent_brain/tools/notifications.py): `agent_brain/tools/notifications.py`

### Project Universe

- [Simulator API](https://github.com/bpdeepak/athena/blob/main/simulator/api.py): `simulator/api.py`
- [Simulator Database](https://github.com/bpdeepak/athena/blob/main/simulator/database.py): `simulator/database.py`
- [Chaos Engine](https://github.com/bpdeepak/athena/blob/main/simulator/chaos_engine.py): `simulator/chaos_engine.py`
- [Webhook Dispatcher](https://github.com/bpdeepak/athena/blob/main/simulator/webhook.py): `simulator/webhook.py`

### Other components

- **Program Manager**
- **Neo4j Graph**
- **Pinecone Vectors**
- **LLM Provider**
- **Stakeholders**

## Connections

- Program Manager → PMO Dashboard: uses
- PMO Dashboard → Chat Panel: presents (evidence: `frontend/app/page.tsx`)
- PMO Dashboard → Portfolio Views: presents (evidence: `frontend/app/page.tsx`)
- Chat Panel → API Client: requests
- API Client → FastAPI Core: calls
- FastAPI Core → Event Ingestion: routes events (evidence: `athena_core/api.py`)
- Event Ingestion → Graph Syncer: syncs entities (evidence: `athena_core/ingestion.py`)
- Event Ingestion → Vector Indexer: indexes text (evidence: `athena_core/ingestion.py`)
- Event Ingestion → Risk Cache: checks risks (evidence: `athena_core/ingestion.py`)
- Graph Syncer → Neo4j Graph: writes graph
- Vector Indexer → Pinecone Vectors: upserts vectors
- FastAPI Core → LangGraph Workflow: orchestrates (evidence: `athena_core/api.py`)
- LangGraph Workflow → Query Router: dispatches (evidence: `agent_brain/graph.py`)
- LangGraph Workflow → Agent Nodes: runs nodes (evidence: `agent_brain/graph.py`)
- LangGraph Workflow → Agent State: uses state (evidence: `agent_brain/graph.py`)
- Agent Nodes → Chat Memory: compresses history (evidence: `agent_brain/nodes.py`)
- Agent Nodes → LLM Balancer: invokes models (evidence: `agent_brain/nodes.py`)
- Chat Memory → LLM Balancer: summarizes with (evidence: `agent_brain/memory_manager.py`)
- Agent Nodes → Jira Tools: invokes tools (evidence: `agent_brain/nodes.py`)
- Agent Nodes → PMO Analytics: invokes tools (evidence: `agent_brain/nodes.py`)
- Agent Nodes → Notifications: uses tools (evidence: `agent_brain/nodes.py`)
- PMO Analytics → FastAPI Core: queries analytics (evidence: `agent_brain/tools/pmo_tools.py`)
- LLM Balancer → LLM Provider: routes inference
- FastAPI Core → Simulator API: simulator integration
- Simulator API → Simulator Database: reads and writes (evidence: `simulator/api.py`)
- Simulator API → Chaos Engine: dispatches faults (evidence: `simulator/api.py`)
- Simulator API → Webhook Dispatcher: dispatches events (evidence: `simulator/api.py`)
- Chaos Engine → Simulator API: injects faults (evidence: `simulator/chaos_engine.py`)
- Webhook Dispatcher → FastAPI Core: pushes events
- Agent Nodes → Stakeholders: notifies after approval
