# yashuu05/axiomflow architecture

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

- Interactive diagram: https://gitdiagram.com/yashuu05/axiomflow
- Repository: https://github.com/yashuu05/axiomflow

## Overview

AxiomFlow is an agentic business-workflow product: a user submits an objective, the backend gathers business context, assesses and plans the request, executes relevant business actions, pauses for clarification or approval when needed, and summarizes the outcome. The README describes multi-source automation and human approval; sampled code confirms the workflow graph, context lookup, API, and supporting services. Several agent and UI details are unsampled, so their connections are omitted or marked unverified rather than inferred.

Main entry points: [`backend/agents/graph.py`](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/graph.py) (Workflow graph), [`backend/workflow_service.py`](https://github.com/yashuu05/axiomflow/blob/main/backend/workflow_service.py) (Workflow service), [`backend/database.py`](https://github.com/yashuu05/axiomflow/blob/main/backend/database.py) (MySQL database), [`backend/agents/supervisior/node.py`](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/supervisior/node.py) (Supervisor planning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_api["FastAPI endpoints<br/>[main.py]"]
end

subgraph group_orchestration["Workflow orchestration"]
  node_workflow_service["Workflow service"]
  node_workflow_graph["Workflow graph<br/>[graph.py]"]
  node_workflow_state["Workflow state<br/>[state.py]"]
  node_context_retrieval["Business context"]
  node_supervisor["Supervisor planning<br/>[node.py]"]
  node_policy["Ethics guardrails<br/>[policies_ethics.py]"]
  node_model_factory["Resilient models<br/>[model_factory.py]"]
  node_approval["Approval handling<br/>[approval.py]"]
  node_execution_nodes["Execution stages<br/>[execute.py]"]
  node_summarization["Workflow summary<br/>[summarize.py]"]
end

subgraph group_actions["Business actions"]
  node_specialists["Task specialists"]
  node_tool_registry["Agent tool registry<br/>[registry.py]"]
  node_google_tools["Google service tools"]
end

subgraph group_services["Platform services"]
  node_google_oauth["Google OAuth<br/>[google_oauth.py]"]
  node_client_factory["Google client factory<br/>[client_factory.py]"]
  node_database[("MySQL database<br/>[database.py]")]
  node_notifications["Notifications and SSE"]
end

node_user(("Business user"))
node_google_services["Google services"]

node_user -.->|"submits request"| node_dashboard
node_dashboard -.->|"sends requests"| node_api
node_api -->|"dispatches workflows"| node_workflow_service
node_workflow_service -->|"invokes graph"| node_workflow_graph
node_workflow_service -->|"reads and writes"| node_database
node_workflow_service -->|"notifies"| node_notifications
node_workflow_graph -->|"uses state"| node_workflow_state
node_workflow_graph -->|"dispatches to"| node_context_retrieval
node_workflow_graph -->|"dispatches to"| node_execution_nodes
node_workflow_graph -->|"dispatches to"| node_approval
node_workflow_graph -->|"dispatches to"| node_summarization
node_context_retrieval -->|"reads profile"| node_database
node_workflow_graph -.->|"plans through"| node_supervisor
node_supervisor -->|"checks policy"| node_policy
node_supervisor -->|"uses models"| node_model_factory
node_execution_nodes -.->|"delegates tasks"| node_specialists
node_specialists -.->|"uses capabilities"| node_tool_registry
node_specialists -.->|"calls tools"| node_google_tools
node_google_tools -->|"builds clients"| node_client_factory
node_client_factory -->|"loads credentials"| node_database
node_google_oauth -->|"stores OAuth data"| node_database
node_client_factory -.->|"authorizes access"| node_google_services
node_approval -->|"coordinates approval"| node_workflow_service

click node_dashboard "https://github.com/yashuu05/axiomflow/blob/main/frontend/src/app/dashboard/page.tsx"
click node_api "https://github.com/yashuu05/axiomflow/blob/main/backend/main.py"
click node_workflow_service "https://github.com/yashuu05/axiomflow/blob/main/backend/workflow_service.py"
click node_workflow_graph "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/graph.py"
click node_workflow_state "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/state.py"
click node_context_retrieval "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/retrieve_context.py"
click node_supervisor "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/supervisior/node.py"
click node_policy "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/policies_ethics.py"
click node_model_factory "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/model_factory.py"
click node_approval "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/approval.py"
click node_execution_nodes "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/execute.py"
click node_summarization "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/summarize.py"
click node_specialists "https://github.com/yashuu05/axiomflow/tree/main/backend/agents/specialists"
click node_tool_registry "https://github.com/yashuu05/axiomflow/blob/main/backend/agents/tools/registry.py"
click node_google_tools "https://github.com/yashuu05/axiomflow/tree/main/backend/tools"
click node_google_oauth "https://github.com/yashuu05/axiomflow/blob/main/backend/google_oauth.py"
click node_client_factory "https://github.com/yashuu05/axiomflow/blob/main/backend/tools/client_factory.py"
click node_database "https://github.com/yashuu05/axiomflow/blob/main/backend/database.py"
click node_notifications "https://github.com/yashuu05/axiomflow/blob/main/backend/notification_service.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,node_user toneBlue
class node_workflow_service,node_workflow_graph,node_workflow_state,node_context_retrieval,node_supervisor,node_policy,node_model_factory,node_approval,node_execution_nodes,node_summarization toneAmber
class node_specialists,node_tool_registry,node_google_tools toneMint
class node_google_oauth,node_client_factory,node_database,node_notifications toneRose
class node_google_services toneIndigo
```

## Components

### User experience

- [Dashboard](https://github.com/yashuu05/axiomflow/blob/main/frontend/src/app/dashboard/page.tsx): `frontend/src/app/dashboard/page.tsx`
- [FastAPI endpoints](https://github.com/yashuu05/axiomflow/blob/main/backend/main.py): `backend/main.py`

### Workflow orchestration

- [Workflow service](https://github.com/yashuu05/axiomflow/blob/main/backend/workflow_service.py): `backend/workflow_service.py`
- [Workflow graph](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/graph.py): `backend/agents/graph.py`
- [Workflow state](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/state.py): `backend/agents/state.py`
- [Business context](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/retrieve_context.py): `backend/agents/nodes/retrieve_context.py`
- [Supervisor planning](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/supervisior/node.py): `backend/agents/supervisior/node.py`
- [Ethics guardrails](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/policies_ethics.py): `backend/agents/policies_ethics.py`
- [Resilient models](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/model_factory.py): `backend/agents/model_factory.py`
- [Approval handling](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/approval.py): `backend/agents/nodes/approval.py`
- [Execution stages](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/execute.py): `backend/agents/nodes/execute.py`
- [Workflow summary](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/nodes/summarize.py): `backend/agents/nodes/summarize.py`

### Business actions

- [Task specialists](https://github.com/yashuu05/axiomflow/tree/main/backend/agents/specialists): `backend/agents/specialists`
- [Agent tool registry](https://github.com/yashuu05/axiomflow/blob/main/backend/agents/tools/registry.py): `backend/agents/tools/registry.py`
- [Google service tools](https://github.com/yashuu05/axiomflow/tree/main/backend/tools): `backend/tools`

### Platform services

- [Google OAuth](https://github.com/yashuu05/axiomflow/blob/main/backend/google_oauth.py): `backend/google_oauth.py`
- [Google client factory](https://github.com/yashuu05/axiomflow/blob/main/backend/tools/client_factory.py): `backend/tools/client_factory.py`
- [MySQL database](https://github.com/yashuu05/axiomflow/blob/main/backend/database.py): `backend/database.py`
- [Notifications and SSE](https://github.com/yashuu05/axiomflow/blob/main/backend/notification_service.py): `backend/notification_service.py`

### Other components

- **Business user**
- **Google services**

## Connections

- Business user → Dashboard: submits request (evidence: `README.md`)
- Dashboard → FastAPI endpoints: sends requests
- FastAPI endpoints → Workflow service: dispatches workflows (evidence: `backend/main.py`)
- Workflow service → Workflow graph: invokes graph (evidence: `backend/workflow_service.py`)
- Workflow service → MySQL database: reads and writes (evidence: `backend/workflow_service.py`)
- Workflow service → Notifications and SSE: notifies (evidence: `backend/workflow_service.py`)
- Workflow graph → Workflow state: uses state (evidence: `backend/agents/graph.py`)
- Workflow graph → Business context: dispatches to (evidence: `backend/agents/graph.py`)
- Workflow graph → Execution stages: dispatches to (evidence: `backend/agents/graph.py`)
- Workflow graph → Approval handling: dispatches to (evidence: `backend/agents/graph.py`)
- Workflow graph → Workflow summary: dispatches to (evidence: `backend/agents/graph.py`)
- Business context → MySQL database: reads profile (evidence: `backend/agents/nodes/retrieve_context.py`)
- Workflow graph → Supervisor planning: plans through
- Supervisor planning → Ethics guardrails: checks policy (evidence: `backend/agents/supervisior/node.py`)
- Supervisor planning → Resilient models: uses models (evidence: `backend/agents/supervisior/node.py`)
- Execution stages → Task specialists: delegates tasks
- Task specialists → Agent tool registry: uses capabilities
- Task specialists → Google service tools: calls tools (evidence: `backend/agents/specialists/sheet_agent.py`)
- Google service tools → Google client factory: builds clients (evidence: `backend/tools/client_factory.py`)
- Google client factory → MySQL database: loads credentials (evidence: `backend/tools/client_factory.py`)
- Google OAuth → MySQL database: stores OAuth data (evidence: `backend/google_oauth.py`)
- Google client factory → Google services: authorizes access
- Approval handling → Workflow service: coordinates approval (evidence: `backend/agents/nodes/approval.py`)
